tag rendered by the plugin.
+ * tdClass - class name to apply to the tag rendered by the plugin.
+ * loadingImage - path to an image to display while CSV/TSV data is loading
+ * loadingText - text to display while CSV/TSV is loading
+ * - if not specified, default value is "Loading CSV data..."
+ *
+ *
+ * Upon completion, the plugin triggers a "loadComplete" event so that you
+ * may perform other manipulation on the table after it has loaded. A
+ * common use of this would be to use the jQuery tablesorter plugin, found
+ * at http://tablesorter.com/
+ *
+ * An example of such a call would be as follows, assuming you have loaded
+ * the tablesorter plugin.
+ *
+ * $('#CSVTable').CSVToTable('test.csv',
+ * {
+ * loadingImage: 'images/loading.gif',
+ * startLine: 1,
+ * headers: ['Album Title', 'Artist Name', 'Price ($USD)']
+ * }
+ * ).bind("loadComplete",function() {
+ * $('#CSVTable').find('TABLE').tablesorter();
+ * });;
+
+ *
+ */
+
+
+ (function($){
+
+ /**
+ *
+ * CSV Parser credit goes to Brian Huisman, from his blog entry entitled "CSV String to Array in JavaScript":
+ * http://www.greywyvern.com/?post=258
+ *
+ */
+ String.prototype.splitCSV = function(sep) {
+ for (var thisCSV = this.split(sep = sep || ","), x = thisCSV.length - 1, tl; x >= 0; x--) {
+ if (thisCSV[x].replace(/"\s+$/, '"').charAt(thisCSV[x].length - 1) == '"') {
+ if ((tl = thisCSV[x].replace(/^\s+"/, '"')).length > 1 && tl.charAt(0) == '"') {
+ thisCSV[x] = thisCSV[x].replace(/^\s*"|"\s*$/g, '').replace(/""/g, '"');
+ } else if (x) {
+ thisCSV.splice(x - 1, 2, [thisCSV[x - 1], thisCSV[x]].join(sep));
+ } else thisCSV = thisCSV.shift().split(sep).concat(thisCSV);
+ } else thisCSV[x].replace(/""/g, '"');
+ } return thisCSV;
+ };
+
+ $.fn.CSVToTable = function(csvFile, options) {
+ var defaults = {
+ tableClass: "CSVTable",
+ theadClass: "",
+ thClass: "",
+ tbodyClass: "",
+ trClass: "",
+ tdClass: "",
+ loadingImage: "",
+ loadingText: "Loading CSV data...",
+ separator: ",",
+ startLine: 0
+ };
+ var options = $.extend(defaults, options);
+ return this.each(function() {
+ var obj = $(this);
+ var error = '';
+ (options.loadingImage) ? loading = '' + options.loadingText + '
' : loading = options.loadingText;
+ obj.html(loading);
+ $.get(csvFile, function(data) {
+ var tableHTML = '';
+ var lines = data.replace('\r','').split('\n');
+ var printedLines = 0;
+ var headerCount = 0;
+ var headers = new Array();
+ $.each(lines, function(lineCount, line) {
+ if ((lineCount == 0) && (typeof(options.headers) != 'undefined')) {
+ headers = options.headers;
+ headerCount = headers.length;
+ tableHTML += '';
+ $.each(headers, function(headerCount, header) {
+ tableHTML += '' + header + ' ';
+ });
+ tableHTML += ' ';
+ }
+ if ((lineCount == options.startLine) && (typeof(options.headers) == 'undefined')) {
+ headers = line.splitCSV(options.separator);
+ headerCount = headers.length;
+ tableHTML += '';
+ $.each(headers, function(headerCount, header) {
+ tableHTML += '' + header + ' ';
+ });
+ tableHTML += ' ';
+ } else if (lineCount >= options.startLine) {
+ var items = line.splitCSV(options.separator);
+ if (items.length > 1) {
+ printedLines++;
+ if (items.length != headerCount) {
+ error += 'error on line ' + lineCount + ': Item count (' + items.length + ') does not match header count (' + headerCount + ') \n';
+ }
+ (printedLines % 2) ? oddOrEven = 'odd' : oddOrEven = 'even';
+ tableHTML += '';
+ $.each(items, function(itemCount, item) {
+ tableHTML += '' + item + ' ';
+ });
+ tableHTML += ' ';
+ }
+ }
+ });
+ tableHTML += '
';
+ if (error) {
+ obj.html(error);
+ } else {
+ obj.fadeOut(500, function() {
+ obj.html(tableHTML)
+ }).fadeIn(function() {
+ // trigger loadComplete
+ setTimeout(function() {
+ obj.trigger("loadComplete");
+ },0);
+ });
+ }
+ });
+ });
+ };
+
+})(jQuery);
diff --git a/common/static/js/vendor/jquery.ui.datepicker-ru.js b/common/static/js/vendor/jquery.ui.datepicker-ru.js
new file mode 100644
index 000000000000..ee16e559164a
--- /dev/null
+++ b/common/static/js/vendor/jquery.ui.datepicker-ru.js
@@ -0,0 +1,22 @@
+/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Andrew Stromnov (stromnov@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ru'] = {
+ closeText: 'Закрыть',
+ prevText: '<Пред',
+ nextText: 'След>',
+ currentText: 'Сегодня',
+ monthNames: ["Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", "Августа", "Сентября", "Октября", "Ноября", "Декабря"],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+ weekHeader: 'Не',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ru']);
+});
\ No newline at end of file
diff --git a/common/static/js/vendor/jqwidgets/globalization/ReadMe.txt b/common/static/js/vendor/jqwidgets/globalization/ReadMe.txt
new file mode 100644
index 000000000000..c5beef59cc79
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/ReadMe.txt
@@ -0,0 +1,2 @@
+Download more cultures from: http://jqwidgets.com/builds/cultures.zip
+License: https://github.com/jquery/globalize/blob/master/LICENSE
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.cs-CZ.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.cs-CZ.js
new file mode 100644
index 000000000000..6e6b2b15c804
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.cs-CZ.js
@@ -0,0 +1,85 @@
+/*
+ * Globalize Culture cs-CZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "cs-CZ", "default", {
+ name: "cs-CZ",
+ englishName: "Czech (Czech Republic)",
+ nativeName: "čeština (Česká republika)",
+ language: "cs",
+ numberFormat: {
+ ",": " ",
+ ".": ",",
+ "NaN": "Není číslo",
+ negativeInfinity: "-nekonečno",
+ positiveInfinity: "+nekonečno",
+ percent: {
+ pattern: ["-n%","n%"],
+ ",": " ",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-n $","n $"],
+ ",": " ",
+ ".": ",",
+ symbol: "Kč"
+ }
+ },
+ calendars: {
+ standard: {
+ "/": ".",
+ firstDay: 1,
+ days: {
+ names: ["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],
+ namesAbbr: ["ne","po","út","st","čt","pá","so"],
+ namesShort: ["ne","po","út","st","čt","pá","so"]
+ },
+ months: {
+ names: ["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],
+ namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+ },
+ monthsGenitive: {
+ names: ["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince",""],
+ namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+ },
+ AM: ["dop.","dop.","DOP."],
+ PM: ["odp.","odp.","ODP."],
+ eras: [{"name":"n. l.","start":null,"offset":0}],
+ patterns: {
+ d: "d.M.yyyy",
+ D: "d. MMMM yyyy",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "d. MMMM yyyy H:mm",
+ F: "d. MMMM yyyy H:mm:ss",
+ M: "dd MMMM",
+ Y: "MMMM yyyy"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.de-DE.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.de-DE.js
new file mode 100644
index 000000000000..a104e764e06a
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.de-DE.js
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture de-DE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "de-DE", "default", {
+ name: "de-DE",
+ englishName: "German (Germany)",
+ nativeName: "Deutsch (Deutschland)",
+ language: "de",
+ numberFormat: {
+ ",": ".",
+ ".": ",",
+ "NaN": "n. def.",
+ negativeInfinity: "-unendlich",
+ positiveInfinity: "+unendlich",
+ percent: {
+ pattern: ["-n%","n%"],
+ ",": ".",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-n $","n $"],
+ ",": ".",
+ ".": ",",
+ symbol: "€"
+ }
+ },
+ calendars: {
+ standard: {
+ "/": ".",
+ firstDay: 1,
+ days: {
+ names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+ namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+ namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+ },
+ months: {
+ names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+ namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+ },
+ AM: null,
+ PM: null,
+ eras: [{"name":"n. Chr.","start":null,"offset":0}],
+ patterns: {
+ d: "dd.MM.yyyy",
+ D: "dddd, d. MMMM yyyy",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "dddd, d. MMMM yyyy HH:mm",
+ F: "dddd, d. MMMM yyyy HH:mm:ss",
+ M: "dd MMMM",
+ Y: "MMMM yyyy"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.en-CA.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.en-CA.js
new file mode 100644
index 000000000000..1c8c1b577cda
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.en-CA.js
@@ -0,0 +1,49 @@
+/*
+ * Globalize Culture en-CA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-CA", "default", {
+ name: "en-CA",
+ englishName: "English (Canada)",
+ nativeName: "English (Canada)",
+ numberFormat: {
+ currency: {
+ pattern: ["-$n","$n"]
+ }
+ },
+ calendars: {
+ standard: {
+ patterns: {
+ d: "dd/MM/yyyy",
+ D: "MMMM-dd-yy",
+ f: "MMMM-dd-yy h:mm tt",
+ F: "MMMM-dd-yy h:mm:ss tt"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.en-US.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.en-US.js
new file mode 100644
index 000000000000..03b3ec372b12
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.en-US.js
@@ -0,0 +1,33 @@
+/*
+ * Globalize Culture en-US
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-US", "default", {
+ name: "en-US",
+ englishName: "English (United States)"
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.fr-FR.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.fr-FR.js
new file mode 100644
index 000000000000..89c9bd4e0b6a
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.fr-FR.js
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture fr-FR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fr-FR", "default", {
+ name: "fr-FR",
+ englishName: "French (France)",
+ nativeName: "français (France)",
+ language: "fr",
+ numberFormat: {
+ ",": " ",
+ ".": ",",
+ "NaN": "Non Numérique",
+ negativeInfinity: "-Infini",
+ positiveInfinity: "+Infini",
+ percent: {
+ ",": " ",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-n $","n $"],
+ ",": " ",
+ ".": ",",
+ symbol: "€"
+ }
+ },
+ calendars: {
+ standard: {
+ firstDay: 1,
+ days: {
+ names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+ namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+ namesShort: ["di","lu","ma","me","je","ve","sa"]
+ },
+ months: {
+ names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+ namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+ },
+ AM: null,
+ PM: null,
+ eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+ patterns: {
+ d: "dd/MM/yyyy",
+ D: "dddd d MMMM yyyy",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "dddd d MMMM yyyy HH:mm",
+ F: "dddd d MMMM yyyy HH:mm:ss",
+ M: "d MMMM",
+ Y: "MMMM yyyy"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.he-IL.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.he-IL.js
new file mode 100644
index 000000000000..8cace109ed30
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.he-IL.js
@@ -0,0 +1,97 @@
+/*
+ * Globalize Culture he-IL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "he-IL", "default", {
+ name: "he-IL",
+ englishName: "Hebrew (Israel)",
+ nativeName: "עברית (ישראל)",
+ language: "he",
+ isRTL: true,
+ numberFormat: {
+ "NaN": "לא מספר",
+ negativeInfinity: "אינסוף שלילי",
+ positiveInfinity: "אינסוף חיובי",
+ percent: {
+ pattern: ["-n%","n%"]
+ },
+ currency: {
+ pattern: ["$-n","$ n"],
+ symbol: "₪"
+ }
+ },
+ calendars: {
+ standard: {
+ days: {
+ names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+ namesAbbr: ["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"],
+ namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+ },
+ months: {
+ names: ["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר",""],
+ namesAbbr: ["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ",""]
+ },
+ eras: [{"name":"לספירה","start":null,"offset":0}],
+ patterns: {
+ d: "dd/MM/yyyy",
+ D: "dddd dd MMMM yyyy",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "dddd dd MMMM yyyy HH:mm",
+ F: "dddd dd MMMM yyyy HH:mm:ss",
+ M: "dd MMMM",
+ Y: "MMMM yyyy"
+ }
+ },
+ Hebrew: {
+ name: "Hebrew",
+ "/": " ",
+ days: {
+ names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+ namesAbbr: ["א","ב","ג","ד","ה","ו","ש"],
+ namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+ },
+ months: {
+ names: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"],
+ namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"]
+ },
+ eras: [{"name":"C.E.","start":null,"offset":0}],
+ twoDigitYearMax: 5790,
+ patterns: {
+ d: "dd MMMM yyyy",
+ D: "dddd dd MMMM yyyy",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "dddd dd MMMM yyyy HH:mm",
+ F: "dddd dd MMMM yyyy HH:mm:ss",
+ M: "dd MMMM",
+ Y: "MMMM yyyy"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.hr-HR.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.hr-HR.js
new file mode 100644
index 000000000000..71a796e1b352
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.hr-HR.js
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture hr-HR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hr-HR", "default", {
+ name: "hr-HR",
+ englishName: "Croatian (Croatia)",
+ nativeName: "hrvatski (Hrvatska)",
+ language: "hr",
+ numberFormat: {
+ pattern: ["- n"],
+ ",": ".",
+ ".": ",",
+ percent: {
+ pattern: ["-n%","n%"],
+ ",": ".",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-n $","n $"],
+ ",": ".",
+ ".": ",",
+ symbol: "kn"
+ }
+ },
+ calendars: {
+ standard: {
+ "/": ".",
+ firstDay: 1,
+ days: {
+ names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+ namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+ namesShort: ["ne","po","ut","sr","če","pe","su"]
+ },
+ months: {
+ names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""],
+ namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+ },
+ monthsGenitive: {
+ names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""],
+ namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+ },
+ AM: null,
+ PM: null,
+ patterns: {
+ d: "d.M.yyyy.",
+ D: "d. MMMM yyyy.",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "d. MMMM yyyy. H:mm",
+ F: "d. MMMM yyyy. H:mm:ss",
+ M: "d. MMMM"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.hu-HU.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.hu-HU.js
new file mode 100644
index 000000000000..015632881cdb
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.hu-HU.js
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture hu-HU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hu-HU", "default", {
+ name: "hu-HU",
+ englishName: "Hungarian (Hungary)",
+ nativeName: "magyar (Magyarország)",
+ language: "hu",
+ numberFormat: {
+ ",": " ",
+ ".": ",",
+ "NaN": "nem szám",
+ negativeInfinity: "negatív végtelen",
+ positiveInfinity: "végtelen",
+ percent: {
+ ",": " ",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-n $","n $"],
+ ",": " ",
+ ".": ",",
+ symbol: "Ft"
+ }
+ },
+ calendars: {
+ standard: {
+ "/": ".",
+ firstDay: 1,
+ days: {
+ names: ["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],
+ namesAbbr: ["V","H","K","Sze","Cs","P","Szo"],
+ namesShort: ["V","H","K","Sze","Cs","P","Szo"]
+ },
+ months: {
+ names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""],
+ namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""]
+ },
+ AM: ["de.","de.","DE."],
+ PM: ["du.","du.","DU."],
+ eras: [{"name":"i.sz.","start":null,"offset":0}],
+ patterns: {
+ d: "yyyy.MM.dd.",
+ D: "yyyy. MMMM d.",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "yyyy. MMMM d. H:mm",
+ F: "yyyy. MMMM d. H:mm:ss",
+ M: "MMMM d.",
+ Y: "yyyy. MMMM"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.it-IT.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.it-IT.js
new file mode 100644
index 000000000000..da248485df52
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.it-IT.js
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture it-IT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "it-IT", "default", {
+ name: "it-IT",
+ englishName: "Italian (Italy)",
+ nativeName: "italiano (Italia)",
+ language: "it",
+ numberFormat: {
+ ",": ".",
+ ".": ",",
+ "NaN": "Non un numero reale",
+ negativeInfinity: "-Infinito",
+ positiveInfinity: "+Infinito",
+ percent: {
+ pattern: ["-n%","n%"],
+ ",": ".",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-$ n","$ n"],
+ ",": ".",
+ ".": ",",
+ symbol: "€"
+ }
+ },
+ calendars: {
+ standard: {
+ firstDay: 1,
+ days: {
+ names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],
+ namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"],
+ namesShort: ["do","lu","ma","me","gi","ve","sa"]
+ },
+ months: {
+ names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],
+ namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""]
+ },
+ AM: null,
+ PM: null,
+ eras: [{"name":"d.C.","start":null,"offset":0}],
+ patterns: {
+ d: "dd/MM/yyyy",
+ D: "dddd d MMMM yyyy",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "dddd d MMMM yyyy HH:mm",
+ F: "dddd d MMMM yyyy HH:mm:ss",
+ M: "dd MMMM",
+ Y: "MMMM yyyy"
+ }
+ }
+ }
+});
+
+}( this ));
\ No newline at end of file
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.ja-JP.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.ja-JP.js
new file mode 100644
index 000000000000..e4c1ff69e3bb
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.ja-JP.js
@@ -0,0 +1,100 @@
+/*
+ * Globalize Culture ja-JP
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ja-JP", "default", {
+ name: "ja-JP",
+ englishName: "Japanese (Japan)",
+ nativeName: "日本語 (日本)",
+ language: "ja",
+ numberFormat: {
+ "NaN": "NaN (非数値)",
+ negativeInfinity: "-∞",
+ positiveInfinity: "+∞",
+ percent: {
+ pattern: ["-n%","n%"]
+ },
+ currency: {
+ pattern: ["-$n","$n"],
+ decimals: 0,
+ symbol: "¥"
+ }
+ },
+ calendars: {
+ standard: {
+ days: {
+ names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+ namesAbbr: ["日","月","火","水","木","金","土"],
+ namesShort: ["日","月","火","水","木","金","土"]
+ },
+ months: {
+ names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+ namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+ },
+ AM: ["午前","午前","午前"],
+ PM: ["午後","午後","午後"],
+ eras: [{"name":"西暦","start":null,"offset":0}],
+ patterns: {
+ d: "yyyy/MM/dd",
+ D: "yyyy'年'M'月'd'日'",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "yyyy'年'M'月'd'日' H:mm",
+ F: "yyyy'年'M'月'd'日' H:mm:ss",
+ M: "M'月'd'日'",
+ Y: "yyyy'年'M'月'"
+ }
+ },
+ Japanese: {
+ name: "Japanese",
+ days: {
+ names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+ namesAbbr: ["日","月","火","水","木","金","土"],
+ namesShort: ["日","月","火","水","木","金","土"]
+ },
+ months: {
+ names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+ namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+ },
+ AM: ["午前","午前","午前"],
+ PM: ["午後","午後","午後"],
+ eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
+ twoDigitYearMax: 99,
+ patterns: {
+ d: "gg y/M/d",
+ D: "gg y'年'M'月'd'日'",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "gg y'年'M'月'd'日' H:mm",
+ F: "gg y'年'M'月'd'日' H:mm:ss",
+ M: "M'月'd'日'",
+ Y: "gg y'年'M'月'"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.lt.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.lt.js
new file mode 100644
index 000000000000..56aeb3b34d59
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.lt.js
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture lt
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lt", "default", {
+ name: "lt",
+ englishName: "Lithuanian",
+ nativeName: "lietuvių",
+ language: "lt",
+ numberFormat: {
+ ",": ".",
+ ".": ",",
+ negativeInfinity: "-begalybė",
+ positiveInfinity: "begalybė",
+ percent: {
+ pattern: ["-n%","n%"],
+ ",": ".",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-n $","n $"],
+ ",": ".",
+ ".": ",",
+ symbol: "Lt"
+ }
+ },
+ calendars: {
+ standard: {
+ "/": ".",
+ firstDay: 1,
+ days: {
+ names: ["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],
+ namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Št"],
+ namesShort: ["S","P","A","T","K","Pn","Š"]
+ },
+ months: {
+ names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis",""],
+ namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+ },
+ monthsGenitive: {
+ names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio",""],
+ namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+ },
+ AM: null,
+ PM: null,
+ patterns: {
+ d: "yyyy.MM.dd",
+ D: "yyyy 'm.' MMMM d 'd.'",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "yyyy 'm.' MMMM d 'd.' HH:mm",
+ F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss",
+ M: "MMMM d 'd.'",
+ Y: "yyyy 'm.' MMMM"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.ru-RU.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.ru-RU.js
new file mode 100644
index 000000000000..5946b15cee6e
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.ru-RU.js
@@ -0,0 +1,82 @@
+/*
+ * Globalize Culture ru-RU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ru-RU", "default", {
+ name: "ru-RU",
+ englishName: "Russian (Russia)",
+ nativeName: "русский (Россия)",
+ language: "ru",
+ numberFormat: {
+ ",": " ",
+ ".": ",",
+ negativeInfinity: "-бесконечность",
+ positiveInfinity: "бесконечность",
+ percent: {
+ pattern: ["-n%","n%"],
+ ",": " ",
+ ".": ","
+ },
+ currency: {
+ pattern: ["-n$","n$"],
+ ",": " ",
+ ".": ",",
+ symbol: "р."
+ }
+ },
+ calendars: {
+ standard: {
+ "/": ".",
+ firstDay: 1,
+ days: {
+ names: ["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],
+ namesAbbr: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],
+ namesShort: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]
+ },
+ months: {
+ names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+ namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+ },
+ monthsGenitive: {
+ names: ["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря",""],
+ namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+ },
+ AM: null,
+ PM: null,
+ patterns: {
+ d: "dd.MM.yyyy",
+ D: "d MMMM yyyy 'г.'",
+ t: "H:mm",
+ T: "H:mm:ss",
+ f: "d MMMM yyyy 'г.' H:mm",
+ F: "d MMMM yyyy 'г.' H:mm:ss",
+ Y: "MMMM yyyy"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.culture.sa-IN.js b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.sa-IN.js
new file mode 100644
index 000000000000..b94958d16b2d
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.culture.sa-IN.js
@@ -0,0 +1,71 @@
+/*
+ * Globalize Culture sa-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined" &&
+ typeof exports !== "undefined" &&
+ typeof module !== "undefined" ) {
+ // Assume CommonJS
+ Globalize = require( "globalize" );
+} else {
+ // Global variable
+ Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sa-IN", "default", {
+ name: "sa-IN",
+ englishName: "Sanskrit (India)",
+ nativeName: "संस्कृत (भारतम्)",
+ language: "sa",
+ numberFormat: {
+ groupSizes: [3,2],
+ percent: {
+ groupSizes: [3,2]
+ },
+ currency: {
+ pattern: ["$ -n","$ n"],
+ groupSizes: [3,2],
+ symbol: "रु"
+ }
+ },
+ calendars: {
+ standard: {
+ "/": "-",
+ days: {
+ names: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+ namesAbbr: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+ namesShort: ["र","स","म","ब","ग","श","श"]
+ },
+ months: {
+ names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+ namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+ },
+ AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+ PM: ["अपराह्न","अपराह्न","अपराह्न"],
+ patterns: {
+ d: "dd-MM-yyyy",
+ D: "dd MMMM yyyy dddd",
+ t: "HH:mm",
+ T: "HH:mm:ss",
+ f: "dd MMMM yyyy dddd HH:mm",
+ F: "dd MMMM yyyy dddd HH:mm:ss",
+ M: "dd MMMM"
+ }
+ }
+ }
+});
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/globalization/globalize.js b/common/static/js/vendor/jqwidgets/globalization/globalize.js
new file mode 100644
index 000000000000..79919221029e
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/globalization/globalize.js
@@ -0,0 +1,1586 @@
+/*!
+ * Globalize
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+
+(function( window, undefined ) {
+
+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 -
+ 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 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" ];
+};
+
+}( this ));
diff --git a/common/static/js/vendor/jqwidgets/jqx-all.js b/common/static/js/vendor/jqwidgets/jqx-all.js
new file mode 100644
index 000000000000..9e9dd4ae46ca
--- /dev/null
+++ b/common/static/js/vendor/jqwidgets/jqx-all.js
@@ -0,0 +1,7 @@
+/*
+jQWidgets v3.2.2 (2014-Mar-21)
+Copyright (c) 2011-2014 jQWidgets.
+License: http://jqwidgets.com/license/
+*/
+
+(function(a){a.jqx=a.jqx||{};a.jqx.define=function(b,c,d){b[c]=function(){if(this.baseType){this.base=new b[this.baseType]();this.base.defineInstance()}this.defineInstance()};b[c].prototype.defineInstance=function(){};b[c].prototype.base=null;b[c].prototype.baseType=undefined;if(d&&b[d]){b[c].prototype.baseType=d}};a.jqx.invoke=function(e,d){if(d.length==0){return}var f=typeof(d)==Array||d.length>0?d[0]:d;var c=typeof(d)==Array||d.length>1?Array.prototype.slice.call(d,1):a({}).toArray();while(e[f]==undefined&&e.base!=null){if(e[f]!=undefined&&a.isFunction(e[f])){return e[f].apply(e,c)}if(typeof f=="string"){var b=f.toLowerCase();if(e[b]!=undefined&&a.isFunction(e[b])){return e[b].apply(e,c)}}e=e.base}if(e[f]!=undefined&&a.isFunction(e[f])){return e[f].apply(e,c)}if(typeof f=="string"){var b=f.toLowerCase();if(e[b]!=undefined&&a.isFunction(e[b])){return e[b].apply(e,c)}}return};a.jqx.hasProperty=function(c,b){if(typeof(b)=="object"){for(var e in b){var d=c;while(d){if(d.hasOwnProperty(e)){return true}if(d.hasOwnProperty(e.toLowerCase())){return true}d=d.base}return false}}else{while(c){if(c.hasOwnProperty(b)){return true}if(c.hasOwnProperty(b.toLowerCase())){return true}c=c.base}}return false};a.jqx.hasFunction=function(e,d){if(d.length==0){return false}if(e==undefined){return false}var f=typeof(d)==Array||d.length>0?d[0]:d;var c=typeof(d)==Array||d.length>1?Array.prototype.slice.call(d,1):{};while(e[f]==undefined&&e.base!=null){if(e[f]&&a.isFunction(e[f])){return true}if(typeof f=="string"){var b=f.toLowerCase();if(e[b]&&a.isFunction(e[b])){return true}}e=e.base}if(e[f]&&a.isFunction(e[f])){return true}if(typeof f=="string"){var b=f.toLowerCase();if(e[b]&&a.isFunction(e[b])){return true}}return false};a.jqx.isPropertySetter=function(c,b){if(b.length==1&&typeof(b[0])=="object"){return true}if(b.length==2&&typeof(b[0])=="string"&&!a.jqx.hasFunction(c,b)){return true}return false};a.jqx.validatePropertySetter=function(f,d,b){if(!a.jqx.propertySetterValidation){return true}if(d.length==1&&typeof(d[0])=="object"){for(var e in d[0]){var g=f;while(!g.hasOwnProperty(e)&&g.base){g=g.base}if(!g||!g.hasOwnProperty(e)){if(!b){var c=g.hasOwnProperty(e.toString().toLowerCase());if(!c){throw"Invalid property: "+e}else{return true}}return false}}return true}if(d.length!=2){if(!b){throw"Invalid property: "+d.length>=0?d[0]:""}return false}while(!f.hasOwnProperty(d[0])&&f.base){f=f.base}if(!f||!f.hasOwnProperty(d[0])){if(!b){throw"Invalid property: "+d[0]}return false}return true};a.jqx.set=function(c,b){if(b.length==1&&typeof(b[0])=="object"){a.each(b[0],function(d,e){var f=c;while(!f.hasOwnProperty(d)&&f.base!=null){f=f.base}if(f.hasOwnProperty(d)){a.jqx.setvalueraiseevent(f,d,e)}else{if(f.hasOwnProperty(d.toLowerCase())){a.jqx.setvalueraiseevent(f,d.toLowerCase(),e)}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+d+"'"}}}})}else{if(b.length==2){while(!c.hasOwnProperty(b[0])&&c.base){c=c.base}if(c.hasOwnProperty(b[0])){a.jqx.setvalueraiseevent(c,b[0],b[1])}else{if(c.hasOwnProperty(b[0].toLowerCase())){a.jqx.setvalueraiseevent(c,b[0].toLowerCase(),b[1])}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+b[0]+"'"}}}}}};a.jqx.setvalueraiseevent=function(c,d,e){var b=c[d];c[d]=e;if(!c.isInitialized){return}if(c.propertyChangedHandler!=undefined){c.propertyChangedHandler(c,d,b,e)}if(c.propertyChangeMap!=undefined&&c.propertyChangeMap[d]!=undefined){c.propertyChangeMap[d](c,d,b,e)}};a.jqx.get=function(e,d){if(d==undefined||d==null){return undefined}if(e.propertyMap){var c=e.propertyMap(d);if(c!=null){return c}}if(e.hasOwnProperty(d)){return e[d]}if(e.hasOwnProperty(d.toLowerCase())){return e[d.toLowerCase()]}var b=undefined;if(typeof(d)==Array){if(d.length!=1){return undefined}b=d[0]}else{if(typeof(d)=="string"){b=d}}while(!e.hasOwnProperty(b)&&e.base){e=e.base}if(e){return e[b]}return undefined};a.jqx.serialize=function(e){var b="";if(a.isArray(e)){b="[";for(var d=0;d0){b+=", "}b+=a.jqx.serialize(e[d])}b+="]"}else{if(typeof(e)=="object"){b="{";var c=0;for(var d in e){if(c++>0){b+=", "}b+=d+": "+a.jqx.serialize(e[d])}b+="}"}else{b=e.toString()}}return b};a.jqx.propertySetterValidation=true;a.jqx.jqxWidgetProxy=function(g,c,b){var d=a(c);var f=a.data(c,g);if(f==undefined){return undefined}var e=f.instance;if(a.jqx.hasFunction(e,b)){return a.jqx.invoke(e,b)}if(a.jqx.isPropertySetter(e,b)){if(a.jqx.validatePropertySetter(e,b)){a.jqx.set(e,b);return undefined}}else{if(typeof(b)=="object"&&b.length==0){return}else{if(typeof(b)=="object"&&b.length==1&&a.jqx.hasProperty(e,b[0])){return a.jqx.get(e,b[0])}else{if(typeof(b)=="string"&&a.jqx.hasProperty(e,b[0])){return a.jqx.get(e,b)}}}}throw"jqxCore: Invalid parameter '"+a.jqx.serialize(b)+"' does not exist.";return undefined};a.jqx.applyWidget=function(c,d,k,l){var g=false;try{g=window.MSApp!=undefined}catch(f){}var m=a(c);if(!l){l=new a.jqx["_"+d]()}else{l.host=m;l.element=c}if(c.id==""){c.id=a.jqx.utilities.createId()}var j={host:m,element:c,instance:l};l.widgetName=d;a.data(c,d,j);a.data(c,"jqxWidget",j.instance);var h=new Array();var l=j.instance;while(l){l.isInitialized=false;h.push(l);l=l.base}h.reverse();h[0].theme=a.jqx.theme||"";a.jqx.jqxWidgetProxy(d,c,k);for(var b in h){l=h[b];if(b==0){l.host=m;l.element=c;l.WinJS=g}if(l!=undefined){if(l.createInstance!=null){if(g){MSApp.execUnsafeLocalFunction(function(){l.createInstance(k)})}else{l.createInstance(k)}}}}for(var b in h){if(h[b]!=undefined){h[b].isInitialized=true}}if(g){MSApp.execUnsafeLocalFunction(function(){j.instance.refresh(true)})}else{j.instance.refresh(true)}};a.jqx.jqxWidget=function(b,d,j){var c=false;try{jqxArgs=Array.prototype.slice.call(j,0)}catch(h){jqxArgs=""}try{c=window.MSApp!=undefined}catch(h){}var g=b;var f="";if(d){f="_"+d}a.jqx.define(a.jqx,"_"+g,f);a.fn[g]=function(){var e=Array.prototype.slice.call(arguments,0);if(e.length==0||(e.length==1&&typeof(e[0])=="object")){if(this.length==0){if(this.selector){throw new Error("Invalid jQuery Selector - "+this.selector+"! Please, check whether the used ID or CSS Class name is correct.")}else{throw new Error("Invalid jQuery Selector! Please, check whether the used ID or CSS Class name is correct.")}}return this.each(function(){var n=a(this);var m=this;var o=a.data(m,g);if(o==null){a.jqx.applyWidget(m,g,e,undefined)}else{a.jqx.jqxWidgetProxy(g,this,e)}})}else{if(this.length==0){if(this.selector){throw new Error("Invalid jQuery Selector - "+this.selector+"! Please, check whether the used ID or CSS Class name is correct.")}else{throw new Error("Invalid jQuery Selector! Please, check whether the used ID or CSS Class name is correct.")}}var l=null;var k=0;this.each(function(){var m=a.jqx.jqxWidgetProxy(g,this,e);if(k==0){l=m;k++}else{if(k==1){var n=[];n.push(l);l=n}l.push(m)}})}return l};try{a.extend(a.jqx["_"+g].prototype,Array.prototype.slice.call(j,0)[0])}catch(h){}a.extend(a.jqx["_"+g].prototype,{toThemeProperty:function(e,k){if(this.theme==""){return e}if(k!=null&&k){return e+"-"+this.theme}return e+" "+e+"-"+this.theme}});a.jqx["_"+g].prototype.refresh=function(){if(this.base){this.base.refresh(true)}};a.jqx["_"+g].prototype.createInstance=function(){};a.jqx["_"+g].prototype.applyTo=function(l,k){if(!(k instanceof Array)){var e=[];e.push(k);k=e}a.jqx.applyWidget(l,g,k,this)};a.jqx["_"+g].prototype.getInstance=function(){return this};a.jqx["_"+g].prototype.propertyChangeMap={};a.jqx["_"+g].prototype.addHandler=function(m,k,e,l){switch(k){case"mousewheel":if(window.addEventListener){if(a.jqx.browser.mozilla){m[0].addEventListener("DOMMouseScroll",e,false)}else{m[0].addEventListener("mousewheel",e,false)}return false}break;case"mousemove":if(window.addEventListener&&!l){m[0].addEventListener("mousemove",e,false);return false}break}if(l==undefined||l==null){if(m.on){m.on(k,e)}else{m.bind(k,e)}}else{if(m.on){m.on(k,l,e)}else{m.bind(k,l,e)}}};a.jqx["_"+g].prototype.removeHandler=function(l,k,e){switch(k){case"mousewheel":if(window.removeEventListener){if(a.jqx.browser.mozilla){l[0].removeEventListener("DOMMouseScroll",e,false)}else{l[0].removeEventListener("mousewheel",e,false)}return false}break;case"mousemove":if(e){if(window.removeEventListener){l[0].removeEventListener("mousemove",e,false)}}break}if(k==undefined){if(l.off){l.off()}else{l.unbind()}return}if(e==undefined){if(l.off){l.off(k)}else{l.unbind(k)}}else{if(l.off){l.off(k,e)}else{l.unbind(k,e)}}}};a.jqx.theme=a.jqx.theme||"";a.jqx.ready=function(){a(window).trigger("jqxReady")};a.jqx.init=function(){a.each(arguments[0],function(b,c){if(b=="theme"){a.jqx.theme=c}if(b=="scrollBarSize"){a.jqx.utilities.scrollBarSize=c}if(b=="touchScrollBarSize"){a.jqx.utilities.touchScrollBarSize=c}if(b=="scrollBarButtonsVisibility"){a.jqx.utilities.scrollBarButtonsVisibility=c}})};a.jqx.utilities=a.jqx.utilities||{};a.extend(a.jqx.utilities,{scrollBarSize:15,touchScrollBarSize:10,scrollBarButtonsVisibility:"visible",createId:function(){var b=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return"jqxWidget"+b()+b()},setTheme:function(f,g,e){if(typeof e==="undefined"){return}var h=e[0].className.split(" "),b=[],j=[],d=e.children();for(var c=0;c=0){if(f.length>0){b.push(h[c]);j.push(h[c].replace(f,g))}else{j.push(h[c]+"-"+g)}}}this._removeOldClasses(b,e);this._addNewClasses(j,e);for(var c=0;cy){return 1}}catch(C){var D=C}return 0};f.hiddenWidgets=new Array();f.resizeHandlers.sort(o);for(var r=0;r=0){f.hiddenWidgets.splice(f.hiddenWidgets.indexOf(x),1)}}}}}if(f.hiddenWidgets.length>0){f.hiddenWidgets.sort(o);if(f.__resizeInterval){clearInterval(f.__resizeInterval)}f.__resizeInterval=setInterval(function(){var z=false;var B=new Array();for(var A=0;A]*)\/>/gi,p=/<([\w:]+)/,g=/<(?:script|object|embed|option|style)/i,k=new RegExp("<(?:"+n+")[\\s/>]","i"),q=/^\s+/,t={option:[1,""," "],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(jQuery.support.htmlSerialize||!k.test(s))&&(jQuery.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(h,"<$1>$2>");try{for(;m=0&&c.indexOf(".net4.0c")>=0){d.browser="msie";d.version="11";b[1]="msie"}d[b[1]]=b[1];return d}});a.jqx.browser=a.jqx.utilities.getBrowser();a.jqx.isHidden=function(d){try{var b=d[0].offsetWidth,e=d[0].offsetHeight;if(b===0||e===0){return true}else{return false}}catch(c){return false}};a.jqx.ariaEnabled=true;a.jqx.aria=function(c,e,d){if(!a.jqx.ariaEnabled){return}if(e==undefined){a.each(c.aria,function(g,h){var k=!c.base?c.host.attr(g):c.base.host.attr(g);if(k!=undefined&&!a.isFunction(k)){var j=k;switch(h.type){case"number":j=new Number(k);if(isNaN(j)){j=k}break;case"boolean":j=k=="true"?true:false;break;case"date":j=new Date(k);if(j=="Invalid Date"||isNaN(j)){j=k}break}c[h.name]=j}else{var k=c[h.name];if(a.isFunction(k)){k=c[h.name]()}if(k==undefined){k=""}try{!c.base?c.host.attr(g,k.toString()):c.base.host.attr(g,k.toString())}catch(f){}}})}else{try{if(c.host){if(!c.base){if(c.host){if(c.element.setAttribute){c.element.setAttribute(e,d.toString())}else{c.host.attr(e,d.toString())}}else{c.attr(e,d.toString())}}else{if(c.base.host){c.base.host.attr(e,d.toString())}else{c.attr(e,d.toString())}}}else{if(c.setAttribute){c.setAttribute(e,d.toString())}}}catch(b){}}};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c){var b=this.length;var d=Number(arguments[1])||0;d=(d<0)?Math.ceil(d):Math.floor(d);if(d<0){d+=b}for(;d=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0){this.touchDevice=true;return true}else{if(navigator.userAgent.indexOf("Touch")>=0){var b=("MSPointerDown" in window);if(b){this.touchDevice=true;return true}if(navigator.userAgent.indexOf("ARM")>=0){this.touchDevice=true;return true}this.touchDevice=false;return false}}}if(navigator.platform.toLowerCase().indexOf("win")!=-1){this.touchDevice=false;return false}if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){this.touchDevice=true}return this.touchDevice}catch(f){this.touchDevice=false;return false}},getLeftPos:function(b){var c=b.offsetLeft;while((b=b.offsetParent)!=null){if(b.tagName!="HTML"){c+=b.offsetLeft;if(document.all){c+=b.clientLeft}}}return c},getTopPos:function(c){var e=c.offsetTop;var b=a(c).coord();while((c=c.offsetParent)!=null){if(c.tagName!="HTML"){e+=(c.offsetTop-c.scrollTop);if(document.all){e+=c.clientTop}}}var d=navigator.userAgent.toLowerCase();var f=(d.indexOf("windows phone")!=-1||d.indexOf("WPDesktop")!=-1||d.indexOf("ZuneWP7")!=-1||d.indexOf("msie 9")!=-1||d.indexOf("msie 11")!=-1||d.indexOf("msie 10")!=-1)&&d.indexOf("touch")!=-1;if(f){return b.top}if(this.isSafariMobileBrowser()){if(this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()){return e}if(d.indexOf("version/7")!=-1){return b.top}e=e+a(window).scrollTop()}return e},isChromeMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("android")!=-1;return b},isOperaMiniMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("opera mini")!=-1||c.indexOf("opera mobi")!=-1;return b},isOperaMiniBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("opera mini")!=-1;return b},isNewSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;b=b&&(c.indexOf("version/5")!=-1);return b},isSafari4MobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;b=b&&(c.indexOf("version/4")!=-1);return b},isWindowsPhone:function(){var c=navigator.userAgent.toLowerCase();var b=(c.indexOf("windows phone")!=-1||c.indexOf("WPDesktop")!=-1||c.indexOf("ZuneWP7")!=-1||c.indexOf("msie 9")!=-1||c.indexOf("msie 11")!=-1||c.indexOf("msie 10")!=-1)&&c.indexOf("touch")!=-1;return b},isSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("ipod")!=-1;return b},isIPadSafariMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1;return b},isMobileBrowser:function(){var c=navigator.userAgent.toLowerCase();var b=c.indexOf("ipad")!=-1||c.indexOf("iphone")!=-1||c.indexOf("android")!=-1;return b},getTouches:function(b){if(b.originalEvent){if(b.originalEvent.touches&&b.originalEvent.touches.length){return b.originalEvent.touches}else{if(b.originalEvent.changedTouches&&b.originalEvent.changedTouches.length){return b.originalEvent.changedTouches}}}if(!b.touches){b.touches=new Array();b.touches[0]=b.originalEvent!=undefined?b.originalEvent:b;if(b.originalEvent!=undefined&&b.pageX){b.touches[0]=b}if(b.type=="mousemove"){b.touches[0]=b}}return b.touches},getTouchEventName:function(b){if(this.isWindowsPhone()){if(b.toLowerCase().indexOf("start")!=-1){return"MSPointerDown"}if(b.toLowerCase().indexOf("move")!=-1){return"MSPointerMove"}if(b.toLowerCase().indexOf("end")!=-1){return"MSPointerUp"}}else{return b}},dispatchMouseEvent:function(b,f,d){if(this.simulatetouches){return}var c=document.createEvent("MouseEvent");c.initMouseEvent(b,true,true,f.view,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,0,null);if(d!=null){d.dispatchEvent(c)}},getRootNode:function(b){while(b.nodeType!==1){b=b.parentNode}return b},setTouchScroll:function(b,c){if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[c]=b},touchScroll:function(d,y,g,D,b,k){if(d==null){return}var B=this;var t=0;var j=0;var l=0;var u=0;var m=0;var n=0;if(!this.scrolling){this.scrolling=[]}this.scrolling[D]=false;var h=false;var q=a(d);var v=["select","input","textarea"];var c=0;var e=0;if(!this.enableScrolling){this.enableScrolling=[]}this.enableScrolling[D]=true;var D=D;var C=this.getTouchEventName("touchstart")+".touchScroll";var p=this.getTouchEventName("touchend")+".touchScroll";var A=this.getTouchEventName("touchmove")+".touchScroll";var c=function(E){if(!B.enableScrolling[D]){return true}if(a.inArray(E.target.tagName.toLowerCase(),v)!==-1){return}var F=B.getTouches(E);var G=F[0];if(F.length==1){B.dispatchMouseEvent("mousedown",G,B.getRootNode(G.target))}h=false;j=G.pageY;m=G.pageX;if(B.simulatetouches){j=G._pageY;m=G._pageX}B.scrolling[D]=true;t=0;u=0;return true};if(q.on){q.on(C,c)}else{q.bind(C,c)}var x=function(J){if(!B.enableScrolling[D]){return true}if(!B.scrolling[D]){return true}var L=B.getTouches(J);if(L.length>1){return true}var H=L[0].pageY;var I=L[0].pageX;if(B.simulatetouches){H=L[0]._pageY;I=L[0]._pageX}var E=H-j;var F=I-m;e=H;touchHorizontalEnd=I;l=E-t;n=F-u;h=true;t=E;u=F;var G=b!=null?b[0].style.visibility!="hidden":true;var K=k!=null?k[0].style.visibility!="hidden":true;if(G||K){if((n!==0&&G)||(l!==0&&K)){g(-n*1,-l*1,F,E,J);J.preventDefault();J.stopPropagation();if(J.preventManipulation){J.preventManipulation()}return false}}};if(q.on){q.on(A,x)}else{q.bind(A,x)}if(this.simulatetouches){var o=a(window).on!=undefined||a(window).bind;var z=function(E){B.scrolling[D]=false};a(window).on!=undefined?a(document).on("mouseup.touchScroll",z):a(document).bind("mouseup.touchScroll",z);if(window.frameElement){if(window.top!=null){var r=function(E){B.scrolling[D]=false};if(window.top.document){a(window.top.document).on?a(window.top.document).on("mouseup",r):a(window.top.document).bind("mouseup",r)}}}var s=a(document).on!=undefined||a(document).bind;var w=function(E){if(!B.scrolling[D]){return true}B.scrolling[D]=false;var G=B.getTouches(E)[0],F=B.getRootNode(G.target);B.dispatchMouseEvent("mouseup",G,F);B.dispatchMouseEvent("click",G,F)};a(document).on!=undefined?a(document).on("touchend",w):a(document).bind("touchend",w)}var f=function(E){if(!B.enableScrolling[D]){return true}var G=B.getTouches(E)[0];if(!B.scrolling[D]){return true}B.scrolling[D]=false;if(h){B.dispatchMouseEvent("mouseup",G,F)}else{var G=B.getTouches(E)[0],F=B.getRootNode(G.target);B.dispatchMouseEvent("mouseup",G,F);B.dispatchMouseEvent("click",G,F);return true}};if(q.on){q.on("dragstart",function(E){E.preventDefault()});q.on("selectstart",function(E){E.preventDefault()})}q.on?q.on(p+" touchcancel.touchScroll",f):q.bind(p+" touchcancel.touchScroll",f)}});a.jqx.cookie=a.jqx.cookie||{};a.extend(a.jqx.cookie,{cookie:function(e,f,c){if(arguments.length>1&&String(f)!=="[object Object]"){c=jQuery.extend({},c);if(f===null||f===undefined){c.expires=-1}if(typeof c.expires==="number"){var h=c.expires,d=c.expires=new Date();d.setDate(d.getDate()+h)}f=String(f);return(document.cookie=[encodeURIComponent(e),"=",c.raw?f:encodeURIComponent(f),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join(""))}c=f||{};var b,g=c.raw?function(j){return j}:decodeURIComponent;return(b=new RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?g(b[1]):null}});a.jqx.string=a.jqx.string||{};a.extend(a.jqx.string,{replace:function(f,d,e){if(d===e){return this}var b=f;var c=b.indexOf(d);while(c!=-1){b=b.replace(d,e);c=b.indexOf(d)}return b},contains:function(b,c){if(b==null||c==null){return false}return b.indexOf(c)!=-1},containsIgnoreCase:function(b,c){if(b==null||c==null){return false}return b.toUpperCase().indexOf(c.toUpperCase())!=-1},equals:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);if(c.length==b.length){return b.slice(0,c.length)==c}return false},equalsIgnoreCase:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);if(c.length==b.length){return b.toUpperCase().slice(0,c.length)==c.toUpperCase()}return false},startsWith:function(b,c){if(b==null||c==null){return false}return b.slice(0,c.length)==c},startsWithIgnoreCase:function(b,c){if(b==null||c==null){return false}return b.toUpperCase().slice(0,c.length)==c.toUpperCase()},normalize:function(b){if(b.charCodeAt(b.length-1)==65279){b=b.substring(0,b.length-1)}return b},endsWith:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);return b.slice(-c.length)==c},endsWithIgnoreCase:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);return b.toUpperCase().slice(-c.length)==c.toUpperCase()}});a.extend(jQuery.easing,{easeOutBack:function(f,g,e,k,j,h){if(h==undefined){h=1.70158}return k*((g=g/j-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,j,h){return j*(g/=h)*g+e},easeInOutCirc:function(f,g,e,j,h){if((g/=h/2)<1){return -j/2*(Math.sqrt(1-g*g)-1)+e}return j/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,j,h){return -j/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,j,h){return j*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,j,h){return j*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,j,h){if((g/=h/2)<1){return j/2*g*g*g+e}return j/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,j,h){return -j*Math.cos(g/h*(Math.PI/2))+j+e},easeOutSine:function(f,g,e,j,h){return j*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,j,h){return -j/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jQuery);(function(b){b.extend(jQuery.event.special,{close:{noBubble:true},open:{noBubble:true},cellclick:{noBubble:true},rowclick:{noBubble:true},tabclick:{noBubble:true},selected:{noBubble:true},expanded:{noBubble:true},collapsed:{noBubble:true},valuechanged:{noBubble:true},expandedItem:{noBubble:true},collapsedItem:{noBubble:true},expandingItem:{noBubble:true},collapsingItem:{noBubble:true}});b.fn.extend({ischildof:function(f){var d=b(this).parents().get();for(var c=0;cL.length){K="remove"}if(H._oldlocaldata.length0){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,X){if(this.isUpdating==true){return}var U=this._source;if(!U){return}i.jqx.dataFormat.datescache=new Array();if(U.dataFields!=null){U.datafields=U.dataFields}if(U.recordstartindex==undefined){U.recordstartindex=0}if(U.recordendindex==undefined){U.recordendindex=0}if(U.loadallrecords==undefined){U.loadallrecords=true}if(U.sort!=undefined){this.sort=U.sort}if(U.filter!=undefined){this.filter=U.filter}else{this.filter=null}if(U.sortcolumn!=undefined){this.sortcolumn=U.sortcolumn}if(U.sortdirection!=undefined){this.sortdirection=U.sortdirection}if(U.sortcomparer!=undefined){this.sortcomparer=U.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(U.formatdata!=undefined){K.formatData=U.formatdata}if(U.data!=undefined){if(K.data==undefined){K.data={}}i.extend(K.data,U.data)}if(U.mapchar!=undefined){this.mapChar=U.mapchar?U.mapchar:">"}else{this.mapChar=K.mapChar?K.mapChar:">"}if(K.unboundmode||U.unboundmode){this.unboundmode=K.unboundmode||U.unboundmode}if(U.cache!=undefined){this.cache=U.cache}if(this.koSubscriptions){for(var Z=0;Z0){for(var W=0;W0){var ak=al;for(var ah=0;ah0){var aD=false;var ay=false;for(var au=0;au=0)){aD=true;ap=at.map;aB=at.type;az=at.name;ay=true;var aC=ak[av];if(ap!=null){var ao=ap.split(ae.mapChar);if(ao.length>0){var aw=ak;for(var aq=0;aq0){var aw=ak;for(var aq=0;aq0){var ag=this;var aj=H(ag,aa);aj.uid=ah;ae.records[ae.records.length]=aj}else{this.uid=ah;ae.records[ae.records.length]=this}})}else{if(aa==0){i.each(U.localdata,function(ai,aj){var ag=i.extend({},this);if(typeof aj==="string"){ae.records=U.localdata;return false}else{var ah=ae.getid(U.id,ag,ai);if(typeof(ah)==="object"){ah=ai}ag.uid=ah;ae.records[ae.records.length]=ag}})}else{i.each(U.localdata,function(ai){var ag=this;var aj=H(ag,aa);var ah=ae.getid(U.id,aj,ai);if(typeof(ah)==="object"){ah=ai}var ag=i.extend({},aj);ag.uid=ah;ae.records[ae.records.length]=ag})}}}this.originaldata=U.localdata;this.cachedrecords=this.records;this.addForeignValues(U);if(K.uniqueDataFields){var S=this.getUniqueRecords(this.records,K.uniqueDataFields);this.records=S;this.cachedrecords=S}if(K.beforeLoadComplete){var ab=K.beforeLoadComplete(ae.records,this.originaldata);if(ab!=undefined){ae.records=ab;ae.cachedrecords=ab}}if(K.autoSort&&K.autoSortField){var O=Object.prototype.toString;Object.prototype.toString=(typeof field=="function")?field:function(){return this[K.autoSortField]};ae.records.sort(function(ah,ag){if(ah===undefined){ah=null}if(ag===undefined){ag=null}if(ah===null&&ag===null){return 0}if(ah===null&&ag!==null){return 1}if(ah!==null&&ag===null){return -1}ah=ah.toString();ag=ag.toString();if(i.jqx.dataFormat.isNumber(ah)&&i.jqx.dataFormat.isNumber(ag)){if(ahag){return 1}return 0}else{if(i.jqx.dataFormat.isDate(ah)&&i.jqx.dataFormat.isDate(ag)){if(ahag){return 1}return 0}else{if(!i.jqx.dataFormat.isNumber(ah)&&!i.jqx.dataFormat.isNumber(ag)){ah=String(ah).toLowerCase();ag=String(ag).toLowerCase()}}}try{if(ahag){return 1}}catch(ai){var aj=ai}return 0});Object.prototype.toString=O}ae.loadedData=U.localdata;ae.buildHierarchy();if(i.isFunction(K.loadComplete)){K.loadComplete(U.localdata,ae.records)}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":if(U.localdata!=null){if(i.isFunction(U.beforeprocessing)){U.beforeprocessing(U.localdata)}if(U.datatype==="xml"){ae.loadxml(U.localdata,U.localdata,U)}else{if(Q==="text"){ae.loadtext(U.localdata,U)}else{ae.loadjson(U.localdata,U.localdata,U)}}ae.addForeignValues(U);if(K.uniqueDataFields){var S=ae.getUniqueRecords(ae.records,K.uniqueDataFields);ae.records=S;ae.cachedrecords=S}if(K.beforeLoadComplete){var ab=K.beforeLoadComplete(ae.records,this.originaldata);if(ab!=undefined){ae.records=ab;ae.cachedrecords=ab}}ae.loadedData=U.localdata;ae.buildHierarchy.call(ae);if(i.isFunction(K.loadComplete)){K.loadComplete(U.localdata,ae.records)}ae.callBindingUpdate(X);return}var ac=K.data!=undefined?K.data:{};if(U.processdata){U.processdata(ac)}if(i.isFunction(K.processData)){K.processData(ac)}if(i.isFunction(K.formatData)){var e=K.formatData(ac);if(e!=undefined){ac=e}}var Y="application/x-www-form-urlencoded";if(K.contentType){Y=K.contentType}var J="GET";if(U.type){J=U.type}if(K.type){J=K.type}if(U.url&&U.url.length>0){if(i.isFunction(K.loadServerData)){ae._requestData(ac,U,K)}else{this.xhr=i.jqx.data.ajax({dataType:Q,cache:this.cache,type:J,url:U.url,async:N,contentType:Y,data:ac,success:function(aj,ag,am){if(i.isFunction(U.beforeprocessing)){var al=U.beforeprocessing(aj,ag,am);if(al!=undefined){aj=al}}if(i.isFunction(K.downloadComplete)){var al=K.downloadComplete(aj,ag,am);if(al!=undefined){aj=al}}if(aj==null){ae.records=new Array();ae.cachedrecords=new Array();ae.originaldata=new Array();ae.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(new Array())}return}var ah=aj;if(aj.records){ah=aj.records}if(aj.totalrecords!=undefined){U.totalrecords=aj.totalrecords}if(U.datatype==="xml"){ae.loadxml(null,ah,U)}else{if(Q==="text"){ae.loadtext(ah,U)}else{ae.loadjson(null,ah,U)}}ae.addForeignValues(U);if(K.uniqueDataFields){var ai=ae.getUniqueRecords(ae.records,K.uniqueDataFields);ae.records=ai;ae.cachedrecords=ai}if(K.beforeLoadComplete){var ak=K.beforeLoadComplete(ae.records,aj);if(ak!=undefined){ae.records=ak;ae.cachedrecords=ak}}ae.loadedData=aj;ae.buildHierarchy.call(ae);ae.callDownloadComplete();if(i.isFunction(K.loadComplete)){K.loadComplete(aj,ag,am,ae.records)}},error:function(ai,ag,ah){if(i.isFunction(U.loaderror)){U.loaderror(ai,ag,ah)}if(i.isFunction(K.loadError)){K.loadError(ai,ag,ah)}ai=null;ae.callDownloadComplete()},beforeSend:function(ah,ag){if(i.isFunction(K.beforeSend)){K.beforeSend(ah,ag)}if(i.isFunction(U.beforesend)){U.beforesend(ah,ag)}}})}}else{ae.buildHierarchy(new Array());ae.callDownloadComplete();if(i.isFunction(K.loadComplete)){if(!af){var af={}}K.loadComplete(af)}}break}this.callBindingUpdate(X)},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;L1){var W=S;for(var V=0;V0){var K=function(O){if(O){for(var P=0;P=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;OQ.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;O0){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;e0){return e}else{if(K.map){try{var e=i(H).attr(K.map);if(e!=null&&e.toString().length>0){return e}else{if(i(K.map,H).length>0){return i(K.map,H).text()}else{if(i(K.name,H).length>0){return i(K.name,H).text()}}}}catch(I){return J}}}return}}if(i(K,H).length>0){return i(K,H).text()}if(K){if(K.toString().length>0){var e=i(H).attr(K);if(e!=null&&e.toString().length>0){return e}}}return J},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;Q0){var aa=ae;for(var Q=0;Q0){var Z=I;for(var Q=0;Q0){var al=am;for(var ah=0;ah0){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;ab0){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||X0){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},loadtext:function(X,P){if(X==null){return}var e=P.rowDelimiter||this.rowDelimiter||"\n";var L=X.split(e);var 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=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 Y=M.map||M.name||S.toString();K[Y]=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){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'+e+""}return''+e+" "},formatemail:function(e){return''+e+" "},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)-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(T,M){if(M==undefined||M==null){M=this.defaultcalendar()}var Q=this;if(T==""){return null}if(T!=null&&!T.substring){T=T.toString()}if(T!=null&&T.substring(0,6)=="/Date("){var R=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;var J=new Date(+T.replace(/\/Date\((\d+)\)\//,"$1"));if(J=="Invalid Date"){var K=T.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);var J=null;if(K){J=new Date(1*K[1]+3600000*K[2]+60000*K[3])}}if(J==null||J=="Invalid Date"||isNaN(J)){var N=R.exec(T);if(N){var U=new Date(parseInt(N[1]));if(N[2]){var e=parseInt(N[3]);if(N[2]==="-"){e=-e}var P=U.getUTCMinutes();U.setUTCMinutes(P-e)}if(!isNaN(U.valueOf())){return U}}}return J}patterns=M.patterns;for(prop in patterns){J=Q.parsedate(T,patterns[prop],M);if(J){if(prop=="ISO"){var I=Q.parsedate(T,patterns.ISO2,M);if(I){return I}}return J}}if(T!=null){var I=null;var S=[":","/","-"];var O=true;for(var H=0;HH},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;af1&&ah.length)<[^<]*)*<\/script>/gi,d=/([?&])_=[^&]*/,h=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,t=/\s+/,F=jQuery.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(jQuery.isFunction(M)){for(;I0?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){jQuery.lastModified[P]=an}an=W.getResponseHeader("Etag");if(an){jQuery.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(!(--jQuery.active)){jQuery.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=jQuery.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=jQuery.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&&jQuery.active++===0){jQuery.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=jQuery.now(),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(jQuery.lastModified[P]){W.setRequestHeader("If-Modified-Since",jQuery.lastModified[P])}if(jQuery.etag[P]){W.setRequestHeader("If-None-Match",jQuery.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=jQuery.now();i.jqx.data.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=y.pop()||(jQuery.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=jQuery.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){jQuery.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&&jQuery.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){jQuery.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){jQuery.extend(jQuery.support,{ajax:!!e,cors:!!e&&("withCredentials" in e)})})(i.jqx.data.ajaxSettings.xhr());if(jQuery.support.ajax){i.jqx.data.ajaxTransport(function(e){if(!e.crossDomain||jQuery.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=jQuery.noop;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={};jQuery(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;WK.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}return false}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=0?ae.split(" "):new Array();if(aj.length>0){for(var ak=0;ak0){for(var ak=0;ak=0){Z.push(ab[ak])}}}if(Y.length>0){for(var ak=0;ak=0){Z.push(Y[ak])}}}var ai=undefined;for(var ah=0;ahao;case"GREATER_THAN_OR_EQUAL":return ap>=ao;case"LESS_THAN":return ap=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;ak0){for(var ak=0;ak=0){aa.push(ac[ak])}}}if(Z.length>0){for(var ak=0;ak=0){aa.push(Z[ak])}}}var aj=undefined;for(var ai=0;ai=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=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,aa){this.filtervalue=X;this.type="datefilter";if(W!=undefined&&aa!=undefined){var Y=i.jqx.dataFormat.parsedate(X,W,aa);if(Y!=null){this.filterdate=Y}else{var U=i.jqx.dataFormat.tryparsedate(X,aa);if(U!=null){this.filterdate=U}}}else{var Z=new Date(X);if(Z.toString()=="NaN"||Z.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=Z}}if(!this.filterdate){var Z=new Date(X);if(Z.toString()=="NaN"||Z.toString()=="Invalid Date"){this.filterdate=i.jqx.dataFormat.tryparsedate(X)}else{this.filterdate=Z}}this.comparisonoperator=V;this.evaluate=function(an){var am=this.filtervalue;var av=this.comparisonoperator;if(an==null||an==undefined||an==""){if(av=="NOT_NULL"){return false}if(av=="NULL"){return true}else{return false}}else{if(av=="NULL"){return false}if(av=="NOT_NULL"){return true}}var ax=new Date();ax.setFullYear(1900,0,1);ax.setHours(12,0,0,0);try{var au=new Date(an);if(au.toString()=="NaN"||au.toString()=="Invalid Date"){an=i.jqx.dataFormat.tryparsedate(an)}else{an=au}ax=an;var ar=false;if(W!=undefined&&aa!=undefined){if(W.indexOf("t")>=0||W.indexOf("T")>=0||W.indexOf(":")>=0||W.indexOf("f")>=0){ar=true;if(am&&am.toString().indexOf(":")==-1){var ai=i.jqx.dataFormat.tryparsedate(am.toString()+":00",aa);if(ai!=null){this.filterdate=ai}}}}if(!ar){ax.setHours(0);ax.setMinutes(0);ax.setSeconds(0)}}catch(ao){if(an.toString()!=""){return false}}if(this.filterdate!=null){am=this.filterdate}else{if(am.indexOf){if(am.indexOf(":")!=-1||!isNaN(parseInt(am))){var ah=new Date(ax);ah.setHours(12,0,0,0);var ag=am.split(":");for(var at=0;atay;case"GREATER_THAN_OR_EQUAL":return az>=ay;case"LESS_THAN":return az=0||am.indexOf(" AND ")>=0||am.indexOf(" OR ")>=0||am.indexOf(" and ")>=0||am.indexOf(" or ")>=0){var ai=aw(ax,am);if(ai){return ai}var aj=am.indexOf(" AND ")>=0?am.split(" AND "):new Array();var ae=am.indexOf(" OR ")>=0?am.split(" OR "):new Array();var ad=am.indexOf(" and ")>=0?am.split(" and "):new Array();var ak=am.indexOf(" or ")>=0?am.split(" or "):new Array();aj=aj.concat(ad);ae=ae.concat(ak);var ac=am.indexOf("|")>=0?am.split("|"):new Array();if(ac.length>0){for(var at=0;at0){for(var at=0;at=0){af.push(aj[at])}}}if(ae.length>0){for(var at=0;at=0){af.push(ae[at])}}}var aq=undefined;for(var ap=0;ap=0){var ab=an.toString().split("..");if(ab.length==2){ai=ax>=ab[0]&&ax<=ab[1]}}else{var ai=aw(ax,an)}var al=ap=0){af=am.toString().split("..");if(af.length==2){return ax>=af[0]&&ax<=af[1]}}return aw(ax,am)}};var e=function(V,U,W){this.filtervalue=V;this.comparisonoperator=U;this.evaluate=function(Y,X){return W(this.filtervalue,Y,this.comparisonoperator)}}}})(jQuery);(function(a){a.jqx.jqxWidget("jqxValidator","",{});a.extend(a.jqx._jqxValidator.prototype,{defineInstance:function(){this.rules=null;this.scroll=true;this.focus=true;this.scrollDuration=300;this.scrollCallback=null;this.position="right";this.arrow=true;this.animation="fade";this.animationDuration=150;this.closeOnClick=true;this.onError=null;this.onSuccess=null;this.ownerElement=null;this._events=["validationError","validationSuccess"];this.hintPositionOffset=5;this._inputHint=[];this.rtl=false;this.hintType="tooltip"},createInstance:function(){if(this.hintType=="label"&&this.animationDuration==150){this.animationDuration=0}this._configureInputs();this._removeEventListeners();this._addEventListeners()},destroy:function(){this._removeEventListeners();this.hide()},validate:function(p){var b=true,o,e=Infinity,h,g,c,j=[],n;this.updatePosition();var k=this;var d=0;for(var f=0;fh){e=h;g=c}}d--;if(d==0){if(typeof p==="function"){k._handleValidation(b,e,g,j);if(p){p(b)}}}};this._validateRule(this.rules[f],l)}else{o=this._validateRule(this.rules[f])}if(false==o){b=false;c=a(this.rules[f].input);j.push(c);h=c.offset().top;if(e>h){e=h;g=c}}}if(d==0){this._handleValidation(b,e,g,j);return b}else{return undefined}},validateInput:function(b){var e=this._getRulesForInput(b),d=true;for(var c=0;c0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").removeClass(g.toThemeProperty("jqx-validator-error-element"))}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}}}else{c.removeClass(g.toThemeProperty("jqx-validator-error-element"))}};if(e){f=e.hint;if(f){if(this.positions){if(this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]){this.positions[Math.round(f.offset().top)+"_"+Math.round(f.offset().left)]=null}}if(this.animation==="fade"){f.fadeOut(this.animationDuration,function(){f.remove();d()})}else{f.remove();d()}}e.hint=null}},_handleValidation:function(b,e,d,c){if(!b){this._scrollHandler(e);if(this.focus){d.focus()}this._raiseEvent(0,{invalidInputs:c});if(typeof this.onError==="function"){this.onError(c)}}else{this._raiseEvent(1);if(typeof this.onSuccess==="function"){this.onSuccess()}}},_scrollHandler:function(c){if(this.scroll){var b=this;a("html,body").animate({scrollTop:c},this.scrollDuration,function(){if(typeof b.scrollCallback==="function"){b.scrollCallback.call(b)}})}},_higherPriorityActive:function(d){var e=false,c;for(var b=this.rules.length-1;b>=0;b-=1){c=this.rules[b];if(e&&c.input===d.input&&c.hint){return true}if(c===d){e=true}}return false},_removeLowPriorityHints:function(d){var e=false,c;for(var b=0;b0){var b=this;var g=function(){b.updatePosition()};var e=this.host.parents(".jqx-window");this.addHandler(e,"closed",function(){b.hide()});this.addHandler(e,"moved",g);this.addHandler(e,"moving",g);this.addHandler(e,"resized",g);this.addHandler(e,"resizing",g);this.addHandler(a(document.parentWindow),"scroll",function(){g()})}for(var d=0;d=0){c=c.split("=");d=c[1].split(",");c=c[0]}e=this["_"+c];if(e){f.rule=function(g,h){return e.apply(this,[g].concat(d))}}else{b=true}}else{if(typeof c!=="function"){b=true}else{f.rule=c}}if(b){throw new Error("Wrong parameter!")}},_required:function(b){switch(this._getType(b)){case"textarea":case"password":case"jqx-input":case"text":var d=a.data(b[0]);if(d.jqxMaskedInput){var e=b.jqxMaskedInput("promptChar"),c=b.jqxMaskedInput("value");return c&&c.indexOf(e)<0}else{if(d.jqxNumberInput){return b.jqxNumberInput("inputValue")!==""}else{if(d.jqxDateTimeInput){return true}else{return a.trim(b.val())!==""}}}case"checkbox":return b.is(":checked");case"radio":return b.is(":checked");case"div":if(b.is(".jqx-checkbox")){return b.jqxCheckBox("checked")}if(b.is(".jqx-radiobutton")){return b.jqxRadioButton("checked")}return false}return false},_notNumber:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d)})},_startWithLetter:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d/;return !c.test(d.substring(0,1))})},_number:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=new Number(d);return !isNaN(c)&&isFinite(c)})},_phone:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^\(\d{3}\)(\d){3}-(\d){4}$/;return c.test(d)})},_length:function(c,d,b){return this._minLength(c,d)&&this._maxLength(c,b)},_maxLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length<=b})},_minLength:function(c,b){b=parseInt(b,10);return this._validateText(c,function(d){return d.length>=b})},_email:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return c.test(d)})},_zipCode:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/^(^\d{5}$)|(^\d{5}-\d{4}$)|(\d{3}-\d{2}-\d{4})$/;return c.test(d)})},_ssn:function(b){return this._validateText(b,function(d){if(d==""){return true}var c=/\d{3}-\d{2}-\d{4}/;return c.test(d)})},_validateText:function(b,d){var c;if(this._isTextInput(b)){if(this._isjQWidget(b)){c=b.find("input").val()}else{c=b.val()}return d(c)}return false},_isjQWidget:function(b){var c=a.data(b[0]);if(c.jqxMaskedInput||c.jqxNumberInput||c.jqxDateTimeInput){return true}return false},_isTextInput:function(b){var c=this._getType(b);return c==="text"||c==="textarea"||c==="password"||b.is(".jqx-input")},_getType:function(c){var b=c[0].tagName.toLowerCase(),d;if(b==="textarea"){return"textarea"}else{if(c.is(".jqx-input")){return"jqx-input"}else{if(b==="input"){d=a(c).attr("type")?a(c).attr("type").toLowerCase():"text";return d}}}return b},_hintRender:function(e,c){if(this.hintType=="label"){var f=a(' ');f.html(e);var d=this;if(this.closeOnClick){f.click(function(){d.hideHint(c.selector)})}if(this.position=="left"||this.position=="top"){f.insertBefore(a(c))}else{f.insertAfter(a(c))}return f}var f=a('
'),b=this;f.html(e);if(this.closeOnClick){f.click(function(){b.hideHint(c.selector)})}if(this.ownerElement==null){f.appendTo(document.body)}else{if(this.ownerElement.innerHTML){f.appendTo(a(this.ownerElement))}else{f.appendTo(this.ownerElement)}}return f},_hintLayout:function(h,c,b,f){if(this._hintRender===f.hintRender){var i;i=this._getPosition(c,b,h,f);if(this.hintType=="label"){var e="2px";if(this.position=="left"||this.position=="top"){e="-2px"}if(c[0].nodeName.toLowerCase()!="input"){if(c.find("input").length>0){if(c.find(".jqx-input").length>0){c.find(".jqx-input").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{if(c.is(".jqx-checkbox")){c.find(".jqx-checkbox-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}}if(c.is(".jqx-radiobutton")){c.find(".jqx-radiobutton-default").addClass(this.toThemeProperty("jqx-validator-error-element"))}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}}}else{c.addClass(this.toThemeProperty("jqx-validator-error-element"))}var d=a(" ");d.addClass(this.toThemeProperty("jqx-validator-hint"));d.html(h.text());d.appendTo(a(document.body));var g=d.outerWidth();d.remove();h.css({position:"relative",left:a(c).css("margin-left"),width:a(c).width(),top:e});if(b=="center"){h.css("width",g);h.css("left","0px");h.css("margin-left","auto");h.css("margin-right","auto")}return}h.css({position:"absolute",left:i.left,top:i.top});if(this.arrow){this._addArrow(c,h,b,i)}}},_showHint:function(b){if(b){if(this.animation==="fade"){b.fadeOut(0);b.fadeIn(this.animationDuration)}}},_getPosition:function(i,f,d,g){var e=i.offset(),h,c;var b=i.outerWidth();var j=i.outerHeight();if(this.rtl&&f.indexOf("left")>=0){f="right"}if(this.rtl&&f.indexOf("right")>=0){f="left"}if(this.ownerElement!=null){e={left:0,top:0};e.top=parseInt(e.top)+i.position().top;e.left=parseInt(e.left)+i.position().left}if(g&&g.hintPositionRelativeElement){var k=a(g.hintPositionRelativeElement);e=k.offset();b=k.width();j=k.height()}if(f.indexOf("top")>=0){h=e.top-j}else{if(f.indexOf("bottom")>=0){h=e.top+d.outerHeight()+this.hintPositionOffset+5}else{h=e.top}}if(f.indexOf("center")>=0){c=e.left+this.hintPositionOffset+(b-d.outerWidth())/2}else{if(f.indexOf("left")>=0){c=e.left-d.outerWidth()-this.hintPositionOffset}else{if(f.indexOf("right")>=0){c=e.left+b+this.hintPositionOffset}else{c=e.left+this.hintPositionOffset}}}if(f.indexOf(":")>=0){f=f.split(":")[1].split(",");c+=parseInt(f[0],10);h+=parseInt(f[1],10)}if(!this.positions){this.positions=new Array()}if(this.positions[Math.round(h)+"_"+Math.round(c)]){if(this.positions[Math.round(h)+"_"+Math.round(c)].top==h){h+=i.outerHeight()}}this.positions[Math.round(h)+"_"+Math.round(c)]={left:c,top:h};return{left:c,top:h}},_addArrow:function(j,e,g,k){var l=a('
'),d,i;if(this.rtl&&g.indexOf("left")>=0){g="right"}if(this.rtl&&g.indexOf("right")>=0){g="left"}e.children(".jqx-validator-hint-arrow").remove();e.append(l);var c=l.outerHeight(),f=l.outerWidth(),h=e.outerHeight(),b=e.outerWidth();this._addImage(l);if(g.indexOf("top")>=0){i=h-c}else{if(g.indexOf("bottom")>=0){i=-c}else{i=(h-c)/2-c/2}}if(g.indexOf("center")>=0){d=(b-f)/2}else{if(g.indexOf("left")>=0){d=b-f/2-1}else{if(g.indexOf("right")>=0){d=-f/2}}}if(g.indexOf("topright")>=0||g.indexOf("bottomright")>=0){d=0}if(g.indexOf("topleft")>=0||g.indexOf("bottomleft")>=0){d=b-f}l.css({position:"absolute",left:d,top:i})},_addImage:function(b){var c=b.css("background-image");c=c.replace('url("',"");c=c.replace('")',"");c=c.replace("url(","");c=c.replace(")","");b.css("background-image","none");b.append(' ')},_raiseEvent:function(b,d){var c=a.Event(this._events[b]);c.args=d;return this.host.trigger(c)},propertyChangedHandler:function(b,c,e,d){if(c==="rules"){this._configureInputs();this._removeEventListeners();this._addEventListeners()}}})})(jQuery);(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(){this.cursor="arrow";this.roundedCorners="all";this.disabled=false;this.height=null;this.width=null;this.overrideTheme=false;this.enableHover=true;this.enableDefault=true;this.enablePressed=true;this.rtl=false;this._ariaDisabled=false;this._scrollAreaButton=false;this.aria={"aria-disabled":{name:"disabled",type:"boolean"}}},createInstance:function(d){var b=this;this._setSize();if(!this._ariaDisabled){this.host.attr("role","button")}if(!this.overrideTheme){this.host.addClass(this.toThemeProperty(a.jqx.cssroundedcorners(this.roundedCorners)));if(this.enableDefault){this.host.addClass(this.toThemeProperty("jqx-button"))}this.host.addClass(this.toThemeProperty("jqx-widget"))}this.isTouchDevice=a.jqx.mobile.isTouchDevice();if(!this._ariaDisabled){a.jqx.aria(this)}if(this.cursor!="arrow"){if(!this.disabled){this.host.css({cursor:this.cursor})}else{this.host.css({cursor:"arrow"})}}var g="mouseenter mouseleave mousedown focus blur";if(this._scrollAreaButton){var g="mousedown"}if(this.isTouchDevice){this.addHandler(this.host,a.jqx.mobile.getTouchEventName("touchstart"),function(h){b.isPressed=true;b.refresh()});this.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+this.element.id,function(h){b.isPressed=false;b.refresh()})}this.addHandler(this.host,g,function(h){switch(h.type){case"mouseenter":if(!this.isTouchDevice){if(!b.disabled&&b.enableHover){b.isMouseOver=true;b.refresh()}}break;case"mouseleave":if(!this.isTouchDevice){if(!b.disabled&&b.enableHover){b.isMouseOver=false;b.refresh()}}break;case"mousedown":if(!b.disabled){b.isPressed=true;b.refresh()}break;case"focus":if(!b.disabled){b.isFocused=true;b.refresh()}break;case"blur":if(!b.disabled){b.isFocused=false;b.refresh()}break}});this.mouseupfunc=function(h){if(!b.disabled){b.isPressed=false;b.refresh()}};this.addHandler(a(document),"mouseup.button"+this.element.id,this.mouseupfunc);try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var f="";if(window.parent&&document.referrer){f=document.referrer}if(f.indexOf(document.location.host)!=-1){var e=function(h){b.isPressed=false;b.refresh()};if(window.top.document){this.addHandler(a(window.top.document),"mouseup",e)}}}}}catch(c){}this.propertyChangeMap.roundedCorners=function(h,j,i,k){h.host.removeClass(h.toThemeProperty(a.jqx.cssroundedcorners(i)));h.host.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(k)))};this.propertyChangeMap.width=function(h,j,i,k){h._setSize();h.refresh()};this.propertyChangeMap.height=function(h,j,i,k){h._setSize();h.refresh()};this.propertyChangeMap.disabled=function(h,j,i,k){if(i!=k){h.host[0].disabled=k;h.host.attr("disabled",k);h.refresh();if(!k){h.host.css({cursor:h.cursor})}else{h.host.css({cursor:"default"})}a.jqx.aria(h,"aria-disabled",h.disabled)}};this.propertyChangeMap.rtl=function(h,j,i,k){if(i!=k){h.refresh()}};this.propertyChangeMap.theme=function(h,j,i,k){h.host.removeClass();if(h.enableDefault){h.host.addClass(h.toThemeProperty("jqx-button"))}h.host.addClass(h.toThemeProperty("jqx-widget"));if(!h.overrideTheme){h.host.addClass(h.toThemeProperty(a.jqx.cssroundedcorners(h.roundedCorners)))}h._oldCSSCurrent=null;h.refresh()};if(this.disabled){this.element.disabled=true;this.host.attr("disabled",true)}},resize:function(c,b){this.width=c;this.height=b;this._setSize()},val:function(){var b=this.host.find("input");if(b.length>0){if(arguments.length==0||typeof(value)=="object"){return b.val()}b.val(value);this.refresh();return b.val()}if(arguments.length==0||typeof(value)=="object"){if(this.element.nodeName.toLowerCase()=="button"){return a(this.element).text()}return this.element.value}this.element.value=arguments[0];if(this.element.nodeName.toLowerCase()=="button"){a(this.element).text(arguments[0])}this.refresh()},_setSize:function(){if(this.width!=null&&(this.width.toString().indexOf("px")!=-1||this.width.toString().indexOf("%")!=-1)){this.host.css("width",this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.css("width",this.width)}}if(this.height!=null&&(this.height.toString().indexOf("px")!=-1||this.height.toString().indexOf("%")!=-1)){this.host.css("height",this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.css("height",parseInt(this.height))}}},_removeHandlers:function(){this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"click");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"mousedown");this.removeHandler(a(document),"mouseup.button"+this.element.id,this.mouseupfunc);if(this.isTouchDevice){this.removeHandler(this.host,a.jqx.mobile.getTouchEventName("touchstart"));this.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchend")+"."+this.element.id)}this.mouseupfunc=null;delete this.mouseupfunc},focus:function(){this.host.focus()},destroy:function(){this._removeHandlers();var b=a.data(this.element,"jqxButton");if(b){delete b.instance}this.host.removeClass();this.host.removeData();this.host.remove();delete this.set;delete this.get;delete this.call;delete this.propertyChangeMap.roundedCorners;delete this.propertyChangeMap.width;delete this.propertyChangeMap.height;delete this.propertyChangeMap.disabled;delete this.propertyChangeMap.rtl;delete this.propertyChangeMap.theme;delete this.propertyChangeMap;delete this.element;delete this.host},render:function(){this.refresh()},refresh:function(){if(this.overrideTheme){return}var d=this.toThemeProperty("jqx-fill-state-focus");var h=this.toThemeProperty("jqx-fill-state-disabled");var b=this.toThemeProperty("jqx-fill-state-normal");if(!this.enableDefault){b=""}var g=this.toThemeProperty("jqx-fill-state-hover");var e=this.toThemeProperty("jqx-fill-state-pressed");var f=this.toThemeProperty("jqx-fill-state-pressed");if(!this.enablePressed){e=""}var c="";if(!this.host){return}this.host[0].disabled=this.disabled;if(this.disabled){c=h}else{if(this.isMouseOver&&!this.isTouchDevice){if(this.isPressed){c=f}else{c=g}}else{if(this.isPressed){c=e}else{c=b}}}if(this.isFocused){c+=" "+d}if(c!=this._oldCSSCurrent){if(this._oldCSSCurrent){this.host.removeClass(this._oldCSSCurrent)}this.host.addClass(c);this._oldCSSCurrent=c}if(this.rtl){this.host.addClass(this.toThemeProperty("jqx-rtl"));this.host.css("direction","rtl")}}});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(d){var c=this;this.host.onselectstart=function(){return false};this.host.attr("role","button");var b=this.height||this.host.height();var e=this.width||this.host.width();this.href=this.host.attr("href");this.target=this.host.attr("target");this.content=this.host.text();this.element.innerHTML="";this.host.append(" ");var f=this.host.find("input");f.addClass(this.toThemeProperty("jqx-reset"));f.width(e);f.height(b);f.val(this.content);this.host.find("tr").addClass(this.toThemeProperty("jqx-reset"));this.host.find("td").addClass(this.toThemeProperty("jqx-reset"));this.host.find("tbody").addClass(this.toThemeProperty("jqx-reset"));this.host.css("color","inherit");this.host.addClass(this.toThemeProperty("jqx-link"));f.css({width:e});f.css({height:b});var g=d==undefined?{}:d[0]||{};f.jqxButton(g);if(this.disabled){this.host[0].disabled=true}this.propertyChangeMap.disabled=function(h,j,i,k){h.host[0].disabled=k;h.host.find("input").jqxButton({disabled:k})};this.addHandler(f,"click",function(h){if(!this.disabled){c.onclick(h)}return false})},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(e){var c=this;var d=a.jqx.mobile.isTouchDevice();var b=!d?"mouseup."+this.base.element.id:"touchend."+this.base.element.id;var f=!d?"mousedown."+this.base.element.id:"touchstart."+this.base.element.id;this.addHandler(a(document),b,function(g){if(c.timeout!=null){clearTimeout(c.timeout);c.timeout=null;c.refresh()}if(c.timer!=undefined){clearInterval(c.timer);c.timer=null;c.refresh()}});this.addHandler(this.base.host,f,function(g){if(c.timer!=null){clearInterval(c.timer)}c.timeout=setTimeout(function(){clearInterval(c.timer);c.timer=setInterval(function(h){c.ontimer(h)},c.delay)},150)});this.mousemovefunc=function(g){if(!d){if(g.which==0){if(c.timer!=null){clearInterval(c.timer);c.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 jQuery.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.aria={"aria-checked":{name:"toggled",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}}},createInstance:function(c){var b=this;this.base.overrideTheme=true;this.isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);this.propertyChangeMap.toggled=function(d,f,e,g){d.refresh()};this.propertyChangeMap.disabled=function(d,f,e,g){b.base.disabled=g;d.refresh()};this.addHandler(this.base.host,"click",function(d){if(!b.base.disabled){b.toggle()}});if(!this.isTouchDevice){this.addHandler(this.base.host,"mouseenter",function(d){if(!b.base.disabled){b.refresh()}});this.addHandler(this.base.host,"mouseleave",function(d){if(!b.base.disabled){b.refresh()}})}this.addHandler(this.base.host,"mousedown",function(d){if(!b.base.disabled){b.refresh()}});this.addHandler(a(document),"mouseup",function(d){if(!b.base.disabled){b.refresh()}})},_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")},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 g=this.base.toThemeProperty("jqx-fill-state-disabled");var b=this.base.toThemeProperty("jqx-fill-state-normal");var f=this.base.toThemeProperty("jqx-fill-state-hover");var d=this.base.toThemeProperty("jqx-fill-state-pressed");var e=this.base.toThemeProperty("jqx-fill-state-pressed");var c="";this.base.host[0].disabled=this.base.disabled;if(this.base.disabled){c=g}else{if(this.base.isMouseOver&&!this.isTouchDevice){if(this.base.isPressed||this.toggled){c=e}else{c=f}}else{if(this.base.isPressed||this.toggled){c=d}else{c=b}}}if(this.base.host.hasClass(g)&&g!=c){this.base.host.removeClass(g)}if(this.base.host.hasClass(b)&&b!=c){this.base.host.removeClass(b)}if(this.base.host.hasClass(f)&&f!=c){this.base.host.removeClass(f)}if(this.base.host.hasClass(d)&&d!=c){this.base.host.removeClass(d)}if(this.base.host.hasClass(e)&&e!=c){this.base.host.removeClass(e)}if(!this.base.host.hasClass(c)){this.base.host.addClass(c)}}})})(jQuery);(function(a){a.jqx.jqxWidget("jqxDropDownButton","",{});a.extend(a.jqx._jqxDropDownButton.prototype,{defineInstance:function(){this.disabled=false;this.width=null;this.height=null;this.arrowSize=19;this.enableHover=true;if(this.openDelay==undefined){this.openDelay=250}if(this.closeDelay==undefined){this.closeDelay=300}this.animationType="default";this.enableBrowserBoundsDetection=false;this.dropDownHorizontalAlignment="left";this.popupZIndex=20000;this.autoOpen=false;this.rtl=false;this.initContent=null;this.dropDownWidth=null;this.dropDownHeight=null;this.aria={"aria-disabled":{name:"disabled",type:"boolean"}};this.events=["open","close","opening","closing"]},createInstance:function(i){this.isanimating=false;var c=a("");a.jqx.aria(this);this.popupContent=this.host.children();this.host.attr("role","button");if(this.popupContent.length==0){this.popupContent=a(""+this.host.text()+"
");this.popupContent.css("display","block");this.element.innerHTML=""}else{this.popupContent.detach()}var j=this;this.addHandler(this.host,"loadContent",function(e){j._arrange()});try{var f="dropDownButtonPopup"+this.element.id;var d=a(a.find("#"+f));if(d.length>0){d.remove()}a.jqx.aria(this,"aria-haspopup",true);a.jqx.aria(this,"aria-owns",f);var b=a("");b.addClass(this.toThemeProperty("jqx-widget-content"));b.addClass(this.toThemeProperty("jqx-dropdownbutton-popup"));b.addClass(this.toThemeProperty("jqx-popup"));b.addClass(this.toThemeProperty("jqx-rc-all"));b.css("z-index",this.popupZIndex);if(a.jqx.browser.msie){b.addClass(this.toThemeProperty("jqx-noshadow"))}this.popupContent.appendTo(b);b.appendTo(document.body);this.container=b;this.container.css("visibility","hidden")}catch(g){}this.touch=a.jqx.mobile.isTouchDevice();this.dropDownButtonStructure=c;this.host.append(c);this.dropDownButtonWrapper=this.host.find("#dropDownButtonWrapper");this.firstDiv=this.dropDownButtonWrapper.parent();this.dropDownButtonArrow=this.host.find("#dropDownButtonArrow");this.arrow=a(this.dropDownButtonArrow.children()[0]);this.dropDownButtonContent=this.host.find("#dropDownButtonContent");this.dropDownButtonContent.addClass(this.toThemeProperty("jqx-dropdownlist-content"));this.dropDownButtonWrapper.addClass(this.toThemeProperty("jqx-disableselect"));if(this.rtl){this.dropDownButtonContent.addClass(this.toThemeProperty("jqx-rtl"))}var l=this;if(this.host.parents()){this.addHandler(this.host.parents(),"scroll.dropdownbutton"+this.element.id,function(e){var m=l.isOpened();if(m){l.close()}})}this.addHandler(this.dropDownButtonWrapper,"selectstart",function(){return false});this.dropDownButtonWrapper[0].id="dropDownButtonWrapper"+this.element.id;this.dropDownButtonArrow[0].id="dropDownButtonArrow"+this.element.id;this.dropDownButtonContent[0].id="dropDownButtonContent"+this.element.id;var l=this;this.propertyChangeMap.disabled=function(e,n,m,o){if(o){e.host.addClass(l.toThemeProperty("jqx-dropdownlist-state-disabled"));e.host.addClass(l.toThemeProperty("jqx-fill-state-disabled"));e.dropDownButtonContent.addClass(l.toThemeProperty("jqx-dropdownlist-content-disabled"))}else{e.host.removeClass(l.toThemeProperty("jqx-dropdownlist-state-disabled"));e.host.removeClass(l.toThemeProperty("jqx-fill-state-disabled"));e.dropDownButtonContent.removeClass(l.toThemeProperty("jqx-dropdownlist-content-disabled"))}a.jqx.aria(e,"aria-disabled",e.disabled)};if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-dropdownlist-state-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.dropDownButtonContent.addClass(this.toThemeProperty("jqx-dropdownlist-content-disabled"))}var h=this.toThemeProperty("jqx-rc-all")+" "+this.toThemeProperty("jqx-fill-state-normal")+" "+this.toThemeProperty("jqx-widget")+" "+this.toThemeProperty("jqx-widget-content")+" "+this.toThemeProperty("jqx-dropdownlist-state-normal");this.host.addClass(h);this.arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down"));this.arrow.addClass(this.toThemeProperty("jqx-icon"));this._setSize();this.render();if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.container.css("display","none");if(this.host.parents(".jqx-window").length>0){var k=this.host.parents(".jqx-window").css("z-index");b.css("z-index",k+10);this.container.css("z-index",k+10)}}},setContent:function(b){this.dropDownButtonContent.children().remove();this.dropDownButtonContent[0].innerHTML="";this.dropDownButtonContent.append(b)},val:function(b){if(arguments.length==0||typeof(b)=="object"){return this.dropDownButtonContent.text(b)}else{this.dropDownButtonContent.html(b)}},getContent:function(){if(this.dropDownButtonContent.children().length>0){return this.dropDownButtonContent.children()}return this.dropDownButtonContent.text()},_setSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host[0].style.width=this.width}else{if(this.width!=undefined&&!isNaN(this.width)){this.host[0].style.width=parseInt(this.width)+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host[0].style.height=this.height}else{if(this.height!=undefined&&!isNaN(this.height)){this.host[0].style.height=parseInt(this.height)+"px"}}var c=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){c=true;this.host.width(this.width)}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){c=true;this.host.height(this.height)}var b=this;if(c){this.refresh(false)}a.jqx.utilities.resize(this.host,function(){b._arrange()})},isOpened:function(){var c=this;var b=a.data(document.body,"openedJQXButton"+this.element.id);if(b!=null&&b==c.popupContent){return true}return false},focus:function(){try{this.host.focus()}catch(b){}},render:function(){this.removeHandlers();var b=this;var c=false;if(!this.touch){this.addHandler(this.host,"mouseenter",function(){if(!b.disabled&&b.enableHover){c=true;b.host.addClass(b.toThemeProperty("jqx-dropdownlist-state-hover"));b.arrow.addClass(b.toThemeProperty("jqx-icon-arrow-down-hover"));b.host.addClass(b.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.host,"mouseleave",function(){if(!b.disabled&&b.enableHover){b.host.removeClass(b.toThemeProperty("jqx-dropdownlist-state-hover"));b.host.removeClass(b.toThemeProperty("jqx-fill-state-hover"));b.arrow.removeClass(b.toThemeProperty("jqx-icon-arrow-down-hover"));c=false}})}if(b.autoOpen){this.addHandler(this.host,"mouseenter",function(){var d=b.isOpened();if(!d&&b.autoOpen){b.open();b.host.focus()}});this.addHandler(a(document),"mousemove."+b.element.id,function(g){var f=b.isOpened();if(f&&b.autoOpen){var k=b.host.coord();var j=k.top;var i=k.left;var h=b.container.coord();var d=h.left;var e=h.top;canClose=true;if(g.pageY>=j&&g.pageY<=j+b.host.height()){if(g.pageX>=i&&g.pageX=e&&g.pageY<=e+b.container.height()){if(g.pageX>=d&&g.pageXi){if(g>this.host.width()){var d=this.host.coord().left;var b=g-this.host.width();f.left=d-b+2}}if(f.left<0){f.left=parseInt(this.host.coord().left)+"px"}if(f.top+j>e){f.top-=Math.abs(j+c)}return f},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},open:function(){a.jqx.aria(this,"aria-expanded",true);var p=this;if((this.dropDownWidth==null||this.dropDownWidth=="auto")&&this.width!=null&&this.width.indexOf&&this.width.indexOf("%")!=-1){var c=this.host.width();this.container.width(parseInt(c))}p._raiseEvent("2");var b=this.popupContent;var m=a(window).scrollTop();var i=a(window).scrollLeft();var l=parseInt(this._findPos(this.host[0])[1])+parseInt(this.host.outerHeight())-1+"px";var f,h=parseInt(Math.round(this.host.coord(true).left));f=h+"px";var o=a.jqx.mobile.isSafariMobileBrowser()||a.jqx.mobile.isWindowsPhone();var d=a.jqx.utilities.hasTransform(this.host);this.ishiding=false;this.tempSelectedIndex=this.selectedIndex;if(d||(o!=null&&o)){f=a.jqx.mobile.getLeftPos(this.element);l=a.jqx.mobile.getTopPos(this.element)+parseInt(this.host.outerHeight());if(a("body").css("border-top-width")!="0px"){l=parseInt(l)-this._getBodyOffset().top+"px"}if(a("body").css("border-left-width")!="0px"){f=parseInt(f)-this._getBodyOffset().left+"px"}}b.stop();this.host.addClass(this.toThemeProperty("jqx-dropdownlist-state-selected"));this.host.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this.arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down-selected"));var g=false;if(a.jqx.browser.msie&&a.jqx.browser.version<8){g=true}if(g){this.container.css("display","block")}this.container.css("left",f);this.container.css("top",l);var e=true;var q=false;var k=function(){if(this.dropDownHorizontalAlignment=="right"||this.rtl){var s=this.container.width();var r=Math.abs(s-this.host.width());if(s>this.host.width()){this.container.css("left",parseInt(Math.round(h))-r+"px")}else{this.container.css("left",parseInt(Math.round(h))+r+"px")}}};k.call(this);if(this.enableBrowserBoundsDetection){var j=this.testOffset(b,{left:parseInt(this.container.css("left")),top:parseInt(l)},parseInt(this.host.outerHeight()));if(parseInt(this.container.css("top"))!=j.top){q=true;this.container.height(b.outerHeight());b.css("top",23);if(this.interval){clearInterval(this.interval)}this.interval=setInterval(function(){if(b.outerHeight()!=p.container.height()){var r=p.testOffset(b,{left:parseInt(p.container.css("left")),top:parseInt(l)},parseInt(p.host.outerHeight()));p.container.css("top",r.top);p.container.height(b.outerHeight())}},50)}else{b.css("top",0)}this.container.css("top",j.top);if(parseInt(this.container.css("left"))!=j.left){this.container.css("left",j.left)}}if(this.animationType=="none"){this.container.css("visibility","visible");a.data(document.body,"openedJQXButtonParent",p);a.data(document.body,"openedJQXButton"+this.element.id,b);b.css("margin-top",0);b.css("opacity",1);this._raiseEvent("0");k.call(p)}else{this.container.css("visibility","visible");var n=b.outerHeight();p.isanimating=true;if(this.animationType=="fade"){b.css("margin-top",0);b.css("opacity",0);b.animate({opacity:1},this.openDelay,function(){a.data(document.body,"openedJQXButtonParent",p);a.data(document.body,"openedJQXButton"+p.element.id,b);p.ishiding=false;p.isanimating=false;p._raiseEvent("0")});k.call(p)}else{b.css("opacity",1);if(q){b.css("margin-top",n)}else{b.css("margin-top",-n)}k.call(p);b.animate({"margin-top":0},this.openDelay,function(){a.data(document.body,"openedJQXButtonParent",p);a.data(document.body,"openedJQXButton"+p.element.id,b);p.ishiding=false;p.isanimating=false;p._raiseEvent("0")})}}if(!q){this.host.addClass(this.toThemeProperty("jqx-rc-b-expanded"));this.container.addClass(this.toThemeProperty("jqx-rc-t-expanded"))}else{this.host.addClass(this.toThemeProperty("jqx-rc-t-expanded"));this.container.addClass(this.toThemeProperty("jqx-rc-b-expanded"))}this.firstDiv.focus();setTimeout(function(){p.firstDiv.focus()},10);this.container.addClass(this.toThemeProperty("jqx-fill-state-focus"))},close:function(){a.jqx.aria(this,"aria-expanded",false);var e=this.popupContent;var d=this.container;var f=this;f._raiseEvent("3");var c=false;if(a.jqx.browser.msie&&a.jqx.browser.version<8){c=true}if(!this.isOpened()){return}a.data(document.body,"openedJQXButton"+this.element.id,null);if(this.animationType=="none"){this.container.css("visibility","hidden");if(c){this.container.css("display","none")}}else{if(!f.ishiding){f.isanimating=true;e.stop();var b=e.outerHeight();e.css("margin-top",0);var g=-b;if(parseInt(this.container.coord().top)0){this.dropDownButtonContent[0].style.width=c+"px"}this.dropDownButtonContent[0].style.height=parseInt(b)+"px";this.dropDownButtonContent[0].style.left="0px";this.dropDownButtonContent[0].style.top="0px";this.dropDownButtonArrow[0].style.width=parseInt(d)+"px";this.dropDownButtonArrow[0].style.height=parseInt(b)+"px";if(this.rtl){this.dropDownButtonArrow.css("float","left");this.dropDownButtonContent.css("float","right");this.dropDownButtonContent.css("left",-g)}if(this.dropDownWidth!=null){if(this.dropDownWidth.toString().indexOf("%")>=0){var f=(parseInt(this.dropDownWidth)*this.host.width())/100;this.container.width(f)}else{this.container.width(this.dropDownWidth)}}if(this.dropDownHeight!=null){this.container.height(this.dropDownHeight)}},destroy:function(){this.removeHandler(this.dropDownButtonWrapper,"selectstart");this.removeHandler(this.dropDownButtonWrapper,"mousedown");this.removeHandler(this.host,"keydown");this.host.removeClass();this.removeHandler(a(document),"mousedown."+this.element.id,self.closeOpenedDropDown);this.host.remove();this.container.remove()},_raiseEvent:function(f,c){if(c==undefined){c={owner:null}}if(f==2&&!this.contentInitialized){if(this.initContent){this.initContent();this.contentInitialized=true}}var d=this.events[f];args=c;args.owner=this;var e=new jQuery.Event(d);e.owner=this;if(f==2||f==3||f==4){e.args=c}var b=this.host.trigger(e);return b},resize:function(c,b){this.width=c;this.height=b;this._setSize();this._arrange()},propertyChangedHandler:function(b,c,e,d){if(this.isInitialized==undefined||this.isInitialized==false){return}if(c=="rtl"){if(d){b.dropDownButtonArrow.css("float","left");b.dropDownButtonContent.css("float","right")}else{b.dropDownButtonArrow.css("float","right");b.dropDownButtonContent.css("float","left")}}if(c=="autoOpen"){b.render()}if(c=="theme"&&d!=null){a.jqx.utilities.setTheme(e,d,b.host)}if(c=="width"||c=="height"){b._setSize();b._arrange()}}})})(jQuery);(function(a){a.jqx.jqxWidget("jqxColorPicker","",{});a.extend(a.jqx._jqxColorPicker.prototype,{defineInstance:function(){this.disabled=false;this.height=null;this.width=null;this.color=new a.jqx.color({hex:"ff0000"});this.redString="R:";this.greenString="G:";this.blueString="B:";this.showTransparent=false;this.colorMode="saturation";this._delayLoading=false;this.events=["colorchange"]},createInstance:function(c){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("
");this.container.appendTo(this.host);this.colorMap=a("
");this.colorMap.appendTo(this.container);this.colorBar=a("
");this.colorBar.appendTo(this.container);this.colorPanel=a("
");this.colorPanel.appendTo(this.container);this.hexPanel=a("
");this.hexPanel.appendTo(this.colorPanel);this.hexPanel.append('# ');this.hex=a(" ");this.hex.addClass(this.toThemeProperty("jqx-input"));this.hex.addClass(this.toThemeProperty("jqx-widget-content"));this.hex.appendTo(this.hexPanel);this.colorPanel.append('
');this.rgb=a("
");this.rgb.appendTo(this.colorPanel);this.red=a(" ");this.red.addClass(this.toThemeProperty("jqx-input"));this.red.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.redString+" ");this.red.appendTo(this.rgb);this.green=a(" ");this.green.addClass(this.toThemeProperty("jqx-input"));this.green.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.greenString+" ");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(" ");this.blue.addClass(this.toThemeProperty("jqx-input"));this.blue.addClass(this.toThemeProperty("jqx-widget-content"));this.rgb.append(''+this.blueString+" ");this.blue.appendTo(this.rgb);this.preview=a("
");this.preview.addClass(this.toThemeProperty("jqx-widget-content"));this.preview.appendTo(this.colorPanel);this.colorBarPointer=a("
");this.colorBarPointer.addClass(this.toThemeProperty("jqx-color-picker-bar-pointer"));this.colorMapPointer=a("
");this.colorMapPointer.addClass(this.toThemeProperty("jqx-color-picker-pointer"));this.transparent=a("");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 jQuery.Event(d);f.owner=this;f.args=e;var b=this.host.trigger(f);return b},setColor:function(b){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(nf.left+d){k=d}else{k=n-f.left+1}}if(mf.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(d0){this.blue.width(f/3);this.green.width(f/3);this.red.width(f/3);return}},_getColorPointer:function(){var b=a("
");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("
");this.colorBarImageContainer.width(this.colorBar.width());this.colorBarImageContainer.height(this.colorBar.height());this.colorBarImageContainer.appendTo(this.colorBar);this.colorBarImage=a(" ");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(" ");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(" ");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}})(jQuery);(function(a){a.jqx.jqxWidget("jqxSwitchButton","",{});a.extend(a.jqx._jqxSwitchButton.prototype,{defineInstance:function(){this.disabled=false;this.checked=false;this.onLabel="On";this.offLabel="Off";this.toggleMode="default";this.animationDuration=250;this.width=90;this.height=30;this.animationEnabled=true;this.thumbSize="40%";this.orientation="horizontal";this.switchRatio="50%";this.metroMode=false;this._isMouseDown=false;this.rtl=false;this._dimensions={horizontal:{size:"width",opSize:"height",oSize:"outerWidth",opOSize:"outerHeight",pos:"left",oPos:"top",opposite:"vertical"},vertical:{size:"height",opSize:"width",oSize:"outerHeight",opOSize:"outerWidth",pos:"top",oPos:"left",opposite:"horizontal"}};this._touchEvents={mousedown:"touchstart",click:"touchend",mouseup:"touchend",mousemove:"touchmove",mouseenter:"mouseenter",mouseleave:"mouseleave"};this._borders={};this._isTouchDevice=false;this._distanceRequired=3;this._isDistanceTraveled=false;this._thumb;this._onLabel;this._offLabel;this._wrapper;this._animationActive=false;this.aria={"aria-checked":{name:"checked",type:"boolean"},"aria-disabled":{name:"disabled",type:"boolean"}};this._events=["checked","unchecked","change"]},createInstance:function(b){if(this.element.nodeName){if(this.element.nodeName=="INPUT"||this.element.nodeName=="BUTTON"){throw"jqxSwitchButton can be rendered only from a DIV tag."}}this.host.attr("role","checkbox");a.jqx.aria(this);this.render();var c=this;a.jqx.utilities.resize(this.host,function(){c.render()})},resize:function(c,b){this.width=c;this.height=b;this.render()},render:function(){this.innerHTML="";if(this.theme&&this.theme!=""&&(this.theme.indexOf("metro")!=-1||this.theme.indexOf("windowsphone")!=-1||this.theme.indexOf("office")!=-1)){if(this.thumbSize=="40%"){this.thumbSize=12}this.metroMode=true}var c=a.data(document.body,"jqx-switchbutton")||1;this._idHandler(c);a.data(document.body,"jqx-draggables",++c);this._isTouchDevice=a.jqx.mobile.isTouchDevice();this.switchRatio=parseInt(this.switchRatio,10);this._render();this._addClasses();this._performLayout();this._removeEventHandlers();this._addEventHandles();this._disableSelection();var b=this;if(!this.checked){this._switchButton(false,0,true)}if(this.disabled){this.element.disabled=true}},setOnLabel:function(b){this._onLabel.html(''+b+"
");this._centerLabels()},setOffLabel:function(b){this._offLabel.html(''+b+"
");this._centerLabels()},toggle:function(){if(this.checked){this.uncheck()}else{this.check()}},val:function(b){if(arguments.length==0||(b!=null&&typeof(b)=="object")){return this.checked}if(typeof b=="string"){if(b=="true"){this.check()}if(b=="false"){this.uncheck()}if(b==""){this.indeterminate()}}else{if(b==true){this.check()}if(b==false){this.uncheck()}if(b==null){this.indeterminate()}}return this.checked},uncheck:function(){var b=this;this._switchButton(false);a.jqx.aria(this,"aria-checked",this.checked)},check:function(){var b=this;this._switchButton(true);a.jqx.aria(this,"aria-checked",this.checked)},_idHandler:function(b){if(!this.element.id){var c="jqx-switchbutton-"+b;this.element.id=c}},_dir:function(b){return this._dimensions[this.orientation][b]},_getEvent:function(c){if(this._isTouchDevice){var b=this._touchEvents[c];return a.jqx.mobile.getTouchEventName(b)}else{return c}},_render:function(){this._thumb=a("
");this._onLabel=a("
");this._offLabel=a("
");this._wrapper=a("
");this._onLabel.appendTo(this.host);this._thumb.appendTo(this.host);this._offLabel.appendTo(this.host);this.host.wrapInner(this._wrapper);this._wrapper=this.host.children();this.setOnLabel(this.onLabel);this.setOffLabel(this.offLabel)},_addClasses:function(){var c=this._thumb,d=this._onLabel,b=this._offLabel;this.host.addClass(this.toThemeProperty("jqx-switchbutton"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this._wrapper.addClass(this.toThemeProperty("jqx-switchbutton-wrapper"));c.addClass(this.toThemeProperty("jqx-fill-state-normal"));c.addClass(this.toThemeProperty("jqx-switchbutton-thumb"));d.addClass(this.toThemeProperty("jqx-switchbutton-label-on"));d.addClass(this.toThemeProperty("jqx-switchbutton-label"));b.addClass(this.toThemeProperty("jqx-switchbutton-label-off"));b.addClass(this.toThemeProperty("jqx-switchbutton-label"));if(this.checked){this.host.addClass(this.toThemeProperty("jqx-switchbutton-on"))}else{this.host.removeClass(this.toThemeProperty("jqx-switchbutton-on"))}},_performLayout:function(){var g=this.host,e=this._dir("opSize"),f=this._dir("size"),i=this._wrapper,d;g.css({width:this.width,height:this.height});i.css(e,g[e]());this._thumbLayout();this._labelsLayout();d=this._borders[this._dir("opposite")];i.css(f,g[f]()+this._offLabel[this._dir("oSize")]()+d);i.css(e,g[e]());if(this.metroMode||(this.theme&&this.theme!=""&&(this.theme.indexOf("metro")!=-1||this.theme.indexOf("office")!=-1))){var c=this._thumb,h=this._onLabel,b=this._offLabel;h.css("position","relative");h.css("top","1px");h.css("margin-left","1px");b.css("position","relative");b.css("top","1px");b.css("left","-2px");b.css("margin-right","1px");b.height(h.height()-2);b.width(h.width()-3);h.height(h.height()-2);h.width(h.width()-3);this._thumb[this._dir("size")](this.thumbSize+3);this._thumb.css("top","-1px");this._thumb[this._dir("opSize")](g[this._dir("opSize")]()+2);this._thumb.css("position","relative");this.host.css("overflow","hidden");if(this.checked){this._onLabel.css("visibility","visible");this._offLabel.css("visibility","hidden");this._thumb.css("left","0px")}else{this._onLabel.css("visibility","hidden");this._offLabel.css("visibility","visible");this._thumb.css("left","-2px")}}},_thumbLayout:function(){var d=this.thumbSize,e=this.host,b=0,f={horizontal:0,vertical:0},c=this;if(d.toString().indexOf("%")>=0){d=e[this._dir("size")]()*parseInt(d,10)/100}this._thumb[this._dir("size")](d);this._thumb[this._dir("opSize")](e[this._dir("opSize")]());this._handleThumbBorders()},_handleThumbBorders:function(){this._borders.horizontal=parseInt(this._thumb.css("border-left-width"),10)||0;this._borders.horizontal+=parseInt(this._thumb.css("border-right-width"),10)||0;this._borders.vertical=parseInt(this._thumb.css("border-top-width"),10)||0;this._borders.vertical+=parseInt(this._thumb.css("border-bottom-width"),10)||0;var b=this._borders[this._dir("opposite")];if(this.orientation==="horizontal"){this._thumb.css("margin-top",-b/2);this._thumb.css("margin-left",0)}else{this._thumb.css("margin-left",-b/2);this._thumb.css("margin-top",0)}},_labelsLayout:function(){var g=this.host,c=this._thumb,e=this._dir("opSize"),h=this._dir("size"),b=this._dir("oSize"),f=g[h]()-c[b](),d=this._borders[this._dir("opposite")]/2;this._onLabel[h](f+d);this._offLabel[h](f+d);if(this.rtl){this._onLabel[h](f+2*d)}this._onLabel[e](g[e]());this._offLabel[e](g[e]());this._orderLabels();this._centerLabels()},_orderLabels:function(){if(this.orientation==="horizontal"){var b="left";if(this.rtl){b="right"}this._onLabel.css("float",b);this._thumb.css("float",b);this._offLabel.css("float",b)}else{this._onLabel.css("display","block");this._offLabel.css("display","block")}},_centerLabels:function(){var c=this._onLabel.children("div"),b=this._offLabel.children("div"),e=c.parent(),f=e.height(),g=c.outerHeight(),d=this._borders[this.orientation]/2||0;if(g==0){g=14}var h=Math.floor((f-g)/2)+d;c.css("margin-top",h);b.css("margin-top",h)},_removeEventHandlers:function(){var b="."+this.element.id;this.removeHandler(this._wrapper,this._getEvent("click")+b+this.element.id,this._clickHandle);this.removeHandler(this._thumb,this._getEvent("mousedown")+b,this._mouseDown);this.removeHandler(a(document),this._getEvent("mouseup")+b,this._mouseUp);this.removeHandler(a(document),this._getEvent("mousemove")+b,this._mouseMove)},_addEventHandles:function(){var c="."+this.element.id,b=this;this.addHandler(this._thumb,"mouseenter"+c,function(){b._thumb.addClass(b.toThemeProperty("jqx-fill-state-hover"))});this.addHandler(this._thumb,"mouseleave"+c,function(){b._thumb.removeClass(b.toThemeProperty("jqx-fill-state-hover"))});this.addHandler(this._wrapper,this._getEvent("click")+c,this._clickHandle,{self:this});this.addHandler(this._thumb,this._getEvent("mousedown")+c,this._mouseDown,{self:this});this.addHandler(a(document),this._getEvent("mouseup")+c,this._mouseUp,{self:this});this.addHandler(a(document),this._getEvent("mousemove")+c,this._mouseMove,{self:this})},enable:function(){this.disabled=false;this.element.disabled=false;a.jqx.aria(this,"aria-disabled",this.disabled)},disable:function(){this.disabled=true;this.element.disabled=true;a.jqx.aria(this,"aria-disabled",this.disabled)},_clickHandle:function(c){var b=c.data.self;if((b.toggleMode==="click"||b.toggleMode==="default")&&!b.disabled){if(!b._isDistanceTraveled&&!b._dragged){b._wrapper.stop();b.toggle()}}b._thumb.removeClass(b.toThemeProperty("jqx-fill-state-pressed"))},_mouseDown:function(c){var b=c.data.self,d=b._wrapper;if(b.metroMode){b.host.css("overflow","hidden");b._onLabel.css("visibility","visible");b._offLabel.css("visibility","visible")}b._mouseStartPosition=b._getMouseCoordinates(c);b._buttonStartPosition={left:parseInt(d.css("margin-left"),10)||0,top:parseInt(d.css("margin-top"),10)||0};if(!b.disabled&&(b.toggleMode==="slide"||b.toggleMode==="default")){b._wrapper.stop();b._isMouseDown=true;b._isDistanceTraveled=false;b._dragged=false}b._thumb.addClass(b.toThemeProperty("jqx-fill-state-pressed"))},_mouseUp:function(d){var c=d.data.self;if(c.metroMode){}c._isMouseDown=false;c._thumb.removeClass(c.toThemeProperty("jqx-fill-state-pressed"));if(!c._isDistanceTraveled){return}var f=c._wrapper,b=parseInt(f.css("margin-"+c._dir("pos")),10)||0,e=c._dropHandler(b);if(e){c._switchButton(!c.checked)}else{c._switchButton(c.checked,null,true)}c._isDistanceTraveled=false},_mouseMove:function(f){var d=f.data.self,b=d._getMouseCoordinates(f);if(d._isMouseDown&&d._distanceTraveled(b)){var e=d._dir("pos"),h=d._wrapper,c=d._buttonStartPosition[e],g=c+b[e]-d._mouseStartPosition[e],g=d._validatePosition(g);d._dragged=true;h.css("margin-"+d._dir("pos"),g);d._onLabel.css("visibility","visible");d._offLabel.css("visibility","visible");return false}},_distanceTraveled:function(b){if(this._isDistanceTraveled){return true}else{if(!this._isMouseDown){return false}else{var d=this._mouseStartPosition,c=this._distanceRequired;this._isDistanceTraveled=Math.abs(b.left-d.left)>=c||Math.abs(b.top-d.top)>=c;return this._isDistanceTraveled}}},_validatePosition:function(c){var d=this._borders[this._dir("opposite")],b=0,e=-(this.host[this._dir("size")]()-this._thumb[this._dir("oSize")]())-d;if(bc){return e}return c},_dropHandler:function(c){var b=0,d=-(this.host[this._dir("size")]()-this._thumb[this._dir("oSize")]()),g=Math.abs(d-b),e=Math.abs(c-this._buttonStartPosition[this._dir("pos")]),f=g*(this.switchRatio/100);if(e>=f){return true}return false},_switchButton:function(c,h,g){if(this.metroMode){this.host.css("overflow","hidden");this._onLabel.css("visibility","visible");this._offLabel.css("visibility","visible");if(c){this._thumb.css("left","0px")}else{this._thumb.css("left","-2px")}}else{this._onLabel.css("visibility","visible");this._offLabel.css("visibility","visible")}var i=this._wrapper,d=this,f={},e=this._borders[this._dir("opposite")],b=0;if(typeof h==="undefined"){h=(this.animationEnabled?this.animationDuration:0)}if(!this.rtl){if(!c){b=this.host[this._dir("size")]()-this._thumb[this._dir("oSize")]()+e}}else{if(c){b=this.host[this._dir("size")]()-this._thumb[this._dir("oSize")]()+e;if(this.metroMode){b+=5}}else{if(this.metroMode){b-=3}}}f["margin-"+this._dir("pos")]=-b;if(c){d.host.addClass(d.toThemeProperty("jqx-switchbutton-on"))}else{d.host.removeClass(d.toThemeProperty("jqx-switchbutton-on"))}i.animate(f,h,function(){if(c){d._onLabel.css("visibility","visible");d._offLabel.css("visibility","hidden")}else{d._onLabel.css("visibility","hidden");d._offLabel.css("visibility","visible")}d.checked=c;if(!g){d._handleEvent(!c)}})},_handleEvent:function(b){if(b!==this.checked){this._raiseEvent(2,{check:this.checked,checked:this.checked})}if(b){this._raiseEvent(0,{checked:this.checked})}else{this._raiseEvent(1,{checked:this.checked})}},_disableSelection:function(){var c=this.host,b=c.find("*");a.each(b,function(d,e){e.onselectstart=function(){return false};a(e).addClass("jqx-disableselect")})},_getMouseCoordinates:function(b){if(this._isTouchDevice){return{left:b.originalEvent.touches[0].pageX,top:b.originalEvent.touches[0].pageY}}else{return{left:b.pageX,top:b.pageY}}},destroy:function(){this._removeEventHandlers();this.host.removeClass(this.toThemeProperty("jqx-switchbutton"));this._wrapper.remove()},_raiseEvent:function(d,b){var c=a.Event(this._events[d]);c.args=b;return this.host.trigger(c)},_themeChanger:function(f,g,e){if(!f){return}if(typeof e==="undefined"){e=this.host}var h=e[0].className.split(" "),b=[],j=[],d=e.children();for(var c=0;c=0){b.push(h[c]);j.push(h[c].replace(f,g))}}this._removeOldClasses(b,e);this._addNewClasses(j,e);for(var c=0;c0){this.host.width(parseInt(this.width))}if(this.height!=undefined&&parseInt(this.height)>0){this.host.height(parseInt(this.height))}this.isPercentage=false;if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width);this.isPercentage=true}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height);this.isPercentage=true}if(this.isPercentage){var e=this;a.jqx.utilities.resize(this.host,function(){e._arrange()},false)}this.thumbCapture=false;this.scrollOuterWrap=a(this.element.firstChild);this.scrollWrap=a(this.scrollOuterWrap[0].firstChild);this.btnUp=a(this.scrollWrap[0].firstChild);this.areaUp=a(this.btnUp[0].nextSibling);this.btnThumb=a(this.areaUp[0].nextSibling);this.arrowUp=a("
");this.arrowUp.appendTo(this.btnUp);this.areaDown=a(this.btnThumb[0].nextSibling);this.btnDown=a(this.areaDown[0].nextSibling);this.arrowDown=a("
");this.arrowDown.appendTo(this.btnDown);var b=this.element.id;this.btnUp[0].id="jqxScrollBtnUp"+b;this.btnDown[0].id="jqxScrollBtnDown"+b;this.btnThumb[0].id="jqxScrollThumb"+b;this.areaUp[0].id="jqxScrollAreaUp"+b;this.areaDown[0].id="jqxScrollAreaDown"+b;this.scrollWrap[0].id="jqxScrollWrap"+b;this.scrollOuterWrap[0].id="jqxScrollOuterWrap"+b;if(!this.host.jqxRepeatButton){throw new Error("jqxScrollBar: Missing reference to jqxbuttons.js.");return}this.btnUp.jqxRepeatButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.btnDown.jqxRepeatButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.btnDownInstance=a.data(this.btnDown[0],"jqxRepeatButton").instance;this.btnUpInstance=a.data(this.btnUp[0],"jqxRepeatButton").instance;this.areaUp.jqxRepeatButton({_scrollAreaButton:true,_ariaDisabled:true,overrideTheme:true});this.areaDown.jqxRepeatButton({_scrollAreaButton:true,_ariaDisabled:true,overrideTheme:true});this.btnThumb.jqxButton({_ariaDisabled:true,overrideTheme:true,disabled:this.disabled});this.propertyChangeMap.value=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.setPosition(parseFloat(i),true)}}};this.propertyChangeMap.width=function(f,h,g,i){if(f.width!=undefined&&parseInt(f.width)>0){f.host.width(parseInt(f.width));f._arrange()}};this.propertyChangeMap.height=function(f,h,g,i){if(f.height!=undefined&&parseInt(f.height)>0){f.host.height(parseInt(f.height));f._arrange()}};this.propertyChangeMap.theme=function(f,h,g,i){f.setTheme()};this.propertyChangeMap.max=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.max=parseInt(i);if(f.min>f.max){f.max=f.min+1}f._arrange();f.setPosition(f.value)}}};this.propertyChangeMap.min=function(f,h,g,i){if(!(isNaN(i))){if(g!=i){f.min=parseInt(i);if(f.min>f.max){f.max=f.min+1}f._arrange();f.setPosition(f.value)}}};this.propertyChangeMap.disabled=function(f,h,g,i){if(g!=i){if(i){f.host.addClass(f.toThemeProperty("jqx-fill-state-disabled"))}else{f.host.removeClass(f.toThemeProperty("jqx-fill-state-disabled"))}f.btnUp.jqxRepeatButton("disabled",f.disabled);f.btnDown.jqxRepeatButton("disabled",f.disabled);f.btnThumb.jqxButton("disabled",f.disabled)}};this.propertyChangeMap.touchMode=function(f,h,g,i){if(g!=i){f._updateTouchBehavior();if(i===true){f.showButtons=false;f.refresh()}else{if(i===false){f.showButtons=true;f.refresh()}}}};this.buttonUpCapture=false;this.buttonDownCapture=false;this._updateTouchBehavior();this.setPosition(this.value);this._addHandlers();this.setTheme()},resize:function(c,b){this.width=c;this.height=b;this._arrange()},_updateTouchBehavior:function(){this.isTouchDevice=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){if(a.jqx.browser.msie&&a.jqx.browser.version<9){this.setTheme();return}this.isTouchDevice=true;a.jqx.mobile.setMobileSimulator(this.btnThumb[0]);this._removeHandlers();this._addHandlers();this.setTheme()}else{if(this.touchMode==false){this.isTouchDevice=false}}},_addHandlers:function(){var e=this;var d=false;try{if(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch){d=true;this._touchSupport=true}}catch(h){}if(e.isTouchDevice||d){this.addHandler(this.btnThumb,a.jqx.mobile.getTouchEventName("touchend"),function(j){var k=e.vertical?e.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):e.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");var l=e.toThemeProperty("jqx-fill-state-pressed");e.btnThumb.removeClass(k);e.btnThumb.removeClass(l);if(!e.disabled){e.handlemouseup(e,j)}return false});this.addHandler(this.btnThumb,a.jqx.mobile.getTouchEventName("touchstart"),function(j){if(!e.disabled){if(e.touchMode==true){j.clientX=j.originalEvent.clientX;j.clientY=j.originalEvent.clientY}else{var k=j;if(k.originalEvent.touches&&k.originalEvent.touches.length){j.clientX=k.originalEvent.touches[0].clientX;j.clientY=k.originalEvent.touches[0].clientY}else{j.clientX=j.originalEvent.clientX;j.clientY=j.originalEvent.clientY}}e.handlemousedown(j);if(j.preventDefault){j.preventDefault()}}});a.jqx.mobile.touchScroll(this.element,e.max,function(p,o,k,j,l){if(e.host.css("visibility")=="visible"){if(e.touchMode==true){l.clientX=l.originalEvent.clientX;l.clientY=l.originalEvent.clientY}else{var n=l;if(n.originalEvent.touches&&n.originalEvent.touches.length){l.clientX=n.originalEvent.touches[0].clientX;l.clientY=n.originalEvent.touches[0].clientY}else{l.clientX=l.originalEvent.clientX;l.clientY=l.originalEvent.clientY}}var m=e.vertical?e.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):e.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");e.btnThumb.addClass(m);e.btnThumb.addClass(e.toThemeProperty("jqx-fill-state-pressed"));e.thumbCapture=true;e.handlemousemove(l)}},e.element.id)}this.addHandler(this.btnUp,"click",function(k){var j=e.step;if(e.rtl&&!e.vertical){j=-e.step}if(e.buttonUpCapture&&!e.isTouchDevice){if(!e.disabled){e.setPosition(e.value-j)}}else{if(!e.disabled&&e.isTouchDevice){e.setPosition(e.value-j)}}});this.addHandler(this.btnDown,"click",function(k){var j=e.step;if(e.rtl&&!e.vertical){j=-e.step}if(e.buttonDownCapture&&!e.isTouchDevice){if(!e.disabled){e.setPosition(e.value+j)}}else{if(!e.disabled&&e.isTouchDevice){e.setPosition(e.value+j)}}});if(!this.isTouchDevice){try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var i=null;if(window.parent&&document.referrer){i=document.referrer}if(i&&i.indexOf(document.location.host)!=-1){var g=function(j){if(!e.disabled){e.handlemouseup(e,j)}};if(window.top.document.addEventListener){window.top.document.addEventListener("mouseup",g,false)}else{if(window.top.document.attachEvent){window.top.document.attachEvent("onmouseup",g)}}}}}}catch(f){}this.addHandler(this.btnDown,"mouseup",function(k){if(!e.btnDownInstance.base.disabled&&e.buttonDownCapture){e.buttonDownCapture=false;e.btnDown.removeClass(e.toThemeProperty("jqx-scrollbar-button-state-pressed"));e.btnDown.removeClass(e.toThemeProperty("jqx-fill-state-pressed"));e._removeArrowClasses("pressed","down");e.handlemouseup(e,k);var j=e.step;if(e.rtl&&!e.vertical){j=-e.step}e.setPosition(e.value+j);return false}});this.addHandler(this.btnUp,"mouseup",function(k){if(!e.btnUpInstance.base.disabled&&e.buttonUpCapture){e.buttonUpCapture=false;e.btnUp.removeClass(e.toThemeProperty("jqx-scrollbar-button-state-pressed"));e.btnUp.removeClass(e.toThemeProperty("jqx-fill-state-pressed"));e._removeArrowClasses("pressed","up");e.handlemouseup(e,k);var j=e.step;if(e.rtl&&!e.vertical){j=-e.step}e.setPosition(e.value-j);return false}});this.addHandler(this.btnDown,"mousedown",function(j){if(!e.btnDownInstance.base.disabled){e.buttonDownCapture=true;e.btnDown.addClass(e.toThemeProperty("jqx-fill-state-pressed"));e.btnDown.addClass(e.toThemeProperty("jqx-scrollbar-button-state-pressed"));e._addArrowClasses("pressed","down");return false}});this.addHandler(this.btnUp,"mousedown",function(j){if(!e.btnUpInstance.base.disabled){e.buttonUpCapture=true;e.btnUp.addClass(e.toThemeProperty("jqx-fill-state-pressed"));e.btnUp.addClass(e.toThemeProperty("jqx-scrollbar-button-state-pressed"));e._addArrowClasses("pressed","up");return false}})}var c="click";if(this.isTouchDevice){c=a.jqx.mobile.getTouchEventName("touchend")}this.addHandler(this.areaUp,c,function(k){if(!e.disabled){var j=e.largestep;if(e.rtl&&!e.vertical){j=-e.largestep}e.setPosition(e.value-j);return false}});this.addHandler(this.areaDown,c,function(k){if(!e.disabled){var j=e.largestep;if(e.rtl&&!e.vertical){j=-e.largestep}e.setPosition(e.value+j);return false}});this.addHandler(this.areaUp,"mousedown",function(j){if(!e.disabled){e.areaUpCapture=true;return false}});this.addHandler(this.areaDown,"mousedown",function(j){if(!e.disabled){e.areaDownCapture=true;return false}});this.addHandler(this.btnThumb,"mousedown",function(j){if(!e.disabled){e.handlemousedown(j)}return false});this.addHandler(this.btnThumb,"dragstart",function(j){return false});this.addHandler(a(document),"mouseup."+this.element.id,function(j){if(!e.disabled){e.handlemouseup(e,j)}});if(!this.isTouchDevice){this.mousemoveFunc=function(j){if(!e.disabled){e.handlemousemove(j)}};this.addHandler(a(document),"mousemove."+this.element.id,this.mousemoveFunc);this.addHandler(a(document),"mouseleave."+this.element.id,function(j){if(!e.disabled){e.handlemouseleave(j)}});this.addHandler(a(document),"mouseenter."+this.element.id,function(j){if(!e.disabled){e.handlemouseenter(j)}});if(!e.disabled){this.addHandler(this.btnUp,"mouseenter",function(){if(!e.disabled&&!e.btnUpInstance.base.disabled&&e.touchMode!=true){e.btnUp.addClass(e.toThemeProperty("jqx-scrollbar-button-state-hover"));e.btnUp.addClass(e.toThemeProperty("jqx-fill-state-hover"));e._addArrowClasses("hover","up")}});this.addHandler(this.btnUp,"mouseleave",function(){if(!e.disabled&&!e.btnUpInstance.base.disabled&&e.touchMode!=true){e.btnUp.removeClass(e.toThemeProperty("jqx-scrollbar-button-state-hover"));e.btnUp.removeClass(e.toThemeProperty("jqx-fill-state-hover"));e._removeArrowClasses("hover","up")}});var b=e.toThemeProperty("jqx-scrollbar-thumb-state-hover");if(!e.vertical){b=e.toThemeProperty("jqx-scrollbar-thumb-state-hover-horizontal")}this.addHandler(this.btnThumb,"mouseenter",function(){if(!e.disabled&&e.touchMode!=true){e.btnThumb.addClass(b);e.btnThumb.addClass(e.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.btnThumb,"mouseleave",function(){if(!e.disabled&&e.touchMode!=true){e.btnThumb.removeClass(b);e.btnThumb.removeClass(e.toThemeProperty("jqx-fill-state-hover"))}});this.addHandler(this.btnDown,"mouseenter",function(){if(!e.disabled&&!e.btnDownInstance.base.disabled&&e.touchMode!=true){e.btnDown.addClass(e.toThemeProperty("jqx-scrollbar-button-state-hover"));e.btnDown.addClass(e.toThemeProperty("jqx-fill-state-hover"));e._addArrowClasses("hover","down")}});this.addHandler(this.btnDown,"mouseleave",function(){if(!e.disabled&&!e.btnDownInstance.base.disabled&&e.touchMode!=true){e.btnDown.removeClass(e.toThemeProperty("jqx-scrollbar-button-state-hover"));e.btnDown.removeClass(e.toThemeProperty("jqx-fill-state-hover"));e._removeArrowClasses("hover","down")}})}}},destroy:function(){var b=this.btnUp;var f=this.btnDown;var d=this.btnThumb;var c=this.scrollWrap;var h=this.areaUp;var e=this.areaDown;this.arrowUp.remove();delete this.arrowUp;this.arrowDown.remove();delete this.arrowDown;e.removeClass();h.removeClass();f.removeClass();b.removeClass();d.removeClass();b.jqxRepeatButton("destroy");f.jqxRepeatButton("destroy");h.jqxRepeatButton("destroy");e.jqxRepeatButton("destroy");d.jqxButton("destroy");var g=a.data(this.element,"jqxScrollBar");this._removeHandlers();this.btnUp=null;this.btnDown=null;this.scrollWrap=null;this.areaUp=null;this.areaDown=null;this.scrollOuterWrap=null;delete this.mousemoveFunc;delete this.btnDownInstance;delete this.btnUpInstance;delete this.scrollOuterWrap;delete this.scrollWrap;delete this.btnDown;delete this.areaDown;delete this.areaUp;delete this.btnDown;delete this.btnUp;delete this.btnThumb;delete this.propertyChangeMap.value;delete this.propertyChangeMap.min;delete this.propertyChangeMap.max;delete this.propertyChangeMap.touchMode;delete this.propertyChangeMap.disabled;delete this.propertyChangeMap.theme;delete this.propertyChangeMap;if(g){delete g.instance}this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_removeHandlers:function(){this.removeHandler(this.btnUp,"mouseenter");this.removeHandler(this.btnDown,"mouseenter");this.removeHandler(this.btnThumb,"mouseenter");this.removeHandler(this.btnUp,"mouseleave");this.removeHandler(this.btnDown,"mouseleave");this.removeHandler(this.btnThumb,"mouseleave");this.removeHandler(this.btnUp,"click");this.removeHandler(this.btnDown,"click");this.removeHandler(this.btnDown,"mouseup");this.removeHandler(this.btnUp,"mouseup");this.removeHandler(this.btnDown,"mousedown");this.removeHandler(this.btnUp,"mousedown");this.removeHandler(this.areaUp,"mousedown");this.removeHandler(this.areaDown,"mousedown");this.removeHandler(this.areaUp,"click");this.removeHandler(this.areaDown,"click");this.removeHandler(this.btnThumb,"mousedown");this.removeHandler(this.btnThumb,"dragstart");this.removeHandler(a(document),"mouseup."+this.element.id);if(!this.mousemoveFunc){this.removeHandler(a(document),"mousemove."+this.element.id)}else{this.removeHandler(a(document),"mousemove."+this.element.id,this.mousemoveFunc)}this.removeHandler(a(document),"mouseleave."+this.element.id);this.removeHandler(a(document),"mouseenter."+this.element.id);var b=this},_addArrowClasses:function(c,b){if(c=="pressed"){c="selected"}if(c!=""){c="-"+c}if(this.vertical){if(b=="up"||b==undefined){this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-up"+c))}if(b=="down"||b==undefined){this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-down"+c))}}else{if(b=="up"||b==undefined){this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-left"+c))}if(b=="down"||b==undefined){this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-right"+c))}}},_removeArrowClasses:function(c,b){if(c=="pressed"){c="selected"}if(c!=""){c="-"+c}if(this.vertical){if(b=="up"||b==undefined){this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-up"+c))}if(b=="down"||b==undefined){this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-down"+c))}}else{if(b=="up"||b==undefined){this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-left"+c))}if(b=="down"||b==undefined){this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-right"+c))}}},setTheme:function(){var o=this.btnUp;var m=this.btnDown;var p=this.btnThumb;var e=this.scrollWrap;var g=this.areaUp;var h=this.areaDown;var f=this.arrowUp;var i=this.arrowDown;this.scrollWrap[0].className=this.toThemeProperty("jqx-reset");this.scrollOuterWrap[0].className=this.toThemeProperty("jqx-reset");var k=this.toThemeProperty("jqx-reset");this.areaDown[0].className=k;this.areaUp[0].className=k;var d=this.toThemeProperty("jqx-scrollbar")+" "+this.toThemeProperty("jqx-widget")+" "+this.toThemeProperty("jqx-widget-content");this.host.addClass(d);m[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");o[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");var q="";if(this.vertical){f[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-up");i[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-down");q=this.toThemeProperty("jqx-scrollbar-thumb-state-normal")}else{f[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-left");i[0].className=k+" "+this.toThemeProperty("jqx-icon-arrow-right");q=this.toThemeProperty("jqx-scrollbar-thumb-state-normal-horizontal")}q+=" "+this.toThemeProperty("jqx-fill-state-normal");p[0].className=q;if(this.disabled){e.addClass(this.toThemeProperty("jqx-fill-state-disabled"));e.removeClass(this.toThemeProperty("jqx-scrollbar-state-normal"))}else{e.addClass(this.toThemeProperty("jqx-scrollbar-state-normal"));e.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}if(this.roundedCorners=="all"){this.host.addClass(this.toThemeProperty("jqx-rc-all"));if(this.vertical){var j=a.jqx.cssroundedcorners("top");j=this.toThemeProperty(j);o.addClass(j);var c=a.jqx.cssroundedcorners("bottom");c=this.toThemeProperty(c);m.addClass(c)}else{var n=a.jqx.cssroundedcorners("left");n=this.toThemeProperty(n);o.addClass(n);var l=a.jqx.cssroundedcorners("right");l=this.toThemeProperty(l);m.addClass(l)}}else{var b=a.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);elBtnUp.addClass(b);elBtnDown.addClass(b)}var b=a.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);if(!p.hasClass(b)){p.addClass(b)}if(this.isTouchDevice&&this.touchModeStyle!=false){this.showButtons=false;p.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-normal-touch"))}},isScrolling:function(){if(this.thumbCapture==undefined||this.buttonDownCapture==undefined||this.buttonUpCapture==undefined||this.areaDownCapture==undefined||this.areaUpCapture==undefined){return false}return this.thumbCapture||this.buttonDownCapture||this.buttonUpCapture||this.areaDownCapture||this.areaUpCapture},handlemousedown:function(c){if(this.thumbCapture==undefined||this.thumbCapture==false){this.thumbCapture=true;var b=this.btnThumb;if(b!=null){b.addClass(this.toThemeProperty("jqx-fill-state-pressed"));if(this.vertical){b.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"))}else{b.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"))}}}this.dragStartX=c.clientX;this.dragStartY=c.clientY;this.dragStartValue=this.value},toggleHover:function(c,b){},refresh:function(){this._arrange()},_setElementPosition:function(c,b,d){if(!isNaN(b)){if(parseInt(c[0].style.left)!=parseInt(b)){c[0].style.left=b+"px"}}if(!isNaN(d)){if(parseInt(c[0].style.top)!=parseInt(d)){c[0].style.top=d+"px"}}},_setElementTopPosition:function(b,c){if(!isNaN(c)){b[0].style.top=c+"px"}},_setElementLeftPosition:function(c,b){if(!isNaN(b)){c[0].style.left=b+"px"}},handlemouseleave:function(e){var b=this.btnUp;var d=this.btnDown;if(this.buttonDownCapture||this.buttonUpCapture){b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));d.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));this._removeArrowClasses("pressed")}if(this.thumbCapture!=true){return}var c=this.btnThumb;var f=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");c.removeClass(f);c.removeClass(this.toThemeProperty("jqx-fill-state-pressed"))},handlemouseenter:function(e){var b=this.btnUp;var d=this.btnDown;if(this.buttonUpCapture){b.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));b.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._addArrowClasses("pressed","up")}if(this.buttonDownCapture){d.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));d.addClass(this.toThemeProperty("jqx-fill-state-pressed"));this._addArrowClasses("pressed","down")}if(this.thumbCapture!=true){return}var c=this.btnThumb;if(this.vertical){c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"))}else{c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"))}c.addClass(this.toThemeProperty("jqx-fill-state-pressed"))},handlemousemove:function(b){var i=this.btnUp;var e=this.btnDown;var d=0;if(e==null||i==null){return}if(i!=null&&e!=null&&this.buttonDownCapture!=undefined&&this.buttonUpCapture!=undefined){if(this.buttonDownCapture&&b.which==d){e.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed","down");this.buttonDownCapture=false}else{if(this.buttonUpCapture&&b.which==d){i.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));i.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed","up");this.buttonUpCapture=false}}}if(this.thumbCapture!=true){return false}var k=this.btnThumb;if(b.which==d&&!this.isTouchDevice&&!this._touchSupport){this.thumbCapture=false;this._arrange();var j=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");k.removeClass(j);k.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));return true}if(b.preventDefault!=undefined){b.preventDefault()}if(b.originalEvent!=null){b.originalEvent.mouseHandled=true}if(b.stopPropagation!=undefined){b.stopPropagation()}var l=0;try{if(!this.vertical){l=b.clientX-this.dragStartX}else{l=b.clientY-this.dragStartY}var f=this._btnAndThumbSize;if(!this._btnAndThumbSize){f=(this.vertical)?i.height()+e.height()+k.height():i.width()+e.width()+k.width()}var g=(this.max-this.min)/(this.scrollBarSize-f);if(this.thumbStep=="auto"){l*=g}else{l*=g;if(Math.abs(this.dragStartValue+l-this.value)>=parseInt(this.thumbStep)){var c=Math.round(parseInt(l)/this.thumbStep)*this.thumbStep;if(this.rtl&&!this.vertical){this.setPosition(this.dragStartValue-c)}else{this.setPosition(this.dragStartValue+c)}return false}else{return false}}var c=l;if(this.rtl&&!this.vertical){c=-l}this.setPosition(this.dragStartValue+c)}catch(h){alert(h)}return false},handlemouseup:function(d,g){var c=false;if(this.thumbCapture){this.thumbCapture=false;var e=this.btnThumb;var h=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");e.removeClass(h);e.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));c=true;this._mouseup=new Date()}this.areaDownCapture=this.areaUpCapture=false;if(this.buttonUpCapture||this.buttonDownCapture){var b=this.btnUp;var f=this.btnDown;this.buttonUpCapture=false;this.buttonDownCapture=false;b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));f.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed"));b.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));f.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));this._removeArrowClasses("pressed");c=true;this._mouseup=new Date()}if(c){if(g.preventDefault!=undefined){g.preventDefault()}if(g.originalEvent!=null){g.originalEvent.mouseHandled=true}if(g.stopPropagation!=undefined){g.stopPropagation()}}},setPosition:function(b,g){var d=this.element;if(b==undefined||b==NaN){b=this.min}if(b>=this.max){b=this.max}if(b1){c=(b/(d+b)*b)}else{if(d==1){c=b}}if(this.thumbSize>0){c=this.thumbSize}if(c=0){e[0].style.width=m-k-i+"px"}else{e[0].style.width="0px"}this._setElementLeftPosition(n,l);this._setElementLeftPosition(o,l+k);this._setElementLeftPosition(e,2+l+k+d)}},_arrange:function(){if(this._initialLayout){this._initialLayout=false;return}var d=this.element;var g=this.areaUp;var r=this.areaDown;var c=this.btnUp;var k=this.btnDown;var s=this.btnThumb;var n=this.scrollWrap;var l=parseInt(this.element.style.height);var o=parseInt(this.element.style.width);if(this.isPercentage){var l=this.host.height();var o=this.host.width()}if(isNaN(l)){l=0}if(isNaN(o)){o=0}this._width=o;this._height=l;var b=(!this.vertical)?l:o;if(!this.showButtons){b=0}c[0].style.width=b+"px";c[0].style.height=b+"px";k[0].style.width=b+"px";k[0].style.height=b+"px";if(this.vertical){n[0].style.width=o+2+"px"}else{n[0].style.height=l+2+"px"}this._setElementPosition(c,0,0);var q=b+2;if(this.vertical){this._setElementPosition(k,0,l-q)}else{this._setElementPosition(k,o-q,0)}var e=(!this.vertical)?o:l;this.scrollBarSize=e;var h=this._getThumbSize(e-2*b);h=Math.round(h);if(h0){g[0].style.width=u+"px"}if(l>0){g[0].style.height=l+"px"}var j=(e-u-f);if(j<0){j=0}r[0].style.width=j+"px";r[0].style.height=l+"px";var p=parseInt(this.element.style.width);if(this.isPercentage){p=this.host.width()}s[0].style.visibility="inherit";if(p-3*parseInt(b)<0){s[0].style.visibility="hidden"}else{if(p
");if(!this.host.jqxButton){throw new Error("jqxPanel: Missing reference to jqxbuttons.js.")}if(!this.host.jqxScrollBar){throw new Error("jqxPanel: Missing reference to jqxscrollbar.js.")}var d=this.host.children();this._rtl=false;if(d.length>0&&d.css("direction")=="rtl"){this.rtl=true;this._rtl=true}this.host.wrapInner(c);var g=this.host.find("#verticalScrollBar");g[0].id=this.element.id+"verticalScrollBar";this.vScrollBar=g.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme});var f=this.host.find("#horizontalScrollBar");f[0].id=this.element.id+"horizontalScrollBar";this.hScrollBar=f.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme});this.content=this.host.find("#panelContent");this.wrapper=this.host.find("#panelWrapper");this.content.addClass(this.toThemeProperty("jqx-widget-content"));this.wrapper[0].id=this.wrapper[0].id+this.element.id;this.content[0].id=this.content[0].id+this.element.id;this.bottomRight=this.host.find("#bottomRight").addClass(this.toThemeProperty("jqx-panel-bottomright")).addClass(this.toThemeProperty("jqx-scrollbar-state-normal"));this.bottomRight[0].id="bottomRight"+this.element.id;this.vScrollBar.css("visibility","inherit");this.hScrollBar.css("visibility","inherit");this.vScrollInstance=a.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=a.data(this.hScrollBar[0],"jqxScrollBar").instance;var e=this;this.propertyChangeMap.disabled=function(h,j,i,k){e.vScrollBar.jqxScrollBar({disabled:e.disabled});e.hScrollBar.jqxScrollBar({disabled:e.disabled})};this.vScrollBar.jqxScrollBar({disabled:this.disabled});this.hScrollBar.jqxScrollBar({disabled:this.disabled});this._addHandlers();if(this.width==null){this.width=this.content.width()}if(this.height==null){this.height=this.content.height()}this._arrange();this.contentWidth=e.content[0].scrollWidth;this.contentHeight=e.content[0].scrollHeight;if(this.autoUpdate){e._autoUpdate()}this.propertyChangeMap.autoUpdate=function(h,j,i,k){if(e.autoUpdate){e._autoUpdate()}else{clearInterval(e.autoUpdateId);e.autoUpdateId=null}};this.addHandler(a(window),"unload",function(){if(e.autoUpdateId!=null){clearInterval(e.autoUpdateId);e.autoUpdateId=null;e.destroy()}});this._updateTouchScrolling();this._render()},hiddenParent:function(){return a.jqx.isHidden(this.host)},_updateTouchScrolling:function(){var b=this;if(this.touchMode==true){a.jqx.mobile.setMobileSimulator(this.element)}var c=this.isTouchDevice();if(c){a.jqx.mobile.touchScroll(this.element,b.vScrollInstance.max,function(f,e){if(b.vScrollBar.css("visibility")!="hidden"){var d=b.vScrollInstance.value;b.vScrollInstance.setPosition(d+e)}if(b.hScrollBar.css("visibility")!="hidden"){var d=b.hScrollInstance.value;b.hScrollInstance.setPosition(d+f)}},this.element.id,this.hScrollBar,this.vScrollBar);this._arrange()}this.vScrollBar.jqxScrollBar({touchMode:this.touchMode});this.hScrollBar.jqxScrollBar({touchMode:this.touchMode})},isTouchDevice:function(){var b=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){b=true}else{if(this.touchMode==false){b=false}}if(b&&this.touchModeStyle!=false){this.scrollBarSize=a.jqx.utilities.touchScrollBarSize}return b},append:function(b){if(b!=null){this.content.append(b);this._arrange()}},setcontent:function(b){this.content[0].innerHTML=b;this._arrange();var c=this;setTimeout(function(){c._arrange()},100)},prepend:function(b){if(b!=null){this.content.prepend(b);this._arrange()}},clearcontent:function(){this.content.text("");this.content.children().remove();this._arrange()},remove:function(b){if(b!=null){a(b).remove();this._arrange()}},_autoUpdate:function(){var b=this;this.autoUpdateId=setInterval(function(){var d=b.content[0].scrollWidth;var c=b.content[0].scrollHeight;var e=false;if(b.contentWidth!=d){b.contentWidth=d;e=true}if(b.contentHeight!=c){b.contentHeight=c;e=true}if(e){b._arrange()}},this.autoUpdateInterval)},_addHandlers:function(){var b=this;this.addHandler(this.vScrollBar,"valuechanged",function(c){b._render(b)});this.addHandler(this.hScrollBar,"valuechanged",function(c){b._render(b)});this.addHandler(this.host,"mousewheel",function(c){b.wheel(c,b)});this.addHandler(this.wrapper,"scroll",function(c){if(b.wrapper[0].scrollTop!=0){b.wrapper[0].scrollTop=0}if(b.wrapper[0].scrollLeft!=0){b.wrapper[0].scrollLeft=0}});this.addHandler(this.host,"mouseleave",function(c){b.focused=false});this.addHandler(this.host,"focus",function(c){b.focused=true});this.addHandler(this.host,"blur",function(c){b.focused=false});this.addHandler(this.host,"mouseenter",function(c){b.focused=true});a.jqx.utilities.resize(this.host,function(){if(a.jqx.isHidden(b.host)){return}b._arrange(false)})},resize:function(c,b){this.width=c;this.height=b;this._arrange(false)},_removeHandlers:function(){var b=this;this.removeHandler(this.vScrollBar,"valuechanged");this.removeHandler(this.hScrollBar,"valuechanged");this.removeHandler(this.host,"mousewheel");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.wrapper,"scroll");this.removeHandler(a(window),"resize."+this.element.id)},wheel:function(d,c){var e=0;if(d.originalEvent&&a.jqx.browser.msie&&d.originalEvent.wheelDelta){e=d.originalEvent.wheelDelta/120}if(!d){d=window.event}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(!b){if(d.preventDefault){d.preventDefault()}}if(!b){return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},scrollDown:function(){if(this.vScrollBar.css("visibility")=="hidden"){return false}var b=this.vScrollInstance;if(b.value+b.largestep<=b.max){b.setPosition(b.value+b.largestep);return true}else{if(b.value+b.largestep!=b.max){b.setPosition(b.max);return true}}return false},scrollUp:function(){if(this.vScrollBar.css("visibility")=="hidden"){return false}var b=this.vScrollInstance;if(b.value-b.largestep>=b.min){b.setPosition(b.value-b.largestep);return true}else{if(b.value-b.largestep!=b.min){b.setPosition(b.min);return true}}return false},_handleDelta:function(d){if(this.focused){var c=this.vScrollInstance.value;if(d<0){this.scrollDown()}else{this.scrollUp()}var b=this.vScrollInstance.value;if(c!=b){return false}}return true},_render:function(c){if(c==undefined){c=this}var b=c.vScrollInstance.value;var d=c.hScrollInstance.value;if(this.rtl){if(this.hScrollBar[0].style.visibility!="hidden"){if(this._rtl==false){d=c.hScrollInstance.max-d}else{d=-c.hScrollInstance.value}}}c.content.css({left:-d+"px",top:-b+"px"})},scrollTo:function(c,b){if(c==undefined||b==undefined){return}this.vScrollInstance.setPosition(b);this.hScrollInstance.setPosition(c)},getScrollHeight:function(){return this.vScrollInstance.max},getVScrollPosition:function(){return this.vScrollInstance.value},getScrollWidth:function(){return this.hScrollInstance.max},getHScrollPosition:function(){return this.hScrollInstance.value},_getScrollSize:function(){var b=this.scrollBarSize;if(isNaN(b)){b=parseInt(b);if(isNaN(b)){b="17px"}else{b=b+"px"}}if(this.isTouchDevice()){b=a.jqx.utilities.touchScrollBarSize}b=parseInt(b);return b},_getScrollArea:function(){var c=0;this.content.css("margin-right","0px");this.content.css("max-width","9999999px");if(a.jqx.browser.msie&&a.jqx.browser.version<10){c=parseInt(this.content.css("left"));this.content.css("left",0)}this.content.css("overflow","auto");if(this.rtl){this.content.css("direction","rtl")}var b=parseInt(this.content[0].scrollWidth);a.each(this.content.children(),function(){b=Math.max(b,this.scrollWidth);b=Math.max(b,a(this).outerWidth())});if(a.jqx.browser.msie&&a.jqx.browser.version<10){this.content.css("left",c)}var d=parseInt(this.content[0].scrollHeight);this.content.css("overflow","visible");if(a.jqx.browser.msie&&a.jqx.browser.version<9){var d=parseInt(this.content[0].scrollHeight);switch(this.sizeMode){case"wrap":var d=parseInt(this.content[0].scrollHeight);var b=parseInt(this.content[0].scrollWidth);break;case"horizontalWrap":case"horizontalwrap":break;case"verticalWrap":case"verticalwrap":var d=parseInt(this.content[0].scrollHeight);break}}if(this.rtl){this.content.css("direction","ltr")}return{width:b,height:d}},_arrange:function(h){if(h!==false){if(this.width!=null){this.host.width(this.width)}if(this.height!=null){this.host.height(this.height)}}var b=this._getScrollSize();var d=this.host.width();var l=this.host.height();var e=this._getScrollArea();var c=e.width;var k=e.height;var i=k-parseInt(Math.round(this.host.height()));var g=c-parseInt(Math.round(this.host.width()));if(this.horizontalScrollBarMax!=undefined){g=this.horizontalScrollBarMax}if(this.verticalScrollBarMax!=undefined){i=this.verticalScrollBarMax}var j=function(o,p){var n=5;if(p>n){o.vScrollBar.jqxScrollBar({max:p});o.vScrollBar.css("visibility","inherit")}else{o.vScrollBar.jqxScrollBar("setPosition",0);o.vScrollBar.css("visibility","hidden")}};var m=function(o,n){if(n>0){if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(n-10<=b){o.hScrollBar.css("visibility","hidden");o.hScrollBar.jqxScrollBar("setPosition",0)}else{o.hScrollBar.jqxScrollBar({max:n+4});o.hScrollBar.css("visibility","inherit")}}else{o.hScrollBar.jqxScrollBar({max:n+4});o.hScrollBar.css("visibility","inherit")}}else{o.hScrollBar.css("visibility","hidden");o.hScrollBar.jqxScrollBar("setPosition",0)}};switch(this.sizeMode){case"wrap":this.host.width(c);this.host.height(k);this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");return;case"horizontalWrap":case"horizontalwrap":this.host.width(c);this.hScrollBar.css("visibility","hidden");j(this,i);this._arrangeScrollbars(b,c,l);return;case"verticalWrap":case"verticalwrap":this.host.height(k);this.vScrollBar.css("visibility","hidden");m(this,g);this._arrangeScrollbars(b,d,l);return}j(this,i);var f=2;if(this.vScrollBar.css("visibility")!="hidden"){if(this.horizontalScrollBarMax==undefined){if((!this.isTouchDevice()&&g>0)||(g>0)){g+=b+f}}}m(this,g);if(this.hScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar({max:i+b+f})}this._arrangeScrollbars(b,d,l)},_arrangeScrollbars:function(b,d,j){var i=this.vScrollBar[0].style.visibility!="hidden";var f=this.hScrollBar[0].style.visibility!="hidden";var h=2;var g=2;this.hScrollBar.height(b);this.hScrollBar.css({top:j-b-h-g+"px",left:"0px"});this.hScrollBar.width(d-h+"px");this.vScrollBar.width(b);this.vScrollBar.height(parseInt(j)-h+"px");this.vScrollBar.css({left:parseInt(d)-parseInt(b)-h-g+"px",top:"0px"});if(this.rtl){this.vScrollBar.css({left:"0px"});var c=i?parseInt(b)+"px":0;if(this.content.children().css("direction")!="rtl"){var e=false;if(a.jqx.browser.msie&&a.jqx.browser.version<8){e=true}if(!e){this.content.css("padding-left",c)}}}else{if(this.vScrollBar.css("visibility")!="hidden"){this.content.css("max-width",this.host.width()-this.vScrollBar.outerWidth())}}if((this.vScrollBar.css("visibility")!="hidden")&&(this.hScrollBar.css("visibility")!="hidden")){this.bottomRight.css("visibility","inherit");this.bottomRight.css({left:1+parseInt(this.vScrollBar.css("left")),top:1+parseInt(this.hScrollBar.css("top"))});this.bottomRight.width(parseInt(b)+3);this.bottomRight.height(parseInt(b)+3);if(this.rtl){this.bottomRight.css({left:"0px"});this.hScrollBar.css({left:b+g+"px"})}this.hScrollBar.width(d-(1*b)-h-g+"px");this.vScrollBar.height(parseInt(j)-h-b-g+"px")}else{this.bottomRight.css("visibility","hidden")}this.hScrollInstance.refresh();this.vScrollInstance.refresh()},destroy:function(){clearInterval(this.autoUpdateId);this.autoUpdateId=null;this.autoUpdate=false;a.jqx.utilities.resize(this.host,null,true);this._removeHandlers();this.removeHandler(a(window),"unload");this.vScrollBar.jqxScrollBar("destroy");this.hScrollBar.jqxScrollBar("destroy");this.host.remove()},_raiseevent:function(g,d,f){if(this.isInitialized!=undefined&&this.isInitialized==true){var c=this.events[g];var e=new jQuery.Event(c);e.previousValue=d;e.currentValue=f;e.owner=this;var b=this.host.trigger(e);return b}},beginUpdateLayout:function(){this.updating=true},resumeUpdateLayout:function(){this.updating=false;this.vScrollInstance.value=0;this.hScrollInstance.value=0;this._arrange();this._render()},propertyChangedHandler:function(c,d,b,e){if(!c.isInitialized){return}if(d=="rtl"){this.vScrollBar.jqxScrollBar({rtl:e});this.hScrollBar.jqxScrollBar({rtl:e});c._arrange()}if(!c.updating){if(d=="scrollBarSize"||d=="width"||d=="height"){if(b!=e){c._arrange()}}}if(d=="touchMode"){if(e!="auto"){c._updateTouchScrolling()}}if(d=="theme"){c.host.removeClass();c.host.addClass(this.toThemeProperty("jqx-panel"));c.host.addClass(this.toThemeProperty("jqx-widget"));c.host.addClass(this.toThemeProperty("jqx-widget-content"));c.host.addClass(this.toThemeProperty("jqx-rc-all"));c.vScrollBar.jqxScrollBar({theme:this.theme});c.hScrollBar.jqxScrollBar({theme:this.theme});c.bottomRight.removeClass();c.bottomRight.addClass(this.toThemeProperty("jqx-panel-bottomright"));c.bottomRight.addClass(this.toThemeProperty("jqx-scrollbar-state-normal"));c.content.removeClass();c.content.addClass(this.toThemeProperty("jqx-widget-content"))}},invalidate:function(){if(a.jqx.isHidden(this.host)){return}this.refresh()},refresh:function(b){this._arrange()}})})(jQuery);(function(a){a.jqx.jqxWidget("jqxTooltip","",{});a.extend(a.jqx._jqxTooltip.prototype,{defineInstance:function(){this.width="auto";this.height="auto";this.position="default";this.enableBrowserBoundsDetection=true;this.content="";this.left=0;this.top=0;this.absolutePositionX=0;this.absolutePositionY=0;this.trigger="hover";this.showDelay=100;this.autoHide=true;this.autoHideDelay=3000;this.closeOnClick=true;this.disabled=false;this.animationShowDelay=200;this.animationHideDelay="fast";this.showArrow=true;this.name="";this.opacity=0.9;this.rtl=false;this._isOpen=false;this.opening=null;this.value=null;this._eventsMap={mousedown:a.jqx.mobile.getTouchEventName("touchstart"),mouseup:a.jqx.mobile.getTouchEventName("touchend")};this.events=["open","close","opening","closing"]},createInstance:function(d){this._isTouchDevice=a.jqx.mobile.isTouchDevice();var f=a.data(document.body,"_tooltipIDArray"+this.name);if(!f){this.ID_Array=new Array();a.data(document.body,"_tooltipIDArray"+this.name,this.ID_Array)}else{this.ID_Array=f}var e=this._generatekey();var c="jqxtooltip"+e;this.ID_Array.push({tooltipID:c,tooltipHost:this.host});var b=a('');if(a.jqx.browser.msie){b.addClass(this.toThemeProperty("jqx-noshadow"))}a("body").append(b);this._setTheme();var g=a("#"+c);g.css("visibility","hidden");g.css("display","none");g.css("opacity",0);g.css("z-index",99999);if(this.showArrow==false){a("#"+c+"Arrow").css("visibility","hidden");a("#"+c+"Arrow").css("display","none")}this._setSize();this._setContent();if(this.disabled==false){this._trigger();if(this.closeOnClick==true){this._clickHide()}}},open:function(){if(arguments){if(arguments.length){if(arguments.length==2){this.position="absolute";this.left=arguments[0];this.top=arguments[1];this.absolutePositionX=arguments[0];this.absolutePositionY=arguments[1]}}}if(this.disabled==false&&this._id()!="removed"){if(this.position=="mouse"||this.position=="mouseenter"){var b=this.position;this.position="default";this._raiseEvent("2");this._setPosition();this._animateShow();this.position=b}else{this._raiseEvent("2");this._setPosition();this._animateShow()}}},close:function(c){var e=this;if(a.isEmptyObject(c)){c=this.animationHideDelay}var b=new Number(a(this._id()).css("opacity")).toFixed(2);var d=function(){clearTimeout(e.autoHideTimeout);e._raiseEvent("3");a(e._id()).animate({opacity:0},c,function(){a(e._id()).css("visibility","hidden");a(e._id()).css("display","none");e._raiseEvent("1");e._isOpen=false})};if(this._isOpen==false&&b!=0){a(e._id()).stop();d();return}if(this._isOpen==true&&b==this.opacity){d()}},destroy:function(){var c=this.ID_Array.length;this._removeHandlers();a(this._id()).remove();for(var b=0;b(this.host_offset.top-10))){this.tooltip_offset.left=c.left-this.tooltip_width/2;this.tooltip_offset.top=this.host_offset.top-this.tooltip_height-this.arrow_size;this._detectBrowserBounds();this.tooltip_main_offset=g.offset();d.removeClass(this.toThemeProperty("jqx-tooltip-arrow-l-r"));d.addClass(this.toThemeProperty("jqx-tooltip-arrow-t-b"));d.css({"border-width":this.arrow_size+"px "+this.arrow_size+"px 0px"});this.tooltip_arrow_offset=d.offset();this.tooltip_arrow_offset.left=this.tooltip_main_offset.left+((g.width())/2-this.arrow_size);this.tooltip_arrow_offset.top=this.tooltip_main_offset.top+g.height();d.offset({top:this.tooltip_arrow_offset.top,left:this.tooltip_arrow_offset.left})}else{if((c.top<((this.host_offset.top+this.host_height)+10))&&(c.top>((this.host_offset.top+this.host_height)-10))){this.tooltip_offset.left=c.left-this.tooltip_width/2;this.tooltip_offset.top=this.host_offset.top+this.host_height+this.arrow_size;this._detectBrowserBounds();this.tooltip_main_offset=g.offset();d.removeClass(this.toThemeProperty("jqx-tooltip-arrow-l-r"));d.addClass(this.toThemeProperty("jqx-tooltip-arrow-t-b"));d.css({"border-width":"0 "+this.arrow_size+"px "+this.arrow_size+"px"});this.tooltip_arrow_offset=d.offset();this.tooltip_arrow_offset.left=this.tooltip_main_offset.left+((g.width())/2-this.arrow_size);this.tooltip_arrow_offset.top=this.tooltip_main_offset.top-this.arrow_size;d.offset({top:this.tooltip_arrow_offset.top,left:this.tooltip_arrow_offset.left})}else{if((c.left<(this.host_offset.left+10))&&(c.left>(this.host_offset.left-10))){this.tooltip_offset.left=this.host_offset.left-this.tooltip_width-this.arrow_size;this.tooltip_offset.top=c.top-this.tooltip_height/2;this._detectBrowserBounds();this.tooltip_main_offset=g.offset();d.removeClass(this.toThemeProperty("jqx-tooltip-arrow-t-b"));d.addClass(this.toThemeProperty("jqx-tooltip-arrow-l-r"));d.css({"border-width":this.arrow_size+"px 0px "+this.arrow_size+"px "+this.arrow_size+"px"});this.tooltip_main_offset=g.offset();this.tooltip_arrow_offset=d.offset();this.tooltip_arrow_offset.left=this.tooltip_main_offset.left+g.width();this.tooltip_arrow_offset.top=this.tooltip_main_offset.top+(g.height())/2-this.arrow_size;d.offset({top:this.tooltip_arrow_offset.top,left:this.tooltip_arrow_offset.left})}else{if((c.left<(this.host_offset.left+this.host_width+10))&&(c.left>(this.host_offset.left+this.host_width-10))){this.tooltip_offset.left=this.host_offset.left+this.host_width+this.arrow_size;this.tooltip_offset.top=c.top-this.tooltip_height/2;this._detectBrowserBounds();this.tooltip_main_offset=g.offset();d.removeClass(this.toThemeProperty("jqx-tooltip-arrow-t-b"));d.addClass(this.toThemeProperty("jqx-tooltip-arrow-l-r"));d.css({"border-width":this.arrow_size+"px "+this.arrow_size+"px "+this.arrow_size+"px 0px"});this.tooltip_main_offset=g.offset();this.tooltip_arrow_offset=d.offset();this.tooltip_arrow_offset.left=(this.tooltip_main_offset.left-this.arrow_size);this.tooltip_arrow_offset.top=this.tooltip_main_offset.top+(g.height())/2-this.arrow_size;d.offset({top:this.tooltip_arrow_offset.top,left:this.tooltip_arrow_offset.left})}}}}break;case"default":this.tooltip_offset.left=this.host_offset.left+this.host_width-this.default_offset;this.tooltip_offset.top=this.host_offset.top+this.host_height+this.arrow_size;this._detectBrowserBounds();this.tooltip_main_offset=g.offset();d.removeClass(this.toThemeProperty("jqx-tooltip-arrow-l-r"));d.addClass(this.toThemeProperty("jqx-tooltip-arrow-t-b"));d.css({"border-width":"0 "+this.arrow_size+"px "+this.arrow_size+"px"});this.tooltip_arrow_offset=d.offset();this.tooltip_arrow_offset.left=this.tooltip_main_offset.left+4*this.arrow_size;this.tooltip_arrow_offset.top=this.tooltip_main_offset.top-this.arrow_size;d.offset({top:this.tooltip_arrow_offset.top,left:this.tooltip_arrow_offset.left});break}}},_setContent:function(){a(this._id()+"Text").html(this.content)},opened:function(){return this._isOpen&&this.host.css("display")=="block"&&this.host.css("visibility")=="visible"},_animateShow:function(){this._closeAll();clearTimeout(this.autoHideTimeout);var b=new Number(a(this._id()).css("opacity")).toFixed(2);if(this._isOpen==false&&b==0){var c=this;var e=a(this._id());e.css("visibility","visible");e.css("display","block");e.stop();e.css("opacity",0);if(this.opening){var d=this.opening(this);if(d===false){return}}e.animate({opacity:this.opacity},this.animationShowDelay,function(){c._raiseEvent("0");c._isOpen=true;var f=a.data(document.body,"_openedTooltip"+c.name);c.openedTooltip=c;a.data(document.body,"_openedTooltip"+c.name,c);if(c.autoHideTimeout){clearTimeout(c.autoHideTimeout)}if(c.autoHideDelay>0){c.autoHideTimeout=setTimeout(function(){c._autoHide()},c.autoHideDelay)}})}},_trigger:function(){if(this._id()!="removed"){this._enterFlag;this._leaveFlag;var b=this;if(this._isTouchDevice==false){switch(this.trigger){case"hover":if(this.position=="mouse"){this.addHandler(this.host,"mousemove.tooltip",function(c){if(b._enterFlag==1){b._raiseEvent("2");b._setPosition(c);clearTimeout(b.hoverShowTimeout);b.hoverShowTimeout=setTimeout(function(){b._animateShow();b._enterFlag=0},b.showDelay)}});this.addHandler(this.host,"mouseenter.tooltip",function(){if(b._leaveFlag!=0){b._enterFlag=1}});this.addHandler(this.host,"mouseleave.tooltip",function(e){b._leaveFlag=1;clearTimeout(b.hoverShowTimeout);var f=a(b._id()).offset();var d=a(b._id()).width();var c=a(b._id()).height();if(parseInt(e.pageX)parseInt(f.left)+d){b.close()}if(parseInt(e.pageY)parseInt(f.top)+c){b.close()}});this.addHandler(a(this._id()),"mouseleave.tooltip",function(c){b._checkBoundariesAuto(c);if(b._clickFlag!=0&&b._autoFlag!=0){b._leaveFlag=0}else{b._leaveFlag=1;b.close()}})}else{this.addHandler(this.host,"mouseenter.tooltip",function(c){clearTimeout(b.hoverShowTimeout);b.hoverShowTimeout=setTimeout(function(){b._raiseEvent("2");b._setPosition(c);b._animateShow()},b.showDelay)});this.addHandler(this.host,"mouseleave.tooltip",function(f){b._leaveFlag=1;clearTimeout(b.hoverShowTimeout);if(b.autoHide){var d=f.pageX;var j=f.pageY;var g=a(b._id()).offset();var i=g.left;var h=g.top;var e=a(b._id()).width();var c=a(b._id()).height();if(parseInt(d)parseInt(i)+e||parseInt(j)parseInt(h)+c){b.close()}}});this.addHandler(a(this._id()),"mouseleave.tooltip",function(c){b._checkBoundariesAuto(c);if(b._clickFlag!=0&&b._autoFlag!=0){b._leaveFlag=0}else{b._leaveFlag=1;if(b.autoHide){b.close()}}})}break;case"click":this.addHandler(this.host,"click.tooltip",function(c){if(b.position=="mouseenter"){b.position="mouse"}b._raiseEvent("2");b._setPosition(c);b._animateShow()});break;case"none":break}}else{if(this.trigger!="none"){this.addHandler(this.host,"touchstart.tooltip",function(c){if(b.position=="mouseenter"){b.position="mouse"}b._raiseEvent("2");b._setPosition(c);b._animateShow()})}}}},_autoHide:function(){var c=this;var b=new Number(a(this._id()).css("opacity")).toFixed(2);if(this.autoHide==true&&this._isOpen==true&&b>=this.opacity){c._raiseEvent("3");a(c._id()).animate({opacity:0},c.animationHideDelay,function(){a(c._id()).css("visibility","hidden");a(c._id()).css("display","none");c._raiseEvent("1");c._isOpen=false})}},_clickHide:function(){var b=this;this.addHandler(a(this._id()),"click.tooltip",function(c){b._checkBoundariesClick(c);b.close()})},_setSize:function(){a(this._id()).css({width:this.width,height:this.height})},resize:function(){this._setSize()},_setTheme:function(){var e=this._id();var d=a(e+"Main");var c=a(e+"Text");var b=a(e+"Arrow");d.addClass(this.toThemeProperty("jqx-widget"));c.addClass(this.toThemeProperty("jqx-widget"));b.addClass(this.toThemeProperty("jqx-widget"));d.addClass(this.toThemeProperty("jqx-fill-state-normal"));c.addClass(this.toThemeProperty("jqx-fill-state-normal"));b.addClass(this.toThemeProperty("jqx-fill-state-normal"));a(e).addClass(this.toThemeProperty("jqx-tooltip"));a(e).addClass(this.toThemeProperty("jqx-popup"));d.addClass(this.toThemeProperty("jqx-tooltip-main"));c.addClass(this.toThemeProperty("jqx-tooltip-text"));b.addClass(this.toThemeProperty("jqx-tooltip-arrow"))},_initialPosition:function(){var b=this.position;this.position="default";this._setPosition();this.position=b},_detectBrowserBounds:function(){var b=this._id();if(this.enableBrowserBoundsDetection){if(this.tooltip_offset.topthis.windowWidth+this.documentLeft){a(b).offset({top:this.documentTop,left:(this.windowWidth+this.documentLeft-this.tooltip_width)})}else{if(this.tooltip_offset.top(this.windowHeight+this.documentTop)&&this.tooltip_offset.left<0){a(b).offset({top:(this.windowHeight+this.documentTop-this.tooltip_height),left:this.documentLeft})}else{if((this.tooltip_offset.top+this.tooltip_height)>(this.windowHeight+this.documentTop)&&(this.tooltip_offset.left+this.tooltip_width)>this.windowWidth+this.documentLeft){a(b).offset({top:(this.windowHeight+this.documentTop-this.tooltip_height),left:(this.windowWidth+this.documentLeft-this.tooltip_width)})}else{if((this.tooltip_offset.top+this.tooltip_height)>(this.windowHeight+this.documentTop)){a(b).offset({top:(this.windowHeight+this.documentTop-this.tooltip_height),left:this.tooltip_offset.left})}else{if(this.tooltip_offset.left<0){a(b).offset({top:this.tooltip_offset.top,left:this.documentLeft})}else{if((this.tooltip_offset.left+this.tooltip_width)>this.windowWidth+this.documentLeft){a(b).offset({top:this.tooltip_offset.top,left:(this.windowWidth+this.documentLeft-this.tooltip_width)})}else{a(b).offset({top:this.tooltip_offset.top,left:this.tooltip_offset.left})}}}}}}}}}else{a(b).offset({top:this.tooltip_offset.top,left:this.tooltip_offset.left})}},_checkBoundaries:function(b){if(b.pageX>=this.host_offset.left&&b.pageX<=(this.host_offset.left+this.host_width)&&b.pageY>=this.host_offset.top&&b.pageY<=(this.host_offset.top+this.host_height)){return true}else{return false}},_checkBoundariesClick:function(b){if(this._checkBoundaries(b)){this._clickFlag=1}else{this._clickFlag=0}},_checkBoundariesAuto:function(b){if(this._checkBoundaries(b)){this._autoFlag=1}else{this._autoFlag=0}},_removeHandlers:function(){this.removeHandler(this.host,"mouseenter.tooltip");this.removeHandler(this.host,"mousemove.tooltip");this.removeHandler(this.host,"mouseleave.tooltip");this.removeHandler(this.host,"click.tooltip");this.removeHandler(this.host,"touchstart.tooltip");this.removeHandler(a(this._id()),"click.tooltip");this.removeHandler(a(this._id()),"mouseleave.tooltip")},_closeAll:function(){var d=this.ID_Array.length;for(var c=0;c ");this.host.append(this.input);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){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){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(hm){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-4c){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.dateTimethis.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=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.dateTimethis.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=u.dateTime){if(u.dateTimethis.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(b){this.render()},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(f,e){if(!this.canRender){return}var h=this.host.find("#"+f);var d=this.getVisibleDate();var b=this.getFirstDayOfWeek(d);this.refreshCalendarCells(h,b,f);this.refreshTitle(h);this.refreshRowHeader(h,f);if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var g=this.host.height()-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){g=this.host.height()-this.titleHeight}if(this.showFooter){g-=20}var c=h.find("#cellsTable"+f);var i=h.find("#calendarRowHeader"+f);c.height(g);i.height(g)},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);if(53==t&&f.dateTime.getMonth()==0){t=1}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-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(p,k){if(!this.canRender){return}var m=this.host.find("#"+p.toString());if(m!=null){m.remove()}var s=a("
");var b=this.getVisibleDate();var l=this.getFirstDayOfWeek(b);var e=new a.jqx._jqxDateTimeInput.getDateTime(l.dateTime);e._addMonths(1);var r=a.jqx._jqxCalendar.monthView(l,e,null,null,null,s);if(k==undefined||k==null){this.host.append(s);if(this.height!=undefined&&!isNaN(this.height)){s.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("px")!=-1){s.height(this.height)}}if(this.width!=undefined&&!isNaN(this.width)){s.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("px")!=-1){s.width(this.width)}}if(this.width!=null&&this.width.toString().indexOf("%")!=-1){s.width("100%")}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){s.height("100%")}}else{k.append(s)}a.data(this.element,p,r);var q=this.host.height()-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){q=this.host.height()-this.titleHeight}if(this.showFooter){q-=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 j=this.columnHeaderHeight;if(!this.showWeekNumbers){g=0}if(!this.showDayNames){j=0}var u="";var c="";var o="";s[0].innerHTML=u+c+o;this.header=s.find("#calendarHeader");this.header[0].id="calendarHeader"+p;this.header.addClass(this.toThemeProperty("calendar-header"));this.columnHeader=s.find("#calendarColumnHeader");this.columnHeader[0].id="calendarColumnHeader"+p;this.table=s.find("#cellsTable");this.table[0].id="cellsTable"+p;this.rowHeader=s.find("#calendarRowHeader");this.rowHeader[0].id="calendarRowHeader"+p;this.selectCell=s.find("#selectCell");this.selectCell[0].id="selectCell"+p;this.title=s.find("#calendarTitle");this.title[0].id="calendarTitle"+p;this.leftButton=s.find("#leftNavigationArrow");this.leftButton[0].id="leftNavigationArrow"+p;this.titleHeader=s.find("#calendarTitleHeader");this.titleHeader[0].id="calendarTitleHeader"+p;this.rightButton=s.find("#rightNavigationArrow");this.rightButton[0].id="rightNavigationArrow"+p;this.footer=s.find("#calendarFooter");this._footer=s.find("#footer");this._footer[0].id="footer"+p;this.footer[0].id="calendarFooter"+p;this.todayButton=s.find("#todayButton");this.todayButton[0].id="todayButton"+p;this.doneButton=s.find("#doneButton");this.doneButton[0].id="doneButton"+p;this.title.addClass(this.toThemeProperty("jqx-calendar-title-container"));var d=20;if(this.showFooter){this._footer.css("display","block")}s.find("tr").addClass(this.toThemeProperty("jqx-reset"));s.addClass(this.toThemeProperty("jqx-widget-content"));s.addClass(this.toThemeProperty("jqx-calendar-month-container"));this.month=s;this.selectCell.addClass(this.toThemeProperty("jqx-reset"));this.selectCell.addClass(this.toThemeProperty("jqx-calendar-top-left-header"));if(this.showWeekNumbers){this._renderRowHeader(s)}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 i=a(""+this.todayString+" ");i.appendTo(this.todayButton);var h=a(""+this.clearString+" ");h.appendTo(this.doneButton);h.addClass(this.toThemeProperty("jqx-calendar-footer"));i.addClass(this.toThemeProperty("jqx-calendar-footer"));var n=this;var f="mousedown";if(a.jqx.mobile.isTouchDevice()){f=a.jqx.mobile.getTouchEventName("touchstart")}this.addHandler(i,f,function(){if(n.today){n.today()}else{n.setDate(new Date(),"mouse")}return false});this.addHandler(h,f,function(){if(n.clear){n.clear()}else{n.setDate(null,"mouse")}return false})}if(this.view!="month"){this.header.hide()}if(this.showDayNames&&this.view=="month"){this.renderColumnHeader(s)}this.oldView=this.view;this.renderCalendarCells(s,l,p);if(k==undefined||k==null){this.renderTitle(s)}this._refreshOtherMonthRows(r,p);s.find("tbody").css({border:"none",background:"transparent"});if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var t=this;this.addHandler(this.host,"focus",function(){t.focus()});return s},_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("
");var l=a("
");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(""+v+"
");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(1,"arrow");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(1,"arrow");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(""+g+"
");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(bb){f=b}if(this.value.year==f){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=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.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)},_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}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(wthis.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()&&n.getFullYear()<=b.getFullYear()){k.push("- "+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="2013 "}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(n)){b.isDisabled=true}}else{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);return c},_addCellsTable:function(h,g){var e=this;var c=this.showFooter?20:0;if(this.view!="month"){g.height(this.host.height()-this.titleHeight)}else{g.height(this.host.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.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(){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(D,m,u){var E=this;var d=new Array();var y=a("");var p=this.host.find(".jqx-calendar-month-container");p.css("position","relative");var z=D.find("#cellsTable"+D[0].id);z[0].style.borderColor="transparent";var G=this._getDecadeAndCenturiesData();var l=G.years;var F=G.dates;var v=0;var f=this.getMinDate();var n=this.getMaxDate();var s=new Date(this.value.dateTime);s.setDate(1);for(var x=0;x<3;x++){for(var w=0;w<4;w++){var c=x+1;var t=w;if(this.rtl){t=3-t}var A=t+1;var e=y[0].rows["row"+(1+x)+this.element.id];var C=new Date(s);C.setMonth(x*4+t);var b=new a.jqx._jqxCalendar.cell(C);var o=a(e.cells[w]);b.isVisible=true;b.element=o;b.row=x;b.column=w;b.index=d.length;b.isSelected=false;var q="";if(this.view=="year"){if(C.getMonth()==this.getDate().getMonth()&&C.getFullYear()==this.getDate().getFullYear()){b.isSelected=true}var h=this.localization.calendar.months.names;var g=h[x*4+t];switch(this.monthNameFormat){case"default":g=this.localization.calendar.months.namesAbbr[x*4+t];break;case"shortest":g=this.localization.calendar.months.namesShort[x*4+t];break;case"firstTwoLetters":g=g.substring(0,2);break;case"firstLetter":g=g.substring(0,1);break}q=g}else{if(this.view=="decade"||this.view=="centuries"){q=l[x*4+t];b.setDate(F[x*4+t]);if(b.getDate().getFullYear()==this.getDate().getFullYear()){b.isSelected=true}if(undefined==q){q="2013 "}}}var C=b.getDate();if(this.view=="year"){if(this._getYearAndMonthPart(C)this._getYearAndMonthPart(n)){b.isDisabled=true}}else{if(C.getFullYear()n.getFullYear()){b.isDisabled=true}}a.jqx.utilities.html(o,q);d[v]=b;v++}}a.each(d,function(){var j=this.element;var i=this;if(!E.disabled){E.addHandler(j,"mousedown",function(k){E._setDateAndSwitchViews(i,k,"mouse")});E.addHandler(j,"mouseover",function(r){var k=E.renderedCells[i.index];if(E.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=true;E._applyCellStyle(k,k.element,k.element)});E.addHandler(j,"mouseout",function(r){var k=E.renderedCells[i.index];if(E.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=false;E._applyCellStyle(k,k.element,k.element)})}});var B=a.data(this.element,D[0].id);if(B!=undefined&&B!=null){B.cells=d}this.renderedCells=d;this._addCellsTable(z,y);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(c)){return}}else{if(e.getFullYear()c.getFullYear()){return}}this._selectDate(e);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(c)){e=c}}else{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"){this._selectDate(this.selectedDate,"view")}}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("");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(Cthis.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;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(f,h){if(this.view=="month"){var g=this.getMinDate();var c=new Date(this.getMaxDate().getFullYear(),this.getMaxDate().getMonth()+1,this.getMaxDate().getDate());if((fthis._getYearAndMonthPart(c))){return false}}else{if(f&&(f.getFullYear()this.getMaxDate().getFullYear())){return false}}if(f==null){return false}if(h==undefined){var i=this;if(this._animating){return}this._animating=true;var d=this.host.find(".jqx-calendar-month-container");if(this._viewClone){this._viewClone.stop();this._viewClone.remove()}if(this._newViewClone){this._newViewClone.stop();this._newViewClone.remove()}var k=this.host.find(".jqx-calendar-month");k.stop();k.css("margin-left","0px");var b=k.clone();this._viewClone=b;var j=new Date(this.value.dateTime);this.value._setYear(f.getFullYear());this.value._setDay(f.getDate());this.value._setMonth(f.getMonth()+1);i.refreshControl();d.css("position","relative");b.css("position","absolute");b.css("top",k.position().top);d.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 e=-this.host.width();if(fn){v.isDisabled=true}if(j._isDisabled(n)){v.isDisabled=true}j._applyCellStyle(v,u,k);return true}if(q==0){if(g!="none"){if(j._clicks==undefined){j._clicks=0}j._clicks++;if(c){j._clicks++}if(j._clicks==1){j.selection={from:d,to:d}}else{var t=j.selection.from;var p=t<=d?t:d;var s=t<=d?d:t;if(p){var l=new Date(p.getFullYear(),p.getMonth(),p.getDate())}if(s){var m=new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59)}j.selection={from:l,to:m};j._clicks=0}}else{if(j.selection==null||j.selection.from==null){j.selection={from:d,to:d};if(j._clicks==undefined){j._clicks=0}j._clicks++;if(j._clicks==2){j._clicks=0}}}}var o=function(x){if(x==null){return new Date()}var w=new Date();w.setHours(0,0,0,0);w.setFullYear(x.getFullYear(),x.getMonth(),x.getDate());return w};if(!v.isOtherMonth&&o(n).toString()==o(d).toString()){j.value._setMonth(d.getMonth()+1);j.value._setDay(d.getDate());j.value._setYear(d.getFullYear());j._raiseEvent("2");j._raiseEvent("5",{selectionType:g})}v.isSelected=false;v.isDisabled=false;if(o(n)n){v.isDisabled=true}if(j._isDisabled(n)){v.isDisabled=true}if(!v.isDisabled){if(o(n)>=o(j.selection.from)&&o(n)<=o(j.selection.to)){v.isSelected=true}}}}}j._applyCellStyle(v,u,k)});if(j.selectionMode=="range"&&j._clicks==0){j._raiseEvent(7);return}else{if(j.selectionMode=="range"){return}}if(e!=d){j._raiseEvent(7);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;c0&&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