/*!
 * jQuery JavaScript Library v2.2.2
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-03-17T17:51Z
 */
function getErrStr(n){var t="No Error";return(n&ErrorFlags.FlashReadFailure)>0?t="FlashReadFailure":(n&ErrorFlags.FlashReadDismissed)>0?t="FlashReadDismissed":(n&ErrorFlags.FileSystemCorrupt)>0?t="FileSystemCorrupt":(n&ErrorFlags.SerialNumberError)>0?t="SerialNumberError":(n&ErrorFlags.NoUserSDCard)>0?t="NoUserSDCard":(n&ErrorFlags.NoSensorConnected)>0?t="NoSensorConnected":ckUpg(n)&&(t="Something with Upgrade"),t}function ckUpg(n){return(n&ErrorFlags.UC)>0?!0:!1}function stopTheGrabbing(n){n!=undefined?setTimeout(function(){stopGrabbing=!0},n):stopGrabbing=!0}function hideFtrMenuBtn(){$("#imgMenu").hide();TopBar.hide()}function getModel(){if(SystemProperties!==undefined&&SystemProperties.TAG_MODEL!==undefined&&SystemProperties.TAG_MODEL!=="")Model=SystemProperties.TAG_MODEL.trim();else{queryStr==undefined&&(queryStr=window.location.href.toLowerCase());var n=queryStr.indexOf("lxt");n!=-1?Model=queryStr.indexOf("se",n)!=-1?"LxT SE":"LxT":(n=queryStr.indexOf("hvm"))>=0?(Model=queryStr.indexOf("100",n)>=0?"HVM100":"HVM200",SystemProperties.TAG_MODEL=Model):(Model=queryStr.indexOf("831c")>=0?"831C":"831",SystemProperties.TAG_MODEL=Model)}SetModelNumber();typeof _831CUpdateTags!="undefined"&&_831CUpdateTags()}function SetModelNumber(){switch(Model.toLowerCase().trim()){case"831":ModelNumber=m831;document.title="Model 831";break;case"831c":ModelNumber=m831C;window.IsRemote&&(document.title="SoundAdvisor\u2122");break;case"lxt se":ModelNumber=mLxTSE;document.title="SoundExpert\u00ae;";break;case"lxt":case"lxt1":case"lxt2":ModelNumber=mLxT;document.title="SoundTrack LxT\u00ae";break;case"hvm100":ModelNumber=mHVM100;break;case"hvm200":ModelNumber=mHVM200;break;default:ModelNumber=mUnknown}}function Is831C(){return Model.indexOf("831C")>=0}function Is831(){return Model.indexOf("831")>=0}function IsLxT(){return Model.toLowerCase().indexOf("lxt")>=0}function IsLxTse(){return IsLxT()?Model.toLowerCase().indexOf("se")>=0:!1}function IsHvm(){return Model.toLowerCase().indexOf("hvm")>=0}function IsHvm100(){return Model.toLowerCase().indexOf("hvm100")>=0}function IsHvm200(){return IsHvm()&&Model.indexOf("200")>=0}function SecsToHHMM(n){var i=new Date(1970,0,1),t;return i.setSeconds(n),t=i.toTimeString().substr(0,5),n>86399&&(t=Math.floor((i-Date.parse("1/1/70"))/36e5)+t.substr(2)),t}function SecsToHHMMSS(n){var i=new Date(1970,0,1),t;return i.setSeconds(n),t=i.toTimeString().substr(0,8),n>86399&&(t=Math.floor((i-Date.parse("1/1/70"))/36e5)+t.substr(2)),t}function SecsToHHMMSSP(n){var i=new Date(1970,0,1),t;return i.setMilliseconds(n*1e3),t=i.format(timeFm),n>86399&&(t=Math.floor((i-Date.parse("1/1/70"))/36e5)+t.substr(2)),t}function SecsToDate(n){var t=new Date(1970,0,1);return t.setSeconds(n),SystemProperties.TAG_DISPLAY_DATE?t.format("d-m-Y"):t.format("Y-m-d")}function SecsToDateTime(n,t){var i=new Date(1970,0,1);return i.setSeconds(n),SystemProperties.TAG_DISPLAY_DATE||t==1?i.format("d-m-Y H:i:s"):i.format("Y-m-d H:i:s")}function SecsToShortDateTime(n){var t=new Date(1970,0,1);return t.setSeconds(n),SystemProperties.TAG_DISPLAY_DATE?t.format("d-m-Y H:i"):t.format("Y-m-d H:i")}function ConfigFrameSizeAndScroll(n){var t=screenHeight*.71;n=="#About"?$(n).css("height",screenHeight*.745+21):oldSetup?$(n).css("height","250px"):IsHvm()?$(n).css("height",screenHeight*.775):$(n).css("height",screenHeight*.775);$(n).css("overflow-y","scroll");$(n).css("overflow-x","hidden")}function isSysKey(n){var t=!1;if(n>=16&&n<=18||n>=35&&n<=40||n>=112&&n<=123)t=!0;else switch(n){case 9:case 13:case 20:case 27:t=!0;break;default:t=!1}return t}function onlyDecimal(n){n.keypress(function(n){var t=n.keyCode?n.keyCode:n.which;return t==13?!0:t>=48&&t<=57||t==44||t==46||t==45?!0:(n.preventDefault(),!1)})}function onlyAlphaNumeric(n,t){t==undefined&&(t="^[a-zA-Z0-9_]+$");n.data("rx",t);n.keypress(function(n){var t=$(this).data("rx"),i=new RegExp(t),r=String.fromCharCode(n.charCode?n.charCode:n.which);return i.test(r)?!0:(n.preventDefault(),!1)})}function errorHandling(n,t){var i="Error in:"+n+" with: ";return t.Result!=undefined&&t.Result.indexOf("Error")>=0?(i+=t.Result,t.Message!=undefined&&(i+=" - Message: "+t.Message),console.log("%c   "+i,"color:rgb(200, 10, 10); font-size: 11pt; background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAAYCAYAAAAmoYOZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB94BCQABJm+eBXkAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABRlJREFUeNrt3d1PHFUYx/HvmRmWgQUKlEJbKFhKXywVaWstaqI1XmhUqIYYNfqvGf0LTDQaa60WrRWqxUqt0FZKRV76Crssu9vdnZ1zvOClaowXxrv9fZKTmczM1XP1yzNnnjHOOcd/5JxbX+CA5VuLjI58TqGU49CR4/T2H0dERESk0gR/CUzrR7N58g83/3bBOseDXJYL506zODFCmJ+lq7ON37+/q4AlIiIilR2w3N8ylNm4aDZurnWr8Aw4cNYS2ZhLF8f4/aezRHcu0d/dSHNyB6srOaYmf1J1RUREpLID1lpqWotYuWwWZx11DQ1/amvFOGOxeBg8ZqavMnnhCzIz5+ndVcPOvh2UyhELt1L8trDC1bmcqisiIiIVHrAc2Dhi9Px5zpw+TalY4ulnT/DciRMkk0mcA+N8UvfvMf71Z6zMjtGRzHDsUCM2SHB/Kc/c7SWuLmaYT3k8fmJY1RUREZGKZKy1Dhyp5WU+/uhDzn09QlyK8DyfXLHEo72HeGpggIHjA/xwfoSFyW9IlmY5/lg7Cd+Qy+S5czfDzGKOSzN3iOq72H/0BU4Ov0H7zlZVWERERCovYJVKRXdh9DvOfnmGqSsTbG1uwvd8jIFybCkUCuTzOdq2NpMs3+bFJ5rp3tmEJWDpfpq5xRTX5lb59b6jYftu+geeZ99jR+je3UlzU6MqLCIiIpUXsD54/z138cIYxBFhddXDzew8HMNgraVYWKWqlGZPk8++riRVHszOr3BlPk+uuo1tXfs5euwYe3r20NX5CPX1Dfh+oAqLiIhI5QWs4ZOvup7dXQQem2EqjuOHDxiD53k4A3FsyS2nKGRv4R6sUCwHNHf3sfvgYXr29vDogf107NxOGIaAwfN8VVhEREQqTpBeXiLVUMuujnbiOKZcLmMMRKWYRKKKjc8IPaAmkSC5YztRtJV0Ok2UL9La1cPjfb0cPHCA1ta2za6V+csQLREREZEKCljZbI7r12cIwyS7dnVQjiLK5YhseRWcIwgCfH+tE+X7PkEQUFfn09LSwuzCIvu7uzhy+DBbtjTheRuhyqB8JSIiIhUbsBK1SXIP8oyNfsvy3T3s23uQtu2t1CVD4nht0qgxZnNfVhAEVFdXc/O3Gebn52nvaKexsQlj1hLVxlFERESkUnlNLS34rkRfZx197WVWFy9zefx7rAU/CKipqaE6DAnDkNraWnzfZ3p6ml9+maQcRQRBlcKViIiIyJ8D1ptvvUXr1gYS5RJBsUBvZ8jkzxf5/MwIZ0fOMXXtV/wgQbKugUKxyOTUJFPXrmKtxTpHVCoBVpUUERERWRcMDZ1k+vIPTH/3Fdeu3+ZwjU9QFZDJPSCVSjNzc5bVbJ729h3cuHGdzMoKGAOej1t/fWitxfM8VVNEREQE8Gpraug/+hTFRD0FP+TKjQxL2QiDt/nKb2JigvEfL5FayRIbnxgP51XxytBr9B85itE4BhEREZFNgQFeenmIUhQxPnqOewtLeHUWzxict/bVYBAEOAfOGJwDz/N4ZXCIt995l9pkPRh1r0REREQ2rP+LEKy1pNMpMuksP06Mc3FsjMmfJ5ibm8P3fbY0NlG2jm3bWhkaHOT14WGS9XWsjWRY3+SueoqIiIhg3Pr8hY3f4mysfC7H7M1pPv3kE06dOkVUthx7coBXBwd55pmnqQ5D7bsSERER+beAJSIiIiL/D7WgRERERBSwRERERBSwRERERBSwREREROS/+wOlexN4OXbz6gAAAABJRU5ErkJggg==');background-repeat:no-repeat;"),!0):!1}function defaultVal(n,t){return typeof n=="undefined"?t:n}function formattedString(n){for(var i=n,t=0,r=arguments.length;t<r;t++)i=i.replace("{"+t+"}",arguments[t+1]);return i}function setAllradios(){return}function returnTime(n){return n.setMinutes(n.getMinutes()),n.format("H:i:s")}function SecsToFullDate(n){var t=new Date(1970,0,1);return t.setSeconds(n),SystemProperties.TAG_DISPLAY_DATE?t.format("d-m-Y H:i:s"):t.format("Y-m-d H:i:s")}function ShortLWDStr(n,t){var r=MeasurementProperties.TAG_FREQ_WEIGHTING,u=MeasurementProperties.TAG_DET_WEIGHTING,i=MeasurementProperties.TAG_INTEGRATION_INPUT;return t||(i=undefined),MakeLWeightDetectorString(r,u,"",n,i)}function MakeLWeightDetectorString(n,t,i,r,u){var f="",s="",e="",o="",h;return r=r||"",n>=0&&n<SlmConstants.Weights.length&&(s=SlmConstants.Weights[n]),t>=0&&t<SlmConstants.Detectors.length&&(e=SlmConstants.Detectors[t],o=SlmConstants.DetectorsLong[t]),u==0&&(e="",o=""),r=r.replace(/\$/g,"{0}"),r=r.replace(/#/g,"{1}"),h=MeasurementProperties.TAG_PEAK_WEIGHTING||0,r=r.replace("^",SlmConstants.Weights[h]),r=r.replace("@","{2}"),r.Length==0&&(r="L<sub>{0}{1}<\/sub>"),f=String.format(r,s,e,o),i.Length>0&&(f+=i),f}function switch_style(n,t){var i,r=document.getElementsByTagName("link");for(i=0,ltl=r.length;i<ltl;i++)r[i].rel.indexOf("stylesheet")!=-1&&r[i].title&&(r[i].disabled=!0,r[i].title==gStyles[n]&&(r[i].disabled=!1));set_cookie(style_cookie_name,n,style_cookie_duration);currentTheme=n;t&&t(gStyles[n])}function printMode(n){if(n==="enter"){var t=get_cookie(style_cookie_name);origStyle=t;t!==Theme.LIGHT&&switch_style(Theme.LIGHT,swiClrs)}else origStyle!==Theme.LIGHT&&switch_style(origStyle)}function swiClrs(n){console.log("swiClrs: wh = "+n);var t="dark";(n==undefined||n=="undefined")&&(n="dark");n.indexOf("light")!==-1&&(t="light");t==="dark"?(maxClr="rgba(50,255,0,1)",minClr="rgba(255,255,0,1)",mainClr="rgba(55,160,240,1)",chClr="rgba(200, 220, 240, 0.4)",tickClr="rgba(10, 180, 240, 0.5)",bkGrad=["#001b60","#000000"],$("#obaImgT").attr("src","/images/firmware/OBA.png"),$("#slmImgT").attr("src","/images/firmware/SLM.png"),$(".xClose").attr("src","/images/Close1.png"),spClr[0]="#ffff12",spClr[1]="#ff3f54",spClr[2]="#26b3f7",spClr[3]="#e68600",spClr[4]="#c80fff",spClr[5]="#32ff00"):(maxClr="rgba(0,160,0,1)",minClr="rgba(220,160,0,1)",mainClr="rgba(0,126,185,1)",chClr="rgba(44, 102, 160, 0.4)",tickClr="rgba(0, 100, 150, 1)",bkGrad=["#ffffff","#fffffe"],$("#obaImgT").attr("src","/images/firmware/OBA-Lt.png"),$("#slmImgT").attr("src","/images/firmware/SLM-Lt.png"),$(".xClose").attr("src","/images/Close1Dk.png"),spClr[0]="#dca000",spClr[1]="#b30015",spClr[2]="#007eb9",spClr[3]="#ff6a00",spClr[4]="#750099",spClr[5]="#00a000");typeof upGraph!="undefined"&&upGraph()}function setStyleFromSysProps(n){if(typeof SystemProperties.TAG_DISPLAY_COLOR_SCHEME!="undefined"){var t=parseInt(SystemProperties.TAG_DISPLAY_COLOR_SCHEME,10);isNaN(t)&&(t=Theme.DARK);switch_style(t,swiClrs);n&&n()}else stTmCnt-->0&&setTimeout(setStyleFromSysProps,100)}function setStyleIfChngd(n){console.log("Entering ChangeStyle");var t=get_cookie(style_cookie_name);t.length?t!=n&&(console.log("making the switch"),switch_style(n,swiClrs),set_cookie(style_cookie_name,n,lifespan_in_days)):switch_style(n,swiClrs)}function setStyleByIndex(n){n!="undefined"&&n<gStyles.length?(set_cookie(style_cookie_name,n,lifespan_in_days),switch_style(n,swiClrs)):switch_style(0,swiClrs)}function setStyleIfCookie(n){var t=get_cookie(style_cookie_name);console.log(gStyles[t+0]);t!="undefined"&&t.length>0&&switch_style(t,n)}function setStyleFromCookie(n){var t=get_cookie(style_cookie_name);t!="undefined"&&t.length>0?switch_style(t,n):switch_style(0,n)}function set_cookie(n,t,i){document.cookie=n+"="+encodeURIComponent(t)+"; max-age="+86400*i+"; path=/"}function get_cookie(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0,f=u.length;i<f;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}function getFSz(n){var t="";return n<1024?t=n+" B":n>=1073741824?t=(n/1073741824).toFixed(1)+" GB":n>=1048576?t=(n/1048576).toFixed(1)+" MB":n>=1024&&(t=(n/1024).toFixed(1)+" KB"),t.replace(".",decimalSep)}function emptyFun(){}function retHome(){console.log("GoHome");bGoHome=!0;failCnt=5;typeof app!="undefined"&&typeof app.mainframe!="undefined"&&$.mobile.changePage("#first")}function initConfDlg(){var t=undefined,n;confDialog=$("#confDialog");notifDialog=$("#notifDialog");confDialog.length<=0&&($mainView.append('<div id="confDialog" style="display:none;" title=""><div class="confDlg" style="float:left; margin:0 7px 5px 0;"><\/div><div id="dlgMessage" class="valTxt" style="font-size:13px;min-height:48px;margin-left: 25px;">Continue?<\/div><\/div>'),confDialog=$("#confDialog"));notifDialog.length<=0&&($mainView.append('<div id="notifDialog" style="display:none;" title=""><div class="confDlg" style="float:left; margin:0 7px 5px 0;"><\/div><div id="dlgMessage" class="valTxt" style="font-size:13px;min-height:48px;margin-left: 25px;">Continue?<\/div><\/div>'),notifDialog=$("#notifDialog"));n="232px";Model.indexOf("831")>=0&&(n="232px");confDialog.dialog({maxWidth:n,width:n,autoOpen:!1,modal:!0,position:["center",100],timeoutHandle:undefined,buttons:[{text:"Confirm",id:"dlgConf",click:function(){$(this).dialog("close");confDialog.confFunc!=undefined&&(confDialog.confFunc(),confDialog.confCan=undefined,confDialog.confFunc=undefined,clearTimeout(confDialog.timeoutHandle))}},{text:"Cancel",id:"dlgCan",click:function(){$(this).dialog("close");confDialog.confCan!=undefined&&(confDialog.confCan(),confDialog.confFunc=undefined,confDialog.confCan=undefined,clearTimeout(confDialog.timeoutHandle))}}]});notifDialog.dialog({maxWidth:n,width:n,autoOpen:!1,modal:!0,position:["center",100],timeoutHandle:undefined,buttons:[{text:"Confirm",id:"dlgConf",click:function(){notifDialog.confFunc!=undefined&&notifDialog.confFunc();$(this).dialog("close")}},{text:"Cancel",id:"dlgCan",click:function(){notifDialog.confCan!=undefined&&notifDialog.confCan();$(this).dialog("close")}}]});confDialog.callConfirm=function(n,t,i,r){callConfirmHelper(this,n,t,i,r)};notifDialog.callConfirm=function(n,t,i,r){callConfirmHelper(this,n,t,i,r)}}function callConfirmHelper(n,t,i,r,u){var f,e;n.open=!0;n.confFunc=r;n.find("#dlgMessage").html(i);f=n.parent();u!=undefined?(u.Can!=undefined?(e=u.Can,e.on!="on"&&f.find("#dlgCan").hide()):f.find("#dlgCan").show(),u.Conf!=undefined?(e=u.Conf,e.on!="on"&&f.find("#dlgConf").hide()):f.find("#dlgConf").show()):(f.find("#dlgCan").show(),f.find("#dlgConf").show());n.dialog("option","title",t).dialog({position:{my:"center",at:"center",of:$mainView}}).dialog("open");n.focusNextInputField&&n.focusNextInputField(1,"#dlgConf,#dlgCan",n.parent());n.timeout>0?n.timeoutHandle=setTimeout(function(){n.confOnTO?(f.find("#dlgConf").click(),delete n.confOnTO):n.canOnTO?(f.find("#dlgCan").click(),delete n.canOnTO):n.dialog("close");n.timeout=0},n.timeout):n.timeoutHandle&&clearTimeout(n.timeoutHandle)}function swiToDec(n){return SystemProperties&&SystemProperties.TAG_DISPLAY_DECIMAL&&SystemProperties.TAG_DISPLAY_DECIMAL==1&&(n=n.toString().replace(",",".")),parseFloat(n)}function swiToDecStr(n){return SystemProperties&&SystemProperties.TAG_DISPLAY_DECIMAL&&SystemProperties.TAG_DISPLAY_DECIMAL==1&&(n=n.toString().replace(",",".")),n}function swiToComma(n){return SystemProperties&&SystemProperties.TAG_DISPLAY_DECIMAL&&SystemProperties.TAG_DISPLAY_DECIMAL==1&&(n=n.toString().replace(".",",")),n}function tickForm(n){var i=[],r=0,t=0,u;n.tickSize=(n.max-n.min)/8;i.push([n.min,n.min.toString()]);t=n.min;do t+=n.tickSize,u=r%2==1?t.toFixed(0):"",i.push([t,u]),++r;while(t<n.max);return i}function formD(n,t){var r=fixedLen,i;return(n=n||0,t!==undefined&&t>=0&&(r=t),n<-99||n>350)?"---":(i=n.toFixed&&n.toFixed(r)||"",SystemProperties.TAG_DISPLAY_DECIMAL==1&&(i=i.replace(".",decimalSep)),i)}function formNum(n,t){var r=fixedLen,i;return(n=n||0,t!==undefined&&t>=0&&(r=t),n<-99)?"---":(i=n.toFixed&&n.toFixed(r)||"",SystemProperties.TAG_DISPLAY_DECIMAL==1&&(i=i.replace(".",decimalSep)),i)}function disableSelection(){$("img").addClass("unselectable").attr("unselectable","on").attr("draggable","false").on("dragstart",function(){return!1});$(document).disableSelection();$(document).on("contextmenu",function(){return!1})}function disableSelection(){}function getFilename(n){return $.getJSON("/sdk?func=fname").done(function(t){var i=t.FName,r=t.Ext;(i==undefined||i=="")&&(i="831_Data");r!=undefined&&(i=i+"."+r);n(i)})}function ResetRequired(n,t,i){function r(){$.getJSON("/sdk?func=sendCommand&type=1&data=1&id="+CMD_RESET).done(function(){typeof Sess!="undefined"&&Sess.reset!=undefined&&Sess.reset();n()})}function u(){t?r():StoreCmd(!0,undefined,r,r)}function f(){$.getJSON("/sdk?func=sendCommand&id="+CMD_STOP).done(function(){setTimeout(function(){u()},100)})}CurrentStatus.IsStopped?i?u():confDialog.callConfirm("","Reset required.",function(){u()}):i?f():confDialog.callConfirm("","Stop and Reset required.",function(){f()})}function dispHG(n){n?(hourGlass.show(),hGVis=!0,hgWatchdog!==undefined&&clearTimeout(hgWatchdog),hgWatchdog=setTimeout(function(){location.reload()},25e3)):(hourGlass.hide(),hGVis=!1,clearTimeout(hgWatchdog))}function displayReloading(){dispHG(!0)}function hideReloading(){dispHG(!1)}function StoreCmd(n,t,i,r){if(IsHvm()){r();return}typeof n=="undefined"&&(n=!0);t==undefined&&(t="Save File?");var u="";if(n===!1&&dispHG(!0),n===!0){fnDlgCtl.isOpen||(scOk=function(){totalOvly&&totalOvly.hide();var n=fnDlgCtl.fn();n.length>0?(dispHG(!0),$.getJSON("/sdk?func=sendCommand&id="+CMD_STORE+"&type="+TypeString+"&data="+n).done(function(n){ErrDup==n.ResultCode&&confDialog.callConfirm("Warning","Unable to store file.<br/>File name exists.",function(){StoreCmd()},{Can:{on:"off"}});console.log(n);Sess.reset!=undefined&&Sess.reset()}).always(function(){dispHG(!1)})):confDialog.callConfirm("","",function(){totalOvly&&totalOvly.show();fnDlgCtl.open("Save File?",scOk,scCan,u)},{Can:{on:"off"}});r instanceof Function&&r()},scCan=function(){CurrentStatus.uiMeterState==15&&SendReset(i);totalOvly&&totalOvly.hide();dispHG(!1);i instanceof Function&&i()},totalOvly&&totalOvly.show(),getFilename(function(n){u=n;fnDlgCtl.open(t,scOk,scCan,u)}));return}getFilename(function(n){totalOvly&&totalOvly.hide();$.getJSON("/sdk?func=sendCommand&id="+CMD_STORE+"&type="+TypeString+"&data="+n).done(function(n){ErrDup==n.ResultCode&&confDialog.callConfirm("Warning","Unable to store file.<br/>File name exists.",function(){StoreCmd()},{Can:{on:"off"}});dispHG(!1)}).always(function(){dispHG(!1)})}).fail(function(){dispHG(!1);console.error("error trying to get filename")})}function WaitForStore(n){waitingStore?setTimeout(WaitForStore,250,n):setTimeout(function(){n();dispHG(!1)},300)}function WaitForAutoStore(n){CurrentStatus.IsDataStored?setTimeout(function(){n();dispHG(!1)},300):setTimeout(WaitForAutoStore,250,n)}function WaitForStop(n){CurrentStatus.IsRunning?setTimeout(WaitForStop,250,n):setTimeout(function(){n();dispHG(!1)},300)}function loadJS(n,t){var i=document.createElement("script");i.type="application/javascript";i.src=n;t!=undefined&&(i.onload=t);document.body.appendChild(i)}function checkKeyDown(n){var i,r,t;if(n=n||window.event,i=$(n.target),r=i.attr("id"),n.keyCode=="36")CurrentStatus.IsStopped?CurrentStatus.UnsavedData&&CurrentStatus.IsStopped&&StoreCmd!=undefined&&StoreCmd():(console.log("Stop key pressed"),$.post("/sdk?func=sendCommand&id=257").done(function(){getRunningState()}),playKey=!0,2==SystemProperties.TAG_LOCK_MODE&&0==SystemProperties.TAG_AUTO_STORE&&(confDialog.confCan=function(){SendReset();lockCon.__rn=!0},confDialog.callConfirm("","Measurement OK?",function(){StoreCmd(!1);lockCon.__rn=!0}),t=!0));else if(n.keyCode=="33")playKey?(console.log("Start/Pause key pressed"),CurrentStatus.free_mem_kb<=runAvailMem?confDialog.callConfirm("Warning","Insufficient free space for this operation..",function(){},{Can:{on:"off"}}):($.post("/sdk?func=sendCommand&id=256").done(function(){getRunningState()}),playKey=!1)):(console.log("Pause key pressed"),$.post("/sdk?func=sendCommand&id=276").done(function(){getRunningState()}),playKey=!0);else if((r!=undefined&&r.indexOf("TAG_")>=0||i.attr("name")!=undefined&&i.attr("name").indexOf("TAG_")>=0||i.hasClass("ui-slider-handle"))&&r!="TAG_LOCK_MODE")return;if(t=!1,n.keyCode=="53"||n.keyCode=="12")return typeof enterKDFunc!="undefined"&&(t=enterKDFunc(n)),event.keyCode=9,event.keyCode;n.keyCode=="42"||n.keyCode=="106"?typeof menuKDFunc!="undefined"&&(n.preventDefault(),t=menuKDFunc(n)):n.keyCode=="40"||n.keyCode=="38"||(n.keyCode=="37"?typeof leftKDFunc!="undefined"&&(t=leftKDFunc(n)):n.keyCode=="39"&&typeof rightKDFunc!="undefined"&&(t=rightKDFunc(n)));t||(n.keyCode=="37"?(console.log("Detected left arrow key click"),DateTimePickerActiveFlag||LeftClick()):n.keyCode=="39"?(console.log("Detected right arrow key click"),DateTimePickerActiveFlag||RightClick()):n.keyCode=="98"&&typeof twoKDFunc!="undefined"&&twoKDFunc(n))}function checkKeyUp(n){n=n||window.event;var t=$(n.target);typeof KUFunc!="undefined"&&KUFunc(n)}function CommitSettings(n){n===!0&&SendChangesToMeter("Measurement");MeasurementProperties={};SystemProperties={};clearCache()}function CommitSystemProperties(n){n===!0&&SendChangesToMeter("System");MeasurementProperties={};SystemProperties={}}function ReloadTab(){location.href.indexOf("index")>=0&&setTimeout(function(){CommitCompleteCnt==0?(console.log("G4~ Calling 'Location.Reload()..."),RefreshButton()):ReloadTab()},MessageTimeout)}function InitializeTabScrollButtons(n){liLeftArrow.hide();$("#FooterLeftButton").hide();n==="Tools/About.html"?(liRightArrow.hide(),$("#FooterRightButton").hide()):(liRightArrow.show(),$("#FooterRightButton").show())}function LeftClick(){return}function RightClick(){return}function TabClick(){var n,i,e,o,r,t,u,f;if(tabContainer!=undefined&&tabContainer!==null){if(n=tabContainer.tabs("option","active"),i=tabContainer.children().length-1,console.log("NumTabs: "+i+"  Selected Tab: "+n),n===null&&(n=0),e=$("#FooterLeftButton"),o=$("#FooterRightButton"),e.hide(),o.hide(),r=n,r>0)for(t=!1;!t&&r>0;)u=tabContainer.find("> ul li:nth-child("+r+")").hasClass("ui-state-hidden"),u||(e.show(),t=!0),r--;if(n<i-1)for(console.log("   Selected: "+n+"   NumTabs-1: "+(i-1)),t=!1;!t&&n<i-1;)u=tabContainer.find("> ul li:nth-child("+(n+2)+")").hasClass("ui-state-hidden"),n++,u||(o.show(),t=!0);var h=$(".ui-state-active"),s=h.position(),c=h.offset();s.left>ScrollRightMinShift&&c.left>ScrollRightMaxShift&&(f=s.left-ScrollRightOffset+ArrowWidth+8,$("#TabsListing").css("left",-f));c.left<ScrollLeftMinShift+ArrowWidth&&(f=s.left-ArrowWidth,$("#TabsListing").css("left",-f))}}function CheckForChanges(){var n=$("#ApplyChangesPopup"),t=PropertiesChanged(MeasurementProperties),i=PropertiesChanged(SystemProperties)&&(OnSystemTabs||IsHvm200()&&!t);t||i?(i&&(n.dialog("option","title","System Properties"),n.find("#Button5").focus()),t&&(n.dialog("option","title","Settings"),n.find("#Button5").focus()),OnMeter&&OnSystemTabs||activeSetupLoaded?$("#SaveSettings").html("Save settings and update meter? Select 'No' to discard changes."):$("#SaveSettings").html("Save settings?"),n.dialog("isOpen")===!1?(n.dialog("open"),n.find("#Button5").focus()):n.dialog("close")):(ftr&&ftr.mi&&ftr.mi.handler()===propSBtn&&ftr.mi.pop(),OnSystemTabs&&OnMeter||clearCache())}function checkSetNMeter(){queryStr.indexOf("settings")>=0?(OnSystemTabs=!1,OnSettingTabs=!0,nonMeter=!0):queryStr.indexOf("ystem")!=-1?(OnSystemTabs=!0,OnSettingTabs=!1,nonMeter=!0):(OnSystemTabs=!1,OnSettingTabs=!1);OnMeter=queryStr.indexOf("eter")!=-1?!0:!1}function LoadStaticTabbedView(n,t){activeScreen=n;t===""?$("#tabsPlaceholder").load(n,function(){}):$("#tabsPlaceholder").load(n,function(){$(t).tabs({cache:!0,collapsible:!1,beforeLoad:function(n,t){if(console.log("opening new tab "+t.tab[0].innerText),displayReloading(),t.tab.last().index()>0?(LastSelectedTab=t.tab.last().index(),BtnMenu.show().find("span").text("Save")):OnMeter&&OnSystemTabs?BtnMenu.show().find("span").text("Save"):BtnMenu.hide(),t.tab.index()==0&&t.tab.data("loaded")){CheckForChanges();n.preventDefault();dispHG(!1);return}t.jqXHR.success(function(){t.tab.data("loaded",!0)})},activate:function(n,t){var i=t.oldPanel.attr("id");i=="hConfigWifi"&&(wfOnPage=!1)}}).css({"min-height":"265px"});$(t).tabs("option","heightStyle","fill")});InitializeTabScrollButtons(n);BtnMenu.find("span").text("Save");console.log("LoadStaticTabbedView: closing SettingsPopup");$("#SettingsPopup").dialog("close")}function DisableAllTimers(){enableLiveTimers=!1;enableOverallTimers=!1;enableSessionLogTimers=!1;enableCurrentTimers=!1}function GenerateCache(n){var t=function(){};return t.prototype=n,new t}function parseOptions(n,t,i){OptionTags=GenerateCache(n.SysProperties);(!OnSystemTabs||OnMeter)&&typeof SystemProperties.TAG_OPTION_FLAGS=="undefined"&&(SystemProperties=OptionTags);OnSystemTabs&&OnMeter&&(MeasurementProperties=GenerateCache(n.MeasProperties));typeof t!="undefined"&&t();lockedGetData=0;errorHandling("getOptionData",n);typeof i!="undefined"&&i()}function getOptionData(n,t){if(typeof OptionTags.TAG_OPTION_FLAGS!="undefined"||typeof SystemProperties.TAG_MASK_OPTION!="undefined"){if(typeof SystemProperties.TAG_MASK_OPTION=="undefined"){var i={TAG_MASK_OPTION:OptionTags.TAG_MASK_OPTION,TAG_OPTION_FLAGS:OptionTags.TAG_OPTION_FLAGS,TAG_MODEL:OptionTags.TAG_MODEL};SystemProperties=GenerateCache(i)}else OptionTags=SystemProperties;checkOptionsBasedOnModel();typeof n!="undefined"&&n();typeof t!="undefined"&&t()}else checkOptionsBasedOnModel().done(function(){$.getJSON("/sdk?val=200").done(function(i){parseOptions(i,n,t)}).fail(function(i,r,u){var f=r+", "+u,e;console.log("Request Failed: "+f);console.log("!!!!!!!!!!!!!!!!!!!!!!!!! MUST FIX Request Failed: "+f);e=removeBadTag(i.responseText);parseOptions($.parseJSON(e),n,t)})})}function checkOptionsBasedOnModel(){var n=undefined;if(SystemProperties.TAG_MODEL=SystemProperties.TAG_MODEL==undefined||SystemProperties.TAG_MODEL.trim()==""?Model:SystemProperties.TAG_MODEL.trim(),Model=SystemProperties.TAG_MODEL,SetModelNumber(),Model.indexOf("LxT")!=-1)if(Model.indexOf("SE")!=-1){if(SystemProperties.TAG_OPTION_FLAGS>9507&&(SystemProperties.TAG_OPTION_FLAGS&=9507),SystemProperties.TAG_MASK_OPTION>9507){if(!SystemProperties.hasOwnProperty("TAG_MASK_OPTION")){
//!OnMeter &&
SystemTags.TAG_MASK_OPTION.modded=!0}SystemProperties.TAG_MASK_OPTION&=9507}n=$.getJSON("/sdk?func=directsetupconfig&meterType="+ModelNumber)}else{if(SystemProperties.TAG_OPTION_FLAGS>275815&&(SystemProperties.TAG_OPTION_FLAGS&=275815),SystemProperties.TAG_MASK_OPTION>275815){if(!SystemProperties.hasOwnProperty("TAG_MASK_OPTION")){
//!OnMeter &&
SystemTags.TAG_MASK_OPTION.modded=!0}SystemProperties.TAG_MASK_OPTION&=275815}n=$.getJSON("/sdk?func=directsetupconfig&meterType="+ModelNumber)}else Model=="HVM200"?n=$.getJSON("/sdk?func=directsetupconfig&meterType="+ModelNumber):Model=="HVM100"?n=$.getJSON("/sdk?func=directsetupconfig&meterType="+ModelNumber):Model.indexOf("831")!=-1?(SystemProperties.hasOwnProperty("TAG_MASK_OPTION")||(SystemTags.TAG_MASK_OPTION.modded=!0),SystemProperties.TAG_MASK_OPTION&=Model==="831C"?31838139:33542143,n=$.getJSON("/sdk?func=directsetupconfig&meterType="+ModelNumber)):n=$.getJSON("/sdk?func=directsetupconfig&meterType="+ModelNumber);return n}function getMeasSysProps(n,t){if(t!=!0){if(n==100&&(MeasurementProperties.TAG_RUN_MODE!=undefined||MeasurementProperties.TAG_OPERATING_MODE_20!=undefined))return;if(n==200&&SystemProperties.TAG_MASK_OPTION!=undefined)return}gettingProps=!0;var i="/sdk?func=getData&id="+n;return $.getJSON(i).done(function(t){if(gettingProps=!1,n==100)MeasurementProperties=GenerateCache(t.MeasProperties),MeasurementProperties.OnMeter=OnMeter;else{t.SysProperties.TAG_MODEL=t.SysProperties.TAG_MODEL.trim();SystemProperties=GenerateCache(t.SysProperties);timeOffset=(new Date).getTimezoneOffset();try{checkLocale()}catch(i){}}}).fail(function(t,i,r){var f=i+", "+r,u=$.parseJSON(removeBadTag(t.responseText));n==100?(MeasurementProperties=GenerateCache(u.MeasProperties),MeasurementProperties.OnMeter=OnMeter):SystemProperties=GenerateCache(u.SysProperties)}).always(function(){gettingProps=!1})}function getAllPropertyData(n,t,i){var r=100,u;if(PropertyTags[n]!==undefined?(u=MeasurementProperties,r=100):SystemTags[n]!==undefined&&(u=SystemProperties,r=200),typeof u[n]!="undefined")t(u),lockedGetData=0,typeof i!="undefined"&&i();else if(lockedGetData===0){++lockedGetData;try{(SelectedFile.filename!==undefined&&(SelectedFile.filename==="Active"||SelectedFile.filename.indexOf("Active.")===0)||OnMeter&&r===200)&&(SelectedFile={});SelectedFile.nDx!==undefined?(gettingProps=!0,downloadPropertiesToCache(SelectedFile.nDx,wrapFunction(getPropsByVal,u,[r,t,i]))):getPropsByVal(r,t,i)}catch(f){alert(f);lockedGetData=0}finally{gettingProps=!1;lockedGetData=0}}}function setupSysTabs(){var n=$("#SystemPropertiesTabContainer");n.disableTab(OptionsTab,!0);CurrentStatus.nMode!==0&&MeasurementProperties.TAG_INSTRUMENT_MODE!==0?(n.disableTab(DisplaysTab,!0),tabCount-=2):(n.enableTab("DisplaysTab",!0),OnMeter&&n.enableTab("OptionsTab",!0));n.disableTab(ModemTab,!0);n.disableTab(RS232Tab,!0);n.disableTab(WirelessTab,!0);n.disableTab(SMS_OutTab,!0);n.disableTab(NetworkTab,!0);n.disableTab(OtherTab,!0);n.disableTab(RefSpecTab,!0);n.enableTab("ModemTab",!0);n.enableTab("RS232Tab",!0);n.enableTab("WirelessTab",!0);n.enableTab("SMS_OutTab",!0);n.enableTab("NetworkTab",!0);n.enableTab("OtherTab",!0);n.enableTab("RefSpecTab",!0);n.disableTab(TimeTab,!0);typeof IsRemote!="undefined"&&IsRemote||ModelNumber!==m831C?curTabIndex<=tbId.SetupMgr&&(prpMenu===undefined||prpMenu.length===0?(prpMenu=$("#propMenu"),prpMenu.load("/HVM/ViewTabs.html"),prpMenu.show()):(updatePropsMenu&&updatePropsMenu(),prpMenu.show())):prpMenu=undefined}function showHVMTabs(){var n=$("#hvmTabContainer");n.disableTab(hSetupTab,!0);n.disableTab(hScheduleTab,!0);n.disableTab(hRangeTab,!0);n.disableTab(hTools1Tab,!0);n.disableTab(hTools2Tab,!0);n.disableTab(hSensorTab,!0);n.disableTab(hOptionsTab,!0);n.disableTab(hConfigWifiTab,!0);n.disableTab(hTimeTab,!0);n.enableTab("hSetupTab");n.enableTab("hScheduleTab");n.enableTab("hRangeTab");n.enableTab("hTools1Tab");n.enableTab("hTools2Tab");n.enableTab("hSensorTab");n.enableTab("hOptionsTab");n.enableTab("hConfigWifiTab");n.enableTab("hTimeTab");prpMenu===undefined||prpMenu.length===0?(prpMenu=$("#propMenu"),prpMenu.load("/HVM/ViewTabs.html"),prpMenu.show()):(updatePropsMenu&&updatePropsMenu(),prpMenu.show())}function ShowTabs(n){if(Model.indexOf("HVM")>-1)showHVMTabs();else if(OnSystemTabs)CurrentStatus.nMode!==undefined||isRunningState?(console.log("Problem getting mode so setupSysTabs will be wrong."),setupSysTabs()):getRunningState(setupSysTabs);else{getOptionData();var t=$("#settingsTabContainer");t.disableTab(GeneralTab,!0);t.disableTab(SLMTab,!0);t.disableTab(OBATab,!0);t.disableTab(LnTab,!0);t.disableTab(ControlTab,!0);t.disableTab(TimeHistoryTab,!0);t.disableTab(TriggersTab,!0);t.disableTab(EventHistoryTab,!0);t.disableTab(MarkersTab,!0);t.disableTab(DayNightTab,!0);t.disableTab(SoundTab,!0);t.disableTab(WeatherTab,!0);t.disableTab(Dosimeter1Tab,!0);t.disableTab(Dosimeter2Tab,!0);t.disableTab(FFTGeneralTab,!0);t.disableTab(FFTTab,!0);t.disableTab(FFTControlTab,!0);t.disableTab(FFTTonalityTab,!0);t.disableTab(RAGeneralTab,!0);t.disableTab(RT60Tab,!0);t.disableTab(RT60AdvTab,!0);t.disableTab(RASourceTab,!0);n=="SLM"?(t.enableTab("GeneralTab"),t.enableTab("SLMTab"),t.enableTab("OBATab"),t.enableTab("LnTab"),t.enableTab("ControlTab"),t.enableTab("TimeHistoryTab"),t.enableTab("TriggersTab"),t.enableTab("EventHistoryTab"),t.enableTab("MarkersTab"),t.enableTab("DayNightTab"),t.enableTab("SoundTab"),t.enableTab("WeatherTab"),t.enableTab("Dosimeter1Tab"),t.enableTab("Dosimeter2Tab"),typeof IsRemote!="undefined"&&IsRemote||ModelNumber!==m831C?prpMenu===undefined||prpMenu.length===0?(prpMenu=$("#propMenu"),prpMenu.load("/HVM/ViewTabs.html"),prpMenu.show()):(updatePropsMenu&&updatePropsMenu(),prpMenu.show()):prpMenu=undefined,tabCount=14):n=="FFT"?(t.enableTab("FFTGeneralTab"),t.enableTab("FFTTab"),t.enableTab("FFTControlTab"),t.enableTab("FFTTonalityTab"),tabCount=4):(t.enableTab("RAGeneralTab"),t.enableTab("RT60Tab"),t.enableTab("RT60AdvTab"),t.enableTab("RASourceTab"),tabCount=4)}}function parseProps(n,t,i,r){if(n==undefined){console.log("error ParseProps");return}MeasurementProperties=GenerateCache(n.MeasProperties);MeasurementProperties.OnMeter=OnMeter;SystemProperties=GenerateCache(n.SysProperties);checkOptionsBasedOnModel();t===100?(updateDefFName(),RunRules("Measure",Model,!1),properties=MeasurementProperties,properties.TAG_INSTRUMENT_MODE==2?ShowTabs("FFT"):properties.TAG_INSTRUMENT_MODE==1?ShowTabs("RT60"):ShowTabs("SLM")):t===200&&(RunRules("System",Model,!1),properties=SystemProperties);OnSystemTabs&&setTimeout(wrapFunction(ShowTabs,this,["SYS"]),0);errorHandling("getAllPropertyData",n);i(properties);lockedGetData=0;typeof r!="undefined"&&r()}function replaceInStr(n,t,i){var u,r,f;for(typeof n=="undefined"&&(n=""),u="",r=0,f=n.length;r<f;r++)u+=n.charCodeAt(r)===t?i:n.charAt(r);return u}function removeBadTag(n){var i,t,r;for(typeof n=="undefined"&&(n=""),i="",t=0,r=n.length;t<r;t++)n.charCodeAt(t)<=127&&n.charCodeAt(t)>31&&(i+=n.charAt(t));return i}function getPropsByVal(n,t,i){var u={},r;gettingProps=!0;r="/sdk?func=getData&id="+n;IsHvm()&&(r="/sdk?func=getProperties");$.getJSON(r).done(function(r){gettingProps=!1;parseProps(r,n,t,i)}).fail(function(r,f,e){if(r.responseText.indexOf("LAeq")!=-1)parseData($.parseJSON(r.responseText)),console.log("Error in getting Property File List"),t!=undefined&&t(u);else{var o=f+", "+e;console.log("Request Failed: "+o);parseProps($.parseJSON(removeBadTag(r.responseText)),n,t,i)}}).always(function(){gettingProps=!1})}function getAllSystemPropertyData(n,t,i){n="TAG_USER_STRING_0";getAllPropertyData(n,t,i)}function outputFileList(n){var t="G4~ FileList:";for(var i in n)t+=n[i].name+",";console.log(t)}function getPropertyFileList(n,t){if(t=="MeasPropFiles"&&typeof MeasPropFiles[0]!="undefined"||t=="SysPropFiles"&&typeof SysPropFiles[0]!="undefined")lockedGetData=0,typeof n!="undefined"&&n();else if(lockedGetData==0){++lockedGetData;try{$.getJSON("/sdk?func="+t).done(function(t){t.MeasPropFiles!=undefined&&(MeasPropFiles=GenerateCache(t.MeasPropFiles),outputFileList(MeasPropFiles));t.SysPropFiles!=undefined&&(SysPropFiles=GenerateCache(t.SysPropFiles),outputFileList(SysPropFiles));errorHandling("getPropertyFileList",t);lockedGetData=0;typeof n!="undefined"&&n();dispHG(!1)}).fail(function(i,r,u){var f=r+", "+u;console.log("PropertyFileList Request Failed: "+f);getPropertyFileList(n,t)})}catch(i){console.log(i);lockedGetData=0}finally{lockedGetData=0}}}function changeLanguage(n,t){try{$.getJSON("/setData.js?changeLang="+n).done(function(n){errorHandling("changeLang",n);typeof t!="undefined"&&t()}).fail(function(n,t,i){var r=t+", "+i;console.log("Language change failed: "+r)})}catch(i){console.log(i)}}function clearCache(n){return setTimeout(clearCacheAsync,10,n)}function ccDone(n){PropertiesChanged(SystemProperties)&&(OptionTags=protoBackChanged(SystemProperties));SystemProperties={};OnSettingTabs||(OptionTags={});typeof n!="undefined"?getOptionData(n):getOptionData()}function clearCacheAsync(n){try{bAlreadyDisplayedResetMessage=!1;bAlreadyDisplayedStopMessage=!1;MeasurementProperties.TAG_INSTRUMENT_MODE!==undefined||MeasurementProperties.TAG_OPERATING_MODE_20!==undefined?(MeasurementProperties={},console.log("Taking out the Cache."),$.getJSON("/sdk?func=clearCache").done(function(t){errorHandling("clearCache",t);ccDone(n)}).fail(function(n,t,i){var r=t+", "+i;console.log("Request Failed: "+r)})):ccDone(n);ColorCurrentSelection()}catch(t){console.log(t)}}function downloadPropertiesToCache(n,t){var i="downloadSettingsToCache="+n;OnSystemTabs&&(i="downloadSysPropToCache="+n);$.getJSON("/sdk?"+i).done(function(n){errorHandling("downloadSettingsToCache",n);typeof t!="undefined"&&t()})}function uploadPropertiesFromCache(n,t){n==undefined&&(n="");n!=""&&(n.length>10&&(n=n.substr(0,10)),n.indexOf(".")>0&&(n=n.substring(0,n.indexOf("."))),n=encodeURI(n),n="&filename="+n);var i="func=uploadSettingsFromCache";OnSystemTabs&&(i="func=uploadSysPropFromCache");$.getJSON("/sdk?"+i+n).done(function(n){errorHandling("uploadPropertiesFromCache",n);RefreshSettingsButton();t instanceof Function&&t()})}function deletePropertiesFile(n){if(n!=undefined&&n!=""){n="&filename="+n;var t="deleteSettingsFile=1";OnSystemTabs&&(t="deleteSysPropFile=1");$.getJSON("/setData.js?"+t+n).done(function(n){errorHandling("deletePropertiesFile",n)})}else console.log("When Deleting, you must specifiy a new Filename.")}function renameSettingsFile(n){if(n!=undefined&&n!=""){n="&filename="+n;var t="renameSettingsFile=1";return OnSystemTabs&&(t="renameSysPropFile=1"),$.getJSON("/getData.js?"+t+n).done(function(n){errorHandling("renameSettingsFile",n)})}console.log("When Renaming, you must specifiy a new Filename.")}function getActiveFileInfo(n,t){typeof ActiveFileInfo.link!="undefined"?typeof t!="undefined"&&t():$.getJSON("/sdk?func=getActiveFileInfo&index="+n).done(function(n){ActiveFileInfo=GenerateCache(n.ActiveFileInfo);errorHandling("getActiveFileInfo",n);console.log(ActiveFileInfo);typeof t!="undefined"&&t()}).fail(function(n,i,r){var f=i+", "+r,u;console.error("ActiveFileInfo Request Failed: "+f+" JSON: "+n.responseText);u=removeBadTag(n.responseText);ActiveFileInfo=GenerateCache($.parseJSON(u).ActiveFileInfo);errorHandling("getActiveFileInfo",u);console.log(ActiveFileInfo);typeof t!="undefined"&&t()})}function stringToSecs(n){var t=0,i=0,r=0;return res=n.split(":"),res.length==3?(t=parseInt(res[0],10),i=parseInt(res[1],10),r=parseInt(res[2],10)):res.length==2?(t=parseInt(res[0],10),i=parseInt(res[1],10)):r=parseInt(res[0],10),t*3600+i*60+r}function dateToSecs(n){var r="-",i,t;return n.indexOf("/")>0&&(r="/"),i=null,t=n.split(r),t.length===3&&((SystemProperties.TAG_DISPLAY_DATE|0)==0?(t[0].length<4&&(t[0]=2e3+parseInt(t[0],10)),i=new Date(t[0],t[1]-1,t[2],0,0,0,0)):(t[2].length<4&&(t[2]=2e3+parseInt(t[2],10)),i=new Date(t[2],t[1]-1,t[0],0,0,0,0))),ModelNumber===mHVM200&&i.setMinutes(i.getMinutes()),i.getTime()/1e3}function setRunFlags(){var i=typeof initialGet!="undefined",t=CurrentStatus.uiRunFlags,r=CurrentStatus.uiMeterState,n;CurrentStatus.IsRunning=t&RUNNING||r===state_Running;CurrentStatus.IsPaused=t&PAUSED||r===state_Paused;CurrentStatus.IsRunPending=t&(POST_RUN|RUNNING)&&(t&DATA_VALID)==0||r===state_Waiting;n=t&(RUNNING|PAUSED|POST_RUN)?!1:!0;i&&lastStat.IsStopped!=n&&(initialGet=!0,CurrentStatus.changeState=!0);lastStat.IsStopped=n;CurrentStatus.IsStopped=n;n=t&DATA_RESET&&CurrentStatus.IsStopped;i&&lastStat.IsDataReset!=n&&(initialGet=!0,CurrentStatus.changeState=!0);lastStat.IsDataReset=n;CurrentStatus.IsDataReset=n;n=CurrentStatus.IsDataReset?!0:t&DATA_STORED&&CurrentStatus.IsStopped;i&&lastStat.IsDataStored!=n&&(initialGet=!0,CurrentStatus.changeState=!0);lastStat.IsDataStored=n;CurrentStatus.IsDataStored=n;CurrentStatus.UnsavedData=CurrentStatus.IsDataReset?!1:CurrentStatus.IsDataStored?!1:!0}function setRunningState(n){CurrentStatus=GenerateCache(n);CurrentStatus.fw_ver!==undefined&&(PageStatus=GenerateCache(n));setRunFlags()}function getRunningState(n,t){PauseGetRunState?isRunningState=!1:(statusCheck=!0,g4?(typeof n!="undefined"&&n(),statusCheck=!1,!OnMeter&&(isRunningState||OnMeter)||tmrLastRunState!=-1&&tmrLastRunState!=t||(t=1,tmrLastRunState=t,statusTmr!=undefined&&clearTimeout(statusTmr),statusTmr=setTimeout(wrapFunction(getRunningState,this,[emptyFun,t]),1e3),isRunningState=!0)):typeof WebSocketComm!="undefined"&&WebSocketComm.Connected||$.getJSON("/sdk?func=getMinStatus").done(function(i){if(i.Status===undefined||i.Status.nMode>3){console.error("Bogus CurrentStatus from meter.");getRunningState(n,t);return}CurrentStatus=GenerateCache(i.Status);setRunFlags();errorHandling("getMinStatus",i)}).fail(function(n,t,i){var r=t+", "+i;OnMeter&&conFail(n,t,i)}).always(function(){typeof n!="undefined"&&n();statusCheck=!1;!OnMeter&&(isRunningState||OnMeter)||tmrLastRunState!==-1&&tmrLastRunState!==t||(t=1,tmrLastRunState=t,statusTmr!=undefined&&clearTimeout(statusTmr),statusTmr=setTimeout(wrapFunction(getRunningState,this,[emptyFun,t]),1e3),isRunningState=!0);CurrentStatus.nMode!=previousMode&&previousMode!=99&&location.href.indexOf("index")>=0&&ModelNumber!==mHVM100&&ModelNumber!==mHVM200&&location.reload();typeof screenOn=="undefined"||screenOn||updateLights();previousMode=CurrentStatus.nMode}));stsTmrCnt++}function resetRequired(n,t,i,r){var e=CurrentStatus.UnsavedData,u,f;midRequiredTesting||bCurrentlyDisplaying||n[t]!=i&&(!bAlreadyDisplayedResetMessage&&OnMeter&&(activeSetupLoaded||OnSystemTabs)&&e&&r[t].Flags!=undefined&&(r[t].Flags&(RESET_REQ|FILTER_RESET_REQ))!=0?(u="Reset required.",f="'"+t+"'",midRequiredTesting=!0,$(document).data("forceTag",t),$(document).data("forcewhichGate",-1),bCurrentlyDisplaying=!0,notifyChange(u,"finishRequired",i,f,"Both","OK","Cancel")):!bAlreadyDisplayedStopMessage&&OnMeter&&(activeSetupLoaded||OnSystemTabs)&&(CurrentStatus.IsRunning||CurrentStatus.IsPaused)&&r[t].Flags!=undefined&&(r[t].Flags&STOP_REQ)!=0?(midRequiredTesting=!0,u="Stop required.",f="'"+t+"'",$(document).data("forceTag",t),$(document).data("forcewhichGate",-1),bCurrentlyDisplaying=!0,notifyChange(u,"finishStopRequired",i,f,"Both","OK","Cancel")):(midRequiredTesting=!1,bCurrentlyDisplaying=!1,n[t]=i),r[t]!=undefined&&(r[t].Flags&FILTER_RESET_REQ)!=0&&(resetFilter=!0))}function finishRequired(n,t,i){var f=PropertyTags,u={},r;PropertyTags[t]!=undefined?u=MeasurementProperties:SystemTags[t]!=undefined&&(f=SystemTags,u=SystemProperties);i=="Deny"?(resetCancelled=!0,t.indexOf("TAG_TIME_HISTORY_OPTIONS")>-1||t=="TAG_TIME_HISTORY_MISC"||(r=$("#"+t),f[t].Prec!=undefined?r.val(swiToComma(u[t].toFixed(f[t].Prec))):r.val(u[t]),r.trigger("change")),midRequiredTesting=!1):(resetCancelled=!1,u[t]=n,r=$("#"+t),r.attr("type")=="checkbox"&&r.prop("checked",n>0),bCurrentlyDisplaying=!1,bAlreadyDisplayedResetMessage=!0,bAlreadyDisplayedStopMessage=!0,midRequiredTesting=!1,showSave(u),oldSetup||validateControls(mTabName,t));t==="TAG_MASK_OPTION"&&CheckOptionsDepends();$(document).data("forceTag","");$(document).data("forcewhichGate",0);resetFunctionCallback!==undefined&&(resetFunctionCallback(),resetFunctionCallback=undefined)}function finishStopRequired(n,t,i){var u=PropertyTags,r={},f;PropertyTags[t]!=undefined?r=MeasurementProperties:SystemTags[t]!=undefined&&(u=SystemTags,r=SystemProperties);f=$("#"+t);i=="Deny"?u[t].Prec!=undefined&&f.val(swiToComma(r[t].toFixed(u[t].Prec))):(r[t]=n,bAlreadyDisplayedStopMessage=!0);bCurrentlyDisplaying=!1;f.trigger("change");midRequiredTesting=!1;$(document).data("forceTag","");$(document).data("forcewhichGate",0);resetFunctionCallback!==undefined&&(resetFunctionCallback(),console.log("Ran Reset Function in Stop Req."),resetFunctionCallback=undefined)}function resetTime(n,t){var i=0,r;PropertyTags[n]!=undefined?i=MeasurementProperties[n]:SystemTags[n]!=undefined&&(i=SystemProperties[n]);r=dateTimeFmt(i,t);i!==r&&(t.val(r),timed=!0)}function propSBtn(){OnSystemTabs&&OnMeter?CheckForChanges():sideLoader(tbId.SetupMgr,0)}function showSave(n){PropertiesChanged(n)?ftr&&ftr.mi&&ftr.mi.handler()!==propSBtn&&(window.prep&&prep(),ftr.mi.push("button","Close",propSBtn)):ftr.mi.handler()===propSBtn&&ftr.mi.pop()}function dateTimeFmt(n,t){var i=n,r=t.attr("tagtype");return r==="time"||r==="timeHHMM"?i=SecsToHHMM(i):r==="timeHHMMSS"?i=SecsToHHMMSS(i):r==="date"?i=SecsToDate(i):r==="datetime"&&(i=SecsToDateTime(i)),i}function updatePropertyValue(n,t,i,r){var s,h,u,o,c,p,e,l,f;r=="System"?(s=SystemProperties,h=SystemTags):(s=MeasurementProperties,h=PropertyTags);setTimeout(showSave,0,s);console.log("Entering UpdatePropertyValue for Tab: "+n+"  Named: "+i+" Item: ",t);u=t.val();t.attr("type")=="checkbox"&&(u=u>0?u:1,u=t.is(":checked")?u:0);i==undefined&&(i=t.attr("id"));i.indexOf("TAG")!=0&&t.attr("name")!=undefined&&(i=t.attr("name"));$(document).data("lastPropTag",i);$(document).data("lastPropValue",s[i]);h[i]!=undefined&&(h[i].modded=!1);o=t.attr("tagType");lastFocus=t;(""+u).indexOf(":")>0&&(o=="time"||o=="timeHHMM"||o=="timeHHMMSS")&&(resetFunctionCallback=wrapFunction(resetTime,t,[i,t,o]),u=stringToSecs(u));(o=="date"||o=="datetime")&&(resetFunctionCallback=wrapFunction(resetTime,t,[i,t,o]),u=dateToSecs(u));var a=i.substr(0,3)=="ID_",v=i.substr(0,4)=="OPT_",y=i.substr(0,3)=="id_";if(a||v||y){a&&(c=THOptions[i].mask);v&&(c=MainOptions[i].mask);y&&(p={Order:"Live"},i=t.data("id"),c=GetSelectedDisplayTab(p)[i].mask);theTag=t.attr("tag");$(document).data("lastPropTag",theTag);$(document).data("lastPropValue",s[theTag]);h[theTag]!=undefined&&(h[theTag].modded=!1);(s[theTag]&c)!=0?(console.log("G4~ Property value changed"),u==0&&(a&&(resetFunctionCallback=THInitializeCheckBoxes),resetRequired(s,theTag,s[theTag]&~c,h))):u==1&&(a&&(resetFunctionCallback=THInitializeCheckBoxes),resetRequired(s,theTag,s[theTag]|c,h));return}if(e=h[i],(e.Type===TypeFloatSeries||e.Type===TypeFloat)&&(u=swiToDec(u.toString())),s[i]!=u){l=!1;console.log("G4~ Property value changed");f=t.val();(""+f).indexOf(":")>0&&(o==="time"||o==="timeHHMM"||o==="timeHHMMSS")&&(f=u,l=!0);(o==="date"||o==="datetime")&&(f=u,l=!0);switch(e.Type){case TypeString:f.length<e.MinVal||f.length>e.MaxVal?($("#"+i).addClass("error"),$("#"+i).focus()):$("#"+i).removeClass("error");break;case TypeEnum:case TypeInt:case TypeUInt:f<e.MinVal?(f=e.MinVal,l&&(f=dateTimeFmt(f,t)),t.val(f),u=e.MinVal):f>e.MaxVal?(f=e.MaxVal,l&&(f=dateTimeFmt(f,t)),t.val(f),u=e.MaxVal):(l&&(f=dateTimeFmt(f,t)),t.val(f),$("#"+i).css("background-color","white"));break;case TypeFloat:f=swiToDec(f.toString());f<e.MinVal?(t.val(swiToComma(e.MinVal)),u=e.MinVal):f>e.MaxVal?(t.val(swiToComma(e.MaxVal)),u=e.MaxVal):$("#"+i).css("background-color","white");break;case TypeFloatSeries:console.log("Type is TYPE_TABLE_OF_FLOATS")}resetRequired(s,i,u,h)}}function PropertiesChanged(n){var i={},t;i=n==MeasurementProperties?PropertyTags:SystemTags;for(t in n)if(n.hasOwnProperty(t)&&t!=="TAG_MODEL"&&i[t]!==undefined&&!i[t].readOnly&&n[t]!=n.__proto__[t]&&i[t].modded!=!0&&!((t==="TAG_DEFAULT_FILENAME"||t==="TAG_FILE_NAME")&&checkDefFName()))return!0;return!1}function protoBackChanged(n){var i={},t;i=n==MeasurementProperties?PropertyTags:SystemTags;for(t in n)n.hasOwnProperty(t)&&t!="TAG_MODEL"&&i[t]!=undefined&&!i[t].readOnly&&i[t].modded!=!0&&(n.__proto__[t]=n[t],delete n[t]);return n}function checkForTH(){return MeasurementProperties.TAG_TIME_HISTORY_ENABLE==1?MeasurementProperties.TAG_TIME_HISTORY_OPTIONS!=0||MeasurementProperties.TAG_TIME_HISTORY_MISC!=0||(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&4294965247)!=0:!0}function UpdateTH(){checkForTH()||(MeasurementProperties.TAG_TIME_HISTORY_ENABLE=0,console.error("TimeHistory should not be enbabled!!"));kbCon&&kbCon.pop()}function SendChangesToMeter(n,t){checkForTH()||n!="Measure"&&n!="Measurement"||(MeasurementProperties.TAG_TIME_HISTORY_ENABLE=0,$.notify({title:"No option selected. Time History will be disabled.",buttonYes:"OK",command:"UpdateTH",value:"emptyFun"},{style:"CommonAlert2",autoHide:!1,clickToHide:!1,globalPosition:"top left"}),$(".notifyjs-container").find("button").first().focus(),kbCon&&kbCon.push(cnfCon,$(".notifyjs-container")));UpdateChangesToMeter(t)}function setPropVal(n,t){PropertyTags[n]!=undefined?MeasurementProperties[n]=typeof MeasurementProperties[n]=="string"||MeasurementProperties[n]instanceof String?t:eval(t):SystemTags[n]!=undefined&&(SystemProperties[n]=t)}function UpdateChangesToMeter(n){CommitCompleteCnt=1;UpdateProperties("Measure");UpdateProperties("System");saveCompleteMessage(n);CommitCompleteCnt--}function minMaxVal(n,t){return isNaN(n)?t.min:isFinite(n)?Math.max(Math.min(n,t.MaxVal),t.MinVal):t.max}function clearThFlags(){if(MeasurementProperties.TAG_TIME_HISTORY_ENABLE){var n=MeasurementProperties.TAG_TIME_HISTORY_PERIOD;ModelNumber===m831C||ModelNumber===m831?n>20&&n<24?(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS=0,MeasurementProperties.TAG_TIME_HISTORY_MISC&=571408384,MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&=2303):n==0||n==1?(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS&=618961920,MeasurementProperties.TAG_TIME_HISTORY_MISC&=857684263,MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&=35071):(n==2||n==3)&&(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS&=4294966272,MeasurementProperties.TAG_TIME_HISTORY_MISC&=4280238079,MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&=35071):(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS&=219,MeasurementProperties.TAG_TIME_HISTORY_MISC&=3994036224,MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&=n==2||n==3||n==4?61440:63488)}}function UpdateProperties(n){var l,r,i,u,s,t,e,a,h,f,v,y,o,c;try{if(inFileDsp)return $.when({})}catch(p){}l=0;n=="System"?(r=SystemProperties,i=SystemTags):(n="Measure",r=MeasurementProperties,i=PropertyTags,clearThFlags());l++;posterChild={};u={};s=!1;for(t in r)if(r.hasOwnProperty(t)&&t!=="TAG_MODEL"&&i[t]!=undefined&&!i[t].readOnly){if(!(OnSystemTabs||IsHvm())&&t==="TAG_MASK_OPTION"||t==="TAG_OPTION_FLAGS")continue;if(LatchWhich[n]=1,console.log("G4~ Sending: "+t+": "+r[t]),t!==""&&typeof i[t].ID!="undefined"){if(e={},e.Value=i[t].Type===TypeFloatSeries?r[t]:i[t].Type===TypeFloat?minMaxVal(parseFloat(r[t]),i[t]):i[t].Type===TypeUInt?minMaxVal(parseInt(r[t],10)>>>0,i[t]):i[t].Type===TypeInt||i[t].Type===TypeEnum?minMaxVal(parseInt(r[t],10),i[t]):r[t],i[t].Type===TypeFloatSeries&&(a=t.substr(0,t.length-2),typeof i[t].num!="undefined")){for(h=[],f=0,v=i[t].num;f<v;f++)y=a+"_"+f,h[f]=minMaxVal(parseFloat(r[y]),i[t]);e.Value=h}u[t]=e.Value;s=!0}}return s?(CommitCompleteCnt++,o={},n==="System"?(o.SysProperties=u,g4&&u.TAG_SMTP_PASSWORD&&(console.log("G4~ SendProperty(TAG_SMTP_PASSWORD:"+window.btoa(u.TAG_SMTP_PASSWORD)+")"),delete u.TAG_SMTP_PASSWORD)):o.MeasProperties=u,c=JSON.stringify(o),console.log(c),posterChild=$.post("/sdk?func=setProperties",c).done(function(n){console.log("CommitSettings: "+n.responseText)}).fail(function(){console.log("error Sending Properties")}).always(function(n){testData=n;console.log("Settings Finale");CommitCompleteCnt--})):$.when({})}function saveCompleteMessage(n){CommitCompleteCnt===0?(CommitCompleteCnt++,(activeSetupLoaded||OnSystemTabs)&&OnMeter?cmdLatchSettings(!0,n):SelectedFile.filename!=undefined&&SelectedFile.filename!=="Active"?(SaveAsRequired||(setTimeout(wrapFunction(uploadPropertiesFromCache,this,[SelectedFile.filename,n]),0),CommitCompleteCnt=0,console.log("G4~ SaveComplete")),LatchWhich={}):(CommitCompleteCnt=0,n instanceof Function&&n(),console.log("G4~ SaveComplete"))):setTimeout(saveCompleteMessage,MessageTimeout,n)}function cmdLatchSettings(n,t){var i,r=[];resetFilter&&($.getJSON("/sdk?func=sendCommand&type=1&data=1&id="+CMD_RESET).done(function(){console.log("FCFR")}),resetFilter=!1);LatchWhich.Measure==1&&(CommitCompleteCnt=1,r.push($.getJSON("/sdk?func=LATCHSETTINGS&data=2&marksettingschanged=true").done(function(n){errorHandling("cmdLatchSettings Settings",n)}).always(function(){var n=0;r.forEach(function(t){t.state()!=="pending"&&n++});n+1>=r.length&&(console.log("G4~ SaveComplete"),i!=undefined&&clearTimeout(i),i=clearCache(t));CommitCompleteCnt=0})));LatchWhich.System==1&&(CommitCompleteCnt++,r.push($.getJSON("/sdk?func=LATCHSETTINGS&data=0&marksettingschanged=false").done(function(n){return CommitCompleteCnt++,errorHandling("cmdLatchSettings Sys",n),$.getJSON("/sdk?func=LATCHSETTINGS&data=1&marksettingschanged=true").done(function(n){errorHandling("cmdLatchSettings Prefs",n)}).always(function(){CommitCompleteCnt=0})}).always(function(){var u=0;r.forEach(function(n){n.state()!="pending"&&u++});u+1>=r.length&&(console.log("G4~ SaveComplete"),i!=undefined&&clearTimeout(i),i=clearCache(t));(n===undefined||n===!1)&&ReloadTab()})));LatchWhich={}}function MarkSettingsChanged(){$.getJSON("/sdk?func=MarkSettingsChanged").done(function(n){errorHandling("MarkSettingsChanged",n)})}function populateTab(n,t,i){var r,u,f;t=="System"?(r=SystemProperties,u=SystemTags):(t="Measurement",r=MeasurementProperties,u=PropertyTags);f=$("#"+n);f.find("[id^='TAG_'],[name^='TAG_']").each(function(){var f=$(this),e=f.attr("id"),l=f.attr("name"),o=f.attr("type")||"",s=f.attr("data-validate")||"",a=f.attr("tagType")||"",h,c;f.unbind(".pop");o===""&&(o=f.prop("type"));o==="checkbox"?(f.prop("checked",!1).filter("[value="+r[e]+"]").prop("checked",!0),f.bind("change.pop",function(){updatePropertyValue(n,f,this.id,t);forceData(e,f,i);validateControls(n,this.id)})):o==="radio"?(f=$("input:radio[name="+l+"]"),f.filter("[value="+r[l]+"]").prop("checked",!0),f=$(this),f.bind("change.pop",function(){updatePropertyValue(n,f,this.id,t)})):o==="select-one"?(f.val(r[e]),f.bind("change.pop",function(){updatePropertyValue(n,f,this.id,t);forceData(e,f,i);validateControls(n,this.id)})):(u[e]!==undefined&&u[e].Prec!==undefined&&u[e].Prec>0?f.val(swiToComma(parseFloat(r[e]).toFixed(u[e].Prec))):f.val(r[e]),h=!1,(s.indexOf("decimal")>=0||s.indexOf("number")>=0)&&onlyDecimal(f),s.indexOf("alphanumeric")>=0&&onlyAlphaNumeric(f),c=dateTimeFmt(r[e],f),r[e]!==c&&(f.val(c),h=!0),h?f.bind("change.pop blur.pop",function(){updatePropertyValue(n,f,this.id,t);validateControls(n,this.id)}):f.bind("blur.pop",function(){updatePropertyValue(n,f,this.id,t);validateControls(n,this.id)}));enableControls(f,e,o,r);dispHG(!1)});setTimeout(function(){var n=f.find(searchFocDef).not(":hidden").first();n.focus();dispHG(!1)},0);activeSetupLoaded?settingsTabs.removeClass("mainBG").addClass("activeBG"):settingsTabs.removeClass("activeBG").addClass("mainBG")}function enableControls(n,t,i,r,u){var s=GatingCondition[t]!=undefined?GatingCondition[t].numGates:0,f,o,e;for(u=defaultVal(u,"Enable"),f=0;f<s;f++)if(o=GatingCondition[t].gate[f].gateType,o==undefined||o!="EnableIf"&&o!="EnableMask"&&o!="DisplayIf"||checkGate(t,f,r))n.hasClass("disable")&&enableControl(n,n.parent(),i),n.is(":hidden")&&(e=n.parent(),e.is("td")?e.parent().show():e.show());else{if(o=="DisplayIf"){if(GatingCondition[t].gate[f].value!=undefined)continue;e=n.parent();e.is("td")?e.parent().hide():e.hide()}else n.hasClass("disable")||u!="Enable"||(GatingCondition[t].gate[f].value!=undefined?GatingCondition[t].gate[f].value==n.val()&&disableControl(n,n.parent(),i):disableControl(n,n.parent(),i));break}}function validateControls(n,t){var u,i,r;u=typeof PropertyTags[t]!="undefined"?MeasurementProperties:SystemProperties;i=function(){var n=$(this),i=n.attr("id"),r=n.attr("name"),t=n.attr("type")||"";(t=="checkbox"||t=="radio")&&(i=r);enableControls(n,i,t,u)};r=$("#"+n);r.find("[id^='TAG_']:visible").each(i);r.find("[name^='TAG_']:visible").each(i)}function populateGeneral(){populateTab("mpGen")}function populateWeather(n,t){populateTab("mpWthr",undefined,t)}function populateSLM(){mTabName="mpSLM";populateTab(mTabName)}function populateOBA(){populateTab("mpOBA")}function populateLn(){populateTab("mpLn");activeSetupLoaded?settingsTabs.removeClass("mainBG").addClass("activeBG"):settingsTabs.removeClass("activeBG").addClass("mainBG")}function populateControl(n){var i="mpCtrl",t;oldSetup&&(ctrlTab=$("#mpCtrl"));populateTab(i);t=ctrlTab.find("#TAG_NUM_BLOCK_TIMERS_1");t.unbind("change.pop").bind("change.pop",function(){updatePropertyValue(i,$(this),this.name,"Measure")});t=ctrlTab.find("#TAG_NUM_BLOCK_TIMERS_2");t.unbind("change.pop").bind("change.pop",function(){updatePropertyValue(i,$(this),this.name,"Measure")});t=ctrlTab.find("#TAG_RUN_TIME");t.unbind("change.force").bind("change.force",function(){forceData("TAG_RUN_TIME",$(this),emptyFun)});ctrlTab.find("#TAG_TIMER_START_DATE").unbind("change.force").bind("change.force",function(){forceData("TAG_TIMER_START_DATE",$(this),emptyFun)});ctrlTab.find("#TAG_TIMER_STOP_DATE").unbind("change.force").bind("change.force",function(){forceData("TAG_TIMER_STOP_DATE",$(this),emptyFun)});typeof n.TAG_NUM_BLOCK_TIMERS!="undefined"&&(n.TAG_NUM_BLOCK_TIMERS==2?(ctrlTab.find("#TAG_NUM_BLOCK_TIMERS_1").prop("checked",!0),ctrlTab.find("#TAG_NUM_BLOCK_TIMERS_2").prop("checked",!0)):n.TAG_NUM_BLOCK_TIMERS===1&&ctrlTab.find("#TAG_NUM_BLOCK_TIMERS_1").prop("checked",!0));t=ctrlTab.find("#TAG_MEASUREMENT_HISTORY");t.unbind("change.pop").bind("change.pop",function(){updatePropertyValue(i,$(this),this.id);validateControls(i,"TAG_MEASUREMENT_HISTORY")})}function EnableRunModeSettings(){ctrlTab.length<=0&&(ctrlTab=$("#mpCtrl"));var n=ctrlTab.find("#TAG_RUN_MODE").find(":selected").val();ctrlTab.find("#DeltaRow").hide();ctrlTab.find("#RunTimeRow").hide();ctrlTab.find("#MeasurementCounter").hide();ctrlTab.find("#IntervalTimeRow").hide();ctrlTab.find("#IntervalTimeSyncRow").hide();ctrlTab.find("#ContinuousDailySettings").hide();ctrlTab.find("#BlockAndDailyTimerPeriods").hide();ctrlTab.find("#BlockTimer2").hide();ctrlTab.find("#BlockTimer3").hide();n==1?(ctrlTab.find("#RunTimeRow").show(),SystemProperties.TAG_MODEL.indexOf("831")>-1&&ctrlTab.find("#MeasurementCounter").show()):n==2?(ctrlTab.find("#DeltaRow").show(),ctrlTab.find("#RunTimeRow").show()):n==3?(ctrlTab.find("#IntervalTimeRow").show(),ctrlTab.find("#IntervalTimeSyncRow").show(),ctrlTab.find("#ContinuousDailySettings").show()):n==4?(ctrlTab.find("#IntervalTimeRow").show(),ctrlTab.find("#IntervalTimeSyncRow").show(),ctrlTab.find("#BlockAndDailyTimerPeriods").show()):n==5&&(ctrlTab.find("#IntervalTimeRow").show(),ctrlTab.find("#IntervalTimeSyncRow").show(),ctrlTab.find("#BlockAndDailyTimerPeriods").show(),ctrlTab.find("#BlockTimer2").show(),ctrlTab.find("#BlockTimer3").show(),ctrlTab.find("#TAG_NUM_BLOCK_TIMERS_1").prop("checked")?(tagTimerStartTime2.attr("disabled",!1),tagTimerStopTime2.attr("disabled",!1),tagNumBlockTimers2.attr("disabled",!1),tagTimerStartTime3.attr("disabled",!0),tagTimerStopTime3.attr("disabled",!0)):(tagTimerStartTime2.attr("disabled",!0),tagTimerStopTime2.attr("disabled",!0),tagNumBlockTimers2.prop("checked",!1),tagNumBlockTimers2.attr("disabled",!0),tagTimerStartTime3.attr("disabled",!0),tagTimerStopTime3.attr("disabled",!0)),tagNumBlockTimers2.prop("checked")?(tagTimerStartTime3.attr("disabled",!1),tagTimerStopTime3.attr("disabled",!1)):(tagTimerStartTime3.attr("disabled",!0),tagTimerStopTime3.attr("disabled",!0)))}function validateDropDownControls(n,t){n.children().each(function(){for(var n,r,u=GatingCondition[t]!=undefined?GatingCondition[t].numGates:0,i=0;i<u;i++)if(n=GatingCondition[t].gate[i].gateType,r=GatingCondition[t].gate[i].value,n==undefined||r!=this.value||n!=="EnableIf"&&n!=="EnableMask"&&n!=="DisplayIf"||checkGate(t,i,MeasurementProperties))$(this).removeClass("notAvailable").addClass("available");else{n==="DisplayIf"?$(this).hide():$(this).removeClass("available").addClass("notAvailable");break}})}function populateTriggers(){populateTab("mpTrig")}function populateEventHistory(){populateTab("mpEvnt")}function populateMarkers(){populateTab("mpMark")}function populateDayNight(){populateTab("mpDN")}function setSoundCheck(n){var t=n.find("#TAG_SNAPSHOT_SAMPLING_RATE");t.val(MeasurementProperties.TAG_SNAPSHOT_SAMPLING_RATE);checkGate("TAG_EVENT_SNAPSHOT_ENABLE")?t.siblings(".sLabel").css("color",ActiveLblColor):(enableControls(n.find("#TAG_EVENT_SNAPSHOT_ENABLE"),"TAG_EVENT_SNAPSHOT_ENABLE","checkbox",MeasurementProperties),n.find("#evntSndPd").css("color",DisactColor),n.find("#evntSndPre").css("color",DisactColor));n.find("#TAG_EVENT_SNAPSHOT_ENABLE").is(":checked")?(n.find("#TAG_EVENT_SNAPSHOT_PERIOD").removeAttr("disabled"),n.find("#TAG_EVENT_PRETRIGGER_PERIOD").removeAttr("disabled"),n.find(".esr").css("color",ActiveLblColor)):(n.find(".esr").css("color",DisactColor),n.find("#TAG_EVENT_SNAPSHOT_PERIOD").attr("disabled","true"),n.find("#TAG_EVENT_PRETRIGGER_PERIOD").attr("disabled","true"));n.find("#TAG_MEASUREMENT_SNAPSHOT_ENABLE").is(":checked")?(n.find("#TAG_MEASUREMENT_SNAPSHOT_PERIOD").removeAttr("disabled"),n.find(".msr").css("color",ActiveLblColor)):(n.find("#TAG_MEASUREMENT_SNAPSHOT_PERIOD").attr("disabled","true"),n.find(".msr").css("color",DisactColor));validateDropDownControls(t,"TAG_SNAPSHOT_SAMPLING_RATE")}function populateSound(n,t){var r="mpSnd",u=t.find("[type=checkbox]").off("change.snd"),f=t.find("[type=radio]").off("change.snd"),e=t.find("input:text").off("change.snd"),o=t.find("select").off("change.snd"),i;t.find("#TAG_EVENT_PRETRIGGER_PERIOD").off("blur.snd");t.find("#TAG_SNAPSHOT_SAMPLING_RATE").off("change.snd");t.find("#TAG_SNAPSHOT_SAMPLING_RATE").val(n.TAG_SNAPSHOT_SAMPLING_RATE);t.find("[name='TAG_SR_RANGE']").filter("[value="+MeasurementProperties.TAG_SR_RANGE+"]").prop("checked",!0);i=t.find("#TAG_MEASUREMENT_SNAPSHOT_ENABLE");i.prop("checked",n.TAG_MEASUREMENT_SNAPSHOT_ENABLE>0);checkGate("TAG_MEASUREMENT_SNAPSHOT_ENABLE",0)?enableControl(i,i.parent()):(disableControl(i,i.parent().parent(),"checkbox"),i.parent().parent().find(".sLabel").css("color",DisactColor));enableControls(t.find("#TAG_AUDIO_COMPRESSION"),"TAG_AUDIO_COMPRESSION","checkbox",MeasurementProperties);t.find("#TAG_MEASUREMENT_SNAPSHOT_PERIOD").val(n.TAG_MEASUREMENT_SNAPSHOT_PERIOD);t.find("#TAG_EVENT_SNAPSHOT_ENABLE").prop("checked",n.TAG_EVENT_SNAPSHOT_ENABLE>0);t.find("#TAG_EVENT_SNAPSHOT_PERIOD").val(n.TAG_EVENT_SNAPSHOT_PERIOD);t.find("#TAG_EVENT_PRETRIGGER_PERIOD").val(n.TAG_EVENT_PRETRIGGER_PERIOD);t.find("#TAG_AUDIO_COMPRESSION").prop("checked",n.TAG_AUDIO_COMPRESSION>0);t.find("#TAG_EVENT_PRETRIGGER_PERIOD").on("blur.snd",function(){var n=checkPreTrigMinDur(t);n!==undefined&&confDialog.callConfirm("",n,function(){},{Can:{on:"off"}})});t.find("#TAG_SNAPSHOT_SAMPLING_RATE").on("change.snd",function(){var n=checkPreTrigMinDur(t);n!==undefined&&confDialog.callConfirm("",n,function(){},{Can:{on:"off"}})});t.find("#TAG_EVENT_SNAPSHOT_PERIOD").on("change.snd",function(){var n=checkEvntSnapMinDur(t);n!==undefined&&confDialog.callConfirm("",n,function(){},{Can:{on:"off"}})});u.on("change.snd",function(){updatePropertyValue(r,$(this),this.id);forceData(this.id,$(this),function(){setSoundCheck(t)});setSoundCheck(t)});f.on("change.snd",function(){updatePropertyValue(r,$(this),this.id);forceData(this.id,$(this),function(){setSoundCheck(t)})});e.on("blur.snd",function(){updatePropertyValue(r,$(this),this.id)});o.on("change.snd",function(){updatePropertyValue(r,$(this),this.id)});t.find("#TAG_EVENT_SNAPSHOT_ENABLE").on("change.snd",function(){if($(this).is(":checked")){var n=checkEvntSnapMinDur(t);n!==undefined&&confDialog.callConfirm("",n,function(){},{Can:{on:"off"}})}});setSoundCheck(t);checkPreTrigMinDur(t);checkEvntSnapMinDur(t);dispHG(!1);setTimeout(function(){var n=t.find(searchFocDef).not(":hidden").first();n.focus();dispHG(!1)},0)}function getSndRecBufferSize(){var i=0,t=undefined,n;tbId[curTabIndex]!=="mpEvnt"&&(t=$("#TAG_SNAPSHOT_SAMPLING_RATE"));i=t!=undefined?parseInt(t.val(),10):parseInt(MeasurementProperties.TAG_SNAPSHOT_SAMPLING_RATE,10);n=0;switch(i){case 0:n=48e3;break;case 1:n=24e3;break;case 2:n=16e3;break;case 3:n=8e3;break;case 4:n=51200;break;default:n=8e3}return 48e4/n}function checkPreTrigMinDur(n){var h=undefined,a=parseInt(MeasurementProperties.TAG_EVENT_SNAPSHOT_ENABLE,10)===0&&!document.getElementById("TAG_EVENT_SNAPSHOT_ENABLE").checked,v=parseInt(MeasurementProperties.TAG_EVENT_HISTORY_ENABLE,10)===0&&!document.getElementById("TAG_EVENT_HISTORY_ENABLE").checked,i,r,f,c,o,s;if(!a&&!v){n!==undefined&&(i=parseFloat(n.find("#TAG_EVENT_PRETRIGGER_PERIOD").val()));(i===undefined||isNaN(i))&&(i=MeasurementProperties.TAG_EVENT_PRETRIGGER_PERIOD);r=10;f=0;Model==="831C"&&(r=getSndRecBufferSize(),c=48e4,f=c/r/1e3);var e=MeasurementProperties.TAG_EVENT_MIN_DURATION,l=!1,t=i,u=e;return e+i>r&&(t=r-e,l=!0),o=!1,t<0&&(u=u+t,t=0,o=!0),t=Math.floor(t),n!=undefined&&n.find("#TAG_EVENT_PRETRIGGER_PERIOD").val(t),MeasurementProperties.TAG_EVENT_PRETRIGGER_PERIOD!=t&&(MeasurementProperties.TAG_EVENT_PRETRIGGER_PERIOD=t),u!=undefined&&(MeasurementProperties.TAG_EVENT_MIN_DURATION!=u&&(MeasurementProperties.TAG_EVENT_MIN_DURATION=u),s=$("#TAG_EVENT_MIN_DURATION"),s!=undefined&&s.val(u)),l&&(h=Model!="831C"?formattedString("Pretrigger Time + Minimum Duration ≤ 10s <br>Pretrigger Time changed from {0}s to {1}s",i,t):o?i===t?formattedString("At {0}ksps, Pretrigger Time + Minimum Duration ≤ {1}s <br>Min Duration changed from {2}s to {3}s",f,r,e,u):formattedString("At {0}ksps, Pretrigger Time + Minimum Duration ≤ {1}s <br>Pretrigger Time changed from {2}s to {3}s <br>Min Duration changed from {4}s to {5}s",f,r,i,t,e,u):formattedString("At {0}ksps, Pretrigger Time + Minimum Duration ≤ {1}s <br>Pretrigger Time changed from {2}s to {3}s",f,r,i,t)),h}}function checkEvntSnapMinDur(n){var e=parseInt(MeasurementProperties.TAG_EVENT_SNAPSHOT_ENABLE,10)===0&&!document.getElementById("TAG_EVENT_SNAPSHOT_ENABLE").checked,o=parseInt(MeasurementProperties.TAG_EVENT_HISTORY_ENABLE,10)===0&&!document.getElementById("TAG_EVENT_HISTORY_ENABLE").checked;if(!e&&!o){var r=undefined,i,u,t,f=n.attr("id")==="mpSnd",s=n.attr("id")==="mpEvnt";return f?(t=parseFloat(n.find("#TAG_EVENT_SNAPSHOT_PERIOD").val()),i=MeasurementProperties.TAG_EVENT_MIN_DURATION,(t===undefined||isNaN(t))&&(t=MeasurementProperties.TAG_EVENT_SNAPSHOT_PERIOD)):s&&(i=parseFloat(n.find("#TAG_EVENT_MIN_DURATION").val()),t=MeasurementProperties.TAG_EVENT_SNAPSHOT_PERIOD,(i===undefined||isNaN(i))&&(i=MeasurementProperties.TAG_EVENT_MIN_DURATION)),u=t,t<=i&&(t=Math.ceil(i+.1),MeasurementProperties.TAG_EVENT_SNAPSHOT_PERIOD=t,f&&n.find("#TAG_EVENT_SNAPSHOT_PERIOD").val(t),r=formattedString("Event Sound Recording Snapshot time must be greater than Event Minimum Duration.  Snapshot time updated from {0}s to {1}s.",u,t)),r}}function populateDosimeter1(){populateTab("Dosimeter1")}function populateDosimeter2(){populateTab("Dosimeter2")}function populateFFTGeneral(){populateTab("FFTGeneralTab")}function populateFFT(){populateTab("FFT");$("#TAG_FFT_FREQSPAN").on("change.fft",function(){setupFFTMeasCountMin()})}function populateFFTControl(){populateTab("FFTMeasurementControl")}function populateFFTTonality(){populateTab("FFTTonality")}function populateRAGeneral(){populateTab("RAGeneral")}function populateRT60(){populateTab("RT60")}function populateRT60Adv(){populateTab("RT60Adv")}function populateRASource(){populateTab("RASource")}function populateDevice(){populateTab("Device","System")}function populateTime(){populateTab("Time","System")}function populateNTP(){populateTab("sysNTP","System")}function populatePower(){populateTab("Power","System")}function populatePreferences(){populateTab("Preferences","System");$("#TAG_USB_HOST_POWER").bind("change",function(){updatePropertyValue("Preferences",$(this),this.id,"System");validateControls("Preferences","TAG_USB_HOST_POWER")});$("#TAG_GPS_MODE").bind("change",function(){updatePropertyValue("Preferences",$(this),this.id,"System");validateControls("Preferences","TAG_GPS_MODE")})}function populateLocalization(){populateTab("sysLocal","System")}function populateDisplays(){populateTab("Displays","System")}function populateOptions(){}function populateOther(){var n;populateTab("sysOther","System");n=$("#TAG_LOGIC_IN");n.children().each(function(){checkGate("TAG_LOGIC_IN",this.value)?$(this).removeClass("notAvailable").addClass("available"):$(this).removeClass("available").addClass("notAvailable")});n=$("#TAG_LOGIC_OUT");n.children().each(function(){checkGate("TAG_LOGIC_OUT",this.value,SystemProperties)?$(this).removeClass("notAvailable").addClass("available"):$(this).removeClass("available").addClass("notAvailable")})}function populateNetwork(){var n;populateTab("spNet","System");n=$("#TAG_IP_ADDRESS");n.val().length==0&&n.val("No Network")}function populateEmail(){populateTab("sysEmail","System")}function populateModem(){populateTab("Modem","System")}function populateRS232(){populateTab("RS232","System")}function populateWireless(){populateTab("Wireless","System")}function populateSMS_Out(){populateTab("SMS_Out","System")}function populateLock(){populateTab("Lock","System")}function populatePwrOff(){populateTab("PwrOffTab","System")}function CalculateDoseLevel(n,t){var i,r=parseInt(t,10);switch(r){case 0:i=10;break;case 1:i=13.29;break;case 2:i=16.61;break;case 3:i=20}return 87.65}function setSessionValue(n,t){var i={};i[n]=t;(SessionID==undefined||SessionID==0)&&(SessionID=Date.now());$.post("/sdk?setSessionValue="+SessionID,i).done(function(n){n.Transferable!=undefined&&console.log("G4~ Transferable: "+n.Transferable)})}function getSessionValue(){(SessionID==undefined||SessionID==0)&&(SessionID=Date.now());$.getJSON("/sdk?getSessionValue="+SessionID).done(function(n){SessionData=GenerateCache(n);console.log(SessionData)})}function setTimeHistoryCheck(){var i=mpTime.main||$("#mpTime"),n=i.find("#TAG_TIME_HISTORY_PERIOD"),t;n.val(MeasurementProperties.TAG_TIME_HISTORY_PERIOD);t="TAG_TIME_HISTORY_PERIOD";validateDropDownControls(n,t)}function populateTimeHistory(n){var t=mpTime.main||$("#mpTime"),i=t.find("input:checkbox[name=TAG_TIME_HISTORY_ENABLE]");i.filter("[value="+n.TAG_TIME_HISTORY_ENABLE+"]").prop("checked",!0);setTimeHistoryCheck();setTimeout(function(){var n=mpTime.main||$("#mpTime"),t=n.find(searchFocDef).not(":hidden").first();t.focus();dispHG(!1)},0)}function EnableTimeHistoryOptions(){var n=$("#TAG_RUN_MODE").find(":selected").text();n==="Manual Stop"&&$("#DeltaRow").hide()}function initTH(){$(document).data("lastPropTag","");tmTab=$("#mpTime");tmTab.find("#EnableTimeHistory").find(":checkbox").change(function(){$(this).is(":checked")?(tmTab.find("#TAG_TIME_HISTORY_OPTIONS").attr("disabled",!1),tmTab.find("#TAG_TIME_HISTORY_PERIOD").attr("disabled",!1),tmTab.find("#TimeHistoryOptions").attr("disabled",!1),tmTab.find("#periodDropdownLabel").removeClass("disabled"),tmTab.find(".thListOfCheckboxes").removeClass("disabled")):(tmTab.find("#TAG_TIME_HISTORY_OPTIONS").attr("disabled",!0),tmTab.find("#TAG_TIME_HISTORY_PERIOD").attr("disabled",!0),tmTab.find("#TimeHistoryOptions").attr("disabled",!0),tmTab.find("#periodDropdownLabel").addClass("disabled"),tmTab.find(".thListOfCheckboxes").addClass("disabled"))});tmTab.find("#ID_TH_OBALEQ13").on("change.TH",function(){if(MeasurementProperties.TAG_TIME_HISTORY_PERIOD>20&&MeasurementProperties.TAG_TIME_HISTORY_PERIOD<24){var n=$(this);n.prop("checked")&&(MeasurementProperties.TAG_TIME_HISTORY_MISC&=~THOptions.ID_TH_OBALEQ11.mask,tmTab.find("#ID_TH_OBALEQ11").prop("checked",!1))}});tmTab.find("#ID_TH_OBALEQ11").on("change.TH",function(){if(MeasurementProperties.TAG_TIME_HISTORY_PERIOD>20&&MeasurementProperties.TAG_TIME_HISTORY_PERIOD<24){var n=$(this);n.prop("checked")&&(MeasurementProperties.TAG_TIME_HISTORY_MISC&=~THOptions.ID_TH_OBALEQ13.mask,tmTab.find("#ID_TH_OBALEQ13").prop("checked",!1))}});tmTab.find("#TimeHistoryTab").css("background","transparent");tmTab.find("#TAG_TIME_HISTORY_ENABLE").bind("change.pop",function(){CurrentStatus.uiRunFlags&(DATA_RESET|DATA_STORED)||bAlreadyDisplayedResetMessage||!activeSetupLoaded?(updatePropertyValue("PropTimeHistoryTab",$("#TAG_TIME_HISTORY_ENABLE"),"TAG_TIME_HISTORY_ENABLE"),finishUpdatePropTH()):(resetFunctionCallback=wrapFunction(finishUpdatePropTH,this,["Pop"]),updatePropertyValue("PropTimeHistoryTab",$("#TAG_TIME_HISTORY_ENABLE"),"TAG_TIME_HISTORY_ENABLE"));thInitTab();Custom.init("TimeHistory",!0)});tmTab.find("#TAG_TIME_HISTORY_ENABLE").off("blur");ConfigFrameSizeAndScroll("#TimeHistory");tmTab.find("#TAG_TIME_HISTORY_PERIOD").bind("change",function(){var n=$(this);setTimeout(function(){var t="TimeHistoryTab";CurrentStatus.uiRunFlags&(DATA_RESET|DATA_STORED)||bAlreadyDisplayedResetMessage||!OnMeter||OnMeter&&!activeSetupLoaded?(updatePropertyValue(t,n,n.id),validateSelection(n.val())):(resetFunctionCallback=wrapFunction(validateSelection,n,[n.val()]),updatePropertyValue(t,n,n.id))},0)});tmTab.find("#TimeHistoryOptions").on("change.pop","input:checkbox",function(){updatePropertyValue("TimeHistoryTab",$(this),this.id)});Custom.init("TimeHistory",!1)}function thInitTab(){var n=MeasurementProperties.TAG_TIME_HISTORY_ENABLE,t=MeasurementProperties.TAG_TIME_HISTORY_PERIOD;n=="1"?(tmTab.find("#TAG_TIME_HISTORY_ENABLE").prop("checked",!0),tmTab.find("#TAG_TIME_HISTORY_OPTIONS").prop("disabled",!1),tmTab.find("#TAG_TIME_HISTORY_PERIOD").prop("disabled",!1),tmTab.find("#TimeHistoryOptions").prop("disabled",!1),tmTab.find("#periodDropdownLabel").removeClass("disable"),tmTab.find("#TAG_TIME_HISTORY_PERIOD").removeClass("disable")):(tmTab.find("#TAG_TIME_HISTORY_ENABLE").prop("checked",!1),tmTab.find("#TAG_TIME_HISTORY_OPTIONS").prop("disabled",!0),tmTab.find("#TAG_TIME_HISTORY_PERIOD").prop("disabled",!0),tmTab.find("#TimeHistoryOptions").prop("disabled",!0),tmTab.find("#TAG_TIME_HISTORY_PERIOD").addClass("disable"),tmTab.find("#periodDropdownLabel").addClass("disable"));SelectPeriod(t)}function TimeHistoryOptionAvailable(){return!0}function TimeHistoryOptionEnabled(n,t){return n[THOptions[t].options]&THOptions[t].mask?!0:!1}function UpdateTimeHistoryFlags(n){var i=0,t;if(n.TimeHistoryEnable.data==1)for(t in THOptions)t.indexOf("ID")==0&&(TimeHistoryOptionAvailable(n,THOptions[t].item)||(TimeHistoryOptionEnabled(n,THOptions[t].item)&&i++,n[THOptions[t].options]&=~THOptions[t].mask));return i>0}function changesMayOccur(){setTimeout(function(){$(document).data("forceTag","TAG_TIME_HISTORY_PERIOD");$(document).data("forcewhichGate",-1);forceDataCallBack=wrapFunction(forceData,this,["TAG_TIME_HISTORY_PERIOD",$("#TAG_TIME_HISTORY_PERIOD"),SelectPeriod]);notifyChange(" Some options may change  because of the time  history sample period. ","SelectPeriod","MeasurementProperties.TAG_TIME_HISTORY_PERIOD","TAG_TIME_HISTORY_PERIOD","Both","Yes","Cancel")},0)}function validateSelection(n){if(!resetCancelled){n==undefined&&(n=$("#TAG_TIME_HISTORY_PERIOD").val());var t=MeasurementProperties.TAG_TIME_HISTORY_PERIOD;$(document).data("lastPropTag")!=undefined&&$(document).data("lastPropTag")=="TAG_TIME_HISTORY_PERIOD"&&(t=$(document).data("lastPropValue"));n>=ID_400PS&&n<=ID_100PS?(t<ID_400PS||t>ID_100PS)&&((SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&16384)!=0?(changesMayOccur(),MeasurementProperties.TAG_TIME_HISTORY_MISC=0,MeasurementProperties.TAG_TIME_HISTORY_OPTIONS=0,MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3=THOptions.ID_TH_DUR_FRAC.mask,THInitializeCheckBoxes()):($(document).data("forceTag","TAG_TIME_HISTORY_PERIOD"),$(document).data("forcewhichGate",-1),forceData("TAG_TIME_HISTORY_PERIOD",$("#TAG_TIME_HISTORY_PERIOD"),SelectPeriod))):n==0||n==1?t!=1&&t!=0&&(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3|=THOptions.ID_TH_DUR_FRAC.mask,changesMayOccur()):n==2||n==3?t!=2&&t!=3&&(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3|=THOptions.ID_TH_DUR_FRAC.mask,changesMayOccur()):(n==4&&t!=4?MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3|=THOptions.ID_TH_DUR_FRAC.mask:MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&=~THOptions.ID_TH_DUR_FRAC.mask,t>20&&t<24||t<=3?changesMayOccur():SelectPeriod(n));SystemProperties.TAG_LTM5_ENABLE==1&&n>=ID_5S&&n<=ID_24HR||(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS&=~THOptions.ID_TH_LTM5.mask)}}function SelectPeriod(n){var i;n==undefined&&(n=tmTab.find("#TAG_TIME_HISTORY_PERIOD").val());i=MeasurementProperties.TAG_TIME_HISTORY_PERIOD;$(document).data("lastPropTag")!=undefined&&$(document).data("lastPropTag")=="TAG_TIME_HISTORY_PERIOD"&&(i=$(document).data("lastPropValue"));tmTab.find("#tableTimeHistoryLxT").hide();var r=(2&SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS)>0,u=(1&SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS)>0,t=r||u;MeasurementProperties.TAG_OBA_BANDWIDTH>0&&t?(tmTab.find("#ROW_ID_TH_OBALEQ11").show(),tmTab.find("#ROW_ID_TH_OBAMAX11").show(),tmTab.find("#ROW_ID_TH_OBAMIN11").show(),tmTab.find("#ROW_ID_TH_OBASPL11").show()):(tmTab.find("#ROW_ID_TH_OBALEQ11").hide(),tmTab.find("#ROW_ID_TH_OBAMAX11").hide(),tmTab.find("#ROW_ID_TH_OBAMIN11").hide(),tmTab.find("#ROW_ID_TH_OBASPL11").hide());(MeasurementProperties.TAG_OBA_BANDWIDTH==1||MeasurementProperties.TAG_OBA_BANDWIDTH==3)&&r?(tmTab.find("#ID_TH_OBASPL11").show(),tmTab.find("#ID_TH_OBALEQ11").show(),tmTab.find("#ID_TH_OBAMAX11").show(),tmTab.find("#ID_TH_OBAMIN11").show()):(tmTab.find("#ID_TH_OBASPL11").hide(),tmTab.find("#ID_TH_OBALEQ11").hide(),tmTab.find("#ID_TH_OBAMAX11").hide(),tmTab.find("#ID_TH_OBAMIN11").hide());(MeasurementProperties.TAG_OBA_BANDWIDTH==2||MeasurementProperties.TAG_OBA_BANDWIDTH==3)&&u?(tmTab.find("#ID_TH_OBASPL13").show(),tmTab.find("#ID_TH_OBALEQ13").show(),tmTab.find("#ID_TH_OBAMAX13").show(),tmTab.find("#ID_TH_OBAMIN13").show()):(tmTab.find("#ID_TH_OBASPL13").hide(),tmTab.find("#ID_TH_OBALEQ13").hide(),tmTab.find("#ID_TH_OBAMAX13").hide(),tmTab.find("#ID_TH_OBAMIN13").hide());n>20&&n<24?(tmTab.find("#tableTimeHistory").show(),tmTab.find("#tableWeather").hide(),tmTab.find("#tableMiscellaneous").hide(),tmTab.find("#tableTWA").hide(),t&&MeasurementProperties.TAG_OBA_BANDWIDTH>0?(tmTab.find("#ROW_ID_TH_OBALEQ11").show(),tmTab.find("#ROW_ID_TH_OBAMAX11").hide(),tmTab.find("#ROW_ID_TH_OBAMIN11").hide(),tmTab.find("#ROW_ID_TH_OBASPL11").hide(),tmTab.find("#tableObaBandwidth").show()):tmTab.find("#tableObaBandwidth").hide(),tmTab.find("#tableTimeHistory").hide(),MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&THOptions.ID_TH_LN_ENABLES.mask&&(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&=~THOptions.ID_TH_LN_ENABLES.mask)):n==0||n==1?(tmTab.find("#tableTimeHistory").show(),tmTab.find("#tableWeather").show(),tmTab.find("#tableMiscellaneous").show(),t&&MeasurementProperties.TAG_OBA_BANDWIDTH>0?(tmTab.find("#ROW_ID_TH_OBAMAX11").hide(),tmTab.find("#ROW_ID_TH_OBAMIN11").hide(),tmTab.find("#ROW_ID_TH_OBASPL11").show(),tmTab.find("#ROW_ID_TH_OBALEQ11").show(),tmTab.find("#tableObaBandwidth").show()):tmTab.find("#tableObaBandwidth").hide(),tmTab.find("#tableTimeHistory").show(),tmTab.find("#ROW_ID_TH_CMINUSA").hide(),tmTab.find("#ROW_ID_TH_ASLOWMAX").hide(),tmTab.find("#ROW_ID_TH_AFASTMAX").hide(),tmTab.find("#ROW_ID_TH_AIMPLMAX").hide(),tmTab.find("#ROW_ID_TH_ASLOWMIN").hide(),tmTab.find("#ROW_ID_TH_AFASTMIN").hide(),tmTab.find("#ROW_ID_TH_AIMPLMIN").hide(),tmTab.find("#tableMiscellaneous").hide(),tmTab.find("#tableTWA").hide(),tmTab.find("#ROW_ID_TH_LN_ENABLES").hide(),MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&THOptions.ID_TH_LN_ENABLES.mask&&(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&=~THOptions.ID_TH_LN_ENABLES.mask)):(ModelNumber===mLxT||ModelNumber===mLxTSE?(tmTab.find("#tableTimeHistoryLxT").show(),tmTab.find("#tableWeather").hide()):tmTab.find("#tableWeather").show(),tmTab.find("#tableTimeHistory").show(),tmTab.find("#tableMiscellaneous").show(),(64&SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS)>0?tmTab.find("#tableTWA").show():tmTab.find("#tableTWA").hide(),t&&MeasurementProperties.TAG_OBA_BANDWIDTH>0?(tmTab.find("#ROW_ID_TH_OBASPL11").show(),tmTab.find("#ROW_ID_TH_OBALEQ11").show(),tmTab.find("#ROW_ID_TH_OBAMAX11").show(),tmTab.find("#ROW_ID_TH_OBAMIN11").show(),tmTab.find("#tableObaBandwidth").show()):tmTab.find("#tableObaBandwidth").hide(),tmTab.find("#ROW_ID_TH_ASLOWMAX").show(),tmTab.find("#ROW_ID_TH_AFASTMAX").show(),tmTab.find("#ROW_ID_TH_AIMPLMAX").show(),tmTab.find("#ROW_ID_TH_ASLOWMIN").show(),tmTab.find("#ROW_ID_TH_AFASTMIN").show(),tmTab.find("#ROW_ID_TH_AIMPLMIN").show(),tmTab.find("#ROW_ID_TH_CMINUSA").show(),MeasurementProperties.TAG_PREAMPTYPE=="426A12"||MeasurementProperties.TAG_PREAMPTYPE=="PRM2103"?(tmTab.find("#ROW_ID_TH_2102TEMPERATURE").show(),tmTab.find("#ROW_ID_TH_2102HUMIDITY").show()):(tmTab.find("#ROW_ID_TH_2102TEMPERATURE").hide(),tmTab.find("#ROW_ID_TH_2102HUMIDITY").hide()),tmTab.find("#ROW_ID_TH_EXTPOWER").show(),tmTab.find("#ROW_ID_TH_BATTERY").show(),tmTab.find("#ROW_ID_TH_INTTEMP").show(),n==2||n==3?(tmTab.find("#ROW_ID_TH_LN_ENABLES").hide(),MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&THOptions.ID_TH_LN_ENABLES.mask&&(MeasurementProperties.TAG_TIME_HISTORY_OPTIONS3&=~THOptions.ID_TH_LN_ENABLES.mask)):(tmTab.find("#tableMiscellaneous").show(),tmTab.find("#ROW_ID_TH_LN_ENABLES").show()));n>6&&n<21&&SystemProperties.TAG_LTM5_ENABLE>0?tmTab.find("#tableLAFTM5").show():tmTab.find("#tableLAFTM5").hide();MeasurementProperties.TAG_WEATHER_ENABLE==0?tmTab.find("#tableWeather").hide():MeasurementProperties.TAG_WEATHER_ENABLE==1?(tmTab.find("#tableWeather").show(),tmTab.find(".weatherVai").hide(),tmTab.find(".weatherInt").show()):(tmTab.find("#tableWeather").show(),tmTab.find(".weatherVai").show(),tmTab.find(".weatherInt").show(),ModelNumber===m831&&PageStatus.fw_ver<"2.313"||ModelNumber===m831C&&PageStatus.fw_ver<"03.0.3R0"?tmTab.find("#ROW_ID_TH_WINDSPD").hide():tmTab.find("#ROW_ID_TH_WINDSPD").show());tmTab.find("#ROW_ID_TH_WSLOWSPL").hide();tmTab.find("#ROW_ID_TH_WFASTSPL").hide();tmTab.find("#ROW_ID_TH_WIMPLSPL").hide();ModelNumber===mLxT||ModelNumber===mLxTSE?(tmTab.find("#tableWeather").hide(),SystemProperties.TAG_OPTION_FLAGS&SystemProperties.TAG_MASK_OPTION&4096&&MeasurementProperties.TAG_TIME_HISTORY_PERIOD<5?tmTab.find("#tableTMS").show():tmTab.find("#tableTMS").hide(),tmTab.find("#ROW_ID_TH_CMINUSA").show(),tmTab.find("#ROW_ID_TH_OBASPL11").hide(),tmTab.find("#ROW_ID_TH_LN_ENABLES").hide(),tmTab.find("#ROW_ID_TH_EXTPOWER").hide(),tmTab.find("#ROW_ID_TH_2102TEMPERATURE").hide(),tmTab.find("#ROW_ID_TH_2102HUMIDITY").hide(),tmTab.find("#ROW_ID_TH_ALEQ").hide(),tmTab.find("#ROW_ID_TH_APEAK").hide(),tmTab.find("#ROW_ID_TH_ASLOWMAX").hide(),tmTab.find("#ROW_ID_TH_AFASTMAX").hide(),tmTab.find("#ROW_ID_TH_AIMPLMAX").hide(),tmTab.find("#ROW_ID_TH_ASLOWMIN").hide(),tmTab.find("#ROW_ID_TH_AFASTMIN").hide(),tmTab.find("#ROW_ID_TH_AIMPLMIN").hide(),tmTab.find("#ROW_ID_TH_ASLOWSPL").hide(),tmTab.find("#ROW_ID_TH_AFASTSPL").hide(),tmTab.find("#ROW_ID_TH_AIMPLSPL").hide(),tmTab.find("#Tr1").hide(),(SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&4096)>0&&(tmTab.find("#ROW_ID_TH_WSLOWSPL").show(),tmTab.find("#ROW_ID_TH_WFASTSPL").show(),tmTab.find("#ROW_ID_TH_WIMPLSPL").show())):tmTab.find("#tableTMS").show()}function doExtraTH(){thInitTab();typeof THInitializeCheckBoxes!="undefined"?THInitializeCheckBoxes():(THInitializeCheckBoxes=function(){},setTimeout(THInitializeCheckBoxes,1500))}function finishUpdatePropTH(){forceData("TAG_TIME_HISTORY_ENABLE",$("#TAG_TIME_HISTORY_ENABLE"),thInitTab);thInitTab()}function GenerateDisplaysTabPages(){var e=$("#PagesTable"),n,i,u,a,f,o,r,c,l,t;if(e.html(""),i="Live",u={Order:"Live"},n=GetSelectedDisplayTab(u),i=u.Order,displayOrderArray=displayOrder831,displayOrderArray=Model.indexOf("831")>-1?displayOrder831:displayOrderLxT,n!=undefined){a=0;f="";for(o in displayOrderArray[i]){var t=displayOrderArray[i][o],s=t,v=n[t].title,y=n[t].optionsWord,h=n[t].condition;(h===undefined||h())&&(r='<div><label><input type="checkbox" class="dspCB" data-id="'+s+'" id="id_',r+=s+'" tag="'+y+'" value="1" /> ',r+=v+"<\/label><\/div>",f+=r)}e.append(f);for(t in n)c=SystemProperties[n[t].optionsWord],l=n[t].mask,$("#id_"+t).prop("checked",(c&l)!=0)}}function GetSelectedDisplayTab(n){switch($("#DISPLAY_SELECTOR").find("option:selected").text()){case"Live":activeTab=dsLiveTab;n.Order="Live";break;case"Overall":activeTab=dsOverallTab;n.Order="Overall";break;case"Session Log":activeTab=dsSessionTab;n.Order="Session";break;case"Current":activeTab=dsCurrentTab;n.Order="Current";break;case"Measurement":activeTab=dsMeasurementTab;n.Order="Measurement";break;case"Time History":activeTab=dsTimeHistoryTab;n.Order="TimeHistory";break;case"Events":activeTab=dsEventsTab;n.Order="Events";break;default:activeTab=dsLiveTab;n.Order="Live"}return activeTab}function GenerateOptionsCheckboxes(n,t,i,r){var o,l,f,u,s;if(t.html(""),o="",i==undefined&&(i=MainOptions),i!=undefined){l=0;for(f in i){var a=f,h=i[f].title,v=i[f].optionsMask,c=i[f].condition,e=SystemProperties[i[f].optionsPurch]&i[f].mask;(e!==0||n||r===!0)&&(c===undefined||c())&&(u="",s="",n&&e?u='<div><img tabindex=0 src="/images/CheckMark.png" class="checkMark" id="':n&&!e?(u='<div><img tabindex=0 src="/images/space.gif" class="checkMark" id="',s=" greyed"):u='<div><label class="dspCB"><input type="checkbox" class="dspCB" id="',u+=a+'" tag="'+v+'" value="1"',r==!0&&e==0&&(u+=" disabled"),u+="/>",u+=n?'<span class="dspCB'+s+'">'+h+"<\/span><\/div>":h+"<\/label><\/div>",o+=u)}t.append(o);n||CheckOptionsDepends()}}function AssignClickHandlers(n,t,i){if(i==undefined&&(i=MainOptions),n=="OptionsTab")$("#"+t).on("change","[tag^='TAG_']",function(){var t=i[this.id];t.depends==undefined||t.depends()?updatePropertyValue(n,$(this),this.id,"System"):($(this).prop("checked",!1),updatePropertyValue(n,$(this),this.id,"System"));console.log("G4~ OptionsChanged");forceData("TAG_MASK_OPTION",$(this),CheckOptionsDepends)});else $("#"+t).on("change"," [tag^='TAG_']",function(){updatePropertyValue(n,$(this),this.id,"System")})}function CheckOptionsDepends(){var t,n,i;for(t in MainOptions)n=MainOptions[t],i=SystemProperties[n.optionsMask],n.depends==undefined||n.depends!=undefined&&i&n.mask&&n.depends()?$("#"+t).prop("checked",(SystemProperties[n.optionsMask]&SystemProperties[n.optionsPurch]&n.mask)!=0):($("#"+t).prop("checked",!1),updatePropertyValue("OptionsTab",$("#"+t),t,"System"))}function setupFFTMeasCountMin(){switch(parseInt(MeasurementProperties.TAG_FFT_FREQSPAN,10)){case 0:FFTMeasCountMin=20;break;case 1:FFTMeasCountMin=10;break;case 2:FFTMeasCountMin=5;break;case 3:FFTMeasCountMin=2;break;default:FFTMeasCountMin=1}MeasurementProperties.TAG_MEASUREMENT_COUNTS<FFTMeasCountMin&&(MeasurementProperties.TAG_MEASUREMENT_COUNTS=FFTMeasCountMin)}function RunRules(n,t,i){var s=MeasurementProperties,h=PropertyTags,f,r,c,u,l,e,a,o;n=="System"&&(s=SystemProperties,h=SystemTags);SystemProperties.TAG_MODEL=t;Model=t;checkOptionsBasedOnModel();f=!1;c=GatingCondition.length;for(r in GatingCondition)if(typeof h[r]!="undefined")for(c=r!=undefined?GatingCondition[r].numGates:0,u=0;u<c;u++)if(l=GatingCondition[r].gate[u].gateType,l!=undefined&&l=="forceData"&&(passGate=checkGate(r,u,s),passGate&&u>=0&&GatingCondition[r].gate[u].Set!=undefined))for(e=0,a=GatingCondition[r].gate[u].Set.length;e<a;e++)for(o in GatingCondition[r].gate[u].Set[e])h[o]!=undefined&&(s[o]=eval(GatingCondition[r].gate[u].Set[e][o]),f=!0,i||(h[o].modded=!0));return i&&f&&PropertiesChanged(s)&&UpdateProperties(n),console.log("G4~ RunRules result: "+f),f}function updateDefFName(){if(filenameModded=!1,Model.indexOf("LxT")!=-1){if(MeasurementProperties.TAG_DEFAULT_FILENAME=="831_Data")return MeasurementProperties.TAG_DEFAULT_FILENAME="LxT_Data",PropertyTags.TAG_DEFAULT_FILENAME.modded=!0,filenameModded=!0,oldSetup&&MeasurementProperties.TAG_FILE_NAME=="831_Data"&&(MeasurementProperties.TAG_FILE_NAME="LxT_Data",PropertyTags.TAG_FILE_NAME.modded=!0,filenameModded=!0),!0}else if(MeasurementProperties.TAG_DEFAULT_FILENAME=="LxT_Data")return MeasurementProperties.TAG_DEFAULT_FILENAME="831_Data",PropertyTags.TAG_DEFAULT_FILENAME.modded=!0,filenameModded=!0,oldSetup&&MeasurementProperties.TAG_FILE_NAME=="LxT_Data"&&(MeasurementProperties.TAG_FILE_NAME="831_Data",PropertyTags.TAG_FILE_NAME.modded=!0,filenameModded=!0),!0;return!1}function checkDefFName(){return filenameModded==!0&&PropertyTags.TAG_DEFAULT_FILENAME.modded==!0&&(MeasurementProperties.TAG_DEFAULT_FILENAME=="831_Data"||MeasurementProperties.TAG_DEFAULT_FILENAME=="LxT_Data")?!0:(filenameModded=!1,!1)}function checkGate(n,t,i,r){var f=!0,o,u,e;if(i=typeof PropertyTags[n]!="undefined"?MeasurementProperties:SystemProperties,typeof t=="undefined"&&(t=0),r!=undefined||typeof GatingCondition[n]!="undefined"&&typeof GatingCondition[n].gate[t]!="undefined")if(o=GatingCondition[n].gate[t].gateType,f=!1,r==undefined&&(r=GatingCondition[n].gate[t]),typeof r.EVAL!="undefined"){for(f=!0,u=0;u<r.EVAL.length;u++)if(!eval(r.EVAL[u])){f=!1;break}}else if(typeof r.AND!="undefined"){for(f=!0,u=0;u<r.AND.length;u++)if(!checkGate(n,t,i,r.AND[u])){f=!1;break}}else if(typeof r.OR!="undefined"){for(u=0;u<r.OR.length;u++)if(checkGate(n,t,i,r.OR[u])){f=!0;break}}else if(typeof r.OR1!="undefined"){for(u=0;u<r.OR1.length;u++)if(checkGate(n,t,i,r.OR1[u])){f=!0;break}}else if(typeof r.OR2!="undefined"){for(u=0;u<r.OR2.length;u++)if(checkGate(n,t,i,r.OR2[u])){f=!0;break}}else if(typeof r.NOT!="undefined"){for(f=!0,u=0;u<r.NOT.length;u++)if(checkGate(n,t,i,r.NOT[u])){f=!1;break}}else if(typeof r.GREATER!="undefined")for(f=!0,u=0;u<r.GREATER.length;u++)for(e in r.GREATER[u])console.log("Greater: "+e+" - "+i[e]+" = "+r.GREATER[u][e]),i=typeof PropertyTags[e]!="undefined"?MeasurementProperties:SystemProperties,f=i[e]>r.GREATER[u][e]?!0:!1;else for(e in r)i=typeof PropertyTags[e]!="undefined"?MeasurementProperties:SystemProperties,f=i[e]==eval(r[e])||(o=="DisplayMask"||o=="EnableMask"||o=="SubEnableMask")&&(r[e]&i[e])!=0?!0:!1;return f}function forceData(n,t,i){for(var o=parseFloat(t.val().replace(/[^\d\.]/g,"")),r=0,s=t.prop("type"),f,e=GatingCondition[n]!=undefined?GatingCondition[n].numGates:0,u,r=0;r<e;r++)if(u=GatingCondition[n].gate[r].gateType,u!=undefined&&u=="forceData"){if(GatingCondition[n]==undefined||GatingCondition[n].gate[r].Set==undefined)return;if(console.log("forceData: "+n),f=typeof PropertyTags[n]!="undefined"?MeasurementProperties:SystemProperties,forceDataCallBack=i!=undefined?i:emptyFun,passGate=checkGate(n,r,f),passGate&&GatingCondition[n]!=undefined)return $(document).data("forceTag",n),$(document).data("forcewhichGate",r),GatingCondition[n].message[r]!=undefined&&GatingCondition[n].message[r]!=""?($.notify({title:GatingCondition[n].message[r],buttonYes:"Yes",buttonNo:"No"},{style:"CommonAlert",autoHide:!1,clickToHide:!1,globalPosition:"top left"}),setTimeout(function(){var n=$(".notifyjs-container");n.find("button").first().focus();kbCon&&kbCon.push(cnfCon,n)},0),!0):(forceConfirm($(document).data("forceTag"),$(document).data("forcewhichGate")),forceDataCallBack(),!0)}else continue;return!1}function notifyChange(n,t,i,r,u,f,e){setTimeout(function(){(f==undefined||f=="")&&(f="Yes");(e==undefined||e=="")&&(e="No");(""+r).charAt(0)!="'"&&(r="'"+r+"'");$.notify({title:n,buttonYes:f,buttonNo:e,command:t,value:i,tag:r,whenToCall:u},{style:"CommonAlert",autoHide:!1,clickToHide:!1,globalPosition:"top middle"});var o=$("#Note_Spec");kbCon&&kbCon.push(cnfCon,o);o.find("button").first().focus()},0)}function forceConfirm(n,t){var u,o,e,i,r,f;if(t>=0&&GatingCondition[n].gate[t].Set!=undefined)for(o=GatingCondition[n].gate[t].Set.length,e=0;e<o;e++)for(i in GatingCondition[n].gate[t].Set[e])u=PropertyTags[i]!==undefined?MeasurementProperties:SystemProperties,u[i]=eval(GatingCondition[n].gate[t].Set[e][i]),r=$("#"+i),r!==undefined&&(f=r.attr("tagType"),f==="time"||f==="timeHHMM"?r.val(SecsToHHMM(u[i])):f==="timeHHMMSS"?r.val(SecsToHHMMSS(u[i])):f==="date"||f==="dateTime"?r.val(SecsToDate(u[i])):(f=r.prop("type"))==="checkbox"?r.prop("checked",!1).filter("[value="+u[i]+"]").prop("checked",!0):f==="radio"?r.filter("[value="+u[i]+"]").prop("checked",!0):r.val(u[i]))}function forceDeny(n){var r,t,i;n=$(document).data("lastPropTag");t=$("#"+n);i=$(document).data("lastPropValue");r=typeof PropertyTags[n]!="undefined"?MeasurementProperties:SystemProperties;t.length<=0&&(t=$("input[name='"+n+"']"));r[$(document).data("lastPropTag")]=i;t.attr("type")=="checkbox"?t.prop("checked",i>0):t.attr("type")=="radio"?t.filter("[value='"+i+"']").prop("checked",!0):t.val($(document).data("lastPropValue"))}function disableControl(n){var t,i;n.hasClass("disable")||n.siblings().hasClass("click-div")?console.log("Attempted to add 'click-div' wrapper to already wrapped element."):(n.addClass("disable"),t=n.wrap("<div class='wrapper'>").parent(),t.css({display:"inline",position:"relative"}),i=$("<div class='click-div'>"),i.css({position:"absolute",top:0,height:"100%",width:"100%"}),t.append(i),n.next(".click-div").bind("click.disabled",function(){var n=$(this).parent().children("select, input");n.attr("data-validate")!=undefined&&(n.prop("disabled",!1),n.validate(),n.prop("disabled",!0));n.removeClass("error")}),n.prop("disabled",!0))}function enableControl(n,t){t.children().removeClass("disable");n.removeClass("disable");n.parent().unbind("click.disabled");n.unbind("click.disabled");n.prop("disabled",!1);n.next(".click-div").unbind("click.disabled").remove();n.parent().hasClass("wrapper")&&n.unwrap()}function crossMeasureSystemForceData(n){n=="Measurement"?getAllPropertyData("TAG_DEFAULT_FILENAME",crossMSForceDataStep2,emptyFun):getAllPropertyData("TAG_USB_HOST_POWER",crossMSForceDataStep2,emptyFun)}function crossMSForceDataStep2(){SaveBothProperties=!0}function PopulateSetupManagerRecords(){(setPop==undefined||setPop.length===0)&&(setPop=$("#SettingsPopup"));setPop!=undefined&&setPop.dialog("close");pageAccord=$("#accordion");dispHG(!0);SystemProperties.TAG_OPTION_FLAGS!=undefined&&(OptionTags=SystemProperties);console.log("Calling ClearCache...");clearCache(ClearCacheFinished);DisableAllTimers();setupManagerInit||(firstBindSetupManager(),setupManagerInit=!0)}function accordionRight(){var n=pageAccord.children(".ui-state-hover").attr("id"),t;SelectAccordionItem(n);t=pageAccord.children(".ui-state-active").attr("id");n==undefined&&(n=t);n==t&&(setPop.dialog("close"),QualifySettingsPopup(setupBeingEdited),setPop.dialog("open"));ColorCurrentSelection()}function firstBindSetupManager(){pageAccord.bind("dblclick",function(){setPop.dialog("isOpen")===!1?setPop.dialog("open"):setPop.dialog("close");QualifySettingsPopup(setupBeingEdited)});pageAccord.mouseup(function(n){if(n.which===3)return accordionRight(),n.preventDefault(),!1});oldSetup&&$(document).bind("contextmenu setmgr",function(){return!1});pageAccord.bind("click",function(){var n=$(this),t=n.children(".ui-state-active").attr("id");SelectAccordionItem(t)})}function prepFileListLoc(n){Model.indexOf("HVM")!=-1?$.getJSON("/sdk?func=setrootdir&location=../hvm").done(function(){n()}).fail(function(){n()}):n()}function ClearCacheFinished(){console.log("Calling GetFileList...");OnSystemTabs?OnMeter?($("#SystemPropertiesTabContainer").find("li:eq(0)").addClass("ui-state-hidden"),$("#SystemPropertiesTabContainer").tabs("option","active",1),ShowTabs("SYS")):getPropertyFileList(ProcessSysPropsFileList,"SysPropFiles"):getPropertyFileList(getPropertyFileListFinished,"MeasPropFiles")}function getPropertyFileListFinished(){MeasPropFiles[0]!=undefined&&MeasPropFiles[0].name=="Active"?getActiveFileInfo(MeasPropFiles[0].index,ProcessSetupsFileList):ProcessSetupsFileList()}function getLongDateString(n){return!Is831C()&&OnMeter&&n.setMinutes(n.getMinutes()+timeOffset),SystemProperties.TAG_DISPLAY_DATE==1?n.format("d-m-Y H:i:s"):n.format("Y-m-d H:i:s")}function ProcessSetupsFileList(){var s=MeasPropFiles.length,t,f,e,h=0,o,r,u,i,n;if(cntTries-->0&&(s<=0||MeasPropFiles[0]==undefined||OnMeter&&MeasPropFiles[0].name!="Active"&&MeasPropFiles[0].name!="Active.hp")){console.error("Problem getting the list of files.",MeasPropFiles);getPropertyFileList(getPropertyFileListFinished,"MeasPropFiles");return}if(cntTries=2,pageAccord.html(""),$("#SetupManager").scrollTop(0),pageAccord.accordion({icons:null,animate:!1,heightStyle:"content"}),typeof ActiveFileInfo.link!="undefined"&&ActiveFileInfo.mode!=-1){t="/images/SetupActive.png";u=ActiveFileInfo.link.split(".");i=u[0]!=""?"Active":"Active";f=new Date(MeasPropFiles[0].startTime*1e3);e=getLongDateString(f);switch(ActiveFileInfo.mode){case"0":n="SLM";break;case"1":n="RA";break;case"2":n="FFT";break;case"3":n="HVM";break;default:n="UFO"}pageAccord.append(AddSetupManagerEntry(t,i,e,n,0));h=1;HostIsDirectIO=!1;ListOfLDSetups.push(i)}else(ActiveFileInfo.mode==undefined||ActiveFileInfo.mode==-1)&&(HostIsDirectIO=!0);for(IsHvm()&&OnMeter&&(HostIsDirectIO=!1),o="",r=h;r<s;++r)if(u=MeasPropFiles[r].name.split("."),i=u[0],i!="Previous"){switch(u[1]){case"s":if(IsHvm())continue;n="SLM";break;case"r":if((SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&655360)==0||ModelNumber!==m831||IsHvm())continue;n="RA";break;case"f":if((SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&1048576)==0||ModelNumber!==m831||IsHvm())continue;n="FFT";break;case"hp":if(!IsHvm())continue;n="HVM";t="/images/SetupFile1.png";break;case"hpd":if(!IsHvm())continue;n="HVM";t="/images/SetupLock.png";break;default:n="UFO"}switch(i){case"Default":case"Def_831C":case"RT60impl":case"RT60pink":case"ASTM2235":t="/images/SetupLock.png";break;case"Active":t="/images/SetupActive.png";break;default:n!="HVM"&&(t="/images/SetupFile1.png")}f=new Date(MeasPropFiles[r].startTime*1e3);e=getLongDateString(f);o+=AddSetupManagerEntry(t,i,e,n,r);ListOfLDSetups.push(i)}pageAccord.append(o);pageAccord.accordion("refresh");ColorCurrentSelection();SelectAccordionItem(""+setupBeingEdited);dispHG(!1)}function ProcessSysPropsFileList(){var e=SysPropFiles.length,i,r,u,f,o,t,n;for(ListOfLDSetups=[],dispHG(!0),pageAccord.html(""),$("#SetupManager").scrollTop(0),pageAccord.accordion({icons:null,animate:!1,heightStyle:"content"}),i="/images/Gear.png",HostIsDirectIO=!0,t="",n=0;n<e;n++){var s=SysPropFiles[n].name.split("."),r=s[0],o="SYS";u=new Date(SysPropFiles[n].startTime*1e3);f=getLongDateString(u);t+=AddSetupManagerEntry(i,r,f,o,n);ListOfLDSetups.push(r)}pageAccord.append(t);pageAccord.accordion("refresh");ColorCurrentSelection();SelectAccordionItem(""+setupBeingEdited);dispHG(!1)}function SelectAccordionItem(n){var t,i,r,u;getOptionData();n!=undefined&&(setupBeingEdited=n.replace("ui-accordion-accordion-header-",""),t=-1,i=$("#"+n),(i!=undefined||i)&&(t=i.attr("nDx")),(t==undefined||t==-1)&&(i=pageAccord.children(".ui-state-active").first(),t=i.attr("nDx")),t==undefined&&(t=0),console.log("Selected: "+t),MeasPropFiles[t]!=undefined?(setSessionValue("nDx",MeasPropFiles[t].index),setSessionValue("filename",MeasPropFiles[t].name),SelectedFile.nDx=MeasPropFiles[t].index,SelectedFile.filename=MeasPropFiles[t].name):SysPropFiles[t]!=undefined&&(setSessionValue("nDx",SysPropFiles[t].index),setSessionValue("filename",SysPropFiles[t].name),SelectedFile.nDx=SysPropFiles[t].index,SelectedFile.filename=SysPropFiles[t].name),console.log("G4~ SelectedFileName:"+SelectedFile.filename),r=i.children(".accordionImage").attr("src"),r==undefined||(r=r.replace("/images/Setup",""),r=r.replace(".png","")),clearCache(),ColorCurrentSelection(),u=i.position(),u!==undefined&&pageAccord.scrollTop(u.top+pageAccord.scrollTop()-123))}function MoveEntryToPositionHigherInList(n,t,i){for(var u=0,f,r=i,e=n.length;r<e;r++)if(n[r].name==t){if(u=r,u==i)return;f=n[r];break}for(r=u;r>i;r--)n[r]=n[r-1];n[i]=f}function AddSetupManagerEntry(n,t,i,r,u){var e="<h3 nDx='"+u+"'><img src='"+n+"' class='accordionImage'>",o="<span id='titleText' class='accordionTitle'>"+t+"<\/span>",s="<span id='typeText' class='accordionType'>"+r+"<\/span><\/h3>",f="";return f=Model==="HVM100"&&OnMeter?u==0?"<div class='accordionContent' style='padding:2px'><span id='content'>Current Setup<\/span><\/div>":"<div class='accordionContent' style='padding:2px'><span id='content'>Setup S"+(u-1)+"<\/span><\/div>":"<div class='accordionContent' style='padding:2px'><span id='content'>"+i+"<\/span><\/div>",e+o+s+f}function ColorCurrentSelection(){"use strict";var n="",t;OnSystemTabs&&OnMeter||(pageAccord.accordion({active:parseInt(setupBeingEdited,10),event:"click"}),n=pageAccord.children(".ui-state-active").first().children(".accordionTitle").text(),console.log("G4~ Header text: "+n));t="Settings: ";OnSystemTabs&&(t="System Properties: ");setupBeingEdited==0&&HostIsDirectIO==!1?(console.log("Active setup is selected"),activeSetupLoaded=!0,mainTitle.html(t+n)):(console.log("File setup is selected"),activeSetupLoaded=!1,mainTitle.html(t+n),pageAccord.children(".ui-accordion-header-active").next().addClass("AccordionBkgnd"));setupMode=OnSystemTabs&&OnMeter?"SYS":pageAccord.children(".ui-accordion-header-active").first().children(".accordionType").text();console.log("ColorCurrentSelection -- Type: "+setupMode);configSetupFileMode(setupMode);ShowTabs(setupMode);updateMainTitle();typeof prepMenu!="undefined"&&prepMenu()}function configSetupFileMode(n){var t=MeasurementProperties.hasOwnProperty("TAG_INSTRUMENT_MODE")?MeasurementProperties.TAG_INSTRUMENT_MODE:undefined;n==="HVM"||ModelNumber===mHVM200||ModelNumber===mHVM100||(n==="SLM"?MeasurementProperties.TAG_INSTRUMENT_MODE!=0&&(MeasurementProperties.TAG_INSTRUMENT_MODE=0,PropertyTags.TAG_INSTRUMENT_MODE.modded=!0):n==="FFT"?MeasurementProperties.TAG_INSTRUMENT_MODE!=2&&(MeasurementProperties.TAG_INSTRUMENT_MODE=2,PropertyTags.TAG_INSTRUMENT_MODE.modded=!0):n==="RA"?MeasurementProperties.TAG_INSTRUMENT_MODE!=1&&(MeasurementProperties.TAG_INSTRUMENT_MODE=1,PropertyTags.TAG_INSTRUMENT_MODE.modded=!0):(MeasurementProperties.TAG_INSTRUMENT_MODE=0,PropertyTags.TAG_INSTRUMENT_MODE.modded=!0))}function IsDefaultSetup(){if(SelectedFile.filename!=undefined){var n=SelectedFile.filename.split("."),i=n[0],t=n[1];if(IsHvm()){if(t!=undefined&&t=="hpd")return!0}else if(i=="Default"||SelectedFile["default"]!=undefined&&SelectedFile["default"]==!0)return!0}return!1}function QualifySettingsPopup(){var e="",r="s",t,n,f;SelectedFile.filename!=undefined&&(t=SelectedFile.filename.split("."),e=t[0],typeof t[1]!="undefined"&&(r=t[1]));n=$("#SetActiveButton").removeAttr("disabled");$("#SaveButton").removeAttr("disabled");var o=$("#SaveAsButton").removeAttr("disabled"),u=$("#Rename").removeAttr("disabled"),i=$("#DeleteButton").removeAttr("disabled");$("#RefreshButton").removeAttr("disabled");$("#CancelButton").removeAttr("disabled");f=IsDefaultSetup();OnSystemTabs||!OnMeter?(n.hide(),f&&(u.attr("disabled","disabled"),i.attr("disabled","disabled"))):(e=="Active"?(n.attr("disabled","disabled"),u.attr("disabled","disabled"),i.attr("disabled","disabled")):f&&!IsHvm()&&(u.attr("disabled","disabled"),i.attr("disabled","disabled")),r=="f"&&(SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&1048576)==0?n.attr("disabled","disabled"):r=="r"&&((SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&720896)==0||(SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&524288)==0)&&n.attr("disabled","disabled"),ModelNumber==mHVM100&&(o.attr("disabled","disabled"),i.attr("disabled","disabled")))}function SaveButton(){setPop.dialog("close");alert("Save")}function SaveAsButton(){setPop.dialog("close");SaveAsButtonIsRename=!1;var n="";SelectedFile.filename!=undefined&&(n=SelectedFile.filename.split(".")[0]);(IsDefaultSetup()||n=="Active")&&(n.length>7&&(n=n.substr(0,7)),n+="Mod");$("#NewSetupName").val(n);dispHG(!1);$("#SaveAsRenamePopup").dialog("open");$("#SaveAsOkayButton").focus()}function reopenSaveAs(){SaveAsRequired=!0;SaveAsButton()}function SaveAsOkayButton(){var n=$("#NewSetupName").val().replace(/[^a-z0-9_\-.]/ig,"");if($("#SaveAsRenamePopup").dialog("close"),n=="Default"||n=="Active"){$.notify({title:"'Default' and 'Active' are reserved file names! Please enter a different file name.",buttonYes:"OK",command:"reopenSaveAs"},{style:"CommonAlert2",autoHide:!1,clickToHide:!1,globalPosition:"top left"});$(".notifyjs-container").find("button").first().focus();kbCon&&kbCon.push(cnfCon,$(".notifyjs-container"));return}dispHG(!0);SaveAsButtonIsRename==!0?renameSettingsFile(n).done(RefreshSettingsButton):(OnSystemTabs&&SystemProperties[""]==undefined||!OnSystemTabs&&MeasurementProperties.TAG_DEFAULT_FILENAME==undefined&&MeasurementProperties.TAG_DETECTOR_RATE_21==undefined?downloadPropertiesToCache(SelectedFile.nDx,wrapFunction(uploadPropertiesFromCache,n,[n])):uploadPropertiesFromCache(n),ftr&&ftr.mi&&ftr.mi.handler()==propSBtn&&ftr.mi.pop(),SaveAsRequired=!1,CommitCompleteCnt=0)}function SaveAsCancelButton(){$("#SaveAsRenamePopup").dialog("close");ftr&&ftr.mi&&ftr.mi.handler()==propSBtn;CancelApplyButton()}function RefreshSettingsButton(){RefreshButton()}function RefreshButton(){setPop.dialog("close");MeasPropFiles={};SysPropFiles={};PopulateSetupManagerRecords({})}function RefreshSysPropsButton(){setPop.dialog("close");SysPropFiles={};PopulateSetupManagerRecords({})}function DeleteButton(){$("#DeleteSetupPopup").dialog("open")}function RenameButton(){setPop.dialog("close");SaveAsButtonIsRename=!0;$("#NewSetupName").val(SelectedFile.filename.split(".")[0]);$("#SaveAsRenamePopup").dialog("open");$("#SaveAsOkayButton").focus()}function LoadButton(){setPop.dialog("close");alert("Load")}function callSetToActive(){$.getJSON("/sdk?func=setToActive").done(function(n){var t="";t=n;t.Result!=undefined&&t.Result.indexOf("Success")>=0?(LatchWhich.Measure=1,cmdLatchSettings()):(errorHandling("MakeActiveButton",n),clearCache())})}function prepSetToActive(){$.getJSON("/sdk?func=sendCommand&id="+CMD_STOP).done(function(){$.getJSON("/sdk?func=sendCommand&id="+CMD_RESET).done(function(n){errorHandling("SaveAs",n)||(console.log("Reset Sent. SendingChanges"),callSetToActive())})})}function MakeActiveButton(){var n;setPop.dialog("close");CurrentStatus.uiRunFlags&(DATA_RESET|DATA_STORED)?callSetToActive():(n="There is unsaved data in the meter which will be lost. Either click Cancel and store the data or click OK to continue.",notifyChange(n,"prepSetToActive",0,0,"Confirm","OK","Cancel"));console.log("G4~ GetNewProperties");return}function WriteProtectButton(){setPop.dialog("close");alert("Write Protect Setup")}function CancelButton(){setPop.dialog("close")}function YesApplyButton(){function n(){dispHG(!1);ftr&&ftr.mi&&ftr.mi.handler()===propSBtn&&(ftr.mi.pop(),OnSystemTabs&&OnMeter&&ftr.mi.invoke(function(){}));totalOvly&&totalOvly.hide()}if(dispHG(!0),$("#ApplyChangesPopup").dialog("close"),bAlreadyDisplayedResetMessage==!1&&bAlreadyDisplayedStopMessage==!1){if(SendChangesToMeter("Measurement",n),OnSystemTabs&&OnMeter?window.url.toLowerCase().indexOf("awesome.html")<0?sideLoader&&sideLoader(lastCurTab,lastCurPage):totalOvly&&totalOvly.show():SelectedFile.filename==undefined&&OnMeter,SelectedFile.filename!=undefined&&SelectedFile.filename.substring(0,8)=="Default."||IsDefaultSetup()){SaveAsRequired=!0;SaveAsButton();return}SelectedFile.filename!=undefined&&SelectedFile.filename!="Active"&&(SaveAsRequired=!1)}else ResetRequired(function(){SendChangesToMeter("Measurement",n)},!1,!0)}function SendReset(n){$.getJSON("/sdk?func=sendCommand&id="+CMD_RESET).done(function(t){errorHandling("SaveAs",t)||(console.log("Reset Sent. SendingChanges"),SendChangesToMeter("Measurement"),OnSystemTabs&&OnMeter&&ReloadTab());n!==undefined&&n();clearCache()})}function SendStore(n){var i=CurrentStatus.uiRunFlags&(DATA_RESET|DATA_STORED),r=CurrentStatus.uiRunFlags&DATA_STORED,t;typeof StoreCmd!="undefined"?StoreCmd(!0,"Store Data File?",function(){i||SendReset(n)},function(){i||SendReset(n)}):(MeasurementProperties.TAG_INSTRUMENT_MODE==1&&(r=!(!(CurrentStatus.uiRunFlags&DATA_RESET)&&CurrentStatus.uiRunFlags&DATA_WAIT)),bAlreadyDisplayedResetMessage&&!i?r?SendReset(n):(t=MeasurementProperties.TAG_DEFAULT_FILENAME,(t==undefined||t=="")&&(t="831_data"),$.getJSON("/sdk?func=getproperty&tagid="+SystemTags.TAG_FILE_EXTENSION.ID+"&type=int").done(function(i){var r=i.value%999;t=t+"."+(r/1e3).toFixed(3).split(".")[1];console.log("Storing: "+t);$.getJSON("/getData.js?func=sendCommand&id="+CMD_STORE+"&type=string&data="+t).done(function(t){errorHandling("SaveAs",t);SendReset(n)})})):(SendChangesToMeter("Measurement"),OnSystemTabs&&OnMeter&&ReloadTab(),clearCache(n)))}function finishStopSave(n){if(OnMeter&&activeSetupLoaded){var t=!(CurrentStatus.uiRunFlags&(RUNNING|PAUSED|POST_RUN));bAlreadyDisplayedStopMessage&&!t?$.getJSON("/sdk?func=sendCommand&id="+CMD_STOP).done(function(i){errorHandling("finishStopSave",i);t=!0;SendStore(n)}):SendStore(n)}else SendChangesToMeter("Measurement"),OnSystemTabs&&OnMeter&&ReloadTab(),clearCache(n)}function NoApplyButton(){if(ftr&&ftr.mi&&ftr.mi.pop(),$("#ApplyChangesPopup").dialog("close"),typeof curTabIndex!="undefined"&&curTabIndex==tbId.Lock){delete SystemProperties.TAG_LOCK_MODE;popPage();menuOpen=!1;resetFilter=!1;return}console.log("G4~ Cleared Save");clearCache(function(){OnSystemTabs&&OnMeter&&sideLoader(curTabIndex,curPageIndex)});resetFilter=!1}function CancelApplyButton(){if($("#ApplyChangesPopup").dialog("close"),typeof curTabIndex!="undefined"&&curTabIndex===tbId.Lock){resetFilter=!1;return}typeof SetupMgr!="undefined"&&SetupMgr.Active&&(prevTab=tbId.SetupMgr,prevPage=0);settingsTabs.length===0&&(settingsTabs=$("#settingsTabContainer, #hvmTabContainer, #SystemPropertiesTabContainer"));settingsTabs.tabs("option","active",LastSelectedTab);tabContainer!=null&&TabClick();console.log("LastSelectedTab: "+LastSelectedTab);LastSelectedTab===undefined&&(LastSelectedTab=tbId&&tbId.SetupMgr||33,console.error("What are you doing out there? LastSelectedTab"));sideLoader&&sideLoader(LastSelectedTab,0);dispHG(!1)}function YesDeleteButton(){deletePropertiesFile(SelectedFile.filename);RefreshButton();$("#DeleteSetupPopup").dialog("close")}function NoDeleteButton(){$("#DeleteSetupPopup").dialog("close")}function checkTab(n){return PageArray[n].disp instanceof Boolean||typeof PageArray[n].disp=="boolean"?PageArray[n].disp:PageArray[n].disp instanceof Function?PageArray[n].disp():!1}function getGlobalDataNeeded(){getDataNeeded("live",globalDataNeeded)}function getDataNeeded(n,t,i){var h,u,f,c;rtcnt++;var e="",o="",r="live",s="";for(finGDN=!1,h=t||page.dataNeeded,u=h.slice(),f=0,c=u.length;f<c;f++)u[f]instanceof Object?(getDataNeeded(u[f].g||n,u[f].data),u.splice(f,1),--c):(e.length>0&&(e+=",",o+=",",s+=","),e+=DataTags[u[f]].ID,o+=""+DataTags[u[f]].Type,s+=DataTags[u[f]].nDx!==undefined?DataTags[u[f]].nDx:0);if(n!==undefined)r=n;else switch(curTabIndex){case 1:r="overall";break;case 2:r="overall";break;case 3:r="current";break;case 4:r="measurement";break;case 5:r="events";break;case 6:r="time";break;case 7:r="sysinfo";break;case 0:default:r="live"}inFileDsp&&r.indexOf("file")<0&&curTabIndex<=6&&(r="file"+r);CurrentStatus.IsRunning||CurrentStatus.IsPaused||r==="live"||r==="oneseclive"||initialGet||r==="sysinfo"?(e.length>0?$.getJSON("/sdk?func=getdatamulti&group="+r+"&tagids="+e+"&types="+o+"&indices="+s).done(function(n){var t,r,i;for(WebSocketComm.Worked&&!WebSocketComm.Connected&&WebSocketComm.Reconnect(),t=0,r=u.length;t<r;++t)n.Data&&n.Data[t]&&n.Data[t].value!==undefined&&(DataTags[u[t]]&&DataTags[u[t]].ID==n.Data[t].tagId?(i=u[t],pageData[i]=n.Data[t].value,n.Data[t].flags!==undefined&&(pFlags[i]=n.Data[t].flags)):console.log(u[t],":",DataTags[u[t]]))}).always(function(){i&&i();finGDN=!0}):(i&&i(),finGDN=!0),h==page.dataNeeded&&(initialGet=!1)):finGDN=!0}function pushPage(n,t,i,r){r==undefined&&i instanceof Object&&(r=i);i instanceof String||typeof i=="string"?mainTitle.push(i):mainTitle.push("");pageStack.push({t:curTabIndex,p:curPageIndex});r!==undefined?(ftr.lf.push(r.lf),ftr.mi.push(r.mi),ftr.rt.push(r.rt)):(ftr.lf.push(!1),ftr.mi.push(!1),ftr.rt.push(!1));sideLoader(n,t)}function popPage(){var n=pageStack[pageStack.length-1];pageStack.pop();ftr.lf.pop();ftr.mi.pop();ftr.rt.pop();mainTitle.pop();sideLoader(n.t,n.p)}function refreshViewData(){initialGet=!0;sideLoader(curTabIndex,curPageIndex)}function sideLoader(n,t){prevTab=curTabIndex;prevPage=curPageIndex;findStPg(n,t)}function findStPg(n,t){var r,i;for(checkTab(n)||(n=tbId.Live),r=PageArray[n],curTabIndex=n,i=t;i<=maxPageLength;++i)if(r[i]!==undefined&&r[i].vis){curPageIndex=i;mainLoader(curTabIndex,curPageIndex);return}for(i=0;i<t;++i)if(r[i]!==undefined&&r[i].vis){curPageIndex=i;mainLoader(curTabIndex,curPageIndex);return}curTabIndex=tbId.Live;curPageIndex=pgId.Profile}function prepView(){curTabIndex!==prevTab&&(curTabIndex===tbId.Measure?pushMHCnt():prevTab===tbId.Measure&&popMHCnt())}function mainLoader(n,t){var r=0,i,o,f,s,e,u,h;if(ollTime=0,lastFoc={},page=PageArray[prevTab][prevPage],i=PageArray[n][t],i.refDRate===undefined)for(i.refDRate=RefreshRates.ms1000,e=i.controls.length,r=0;r<e;++r)typeof i.controls[r].refreshRate!="undefined"&&(i.refDRate=Math.min(i.controls[r].refreshRate,i.refDRate));for(initialGet=!0,WebSocketComm&&WebSocketComm.Connected&&WebSocketComm.GetID?(o={},f=GroupTabToName(curTabIndex),i.Registering==undefined&&(i.Registering={}),i.Registering[f]==undefined&&(i.Registering[f]=GenRegJSON(f,0,i.dataNeeded)),o.Registering=i.Registering[f],WebSocketComm.SetDataRate(i.refDRate),WebSocketComm.SetDataNeeded(o)):getDataNeeded(undefined,undefined,prepView),s=page.controls.length,r=0;r<s;++r)typeof page.controls[r].leave!="undefined"&&page.controls[r].leave(curTabIndex,curPageIndex);for(document.rootElement&&document.rootElement.focus(),page=i,curTabIndex=n,curPageIndex=PageArray[curTabIndex].lastPgId=t,getMeasSysProps(100,!1),getMeasSysProps(200,!1),console.log("enter functions and Updates: ",page.controls[0].id),e=page.controls.length,r=0;r<e;++r)u=page.controls[r],typeof u.init=="undefined"||u.isInit||u.init(),u.enter(n,t),setTimeout(function(){u.update(u.refreshRate)},0);setMaxTab();updateMainTitle();h=prevLockMode!==SystemProperties.TAG_LOCK_MODE||prevLockCom!==SystemProperties.TAG_LOCK_COM||prevLockCal!==SystemProperties.TAG_LOCK_CAL;SystemProperties.TAG_LOCK_MODE>0&&h&&curTabIndex!==tbId.PwrOff&&curTabIndex!==tbId.Calibrate&&!(g4==!0&&(OnSettingTabs||OnSystemTabs))?(prevLockMode=SystemProperties.TAG_LOCK_MODE,prevLockCom=SystemProperties.TAG_LOCK_COM,prevLockCal=SystemProperties.TAG_LOCK_CAL,LkScrn()):SystemProperties.TAG_LOCK_MODE===0&&curTabIndex===tbId.LockedScreen&&(lkScrnClose(),prevLockMode=9999,dispHG(!1));prevLockMode=SystemProperties.TAG_LOCK_MODE;prevLockCom=SystemProperties.TAG_LOCK_COM;prevLockCal=SystemProperties.TAG_LOCK_CAL;curTabIndex<tbId.Live||curTabIndex>tbId.TimeHist||inFileDsp?$("#imgMenu").hide():$("#imgMenu").show()}function updatePage(n){page.externalUpdate&&!n?page.externalUpdate=!1:(page.externalUpdate=n,page.controls.forEach(function(n){ollTime%n.refreshRate!=0||n.busy||n.update===undefined||n.update(n.refreshRate)}))}function findLeftTab(n){var i=minTabLen,t;for(n<minTabLen&&(n=maxTabLen),t=n;t>=minTabLen;--t)if(PageArray[t][PageArray[t].lastPgId]!==undefined&&checkTab(t)){i=t;break}return i}function findRightTab(n){for(var i=minTabLen,t=n;t<=maxTabLen;++t)if(PageArray[t][PageArray[t].lastPgId]!==undefined&&checkTab(t)){i=t;break}return i}function updateMainTitle(){var i=curTabIndex,n=PageArray[i],r="",t;i!==tbId.LockedScreen?(n.pCnt>1?(pageArrows.show(),r=" ("+n[n.lastPgId].idx+" of "+n.pCnt+")"):pageArrows.hide(),maxTabLen-minTabLen>0?(tabBar.html(n.Name+r),t=i-1,t=findLeftTab(t),ftr.lf.text(PageArray[t].sName),t=findRightTab(i+1),ftr.rt.text(PageArray[t].sName),ftr.rt.show(),ftr.lf.show()):tabBar.html(n.Name+r)):tabBar.html("LOCKED")}function keyUpArrow(){var t=PageArray[curTabIndex],n;if(t.length===1)return!0;for(curPageIndex=t.lastPgId,prevTab=curTabIndex,prevPage=curPageIndex,curPageIndex>0?curPageIndex--:curPageIndex=t.length-1,n=curPageIndex;t[n]===undefined||!t[n].vis;)if(--n,n<0&&(n=maxPageLength-1),n===prevPage)return curPageIndex=n,t.lastPgId=curPageIndex,!0;return curPageIndex=n,t.lastPgId=curPageIndex,mainLoader(curTabIndex,curPageIndex),!0}function keyDownArrow(){var t=PageArray[curTabIndex],n;if(t.length===1)return!0;for(curPageIndex=t.lastPgId,prevTab=curTabIndex,prevPage=curPageIndex,curPageIndex<t.length-1?curPageIndex++:curPageIndex=0,n=curPageIndex;t[n]===undefined||!t[n].vis;)if(++n,n>=maxPageLength&&(n=0),n===prevPage)return curPageIndex=n,t.lastPgId=curPageIndex,!0;return curPageIndex=n,t.lastPgId=curPageIndex,mainLoader(curTabIndex,curPageIndex),!0}function keyLeftArrow(){prevTab=curTabIndex;prevPage=PageArray[curTabIndex].lastPgId;curTabIndex>minTabLen?--curTabIndex:curTabIndex=maxTabLen;var n=findLeftTab(curTabIndex);return curTabIndex=n,curPageIndex=PageArray[curTabIndex].lastPgId,findStPg(curTabIndex,curPageIndex),!0}function keyRightArrow(){prevTab=curTabIndex;prevPage=PageArray[curTabIndex].lastPgId;curTabIndex<maxTabLen?++curTabIndex:curTabIndex=minTabLen;var n=findRightTab(curTabIndex);return curTabIndex=n,curPageIndex=PageArray[curTabIndex].lastPgId,findStPg(curTabIndex,curPageIndex),!0}function centralTimer(){if(OnMeter&&(typeof WebSocketComm=="undefined"||!WebSocketComm.Connected)){try{var n=page.refDRate;inFileDsp&&(n=1e3);ollTime%page.refDRate==0&&finGDN?(getDataNeeded(),refTime-=10,refTime=refTime<250?250:refTime):finGDN||(refTime+=10,refTime=refTime>500?500:refTime);updateLights();screenOn&&page.controls.forEach(function(n){ollTime%n.refreshRate!=0||n.busy||n.update==undefined||n.update(n.refreshRate)})}catch(t){console.error("####> CentralTimer exceptioned: "+t.message+" <####")}wdCnt>5&&(typeof wdTmr!="undefined"&&clearTimeout(wdTmr),wdTmr=setTimeout(wDogTimer,0),console.error("####> centralTimer restarted Watchdog! <####"));wdCnt++;screenOn||(refTime=4e3);typeof centTmr!="undefined"&&clearTimeout(centTmr);ollTime+=250;centTmr=setTimeout(centralTimer,refTime)}}function wDogTimer(){if(OnMeter&&(typeof WebSocketComm=="undefined"||!WebSocketComm.Connected)){wdCnt==0&&(typeof centTmr!="undefined"&&clearTimeout(centTmr),centTmr=setTimeout(centralTimer,0),console.error("####> Watchdog restarted centralTimer! <####"));wdCnt=0;typeof WebSocketComm!="undefined"&&WebSocketComm.Connected||(stsTmrCnt===0?stsZroCnt++>4&&(statusTmr!==undefined&&clearTimeout(statusTmr),statusTmr=setTimeout(wrapFunction(getRunningState,this,[emptyFun,1]),0),console.error("####> Watchdog restarted statusTmr! <####")):(stsTmrCnt=0,stsZroCnt=0));var n=1e3;screenOn||(n=4e3);typeof wdTmr!="undefined"&&clearTimeout(wdTmr);wdTmr=setTimeout(wDogTimer,n)}}function setMaxTab(){curTabIndex<=tbId.mpWifi?(maxTabLen=tbId.mpWifi,minTabLen=tbId.SetupMgr):(maxTabLen=curTabIndex,minTabLen=curTabIndex)}function showPassword(){var n=document.getElementById("showPassword");document.getElementById("tbNetPass").type=n.checked?"TEXT":"PASSWORD"}function setScanning(){bScan=!0;bScanLeftAP=!1;$("#cfIpAdd").html("<img src='/images/scanning.gif' style='width:16px; height:16px;vertical-align:middle;'/> Scanning")}function setConnecting(){$("#cfIpAdd").html("<img src='/images/scanning.gif' style='width:16px; height:16px;vertical-align:middle;'/> Connecting")}function clearScan(){bScan=!1}function getStreng(n){var u=15,r,t,i;return IsHvm()&&(u=4),r=Math.floor(n/u),t="WifiImg",OnSettingTabs&&(t=""),i="<img src='/images/Wifi0.png' class='"+t+"' />",r==1?i="<img src='/images/Wifi1.png' class='"+t+"' />":r==2?i="<img src='/images/Wifi2.png' class='"+t+"' />":r==3?i="<img src='/images/Wifi3.png' class='"+t+"' />":r==4?i="<img src='/images/Wifi4.png' class='"+t+"' />":r>=5&&(i="<img src='/images/Wifi5.png' class='"+t+"' />"),i}function setupNets(){return(netDetails==undefined||netDetails.length<=0)&&(netDetails=$("#netDetails"),wifiImg=$("#wifiImg")),wfStatCnt=0,setNets()}function setNets(){if(cfIpAdd.length===0&&(cfIpAdd=$("#cfIpAdd")),wfOnPage)return $.getJSON("/sdk?func=getWiFiStatus",function(n){++wfStatCnt;var t=n.WiFiStatus&&n.WiFiStatus.State?n.WiFiStatus.State:"";if(wfCurState=t,console.log("State: "+t+" - "+wfStatCnt),t.indexOf("Disabled")>-1)enabled&&toggleWifiImg(),clearScan(),cfIpAdd.html("WiFi Disabled"),$("#netReboot").hide(),mTblCurrent.hide();else{if(t==="AccessPoint"&&(isAP=!0),wfStatCnt>45)return wfStatCnt=0,clearScan(),clearTimeout(wfNetStatTime),wfNetStatTime=setTimeout(setNets,3e3),upList();if(t==="Connecting"||t==="EstablishingAP")!1==bScan?setConnecting():bScanLeftAP=!0,clearTimeout(wfNetStatTime),wfNetStatTime=setTimeout(setNets,1e3);else{if(t==="UnableToConnect"||t==="Disconnected")return!1==bScan?cfIpAdd.text("Not Connected"):bScanLeftAP=!0,clearTimeout(wfNetStatTime),wfNetStatTime=setTimeout(setNets,2e3),upList();if(t==="Connected"||t==="AccessPoint"||t==="ConnectedStatic")return wfStatCnt=0,clearTimeout(wfNetStatTime),wfNetStatTime=setTimeout(setNets,2e3),(bScanLeftAP||ModelNumber!==mHVM200||"Connected"===t||"ConnectedStatic"===t)&&clearScan(),upList()}}}).fail(function(){clearTimeout(wfNetStatTime);wfNetStatTime=setTimeout(setNets,2e3);clearScan()})}function showAPBtn(){onAwesome||$("#btnSetAP").show()}function upList(n){return $.getJSON("/sdk?func=GetWiFiList",function(n){var f,t,i,r,u;if(n.Answer==="Generating"||n.Answer==="Still Generating")return wfGener=!0,clearTimeout(wfStatTime),wfStatTime=setTimeout(upList,1e3);for(wfGener=!1,mTblCurrent.children().remove(),curNet=GenerateCache(n.Networks),f=curNet.length,content="",t=0;t<f;t++)i="mnuItem sens",IsRemote&&(i+=" hoverable"),t==0&&(i+=" hover"),t%2==0&&(i+=" alternate"),r="<img src='/images/Locked.png' class='lockImg' />",curNet[t].Security!="on"&&(r="<img src='/images/space.gif' class='lockImg' />"),u="<div style='position:relative'>"+r+getStreng(curNet[t].Signal)+"<\/div>",curNet[t].Status=="Not Visible"&&(u=""),content+="<tr style='font-size:1em' class='"+i+"' data-num='"+t+"'><td style='width:80%'>"+curNet[t].SSID+"<br><span style='font-size:0.9em'>"+curNet[t].Status+"<\/span><\/td><td style='width:20%'>"+u+"<\/td><\/tr>";mTblCurrent.append(content);WifiMan&&WifiMan.selChange(WifiMan.lastIndex);dispHG(!1)}).fail(function(){return wfStatTime=setTimeout(function(){wfStatCnt<10?upList():dispHG(!1)},1e3)}).always(function(){wfGener||typeof n!="undefined"||n==!0||getIPAddr(20)})}function getIPAddr(n){if(n!==undefined&&n<=0){cfIpAdd.text("No IP Address");isAP=!1;return}if("Connecting"===wfCurState||"EstablishingAP"===wfCurState){setConnecting();return}if("UnableToConnect"===wfCurState){cfIpAdd.text("Not Connected");return}$.getJSON("/sdk?func=GetIpAddress",function(t){if(t.info!=undefined&&(t=t.info),t.Network!==undefined&&t.Network.IP!==undefined){var i=t.Network.IP;typeof i!="undefined"&&i==="192.168.1.1"?(cfIpAdd.text("My IP: "+i+" - Access Point"),isAP=!0,$("#btnSetAP").hide()):typeof i!="undefined"&&i===""?(setTimeout(function(){getIPAddr(--n)},1e3),showAPBtn()):typeof i!="undefined"?("ConnectedStatic"===wfCurState?cfIpAdd.text("My IP: "+i+" - No DHCP"):cfIpAdd.text("My IP: "+i),isAP=!1,showAPBtn()):(cfIpAdd.parent().hide(),isAP=!1,showAPBtn())}}).fail(function(){clearScan();$("#cfIpAdd").text("Error obtaining WiFi info.")})}function setupWFNets(){setupNets()}function wfChkStat(n){$.getJSON("/sdk?func=getWiFiStatus",function(t){if(t.WiFiStatus==="Resource: Disabled not found!")cfIpAdd.html("WiFi Disabled"),$("#netReboot").hide(),mTblCurrent.hide(),enabled=!1,clearScan();else{if(wfStatCnt>45)return wfStatCnt=0,upList();typeof t.WiFiStatus=="undefined"||t.WiFiStatus.State==="Connecting"||t.WiFiStatus.State==="EstablishingAP"?wfStatTime=setTimeout(wfChkStat,1e3,n):t.WiFiStatus.State==="UnableToConnect"?(cfIpAdd.text("Not Connected"),wfStatTime=setTimeout(wfChkStat,1e3,n)):(t.WiFiStatus.State==="Connected"||t.WiFiStatus.State==="AccessPoint")&&(wfStatTime=setTimeout(n,2e3))}}).fail(function(){wfStatTime=setTimeout(wfChkStat,1e3,n)})}function wfChkAP(){$.getJSON("/sdk?func=GetIpAddress",function(n){if(n.info!=undefined&&(n=n.info),n.Network!=undefined&&n.Network.IP!=undefined){var t=n.Network.IP;typeof t!="undefined"&&t=="192.168.1.1"?confDialog.callConfirm("","Meter is now set to be an Access Point.",function(){console.log("Meter is now set to be an Access Point.")},{Can:{on:"off"}}):confDialog.callConfirm("Warning","Failed changing WiFi to Access Point mode.",function(){},{Can:{on:"off"}})}dispHG(!1);setupNets()}).fail(function(){clearScan();confDialog.callConfirm("Warning","Failed changing WiFi to Access Point mode.",function(){},{Can:{on:"off"}})})}function toggleWifiImg(){enabled=!enabled;wifiImg.attr("src","/images/"+(enabled?"PowerOn.png":"PowerOff.png"));wifiImg.attr("title",enabled?"Turn WiFi off":"Turn WiFi on");$("#netRef").hide();$("#btnAddWifi").hide();$("#btnSetAP").hide()}function netCloseAddPop(){netPass.hide();$("#bgOvly").hide();setTimeout(function(){kbCon!=undefined&&kbCon.pop();popFooters()},10)}function netAddPop(n){kbCon!=undefined&&kbCon.push(dlgCon,netPass);addWifiCb=n;netPass.show();curNet!=undefined&&curNet[selCNet]!=undefined&&curNet[selCNet].SSID!=undefined&&curNet[selCNet].Status!="Connected"?($("#tbNetSSID").val(curNet[selCNet].SSID),$("#tbNetPass").val("").focus()):$("#tbNetSSID").focus();Object.keys(ftr).length>1&&(ftr.lf.push(!1),ftr.rt.push(!1),ftr.mi.push("button","Close",netCloseAddPop));$("#bgOvly").show()}function closeNetDetails(){$("#bgOvly").hide();netDetails.hide();setTimeout(function(){kbCon!=undefined&&kbCon.pop();popFooters()},10)}function popFooters(){Object.keys(ftr).length>1&&(ftr.lf.pop(),ftr.mi.pop(),ftr.rt.pop())}function initWifi(){if(!isWifiInitd){netDetails=$("#netDetails");wifiImg=$("#wifiImg");Networks=$("#Networks");netPass=$("#netPass");$("#netCL").off("click").on("click",function(){Networks.hide();wfOnPage=!1;kbCon!=undefined&&kbCon.pop()});$("#netPassCL").off("click").on("click",function(){netPass.hide();$("#bgOvly").hide();kbCon!=undefined&&kbCon.pop();popFooters()});$("#netDetCL").off("click").on("click",function(){closeNetDetails()});$("#tbNetPass").on("change",function(){!g4&&IsRemote&&confDialog.callConfirm("Warning","The password will be sent in plain text. Use G4 for added security.",function(){},{Can:{on:"off"}})});isWifiInitd=!0;setAsAP=function(){var n="Set WiFi mode to Access Point?";typeof confDialog=="undefined"&&initConfDlg();setTimeout(function(){confDialog.callConfirm("",n,function(){setConnecting();typeof $mainView!="undefined"&&dispHG(!0);$.getJSON("/sdk?func=SetAsAP",function(){console.log("Set Access Point: ");wfStatCnt=0;upList(!0);wfStatCnt=0;wfChkStat(wfChkAP)}).fail(function(){clearScan();confDialog.callConfirm("","You must have at least one configured WiFi network.",function(){},{Can:{on:"off"}})})})},20)};refreshNetworks=function(){isAP?(typeof confDialog=="undefined"&&initConfDlg(),typeof confDialog!="undefined"?confDialog.callConfirm("Warning","If you are connected via Access Point, connection will be lost.",fnNetRef):confirm(curNet[selCNet].SSID+": If you are connected via Access Point, connection will be lost. ")&&fnNetRef()):fnNetRef()};$("#btnSetAP").off("click").on("click",function(){setAsAP()});$("#netReboot").off("click").on("click",function(){confDialog.callConfirm("","The meter will stop and reboot.",function(){$.getJSON("/sdk?func=sendCommand&id=0x83A3",function(){confDialog.callConfirm("","Rebooting",function(){},{Can:{on:"off"},Conf:{on:"off"}})})})});$("#btnDisable").off("click").on("click",function(){enabled?confDialog.callConfirm("","Are you sure you want to disable WiFi (connectivity over WiFi will be lost)? WiFi may be re-enabled via USB.",function(){console.log("Disable Wifi: ");toggleWifiImg();$("#netReboot").hide();mTblCurrent.hide();cfIpAdd.html("WiFi Disabled");$.getJSON("/sdk?func=wifitog&on=false",function(){})}):confDialog.callConfirm("","Turn on WiFi?  (Requires reboot to take effect.)",function(){$.getJSON("/sdk?func=wifitog&on=true",function(){console.log("enable wifi: ");toggleWifiImg();cfIpAdd.html("Reboot to Enable WiFi");$("#netReboot").show()}).fail(function(){confDialog.callConfirm("Warning","Failed to enable WiFi.",function(){},{Can:{on:"off"}})})})});$("#btnAddWifi").off("click").on("click",function(){netAddPop()});$("#btnAddWifiPass").off("click").on("click",function(){var n=$("#tbNetPass").val();if($("#tbNetSSID").val()==""){confDialog.callConfirm("","You must enter a valid WiFi network name (SSID).",function(){},{Can:{on:"off"}});return}n.length==0||n.length>=8?(netPass.hide(),$("#bgOvly").hide(),AddWifi(),addWifiCb!=undefined&&(addWifiCb(),addWifiCb=undefined),$("#tbNetPass").val(""),netCloseAddPop()):setTimeout(function(){confDialog.callConfirm("","Either no password or at least an 8 character password must be entered to match your WiFi network.",function(){},{Can:{on:"off"}})},10)});$("#btndRemove").off("click").on("click",function(){closeNetDetails();setTimeout(function(){typeof confDialog=="undefined"&&initConfDlg();typeof confDialog!="undefined"?confDialog.callConfirm("",curNet[selCNet].SSID+": Are you sure you wish to forget this WiFi network? ",delssid):confirm(curNet[selCNet].SSID+": Are you sure you wish to forget this WiFi network? ")&&delssid()},20)});$("#btndConnect").off("click").on("click",function(){closeNetDetails();curNet[selCNet].Status=="Connected"?console.log("hmm"):curNet[selCNet].Status=="Saved"||curNet[selCNet].Status=="Not Visible"?SwToWF():curNet[selCNet].Status=="Open"?($("#tbNetSSID").val(curNet[selCNet].SSID),$("#tbNetPass").val(""),AddWifi(),SwToWF()):curNet[selCNet].Status=="Secured"&&setTimeout(function(){netAddPop(SwToWF)},20)});$("#btndCancel").off("click").on("click",function(){closeNetDetails()});$("#netRef").off("click").on("click",function(){refreshNetworks()});checkSetNMeter();OnMeter&&OnSettingTabs&&cfInSet()}}function fnNetRef(){bScan||(setScanning(),$.getJSON("/sdk?func=refreshWiFi").always(function(){setupNets()}).fail(function(){clearScan()}))}function AddWifi(){g4?console.log("G4~ AddWifi("+$("#tbNetSSID").val()+":"+btoa($("#tbNetPass").val())+")"):$.ajax("/sdk?func=AddWifi",{data:JSON.stringify({ssid:$("#tbNetSSID").val(),password:btoa($("#tbNetPass").val())}),type:"POST",processData:!1,contentType:"application/json"}).done(function(){console.log("Added: "+$("#tbNetSSID").val());setupNets()}).fail(function(){clearScan();alert("Error adding WiFi.")})}function wfChkWF(){$.getJSON("/sdk?func=GetIpAddress",function(n){if(n.info!=undefined&&(n=n.info),n.Network!=undefined&&n.Network.IP!=undefined){var t=n.Network.IP;typeof t!="undefined"&&t=="192.168.1.1"?confDialog.callConfirm("Warning","Failed to Connect to Network. Meter is still an Access Point.",function(){console.log("Failed to Connect to Network. Meter is still an Access Point.")},{Can:{on:"off"}}):typeof t!="undefined"?t!=""?confDialog.callConfirm("","Meter is now connected with IP: "+t,function(){console.log("Meter is now connected with IP: "+t)},{Can:{on:"off"}}):setTimeout(wfChkWF,1e3):confDialog.callConfirm("","Meter is resetting WiFi."+t,function(){console.log("Meter is resetting WiFi.")},{Can:{on:"off"}})}setupNets(!0)})}function SwToWF(){if(typeof confDialog=="undefined"&&initConfDlg(),typeof confDialog!="undefined"){var n="Connect to WiFi network?";setTimeout(function(){confDialog.callConfirm("",n,function(){curNet!=undefined&&curNet[selCNet]!=undefined?(setConnecting(),$.ajax("/sdk?func=ConnectToNetwork",{data:JSON.stringify({ssid:curNet[selCNet].SSID}),type:"POST",processData:!1,contentType:"application/json"}).done(function(){console.log("SwToWF");console.log("Reset Connection: "+curNet[selCNet].SSID);wfStatCnt=0;upList(!0);wfStatCnt=0;wfChkStat(wfChkWF)}).fail(function(){clearScan();confDialog.callConfirm("Warning","Failed to connect to network.",function(){},{Can:{on:"off"}})})):(clearScan(),confDialog.callConfirm("","You must have at least one configured WiFi network.",function(){},{Can:{on:"off"}}))})},20)}}function delssid(){$.ajax("/sdk?func=RemoveWifi",{data:JSON.stringify({ssid:curNet[selCNet].SSID}),type:"POST",processData:!1,contentType:"application/json"}).done(function(n){console.log("Deleted: "+curNet[selCNet].SSID+" - "+n);setupNets()})}function openNetDetails(){$("#bgOvly").show();netDetails.show();Object.keys(ftr).length>1&&(ftr.lf.push(!1),ftr.rt.push(!1),ftr.mi.push("button","",closeNetDetails));kbCon!=undefined&&kbCon.push(dlgCon,netDetails);$("#ndTitle").text(curNet[selCNet].SSID);var n="<img src='/images/Locked.png' style='height:18px;' /> Secured";curNet[selCNet].Security!="on"&&(n="<img src='/images/space.gif'style='height:18px;width:0px' /> Open");curNet[selCNet].Status=="Connected"?($("#ndStatus").text("Connected").parent().show(),$("#ndSpeed").text(curNet[selCNet].LinkSpd).parent().show(),$("#ndIP").text(curNet[selCNet].IPAddress).parent().show(),$("#btndConnect").hide()):($("#ndStatus").parent().hide(),$("#ndSpeed").parent().hide(),$("#ndIP").parent().hide(),$("#btndConnect").show());curNet[selCNet].Status=="Saved"||curNet[selCNet].Status=="Not Visible"?$("#btndRemove").show():$("#btndRemove").hide();$("#ndSignal").html(getStreng(curNet[selCNet].Signal)+" "+curNet[selCNet].Signal+"/"+maxSignal);$("#ndSecure").html(n);netDetails.find(searchFocDef).not(":hidden").first().focus()}function cfInSet(){Networks.css({"font-size":"12px"});Networks.removeClass("nicePop").show();Networks.find("h1").hide();Networks.find("#netCL").hide();Networks.find("#btnSetAP").css({"font-size":"10px","margin-left":"2px"});Networks.find("#btnAddWifi").css({"font-size":"10px","margin-left":"2px"});setupNets();Networks.find("#netRef").find("img").css({height:"12px",width:"12px"});Networks.find("#dvMain").css({height:"175px"})}function cfOnAwesome(){initWifi();Networks.removeClass("nicePop").show();Networks.find("h1").hide();Networks.find("#netCL").hide();Networks.find("#topWifiBar").hide();Networks.find("#btnSetAP").hide();Networks.find("#btnAddWifi").hide();setupNets();Networks.find("#cfIpAdd").addClass("cCy");$("#netsTbl").removeClass("ndsmall").addClass("ndsmallAw");Networks.find("#cfIpAdd").css("font-size","0.75em");Networks.find("#netRef").find("img").css({height:"12px",width:"12px"});Networks.find("#dvMain").css({height:"200px",width:"100%"});$("#btndRemove").css("font-size","0.7em");$("#btndConnect").css("font-size","0.7em");$("#btndCancel").css("font-size","0.7em");maxSignal=100;$("#netDetails").css("top","0px");Networks.find(".wifiHr").css({"background-color":"gray","-webkit-margin-before":".25em","-webkit-margin-after":".25em"})}function closeWifi(){popPage();wfOnPage=!1;menuOpen=!1}function getWifiStrength(){$.getJSON("/sdk?func=getWifiStatus").done(function(n){if(n.WiFiStatus!=undefined&&n.WiFiStatus.Quality!=undefined){var t=n.WiFiStatus.Quality;wifiStrength=t>=60?3:t>=40?2:t>=20?1:0}})}var GraphTypes,PauseGetRunState,stopGrabbing,setZoom,timeOffset,Custom,SlmConstants,origStyle,stTmCnt,wrapFunction,confDialog,notifDialog,cnfCon,searchFocDef,fixedLen,fnDlgCtl,scOk,scCan,runAvailMem,enterKDFunc,downKDFunc,upKDFunc,leftKDFunc,rightKDFunc,sfLeftKDFunc,sfRightKDFunc,menuKDFunc,playKey,nonMeter,updatePropsMenu,prpMenu,lastStat,PageStatus,resetCancelled,LatchWhich,ctrlTab,SessionID,tmTab,rulesCausedChange,filenameModded,lastFocus,kbCon,forceDataCallBack,bCurrentlyDisplaying,forceCallBack,SaveBothProperties,ftr,sideLoader,setupManagerInit,cntTries,setupMode,globalDataNeeded,initialGet,rtcnt,prevTitle,BtnMenu,SetupMgr,mpSetup,mpMisc,mpSched,mpTools1,mpTools2,mpSensor,mpOptions,mpTime,bScan,bScanLeftAP,wfOnPage,wfStatTime,wfNetStatTime,wfStatCnt,wfCurState,cfIpAdd,onAwesome,wfGener,enabled,addWifiCb,isWifiInitd,netDetails,wifiImg,Networks,netPass,maxSignal,WifiMan,wifiStrength,jqxBaseFramework;(function(n,t){typeof module=="object"&&typeof module.exports=="object"?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)})(typeof window!="undefined"?window:this,function(n,t){function ii(n){var t=!!n&&"length"in n&&n.length,r=i.type(n);return r==="function"||i.isWindow(n)?!1:r==="array"||t===0||typeof t=="number"&&t>0&&t-1 in n}function ri(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if(typeof t=="string"){if(bf.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return lt.call(t,n)>-1!==r})}function hr(n,t){while((n=n[t])&&n.nodeType!==1);return n}function kf(n){var t={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}function yt(){u.removeEventListener("DOMContentLoaded",yt);n.removeEventListener("load",yt);i.ready()}function et(){this.expando=i.expando+et.uid++}function lr(n,t,r){var u;if(r===undefined&&n.nodeType===1)if(u="data-"+t.replace(cr,"-$&").toLowerCase(),r=n.getAttribute(u),typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:df.test(r)?i.parseJSON(r):r}catch(f){}e.set(n,t,r)}else r=undefined;return r}function vr(n,t,r,u){var h,e=1,l=20,c=u?function(){return u.cur()}:function(){return i.css(n,t,"")},s=c(),o=r&&r[3]||(i.cssNumber[t]?"":"px"),f=(i.cssNumber[t]||o!=="px"&&+s)&&ot.exec(i.css(n,t));if(f&&f[3]!==o){o=o||f[3];r=r||[];f=+s||1;do e=e||".5",f=f/e,i.style(n,t,f+o);while(e!==(e=c()/s)&&e!==1&&--l)}return r&&(f=+f||+s||0,h=r[1]?f+(r[1]+1)*r[2]:+r[2],u&&(u.unit=o,u.start=f,u.end=h)),h}function o(n,t){var r=typeof n.getElementsByTagName!="undefined"?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!="undefined"?n.querySelectorAll(t||"*"):[];return t===undefined||t&&i.nodeName(n,t)?i.merge([n],r):r}function ui(n,t){for(var i=0,u=n.length;i<u;i++)r.set(n[i],"globalEval",!t||r.get(t[i],"globalEval"))}function kr(n,t,r,u,f){for(var e,s,p,a,w,v,h=t.createDocumentFragment(),y=[],l=0,b=n.length;l<b;l++)if(e=n[l],e||e===0)if(i.type(e)==="object")i.merge(y,e.nodeType?[e]:e);else if(br.test(e)){for(s=s||h.appendChild(t.createElement("div")),p=(pr.exec(e)||["",""])[1].toLowerCase(),a=c[p]||c._default,s.innerHTML=a[1]+i.htmlPrefilter(e)+a[2],v=a[0];v--;)s=s.lastChild;i.merge(y,s.childNodes);s=h.firstChild;s.textContent=""}else y.push(t.createTextNode(e));for(h.textContent="",l=0;e=y[l++];){if(u&&i.inArray(e,u)>-1){f&&f.push(e);continue}if(w=i.contains(e.ownerDocument,e),s=o(h.appendChild(e),"script"),w&&ui(s),r)for(v=0;e=s[v++];)wr.test(e.type||"")&&r.push(e)}return h}function pt(){return!0}function nt(){return!1}function gr(){try{return u.activeElement}catch(n){}}function fi(n,t,r,u,f,e){var o,s;if(typeof t=="object"){typeof r!="string"&&(u=u||r,r=undefined);for(s in t)fi(n,s,r,u,t[s],e);return n}if(u==null&&f==null?(f=r,u=r=undefined):f==null&&(typeof r=="string"?(f=u,u=undefined):(f=u,u=r,r=undefined)),f===!1)f=nt;else if(!f)return n;return e===1&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),n.each(function(){i.event.add(this,t,f,u,r)})}function nu(n,t){return i.nodeName(n,"table")&&i.nodeName(t.nodeType!==11?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function ee(n){return n.type=(n.getAttribute("type")!==null)+"/"+n.type,n}function oe(n){var t=ue.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function tu(n,t){var f,c,o,s,h,l,a,u;if(t.nodeType===1){if(r.hasData(n)&&(s=r.access(n),h=r.set(t,s),u=s.events,u)){delete h.handle;h.events={};for(o in u)for(f=0,c=u[o].length;f<c;f++)i.event.add(t,o,u[o][f])}e.hasData(n)&&(l=e.access(n),a=i.extend({},l),e.set(t,a))}}function se(n,t){var i=t.nodeName.toLowerCase();i==="input"&&yr.test(n.type)?t.checked=n.checked:(i==="input"||i==="textarea")&&(t.defaultValue=n.defaultValue)}function b(n,t,u,e){t=gi.apply([],t);var l,p,c,a,s,w,h=0,v=n.length,d=v-1,y=t[0],k=i.isFunction(y);if(k||v>1&&typeof y=="string"&&!f.checkClone&&re.test(y))return n.each(function(i){var r=n.eq(i);k&&(t[0]=y.call(this,i,r.html()));b(r,t,u,e)});if(v&&(l=kr(t,n[0].ownerDocument,!1,n,e),p=l.firstChild,l.childNodes.length===1&&(l=p),p||e)){for(c=i.map(o(l,"script"),ee),a=c.length;h<v;h++)s=l,h!==d&&(s=i.clone(s,!0,!0),a&&i.merge(c,o(s,"script"))),u.call(n[h],s,h);if(a)for(w=c[c.length-1].ownerDocument,i.map(c,oe),h=0;h<a;h++)s=c[h],wr.test(s.type||"")&&!r.access(s,"globalEval")&&i.contains(w,s)&&(s.src?i._evalUrl&&i._evalUrl(s.src):i.globalEval(s.textContent.replace(fe,"")))}return n}function iu(n,t,r){for(var u,e=t?i.filter(t,n):n,f=0;(u=e[f])!=null;f++)r||u.nodeType!==1||i.cleanData(o(u)),u.parentNode&&(r&&i.contains(u.ownerDocument,u)&&ui(o(u,"script")),u.parentNode.removeChild(u));return n}function ru(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.detach(),u}function oi(n){var r=u,t=ei[n];return t||(t=ru(n,r),t!=="none"&&t||(wt=(wt||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=wt[0].contentDocument,r.write(),r.close(),t=ru(n,r),wt.detach()),ei[n]=t),t}function tt(n,t,r){var o,s,h,u,e=n.style;return r=r||bt(n),u=r?r.getPropertyValue(t)||r[t]:undefined,u!==""&&u!==undefined||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),r&&!f.pixelMarginRight()&&si.test(u)&&uu.test(t)&&(o=e.width,s=e.minWidth,h=e.maxWidth,e.minWidth=e.maxWidth=e.width=u,u=r.width,e.width=o,e.minWidth=s,e.maxWidth=h),u!==undefined?u+"":u}function ci(n,t){return{get:function(){if(n()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}function su(n){if(n in ou)return n;for(var i=n[0].toUpperCase()+n.slice(1),t=eu.length;t--;)if(n=eu[t]+i,n in ou)return n}function hu(n,t,i){var r=ot.exec(t);return r?Math.max(0,r[2]-(i||0))+(r[3]||"px"):t}function cu(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:t==="width"?1:0,o=0;e<4;e+=2)r==="margin"&&(o+=i.css(n,r+w[e],!0,f)),u?(r==="content"&&(o-=i.css(n,"padding"+w[e],!0,f)),r!=="margin"&&(o-=i.css(n,"border"+w[e]+"Width",!0,f))):(o+=i.css(n,"padding"+w[e],!0,f),r!=="padding"&&(o+=i.css(n,"border"+w[e]+"Width",!0,f)));return o}function lu(t,r,e){var h=!0,o=r==="width"?t.offsetWidth:t.offsetHeight,s=bt(t),c=i.css(t,"boxSizing",!1,s)==="border-box";if(u.msFullscreenElement&&n.top!==n&&t.getClientRects().length&&(o=Math.round(t.getBoundingClientRect()[r]*100)),o<=0||o==null){if(o=tt(t,r,s),(o<0||o==null)&&(o=t.style[r]),si.test(o))return o;h=c&&(f.boxSizingReliable()||o===t.style[r]);o=parseFloat(o)||0}return o+cu(t,r,e||(c?"border":"content"),h,s)+"px"}function au(n,t){for(var e,u,s,o=[],f=0,h=n.length;f<h;f++)(u=n[f],u.style)&&(o[f]=r.get(u,"olddisplay"),e=u.style.display,t?(o[f]||e!=="none"||(u.style.display=""),u.style.display===""&&st(u)&&(o[f]=r.access(u,"olddisplay",oi(u.nodeName)))):(s=st(u),e==="none"&&s||r.set(u,"olddisplay",s?e:i.css(u,"display"))));for(f=0;f<h;f++)(u=n[f],u.style)&&(t&&u.style.display!=="none"&&u.style.display!==""||(u.style.display=t?o[f]||"":"none"));return n}function s(n,t,i,r,u){return new s.prototype.init(n,t,i,r,u)}function pu(){return n.setTimeout(function(){it=undefined}),it=i.now()}function dt(n,t){var r,u=0,i={height:n};for(t=t?1:0;u<4;u+=2-t)r=w[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function wu(n,t,i){for(var u,f=(l.tweeners[t]||[]).concat(l.tweeners["*"]),r=0,e=f.length;r<e;r++)if(u=f[r].call(i,t,n))return u}function le(n,t,u){var f,a,p,v,o,w,h,b,l=this,y={},s=n.style,c=n.nodeType&&st(n),e=r.get(n,"fxshow");u.queue||(o=i._queueHooks(n,"fx"),o.unqueued==null&&(o.unqueued=0,w=o.empty.fire,o.empty.fire=function(){o.unqueued||w()}),o.unqueued++,l.always(function(){l.always(function(){o.unqueued--;i.queue(n,"fx").length||o.empty.fire()})}));n.nodeType===1&&("height"in t||"width"in t)&&(u.overflow=[s.overflow,s.overflowX,s.overflowY],h=i.css(n,"display"),b=h==="none"?r.get(n,"olddisplay")||oi(n.nodeName):h,b==="inline"&&i.css(n,"float")==="none"&&(s.display="inline-block"));u.overflow&&(s.overflow="hidden",l.always(function(){s.overflow=u.overflow[0];s.overflowX=u.overflow[1];s.overflowY=u.overflow[2]}));for(f in t)if(a=t[f],vu.exec(a)){if(delete t[f],p=p||a==="toggle",a===(c?"hide":"show"))if(a==="show"&&e&&e[f]!==undefined)c=!0;else continue;y[f]=e&&e[f]||i.style(n,f)}else h=undefined;if(i.isEmptyObject(y))(h==="none"?oi(n.nodeName):h)==="inline"&&(s.display=h);else{e?"hidden"in e&&(c=e.hidden):e=r.access(n,"fxshow",{});p&&(e.hidden=!c);c?i(n).show():l.done(function(){i(n).hide()});l.done(function(){var t;r.remove(n,"fxshow");for(t in y)i.style(n,t,y[t])});for(f in y)v=wu(c?e[f]:0,f,l),f in e||(e[f]=v.start,c&&(v.end=v.start,v.start=f==="width"||f==="height"?1:0))}}function ae(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function l(n,t,r){var f,o,s=0,a=l.prefilters.length,e=i.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var s=it||pu(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,f=u.tweens.length;r<f;r++)u.tweens[r].run(i);return e.notifyWith(n,[u,i,t]),i<1&&f?t:(e.resolveWith(n,[u]),!1)},u=e.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{},easing:i.easing._default},r),originalProperties:t,originalOptions:r,startTime:it||pu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(o)return this;for(o=!0;i<r;i++)u.tweens[i].run(1);return t?(e.notifyWith(n,[u,1,0]),e.resolveWith(n,[u,t])):e.rejectWith(n,[u,t]),this}}),h=u.props;for(ae(h,u.opts.specialEasing);s<a;s++)if(f=l.prefilters[s].call(u,n,h,u.opts),f)return i.isFunction(f.stop)&&(i._queueHooks(u.elem,u.opts.queue).stop=i.proxy(f.stop,f)),f;return i.map(h,wu,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function k(n){return n.getAttribute&&n.getAttribute("class")||""}function ff(n){return function(t,r){typeof t!="string"&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])u[0]==="+"?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function ef(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);if(typeof s!="string"||o||f[s]){if(o)return!(h=s)}else return t.dataTypes.unshift(s),e(s),!1}),h}var f={},o=n===yi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function wi(n,t){var r,u,f=i.ajaxSettings.flatOptions||{};for(r in t)t[r]!==undefined&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function be(n,t,i){for(var e,u,f,o,s=n.contents,r=n.dataTypes;r[0]==="*";)r.shift(),e===undefined&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(u in s)if(s[u]&&s[u].test(e)){r.unshift(u);break}if(r[0]in i)f=r[0];else{for(u in i){if(!r[0]||n.converters[u+" "+r[0]]){f=u;break}o||(o=u)}f=f||o}if(f)return f!==r[0]&&r.unshift(f),i[f]}function ke(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift(),u)if(u==="*")u=e;else if(e!=="*"&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]],f)){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function bi(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||ge.test(n)?u(n,i):bi(n+"["+(typeof i=="object"&&i!=null?t:"")+"]",i,r,u)});else if(r||i.type(t)!=="object")u(n,t);else for(f in t)bi(n+"["+f+"]",t[f],r,u)}function hf(n){return i.isWindow(n)?n:n.nodeType===9&&n.defaultView}var y=[],u=n.document,v=y.slice,gi=y.concat,ti=y.push,lt=y.indexOf,at={},af=at.toString,ft=at.hasOwnProperty,f={},nr="2.2.2",i=function(n,t){return new i.fn.init(n,t)},vf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,yf=/^-ms-/,pf=/-([\da-z])/gi,wf=function(n,t){return t.toUpperCase()},p,ur,fr,er,or,sr,h,vt,a,g,br,wt,ei,it,kt,vu,yu,bu,rt,ku,du,gt,gu,nf,li,sf,ut,ki,ni,di,cf,lf;i.fn=i.prototype={jquery:nr,constructor:i,selector:"",length:0,toArray:function(){return v.call(this)},get:function(n){return n!=null?n<0?this[n+this.length]:this[n]:v.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n){return i.each(this,n)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(v.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(t>=0&&t<i?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:ti,sort:y.sort,splice:y.splice};i.extend=i.fn.extend=function(){var e,f,r,t,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for(typeof n=="boolean"&&(h=n,n=arguments[u]||{},u++),typeof n=="object"||i.isFunction(n)||(n={}),u===c&&(n=this,u--);u<c;u++)if((e=arguments[u])!=null)for(f in e)(r=n[f],t=e[f],n!==t)&&(h&&t&&(i.isPlainObject(t)||(o=i.isArray(t)))?(o?(o=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):t!==undefined&&(n[f]=t));return n};i.extend({expando:"jQuery"+(nr+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return i.type(n)==="function"},isArray:Array.isArray,isWindow:function(n){return n!=null&&n===n.window},isNumeric:function(n){var t=n&&n.toString();return!i.isArray(n)&&t-parseFloat(t)+1>=0},isPlainObject:function(n){var t;if(i.type(n)!=="object"||n.nodeType||i.isWindow(n)||n.constructor&&!ft.call(n,"constructor")&&!ft.call(n.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in n);return t===undefined||ft.call(n,t)},isEmptyObject:function(n){for(var t in n)return!1;return!0},type:function(n){return n==null?n+"":typeof n=="object"||typeof n=="function"?at[af.call(n)]||"object":typeof n},globalEval:function(n){var t,r=eval;n=i.trim(n);n&&(n.indexOf("use strict")===1?(t=u.createElement("script"),t.text=n,u.head.appendChild(t).parentNode.removeChild(t)):r(n))},camelCase:function(n){return n.replace(yf,"ms-").replace(pf,wf)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t){var r,i=0;if(ii(n)){for(r=n.length;i<r;i++)if(t.call(n[i],i,n[i])===!1)break}else for(i in n)if(t.call(n[i],i,n[i])===!1)break;return n},trim:function(n){return n==null?"":(n+"").replace(vf,"")},makeArray:function(n,t){var r=t||[];return n!=null&&(ii(Object(n))?i.merge(r,typeof n=="string"?[n]:n):ti.call(r,n)),r},inArray:function(n,t,i){return t==null?-1:lt.call(t,n,i)},merge:function(n,t){for(var u=+t.length,i=0,r=n.length;i<u;i++)n[r++]=t[i];return n.length=r,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;r<e;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var e,u,r=0,f=[];if(ii(n))for(e=n.length;r<e;r++)u=t(n[r],r,i),u!=null&&f.push(u);else for(r in n)u=t(n[r],r,i),u!=null&&f.push(u);return gi.apply([],f)},guid:1,proxy:function(n,t){var u,f,r;return(typeof t=="string"&&(u=n[t],t=n,n=u),!i.isFunction(n))?undefined:(f=v.call(arguments,2),r=function(){return n.apply(t||this,f.concat(v.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r)},now:Date.now,support:f});typeof Symbol=="function"&&(i.fn[Symbol.iterator]=y[Symbol.iterator]);i.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(n,t){at["[object "+t+"]"]=t.toLowerCase()});p=function(n){function u(n,t,r,u){var l,w,a,s,nt,d,y,g,p=t&&t.ownerDocument,v=t?t.nodeType:9;if(r=r||[],typeof n!="string"||!n||v!==1&&v!==9&&v!==11)return r;if(!u&&((t?t.ownerDocument||t:c)!==i&&b(t),t=t||i,h)){if(v!==11&&(d=sr.exec(n)))if(l=d[1]){if(v===9)if(a=t.getElementById(l)){if(a.id===l)return r.push(a),r}else return r;else if(p&&(a=p.getElementById(l))&&et(t,a)&&a.id===l)return r.push(a),r}else{if(d[2])return k.apply(r,t.getElementsByTagName(n)),r;if((l=d[3])&&f.getElementsByClassName&&t.getElementsByClassName)return k.apply(r,t.getElementsByClassName(l)),r}if(f.qsa&&!lt[n+" "]&&(!o||!o.test(n))){if(v!==1)p=t,g=n;else if(t.nodeName.toLowerCase()!=="object"){for((s=t.getAttribute("id"))?s=s.replace(hr,"\\$&"):t.setAttribute("id",s=e),y=ft(n),w=y.length,nt=yi.test(s)?"#"+s:"[id='"+s+"']";w--;)y[w]=nt+" "+yt(y[w]);g=y.join(",");p=gt.test(n)&&ii(t.parentNode)||t}if(g)try{return k.apply(r,p.querySelectorAll(g)),r}catch(tt){}finally{s===e&&t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,r,u)}function ni(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function l(n){return n[e]=!0,n}function a(n){var t=i.createElement("div");try{return!!n(t)}catch(r){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ti(n,i){for(var r=n.split("|"),u=r.length;u--;)t.attrHandle[r[u]]=i}function wi(n,t){var i=t&&n,r=i&&n.nodeType===1&&t.nodeType===1&&(~t.sourceIndex||li)-(~n.sourceIndex||li);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function cr(n){return function(t){var i=t.nodeName.toLowerCase();return i==="input"&&t.type===n}}function lr(n){return function(t){var i=t.nodeName.toLowerCase();return(i==="input"||i==="button")&&t.type===n}}function it(n){return l(function(t){return t=+t,l(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ii(n){return n&&typeof n.getElementsByTagName!="undefined"&&n}function bi(){}function yt(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function ri(n,t,i){var r=t.dir,u=i&&r==="parentNode",f=ki++;return t.first?function(t,i,f){while(t=t[r])if(t.nodeType===1||u)return n(t,i,f)}:function(t,i,o){var s,h,c,l=[v,f];if(o){while(t=t[r])if((t.nodeType===1||u)&&n(t,i,o))return!0}else while(t=t[r])if(t.nodeType===1||u){if(c=t[e]||(t[e]={}),h=c[t.uniqueID]||(c[t.uniqueID]={}),(s=h[r])&&s[0]===v&&s[1]===f)return l[2]=s[2];if(h[r]=l,l[2]=n(t,i,o))return!0}}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ar(n,t,i){for(var r=0,f=t.length;r<f;r++)u(n,t[r],i);return i}function pt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=t!=null;f<s;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function fi(n,t,i,r,u,f){return r&&!r[e]&&(r=fi(r)),u&&!u[e]&&(u=fi(u,f)),l(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||ar(t||"*",o.nodeType?[o]:o,[]),v=n&&(f||!t)?pt(b,p,n,o,s):b,h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=pt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=pt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):k.apply(e,h)})}function ei(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ri(function(n){return n===o},c,!0),a=ri(function(n){return nt(o,n)>-1},c,!0),f=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];i<s;i++)if(u=t.relative[n[i].type])f=[ri(ui(f),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[e]){for(r=++i;r<s;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(f),i>1&&yt(n.slice(0,i-1).concat({value:n[i-2].type===" "?"*":""})).replace(at,"$1"),u,i<r&&ei(n.slice(i,r)),r<s&&ei(n=n.slice(r)),r<s&&yt(n))}f.push(u)}return ui(f)}function vr(n,r){var f=r.length>0,e=n.length>0,o=function(o,s,c,l,a){var y,nt,d,g=0,p="0",tt=o&&[],w=[],it=ht,rt=o||e&&t.find.TAG("*",a),ut=v+=it==null?1:Math.random()||.1,ft=rt.length;for(a&&(ht=s===i||s||a);p!==ft&&(y=rt[p])!=null;p++){if(e&&y){for(nt=0,s||y.ownerDocument===i||(b(y),c=!h);d=n[nt++];)if(d(y,s||i,c)){l.push(y);break}a&&(v=ut)}f&&((y=!d&&y)&&g--,o&&tt.push(y))}if(g+=p,f&&p!==g){for(nt=0;d=r[nt++];)d(tt,w,s,c);if(o){if(g>0)while(p--)tt[p]||w[p]||(w[p]=gi.call(l));w=pt(w)}k.apply(l,w);a&&!o&&w.length>0&&g+r.length>1&&u.uniqueSort(l)}return a&&(v=ut,ht=it),tt};return f?l(o):o}var rt,f,t,st,oi,ft,wt,si,ht,w,ut,b,i,s,h,o,d,ct,et,e="sizzle"+1*new Date,c=n.document,v=0,ki=0,hi=ni(),ci=ni(),lt=ni(),bt=function(n,t){return n===t&&(ut=!0),0},li=-2147483648,di={}.hasOwnProperty,g=[],gi=g.pop,nr=g.push,k=g.push,ai=g.slice,nt=function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},kt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",r="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",vi="\\["+r+"*("+tt+")(?:"+r+"*([*^$|!~]?=)"+r+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+tt+"))|)"+r+"*\\]",dt=":("+tt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+vi+")*)|.*)\\)|)",tr=new RegExp(r+"+","g"),at=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),ir=new RegExp("^"+r+"*,"+r+"*"),rr=new RegExp("^"+r+"*([>+~]|"+r+")"+r+"*"),ur=new RegExp("="+r+"*([^\\]'\"]*?)"+r+"*\\]","g"),fr=new RegExp(dt),yi=new RegExp("^"+tt+"$"),vt={ID:new RegExp("^#("+tt+")"),CLASS:new RegExp("^\\.("+tt+")"),TAG:new RegExp("^("+tt+"|[*])"),ATTR:new RegExp("^"+vi),PSEUDO:new RegExp("^"+dt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),bool:new RegExp("^(?:"+kt+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},er=/^(?:input|select|textarea|button)$/i,or=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,sr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,hr=/'|\\/g,y=new RegExp("\\\\([\\da-f]{1,6}"+r+"?|("+r+")|.)","ig"),p=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)},pi=function(){b()};try{k.apply(g=ai.call(c.childNodes),c.childNodes);g[c.childNodes.length].nodeType}catch(yr){k={apply:g.length?function(n,t){nr.apply(n,ai.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}f=u.support={};oi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?t.nodeName!=="HTML":!1};b=u.setDocument=function(n){var v,u,l=n?n.ownerDocument||n:c;return l===i||l.nodeType!==9||!l.documentElement?i:(i=l,s=i.documentElement,h=!oi(i),(u=i.defaultView)&&u.top!==u&&(u.addEventListener?u.addEventListener("unload",pi,!1):u.attachEvent&&u.attachEvent("onunload",pi)),f.attributes=a(function(n){return n.className="i",!n.getAttribute("className")}),f.getElementsByTagName=a(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),f.getElementsByClassName=ot.test(i.getElementsByClassName),f.getById=a(function(n){return s.appendChild(n).id=e,!i.getElementsByName||!i.getElementsByName(e).length}),f.getById?(t.find.ID=function(n,t){if(typeof t.getElementById!="undefined"&&h){var i=t.getElementById(n);return i?[i]:[]}},t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i=typeof n.getAttributeNode!="undefined"&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=f.getElementsByTagName?function(n,t){return typeof t.getElementsByTagName!="undefined"?t.getElementsByTagName(n):f.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if(n==="*"){while(i=u[f++])i.nodeType===1&&r.push(i);return r}return u},t.find.CLASS=f.getElementsByClassName&&function(n,t){if(typeof t.getElementsByClassName!="undefined"&&h)return t.getElementsByClassName(n)},d=[],o=[],(f.qsa=ot.test(i.querySelectorAll))&&(a(function(n){s.appendChild(n).innerHTML="<a id='"+e+"'><\/a><select id='"+e+"-\r\\' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&o.push("[*^$]="+r+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+r+"*(?:value|"+kt+")");n.querySelectorAll("[id~="+e+"-]").length||o.push("~=");n.querySelectorAll(":checked").length||o.push(":checked");n.querySelectorAll("a#"+e+"+*").length||o.push(".#.+[+~]")}),a(function(n){var t=i.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+r+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(f.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&a(function(n){f.disconnectedMatch=ct.call(n,"div");ct.call(n,"[s!='']:x");d.push("!=",dt)}),o=o.length&&new RegExp(o.join("|")),d=d.length&&new RegExp(d.join("|")),v=ot.test(s.compareDocumentPosition),et=v||ot.test(s.contains)?function(n,t){var r=n.nodeType===9?n.documentElement:n,i=t&&t.parentNode;return n===i||!!(i&&i.nodeType===1&&(r.contains?r.contains(i):n.compareDocumentPosition&&n.compareDocumentPosition(i)&16))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},bt=v?function(n,t){if(n===t)return ut=!0,0;var r=!n.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,r&1||!f.sortDetached&&t.compareDocumentPosition(n)===r)?n===i||n.ownerDocument===c&&et(c,n)?-1:t===i||t.ownerDocument===c&&et(c,t)?1:w?nt(w,n)-nt(w,t):0:r&4?-1:1}:function(n,t){if(n===t)return ut=!0,0;var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(o&&s){if(o===s)return wi(n,t)}else return n===i?-1:t===i?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===c?-1:e[u]===c?1:0},i)};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==i&&b(n),t=t.replace(ur,"='$1']"),f.matchesSelector&&h&&!lt[t+" "]&&(!d||!d.test(t))&&(!o||!o.test(t)))try{var r=ct.call(n,t);if(r||f.disconnectedMatch||n.document&&n.document.nodeType!==11)return r}catch(e){}return u(t,i,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==i&&b(n),et(n,t)};u.attr=function(n,r){(n.ownerDocument||n)!==i&&b(n);var e=t.attrHandle[r.toLowerCase()],u=e&&di.call(t.attrHandle,r.toLowerCase())?e(n,r,!h):undefined;return u!==undefined?u:f.attributes||!h?n.getAttribute(r):(u=n.getAttributeNode(r))&&u.specified?u.value:null};u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ut=!f.detectDuplicates,w=!f.sortStable&&n.slice(0),n.sort(bt),ut){while(r=n[i++])r===n[i]&&(t=u.push(i));while(t--)n.splice(u[t],1)}return w=null,n};st=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(t===1||t===9||t===11){if(typeof n.textContent=="string")return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(t===3||t===4)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};t=u.selectors={cacheLength:50,createPseudo:l,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),n[2]==="~="&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),n[1].slice(0,3)==="nth"?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*(n[3]==="even"||n[3]==="odd")),n[5]=+(n[7]+n[8]||n[3]==="odd")):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&fr.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(y,p).toLowerCase();return n==="*"?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+r+")"+n+"("+r+"|$)"))&&hi(n,function(n){return t.test(typeof n.className=="string"&&n.className||typeof n.getAttribute!="undefined"&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return f==null?t==="!=":t?(f+="",t==="="?f===i:t==="!="?f!==i:t==="^="?i&&f.indexOf(i)===0:t==="*="?i&&f.indexOf(i)>-1:t==="$="?i&&f.slice(-i.length)===i:t==="~="?(" "+f.replace(tr," ")+" ").indexOf(i)>-1:t==="|="?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s=n.slice(0,3)!=="nth",o=n.slice(-4)!=="last",f=t==="of-type";return r===1&&u===0?function(n){return!!n.parentNode}:function(t,i,h){var p,w,y,c,a,b,k=s!==o?"nextSibling":"previousSibling",d=t.parentNode,nt=f&&t.nodeName.toLowerCase(),g=!h&&!f,l=!1;if(d){if(s){while(k){for(c=t;c=c[k];)if(f?c.nodeName.toLowerCase()===nt:c.nodeType===1)return!1;b=k=n==="only"&&!b&&"nextSibling"}return!0}if(b=[o?d.firstChild:d.lastChild],o&&g){for(c=d,y=c[e]||(c[e]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),p=w[n]||[],a=p[0]===v&&p[1],l=a&&p[2],c=a&&d.childNodes[a];c=++a&&c&&c[k]||(l=a=0)||b.pop();)if(c.nodeType===1&&++l&&c===t){w[n]=[v,a,l];break}}else if(g&&(c=t,y=c[e]||(c[e]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),p=w[n]||[],a=p[0]===v&&p[1],l=a),l===!1)while(c=++a&&c&&c[k]||(l=a=0)||b.pop())if((f?c.nodeName.toLowerCase()===nt:c.nodeType===1)&&++l&&(g&&(y=c[e]||(c[e]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),w[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var f,r=t.pseudos[n]||t.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return r[e]?r(i):r.length>1?(f=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?l(function(n,t){for(var u,f=r(n,i),e=f.length;e--;)u=nt(n,f[e]),n[u]=!(t[u]=f[e])}):function(n){return r(n,0,f)}):r}},pseudos:{not:l(function(n){var t=[],r=[],i=wt(n.replace(at,"$1"));return i[e]?l(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:l(function(n){return function(t){return u(n,t).length>0}}),contains:l(function(n){return n=n.replace(y,p),function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:l(function(n){return yi.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||i.indexOf(n+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===i.activeElement&&(!i.hasFocus||i.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&!!n.checked||t==="option"&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return or.test(n.nodeName)},input:function(n){return er.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return t==="input"&&n.type==="button"||t==="button"},text:function(n){var t;return n.nodeName.toLowerCase()==="input"&&n.type==="text"&&((t=n.getAttribute("type"))==null||t.toLowerCase()==="text")},first:it(function(){return[0]}),last:it(function(n,t){return[t-1]}),eq:it(function(n,t,i){return[i<0?i+t:i]}),even:it(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:it(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:it(function(n,t,i){for(var r=i<0?i+t:i;--r>=0;)n.push(r);return n}),gt:it(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(rt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[rt]=cr(rt);for(rt in{submit:!0,reset:!0})t.pseudos[rt]=lr(rt);return bi.prototype=t.filters=t.pseudos,t.setFilters=new bi,ft=u.tokenize=function(n,i){var e,f,s,o,r,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(r=n,h=[],c=t.preFilter;r;){(!e||(f=ir.exec(r)))&&(f&&(r=r.slice(f[0].length)||r),h.push(s=[]));e=!1;(f=rr.exec(r))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),r=r.slice(e.length));for(o in t.filter)(f=vt[o].exec(r))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),r=r.slice(e.length));if(!e)break}return i?r.length:r?u.error(n):ci(n,h).slice(0)},wt=u.compile=function(n,t){var r,u=[],f=[],i=lt[n+" "];if(!i){for(t||(t=ft(n)),r=t.length;r--;)i=ei(t[r]),i[e]?u.push(i):f.push(i);i=lt(n,vr(f,u));i.selector=n}return i},si=u.select=function(n,i,r,u){var s,e,o,a,v,l=typeof n=="function"&&n,c=!u&&ft(n=l.selector||n);if(r=r||[],c.length===1){if(e=c[0]=c[0].slice(0),e.length>2&&(o=e[0]).type==="ID"&&f.getById&&i.nodeType===9&&h&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(y,p),i)||[])[0],i)l&&(i=i.parentNode);else return r;n=n.slice(e.shift().value.length)}for(s=vt.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[a=o.type])break;if((v=t.find[a])&&(u=v(o.matches[0].replace(y,p),gt.test(e[0].type)&&ii(i.parentNode)||i))){if(e.splice(s,1),n=u.length&&yt(e),!n)return k.apply(r,u),r;break}}}return(l||wt(n,c))(u,i,!h,r,!i||gt.test(n)&&ii(i.parentNode)||i),r},f.sortStable=e.split("").sort(bt).join("")===e,f.detectDuplicates=!!ut,b(),f.sortDetached=a(function(n){return n.compareDocumentPosition(i.createElement("div"))&1}),a(function(n){return n.innerHTML="<a href='#'><\/a>",n.firstChild.getAttribute("href")==="#"})||ti("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,t.toLowerCase()==="type"?1:2)}),f.attributes&&a(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),n.firstChild.getAttribute("value")===""})||ti("value",function(n,t,i){if(!i&&n.nodeName.toLowerCase()==="input")return n.defaultValue}),a(function(n){return n.getAttribute("disabled")==null})||ti(kt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),u}(n);i.find=p;i.expr=p.selectors;i.expr[":"]=i.expr.pseudos;i.uniqueSort=i.unique=p.uniqueSort;i.text=p.getText;i.isXMLDoc=p.isXML;i.contains=p.contains;var d=function(n,t,r){for(var u=[],f=r!==undefined;(n=n[t])&&n.nodeType!==9;)if(n.nodeType===1){if(f&&i(n).is(r))break;u.push(n)}return u},tr=function(n,t){for(var i=[];n;n=n.nextSibling)n.nodeType===1&&n!==t&&i.push(n);return i},ir=i.expr.match.needsContext,rr=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,bf=/^.[^:#\[\.,]*$/;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),t.length===1&&u.nodeType===1?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return n.nodeType===1}))};i.fn.extend({find:function(n){var t,u=this.length,r=[],f=this;if(typeof n!="string")return this.pushStack(i(n).filter(function(){for(t=0;t<u;t++)if(i.contains(f[t],this))return!0}));for(t=0;t<u;t++)i.find(n,f[t],r);return r=this.pushStack(u>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ri(this,n||[],!1))},not:function(n){return this.pushStack(ri(this,n||[],!0))},is:function(n){return!!ri(this,typeof n=="string"&&ir.test(n)?i(n):n||[],!1).length}});fr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;er=i.fn.init=function(n,t,r){var f,e;if(!n)return this;if(r=r||ur,typeof n=="string"){if(f=n[0]==="<"&&n[n.length-1]===">"&&n.length>=3?[null,n,null]:fr.exec(n),f&&(f[1]||!t)){if(f[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(f[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),rr.test(f[1])&&i.isPlainObject(t))for(f in t)i.isFunction(this[f])?this[f](t[f]):this.attr(f,t[f]);return this}return e=u.getElementById(f[2]),e&&e.parentNode&&(this.length=1,this[0]=e),this.context=u,this.selector=n,this}return!t||t.jquery?(t||r).find(n):this.constructor(t).find(n)}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?r.ready!==undefined?r.ready(n):n(i):(n.selector!==undefined&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};er.prototype=i.fn;ur=i(u);or=/^(?:parents|prev(?:Until|All))/;sr={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({has:function(n){var t=i(n,this),r=t.length;return this.filter(function(){for(var n=0;n<r;n++)if(i.contains(this,t[n]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=ir.test(n)||typeof n!="string"?i(n,t||this.context):0;f<o;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:r.nodeType===1&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.uniqueSort(u):u)},index:function(n){return n?typeof n=="string"?lt.call(i(n),this[0]):lt.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.uniqueSort(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&t.nodeType!==11?t:null},parents:function(n){return d(n,"parentNode")},parentsUntil:function(n,t,i){return d(n,"parentNode",i)},next:function(n){return hr(n,"nextSibling")},prev:function(n){return hr(n,"previousSibling")},nextAll:function(n){return d(n,"nextSibling")},prevAll:function(n){return d(n,"previousSibling")},nextUntil:function(n,t,i){return d(n,"nextSibling",i)},prevUntil:function(n,t,i){return d(n,"previousSibling",i)},siblings:function(n){return tr((n.parentNode||{}).firstChild,n)},children:function(n){return tr(n.firstChild)},contents:function(n){return n.contentDocument||i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return n.slice(-5)!=="Until"&&(u=r),u&&typeof u=="string"&&(f=i.filter(u,f)),this.length>1&&(sr[n]||i.uniqueSort(f),or.test(n)&&f.reverse()),this.pushStack(f)}});h=/\S+/g;i.Callbacks=function(n){n=typeof n=="string"?kf(n):i.extend({},n);var o,r,h,f,t=[],e=[],u=-1,c=function(){for(f=n.once,h=o=!0;e.length;u=-1)for(r=e.shift();++u<t.length;)t[u].apply(r[0],r[1])===!1&&n.stopOnFalse&&(u=t.length,r=!1);n.memory||(r=!1);o=!1;f&&(t=r?[]:"")},s={add:function(){return t&&(r&&!o&&(u=t.length-1,e.push(r)),function f(r){i.each(r,function(r,u){i.isFunction(u)?n.unique&&s.has(u)||t.push(u):u&&u.length&&i.type(u)!=="string"&&f(u)})}(arguments),r&&!o&&c()),this},remove:function(){return i.each(arguments,function(n,r){for(var f;(f=i.inArray(r,t,f))>-1;)t.splice(f,1),f<=u&&u--}),this},has:function(n){return n?i.inArray(n,t)>-1:t.length>0},empty:function(){return t&&(t=[]),this},disable:function(){return f=e=[],t=r="",this},disabled:function(){return!t},lock:function(){return f=e=[],r||(t=r=""),this},locked:function(){return!!f},fireWith:function(n,t){return f||(t=t||[],t=[n,t.slice?t.slice():t],e.push(t),o||c()),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().progress(f.notify).done(f.resolve).fail(f.reject):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return n!=null?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[n^1][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=v.call(arguments),r=u.length,e=r!==1||n&&i.isFunction(n.promise)?r:0,f=e===1?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?v.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);t<r;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().progress(h(t,c,o)).done(h(t,s,u)).fail(f.reject):--e;return e||f.resolveWith(s,u),f.promise()}});i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){(n===!0?--i.readyWait:i.isReady)||(i.isReady=!0,n!==!0&&--i.readyWait>0)||(vt.resolveWith(u,[i]),i.fn.triggerHandler&&(i(u).triggerHandler("ready"),i(u).off("ready")))}});i.ready.promise=function(t){return vt||(vt=i.Deferred(),u.readyState!=="complete"&&(u.readyState==="loading"||u.documentElement.doScroll)?(u.addEventListener("DOMContentLoaded",yt),n.addEventListener("load",yt)):n.setTimeout(i.ready)),vt.promise(t)};i.ready.promise();a=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=r==null;if(i.type(r)==="object"){f=!0;for(s in r)a(n,t,s,r[s],!0,e,o)}else if(u!==undefined&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;s<c;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e};g=function(n){return n.nodeType===1||n.nodeType===9||!+n.nodeType};et.uid=1;et.prototype={register:function(n,t){var i=t||{};return n.nodeType?n[this.expando]=i:Object.defineProperty(n,this.expando,{value:i,writable:!0,configurable:!0}),n[this.expando]},cache:function(n){if(!g(n))return{};var t=n[this.expando];return t||(t={},g(n)&&(n.nodeType?n[this.expando]=t:Object.defineProperty(n,this.expando,{value:t,configurable:!0}))),t},set:function(n,t,i){var r,u=this.cache(n);if(typeof t=="string")u[t]=i;else for(r in t)u[r]=t[r];return u},get:function(n,t){return t===undefined?this.cache(n):n[this.expando]&&n[this.expando][t]},access:function(n,t,r){var u;return t===undefined||t&&typeof t=="string"&&r===undefined?(u=this.get(n,t),u!==undefined?u:this.get(n,i.camelCase(t))):(this.set(n,t,r),r!==undefined?r:t)},remove:function(n,t){var f,r,e,u=n[this.expando];if(u!==undefined){if(t===undefined)this.register(n);else for(i.isArray(t)?r=t.concat(t.map(i.camelCase)):(e=i.camelCase(t),t in u?r=[t,e]:(r=e,r=r in u?[r]:r.match(h)||[])),f=r.length;f--;)delete u[r[f]];(t===undefined||i.isEmptyObject(u))&&(n.nodeType?n[this.expando]=undefined:delete n[this.expando])}},hasData:function(n){var t=n[this.expando];return t!==undefined&&!i.isEmptyObject(t)}};var r=new et,e=new et,df=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,cr=/[A-Z]/g;i.extend({hasData:function(n){return e.hasData(n)||r.hasData(n)},data:function(n,t,i){return e.access(n,t,i)},removeData:function(n,t){e.remove(n,t)},_data:function(n,t,i){return r.access(n,t,i)},_removeData:function(n,t){r.remove(n,t)}});i.fn.extend({data:function(n,t){var o,f,s,u=this[0],h=u&&u.attributes;if(n===undefined){if(this.length&&(s=e.get(u),u.nodeType===1&&!r.get(u,"hasDataAttrs"))){for(o=h.length;o--;)h[o]&&(f=h[o].name,f.indexOf("data-")===0&&(f=i.camelCase(f.slice(5)),lr(u,f,s[f])));r.set(u,"hasDataAttrs",!0)}return s}return typeof n=="object"?this.each(function(){e.set(this,n)}):a(this,function(t){var r,f;if(u&&t===undefined)return(r=e.get(u,n)||e.get(u,n.replace(cr,"-$&").toLowerCase()),r!==undefined)?r:(f=i.camelCase(n),r=e.get(u,f),r!==undefined)?r:(r=lr(u,f,undefined),r!==undefined)?r:void 0;f=i.camelCase(n);this.each(function(){var i=e.get(this,f);e.set(this,f,t);n.indexOf("-")>-1&&i!==undefined&&e.set(this,n,t)})},null,t,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){e.remove(this,n)})}});i.extend({queue:function(n,t,u){var f;if(n)return t=(t||"fx")+"queue",f=r.get(n,t),u&&(!f||i.isArray(u)?f=r.access(n,t,i.makeArray(u)):f.push(u)),f||[]},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};u==="inprogress"&&(u=r.shift(),e--);u&&(t==="fx"&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var u=t+"queueHooks";return r.get(n,u)||r.access(n,u,{empty:i.Callbacks("once memory").add(function(){r.remove(n,[t+"queue",u])})})}});i.fn.extend({queue:function(n,t){var r=2;return(typeof n!="string"&&(t=n,n="fx",r--),arguments.length<r)?i.queue(this[0],n):t===undefined?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);n==="fx"&&r[0]!=="inprogress"&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for(typeof n!="string"&&(t=n,n=undefined),n=n||"fx";s--;)u=r.get(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(t)}});var ar=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ot=new RegExp("^(?:([+-])=|)("+ar+")([a-z%]*)$","i"),w=["Top","Right","Bottom","Left"],st=function(n,t){return n=t||n,i.css(n,"display")==="none"||!i.contains(n.ownerDocument,n)};var yr=/^(?:checkbox|radio)$/i,pr=/<([\w:-]+)/,wr=/^$|\/(?:java|ecma)script/i,c={option:[1,"<select multiple='multiple'>","<\/select>"],thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};c.optgroup=c.option;c.tbody=c.tfoot=c.colgroup=c.caption=c.thead;c.th=c.td;br=/<|&#?\w+;/,function(){var i=u.createDocumentFragment(),n=i.appendChild(u.createElement("div")),t=u.createElement("input");t.setAttribute("type","radio");t.setAttribute("checked","checked");t.setAttribute("name","t");n.appendChild(t);f.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked;n.innerHTML="<textarea>x<\/textarea>";f.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue}();var gf=/^key/,ne=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,dr=/^([^.]*)(?:\.(.+)|)/;i.event={global:{},add:function(n,t,u,f,e){var v,y,w,p,b,c,s,l,o,k,d,a=r.get(n);if(a)for(u.handler&&(v=u,u=v.handler,e=v.selector),u.guid||(u.guid=i.guid++),(p=a.events)||(p=a.events={}),(y=a.handle)||(y=a.handle=function(t){return typeof i!="undefined"&&i.event.triggered!==t.type?i.event.dispatch.apply(n,arguments):undefined}),t=(t||"").match(h)||[""],b=t.length;b--;)(w=dr.exec(t[b])||[],o=d=w[1],k=(w[2]||"").split(".").sort(),o)&&(s=i.event.special[o]||{},o=(e?s.delegateType:s.bindType)||o,s=i.event.special[o]||{},c=i.extend({type:o,origType:d,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:k.join(".")},v),(l=p[o])||(l=p[o]=[],l.delegateCount=0,s.setup&&s.setup.call(n,f,k,y)!==!1||n.addEventListener&&n.addEventListener(o,y)),s.add&&(s.add.call(n,c),c.handler.guid||(c.handler.guid=u.guid)),e?l.splice(l.delegateCount++,0,c):l.push(c),i.event.global[o]=!0)},remove:function(n,t,u,f,e){var y,k,c,v,p,s,l,a,o,b,d,w=r.hasData(n)&&r.get(n);if(w&&(v=w.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;){if(c=dr.exec(t[p])||[],o=d=c[1],b=(c[2]||"").split(".").sort(),!o){for(o in v)i.event.remove(n,o+t[p],u,f,!0);continue}for(l=i.event.special[o]||{},o=(f?l.delegateType:l.bindType)||o,a=v[o]||[],c=c[2]&&new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"),k=y=a.length;y--;)s=a[y],(e||d===s.origType)&&(!u||u.guid===s.guid)&&(!c||c.test(s.namespace))&&(!f||f===s.selector||f==="**"&&s.selector)&&(a.splice(y,1),s.selector&&a.delegateCount--,l.remove&&l.remove.call(n,s));k&&!a.length&&(l.teardown&&l.teardown.call(n,b,w.handle)!==!1||i.removeEvent(n,o,w.handle),delete v[o])}i.isEmptyObject(v)&&r.remove(n,"handle events")}},dispatch:function(n){n=i.event.fix(n);var o,s,e,u,t,h=[],c=v.call(arguments),l=(r.get(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(c[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(h=i.event.handlers.call(this,n,l),o=0;(u=h[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(t=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.rnamespace||n.rnamespace.test(t.namespace))&&(n.handleObj=t,n.data=t.data,e=((i.event.special[t.origType]||{}).handle||t.handler).apply(u.elem,c),e!==undefined&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,t){var e,u,f,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(n.type!=="click"||isNaN(n.button)||n.button<1))for(;r!==this;r=r.parentNode||this)if(r.nodeType===1&&(r.disabled!==!0||n.type!=="click")){for(u=[],e=0;e<s;e++)o=t[e],f=o.selector+" ",u[f]===undefined&&(u[f]=o.needsContext?i(f,this).index(r)>-1:i.find(f,this,null,[r]).length),u[f]&&u.push(o);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return n.which==null&&(n.which=t.charCode!=null?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var e,i,r,f=t.button;return n.pageX==null&&t.clientX!=null&&(e=n.target.ownerDocument||u,i=e.documentElement,r=e.body,n.pageX=t.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),n.pageY=t.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),n.which||f===undefined||(n.which=f&1?1:f&2?3:f&4?2:0),n}},fix:function(n){if(n[i.expando])return n;var f,e,o,r=n.type,s=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=ne.test(r)?this.mouseHooks:gf.test(r)?this.keyHooks:{}),o=t.props?this.props.concat(t.props):this.props,n=new i.Event(s),f=o.length;f--;)e=o[f],n[e]=s[e];return n.target||(n.target=u),n.target.nodeType===3&&(n.target=n.target.parentNode),t.filter?t.filter(n,s):n},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==gr()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===gr()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&i.nodeName(this,"input"))return this.click(),!1},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){n.result!==undefined&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}}};i.removeEvent=function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i)};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.defaultPrevented===undefined&&n.returnValue===!1?pt:nt):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||i.now();this[i.expando]=!0};i.Event.prototype={constructor:i.Event,isDefaultPrevented:nt,isPropagationStopped:nt,isImmediatePropagationStopped:nt,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=pt;n&&n.preventDefault()},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=pt;n&&n.stopPropagation()},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=pt;n&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return r&&(r===f||i.contains(f,r))||(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.fn.extend({on:function(n,t,i,r){return fi(this,n,t,i,r)},one:function(n,t,i,r){return fi(this,n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if(typeof n=="object"){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||typeof t=="function")&&(r=t,t=undefined),r===!1&&(r=nt),this.each(function(){i.event.remove(this,n,r,t)})}});var te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ie=/<script|<style|<link/i,re=/checked\s*(?:[^=]|=\s*.checked.)/i,ue=/^true\/(.*)/,fe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;i.extend({htmlPrefilter:function(n){return n.replace(te,"<$1><\/$2>")},clone:function(n,t,r){var u,c,s,e,h=n.cloneNode(!0),l=i.contains(n.ownerDocument,n);if(!f.noCloneChecked&&(n.nodeType===1||n.nodeType===11)&&!i.isXMLDoc(n))for(e=o(h),s=o(n),u=0,c=s.length;u<c;u++)se(s[u],e[u]);if(t)if(r)for(s=s||o(n),e=e||o(h),u=0,c=s.length;u<c;u++)tu(s[u],e[u]);else tu(n,h);return e=o(h,"script"),e.length>0&&ui(e,!l&&o(n,"script")),h},cleanData:function(n){for(var u,t,f,s=i.event.special,o=0;(t=n[o])!==undefined;o++)if(g(t)){if(u=t[r.expando]){if(u.events)for(f in u.events)s[f]?i.event.remove(t,f):i.removeEvent(t,f,u.handle);t[r.expando]=undefined}t[e.expando]&&(t[e.expando]=undefined)}}});i.fn.extend({domManip:b,detach:function(n){return iu(this,n,!0)},remove:function(n){return iu(this,n)},text:function(n){return a(this,function(n){return n===undefined?i.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=n)})},null,n,arguments.length)},append:function(){return b(this,arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=nu(this,n);t.appendChild(n)}})},prepend:function(){return b(this,arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=nu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return b(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return b(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},empty:function(){for(var n,t=0;(n=this[t])!=null;t++)n.nodeType===1&&(i.cleanData(o(n,!1)),n.textContent="");return this},clone:function(n,t){return n=n==null?!1:n,t=t==null?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return a(this,function(n){var t=this[0]||{},r=0,u=this.length;if(n===undefined&&t.nodeType===1)return t.innerHTML;if(typeof n=="string"&&!ie.test(n)&&!c[(pr.exec(n)||["",""])[1].toLowerCase()]){n=i.htmlPrefilter(n);try{for(;r<u;r++)t=this[r]||{},t.nodeType===1&&(i.cleanData(o(t,!1)),t.innerHTML=n);t=0}catch(f){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=[];return b(this,arguments,function(t){var r=this.parentNode;i.inArray(this,n)<0&&(i.cleanData(o(this)),r&&r.replaceChild(t,this))},n)}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,f=[],e=i(n),o=e.length-1,r=0;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ti.apply(f,u.get());return this.pushStack(f)}});ei={HTML:"block",BODY:"block"};var uu=/^margin/,si=new RegExp("^("+ar+")(?!px)[a-z%]+$","i"),bt=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=n),i.getComputedStyle(t)},hi=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f},ht=u.documentElement;(function(){function o(){t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%";t.innerHTML="";ht.appendChild(r);var i=n.getComputedStyle(t);s=i.top!=="1%";c=i.marginLeft==="2px";e=i.width==="4px";t.style.marginRight="50%";h=i.marginRight==="4px";ht.removeChild(r)}var s,e,h,c,r=u.createElement("div"),t=u.createElement("div");t.style&&(t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle=t.style.backgroundClip==="content-box",r.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",r.appendChild(t),i.extend(f,{pixelPosition:function(){return o(),s},boxSizingReliable:function(){return e==null&&o(),e},pixelMarginRight:function(){return e==null&&o(),h},reliableMarginLeft:function(){return e==null&&o(),c},reliableMarginRight:function(){var f,i=t.appendChild(u.createElement("div"));return i.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",t.style.width="1px",ht.appendChild(r),f=!parseFloat(n.getComputedStyle(i).marginRight),ht.removeChild(r),t.removeChild(i),f}}))})();var he=/^(none|table(?!-c[ea]).+)/,ce={position:"absolute",visibility:"hidden",display:"block"},fu={letterSpacing:"0",fontWeight:"400"},eu=["Webkit","O","Moz","ms"],ou=u.createElement("div").style;i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=tt(n,"opacity");return i===""?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(n,t,r,u){if(n&&n.nodeType!==3&&n.nodeType!==8&&n.style){var e,h,o,s=i.camelCase(t),c=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=su(s)||s),o=i.cssHooks[t]||i.cssHooks[s],r!==undefined){if(h=typeof r,h==="string"&&(e=ot.exec(r))&&e[1]&&(r=vr(n,t,e),h="number"),r==null||r!==r)return;h==="number"&&(r+=e&&e[3]||(i.cssNumber[s]?"":"px"));f.clearCloneStyle||r!==""||t.indexOf("background")!==0||(c[t]="inherit");o&&"set"in o&&(r=o.set(n,r,u))===undefined||(c[t]=r)}else return o&&"get"in o&&(e=o.get(n,!1,u))!==undefined?e:c[t]}},css:function(n,t,r,u){var f,s,o,e=i.camelCase(t);return(t=i.cssProps[e]||(i.cssProps[e]=su(e)||e),o=i.cssHooks[t]||i.cssHooks[e],o&&"get"in o&&(f=o.get(n,!0,r)),f===undefined&&(f=tt(n,t,u)),f==="normal"&&t in fu&&(f=fu[t]),r===""||r)?(s=parseFloat(f),r===!0||isFinite(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return he.test(i.css(n,"display"))&&n.offsetWidth===0?hi(n,ce,function(){return lu(n,t,u)}):lu(n,t,u)},set:function(n,r,u){var f,e=u&&bt(n),o=u&&cu(n,t,u,i.css(n,"boxSizing",!1,e)==="border-box",e);return o&&(f=ot.exec(r))&&(f[3]||"px")!=="px"&&(n.style[t]=r,r=i.css(n,t)),hu(n,r,o)}}});i.cssHooks.marginLeft=ci(f.reliableMarginLeft,function(n,t){if(t)return(parseFloat(tt(n,"marginLeft"))||n.getBoundingClientRect().left-hi(n,{marginLeft:0},function(){return n.getBoundingClientRect().left}))+"px"});i.cssHooks.marginRight=ci(f.reliableMarginRight,function(n,t){if(t)return hi(n,{display:"inline-block"},tt,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u=typeof i=="string"?i.split(" "):[i];r<4;r++)f[n+w[r]+t]=u[r]||u[r-2]||u[0];return f}};uu.test(n)||(i.cssHooks[n+t].set=hu)});i.fn.extend({css:function(n,t){return a(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=bt(n),e=t.length;u<e;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return r!==undefined?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return au(this,!0)},hide:function(){return au(this)},toggle:function(n){return typeof n=="boolean"?n?this.show():this.hide():this.each(function(){st(this)?i(this).show():i(this).hide()})}});i.Tween=s;s.prototype={constructor:s,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||i.easing._default;this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=s.propHooks[this.prop];return n&&n.get?n.get(this):s.propHooks._default.get(this)},run:function(n){var t,r=s.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):s.propHooks._default.set(this),this}};s.prototype.init.prototype=s.prototype;s.propHooks={_default:{get:function(n){var t;return n.elem.nodeType!==1||n.elem[n.prop]!=null&&n.elem.style[n.prop]==null?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""),!t||t==="auto"?0:t)},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.nodeType===1&&(n.elem.style[i.cssProps[n.prop]]!=null||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};s.propHooks.scrollTop=s.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},_default:"swing"};i.fx=s.prototype.init;i.fx.step={};vu=/^(?:toggle|show|hide)$/;yu=/queueHooks$/;i.Animation=i.extend(l,{tweeners:{"*":[function(n,t){var i=this.createTween(n,t);return vr(i.elem,n,ot.exec(t),i),i}]},tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.match(h);for(var r,u=0,f=n.length;u<f;u++)r=n[u],l.tweeners[r]=l.tweeners[r]||[],l.tweeners[r].unshift(t)},prefilters:[le],prefilter:function(n,t){t?l.prefilters.unshift(n):l.prefilters.push(n)}});i.speed=function(n,t,r){var u=n&&typeof n=="object"?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:typeof u.duration=="number"?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(u.queue==null||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(st).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,u,f){var s=i.isEmptyObject(n),o=i.speed(t,u,f),e=function(){var t=l(this,i.extend({},n),o);(s||r.get(this,"finish"))&&t.stop(!0)};return e.finish=e,s||o.queue===!1?this.each(e):this.queue(o.queue,e)},stop:function(n,t,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return typeof n!="string"&&(u=t,t=n,n=undefined),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var s=!0,t=n!=null&&n+"queueHooks",o=i.timers,e=r.get(this);if(t)e[t]&&e[t].stop&&f(e[t]);else for(t in e)e[t]&&e[t].stop&&yu.test(t)&&f(e[t]);for(t=o.length;t--;)o[t].elem===this&&(n==null||o[t].queue===n)&&(o[t].anim.stop(u),s=!1,o.splice(t,1));(s||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,e=r.get(this),u=e[n+"queue"],o=e[n+"queueHooks"],f=i.timers,s=u?u.length:0;for(e.finish=!0,i.queue(this,n,[]),o&&o.stop&&o.stop.call(this,!0),t=f.length;t--;)f[t].elem===this&&f[t].queue===n&&(f[t].anim.stop(!0),f.splice(t,1));for(t=0;t<s;t++)u[t]&&u[t].finish&&u[t].finish.call(this);delete e.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return n==null||typeof n=="boolean"?r.apply(this,arguments):this.animate(dt(t,!0),n,i,u)}});i.each({slideDown:dt("show"),slideUp:dt("hide"),slideToggle:dt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=0,t=i.timers;for(it=i.now();n<t.length;n++)r=t[n],r()||t[n]!==r||t.splice(n--,1);t.length||i.fx.stop();it=undefined};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){kt||(kt=n.setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){n.clearInterval(kt);kt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(t,r){return t=i.fx?i.fx.speeds[t]||t:t,r=r||"fx",this.queue(r,function(i,r){var u=n.setTimeout(i,t);r.stop=function(){n.clearTimeout(u)}})},function(){var n=u.createElement("input"),t=u.createElement("select"),i=t.appendChild(u.createElement("option"));n.type="checkbox";f.checkOn=n.value!=="";f.optSelected=i.selected;t.disabled=!0;f.optDisabled=!i.disabled;n=u.createElement("input");n.value="t";n.type="radio";f.radioValue=n.value==="t"}();rt=i.expr.attrHandle;i.fn.extend({attr:function(n,t){return a(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(e!==3&&e!==8&&e!==2){if(typeof n.getAttribute=="undefined")return i.prop(n,t,r);if(e===1&&i.isXMLDoc(n)||(t=t.toLowerCase(),f=i.attrHooks[t]||(i.expr.match.bool.test(t)?bu:undefined)),r!==undefined){if(r===null){i.removeAttr(n,t);return}return f&&"set"in f&&(u=f.set(n,r,t))!==undefined?u:(n.setAttribute(t,r+""),r)}return f&&"get"in f&&(u=f.get(n,t))!==null?u:(u=i.find.attr(n,t),u==null?undefined:u)}},attrHooks:{type:{set:function(n,t){if(!f.radioValue&&t==="radio"&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&n.nodeType===1)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)&&(n[u]=!1),n.removeAttribute(r)}});bu={set:function(n,t,r){return t===!1?i.removeAttr(n,r):n.setAttribute(r,r),r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=rt[t]||i.find.attr;rt[t]=function(n,t,i){var u,f;return i||(f=rt[t],rt[t]=u,u=r(n,t,i)!=null?t.toLowerCase():null,rt[t]=f),u}});ku=/^(?:input|select|textarea|button)$/i;du=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return a(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return this.each(function(){delete this[i.propFix[n]||n]})}});i.extend({prop:function(n,t,r){var f,u,e=n.nodeType;if(e!==3&&e!==8&&e!==2)return(e===1&&i.isXMLDoc(n)||(t=i.propFix[t]||t,u=i.propHooks[t]),r!==undefined)?u&&"set"in u&&(f=u.set(n,r,t))!==undefined?f:n[t]=r:u&&"get"in u&&(f=u.get(n,t))!==null?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):ku.test(n.nodeName)||du.test(n.nodeName)&&n.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}});f.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(n){var t=n.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});gt=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,r,t,u,f,s,e,c=0;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,k(this)))});if(typeof n=="string"&&n)for(o=n.match(h)||[];r=this[c++];)if(u=k(r),t=r.nodeType===1&&(" "+u+" ").replace(gt," "),t){for(s=0;f=o[s++];)t.indexOf(" "+f+" ")<0&&(t+=f+" ");e=i.trim(t);u!==e&&r.setAttribute("class",e)}return this},removeClass:function(n){var o,r,t,u,f,s,e,c=0;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,k(this)))});if(!arguments.length)return this.attr("class","");if(typeof n=="string"&&n)for(o=n.match(h)||[];r=this[c++];)if(u=k(r),t=r.nodeType===1&&(" "+u+" ").replace(gt," "),t){for(s=0;f=o[s++];)while(t.indexOf(" "+f+" ")>-1)t=t.replace(" "+f+" "," ");e=i.trim(t);u!==e&&r.setAttribute("class",e)}return this},toggleClass:function(n,t){var u=typeof n;return typeof t=="boolean"&&u==="string"?t?this.addClass(n):this.removeClass(n):i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,k(this),t),t)}):this.each(function(){var t,e,f,o;if(u==="string")for(e=0,f=i(this),o=n.match(h)||[];t=o[e++];)f.hasClass(t)?f.removeClass(t):f.addClass(t);else(n===undefined||u==="boolean")&&(t=k(this),t&&r.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||n===!1?"":r.get(this,"__className__")||""))})},hasClass:function(n){for(var t,r=0,i=" "+n+" ";t=this[r++];)if(t.nodeType===1&&(" "+k(t)+" ").replace(gt," ").indexOf(i)>-1)return!0;return!1}});gu=/\r/g;nf=/[\x20\t\r\n\f]+/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;this.nodeType===1&&(u=f?n.call(this,r,i(this).val()):n,u==null?u="":typeof u=="number"?u+="":i.isArray(u)&&(u=i.map(u,function(n){return n==null?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,u,"value")!==undefined||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&(r=t.get(u,"value"))!==undefined)?r:(r=u.value,typeof r=="string"?r.replace(gu,""):r==null?"":r):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return t!=null?t:i.trim(i.text(n)).replace(nf," ")}},select:{get:function(n){for(var o,t,s=n.options,r=n.selectedIndex,u=n.type==="select-one"||r<0,h=u?null:[],c=u?r+1:s.length,e=r<0?c:u?r:0;e<c;e++)if(t=s[e],(t.selected||e===r)&&(f.optDisabled?!t.disabled:t.getAttribute("disabled")===null)&&(!t.parentNode.disabled||!i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),u)return o;h.push(o)}return h},set:function(n,t){for(var u,r,f=n.options,e=i.makeArray(t),o=f.length;o--;)r=f[o],(r.selected=i.inArray(i.valHooks.option.get(r),e)>-1)&&(u=!0);return u||(n.selectedIndex=-1),e}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>-1}};f.checkOn||(i.valHooks[this].get=function(n){return n.getAttribute("value")===null?"on":n.value})});li=/^(?:focusinfocus|focusoutblur)$/;i.extend(i.event,{trigger:function(t,f,e,o){var w,s,c,b,a,v,l,p=[e||u],h=ft.call(t,"type")?t.type:t,y=ft.call(t,"namespace")?t.namespace.split("."):[];if((s=c=e=e||u,e.nodeType!==3&&e.nodeType!==8)&&!li.test(h+i.event.triggered)&&(h.indexOf(".")>-1&&(y=h.split("."),h=y.shift(),y.sort()),a=h.indexOf(":")<0&&"on"+h,t=t[i.expando]?t:new i.Event(h,typeof t=="object"&&t),t.isTrigger=o?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=e),f=f==null?[t]:i.makeArray(f,[t]),l=i.event.special[h]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(b=l.delegateType||h,li.test(b+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(e.ownerDocument||u)&&p.push(c.defaultView||c.parentWindow||n)}for(w=0;(s=p[w++])&&!t.isPropagationStopped();)t.type=w>1?b:l.bindType||h,v=(r.get(s,"events")||{})[t.type]&&r.get(s,"handle"),v&&v.apply(s,f),v=a&&s[a],v&&v.apply&&g(s)&&(t.result=v.apply(s,f),t.result===!1&&t.preventDefault());return t.type=h,o||t.isDefaultPrevented()||(!l._default||l._default.apply(p.pop(),f)===!1)&&g(e)&&a&&i.isFunction(e[h])&&!i.isWindow(e)&&(c=e[a],c&&(e[a]=null),i.event.triggered=h,e[h](),i.event.triggered=undefined,c&&(e[a]=c)),t.result}},simulate:function(n,t,r){var u=i.extend(new i.Event,r,{type:n,isSimulated:!0});i.event.trigger(u,null,t);u.isDefaultPrevented()&&r.preventDefault()}});i.fn.extend({trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}});f.focusin="onfocusin"in n;f.focusin||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=function(n){i.event.simulate(t,n.target,i.event.fix(n))};i.event.special[t]={setup:function(){var i=this.ownerDocument||this,f=r.access(i,t);f||i.addEventListener(n,u,!0);r.access(i,t,(f||0)+1)},teardown:function(){var i=this.ownerDocument||this,f=r.access(i,t)-1;f?r.access(i,t,f):(i.removeEventListener(n,u,!0),r.remove(i,t))}}});var ct=n.location,ai=i.now(),vi=/\?/;i.parseJSON=function(n){return JSON.parse(n+"")};i.parseXML=function(t){var r;if(!t||typeof t!="string")return null;try{r=(new n.DOMParser).parseFromString(t,"text/xml")}catch(u){r=undefined}return(!r||r.getElementsByTagName("parsererror").length)&&i.error("Invalid XML: "+t),r};var ve=/#.*$/,tf=/([?&])_=[^&]*/,ye=/^(.*?):[ \t]*([^\r\n]*)$/mg,pe=/^(?:GET|HEAD)$/,we=/^\/\//,rf={},yi={},uf="*/".concat("*"),pi=u.createElement("a");pi.href=ct.href;i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":uf,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?wi(wi(n,i.ajaxSettings),t):wi(i.ajaxSettings,n)},ajaxPrefilter:ff(rf),ajaxTransport:ff(yi),ajax:function(t,r){function b(t,r,u,h){var v,rt,it,p,b,a=r;s!==2&&(s=2,d&&n.clearTimeout(d),l=undefined,k=h||"",e.readyState=t>0?4:0,v=t>=200&&t<300||t===304,u&&(p=be(f,e,u)),p=ke(f,p,e,v),v?(f.ifModified&&(b=e.getResponseHeader("Last-Modified"),b&&(i.lastModified[o]=b),b=e.getResponseHeader("etag"),b&&(i.etag[o]=b)),t===204||f.type==="HEAD"?a="nocontent":t===304?a="notmodified":(a=p.state,rt=p.data,it=p.error,v=!it)):(it=a,(t||!a)&&(a="error",t<0&&(t=0))),e.status=t,e.statusText=(r||a)+"",v?nt.resolveWith(c,[rt,a,e]):nt.rejectWith(c,[e,a,it]),e.statusCode(w),w=undefined,y&&g.trigger(v?"ajaxSuccess":"ajaxError",[e,f,v?rt:it]),tt.fireWith(c,[e,a]),y&&(g.trigger("ajaxComplete",[e,f]),--i.active||i.event.trigger("ajaxStop")))}typeof t=="object"&&(r=t,t=undefined);r=r||{};var l,o,k,p,d,a,y,v,f=i.ajaxSetup({},r),c=f.context||f,g=f.context&&(c.nodeType||c.jquery)?i(c):i.event,nt=i.Deferred(),tt=i.Callbacks("once memory"),w=f.statusCode||{},it={},rt={},s=0,ut="canceled",e={readyState:0,getResponseHeader:function(n){var t;if(s===2){if(!p)for(p={};t=ye.exec(k);)p[t[1].toLowerCase()]=t[2];t=p[n.toLowerCase()]}return t==null?null:t},getAllResponseHeaders:function(){return s===2?k:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return s||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return s||(f.mimeType=n),this},statusCode:function(n){var t;if(n)if(s<2)for(t in n)w[t]=[w[t],n[t]];else e.always(n[e.status]);return this},abort:function(n){var t=n||ut;return l&&l.abort(t),b(0,t),this}};if(nt.promise(e).complete=tt.add,e.success=e.done,e.error=e.fail,f.url=((t||f.url||ct.href)+"").replace(ve,"").replace(we,ct.protocol+"//"),f.type=r.method||r.type||f.method||f.type,f.dataTypes=i.trim(f.dataType||"*").toLowerCase().match(h)||[""],f.crossDomain==null){a=u.createElement("a");try{a.href=f.url;a.href=a.href;f.crossDomain=pi.protocol+"//"+pi.host!=a.protocol+"//"+a.host}catch(ft){f.crossDomain=!0}}if(f.data&&f.processData&&typeof f.data!="string"&&(f.data=i.param(f.data,f.traditional)),ef(rf,f,r,e),s===2)return e;y=i.event&&f.global;y&&i.active++==0&&i.event.trigger("ajaxStart");f.type=f.type.toUpperCase();f.hasContent=!pe.test(f.type);o=f.url;f.hasContent||(f.data&&(o=f.url+=(vi.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=tf.test(o)?o.replace(tf,"$1_="+ai++):o+(vi.test(o)?"&":"?")+"_="+ai++));f.ifModified&&(i.lastModified[o]&&e.setRequestHeader("If-Modified-Since",i.lastModified[o]),i.etag[o]&&e.setRequestHeader("If-None-Match",i.etag[o]));(f.data&&f.hasContent&&f.contentType!==!1||r.contentType)&&e.setRequestHeader("Content-Type",f.contentType);e.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", "+uf+"; q=0.01":""):f.accepts["*"]);for(v in f.headers)e.setRequestHeader(v,f.headers[v]);if(f.beforeSend&&(f.beforeSend.call(c,e,f)===!1||s===2))return e.abort();ut="abort";for(v in{success:1,error:1,complete:1})e[v](f[v]);if(l=ef(yi,f,r,e),l){if(e.readyState=1,y&&g.trigger("ajaxSend",[e,f]),s===2)return e;f.async&&f.timeout>0&&(d=n.setTimeout(function(){e.abort("timeout")},f.timeout));try{s=1;l.send(it,b)}catch(ft){if(s<2)b(-1,ft);else throw ft;}}else b(-1,"No Transport");return e},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,undefined,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=undefined),i.ajax(i.extend({url:n,type:t,dataType:f,data:r,success:u},i.isPlainObject(n)&&n))}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){var t;return i.isFunction(n)?this.each(function(t){i(this).wrapAll(n.call(this,t))}):(this[0]&&(t=i(n,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this)},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return!i.expr.filters.visible(n)};i.expr.filters.visible=function(n){return n.offsetWidth>0||n.offsetHeight>0||n.getClientRects().length>0};var de=/%20/g,ge=/\[\]$/,of=/\r?\n/g,no=/^(?:submit|button|image|reset|file)$/i,to=/^(?:input|select|textarea|keygen)/i;return i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():t==null?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(t===undefined&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)bi(r,n[r],t,f);return u.join("&").replace(de,"+")},i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&to.test(this.nodeName)&&!no.test(n)&&(this.checked||!yr.test(n))}).map(function(n,t){var r=i(this).val();return r==null?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(of,"\r\n")}}):{name:t.name,value:r.replace(of,"\r\n")}}).get()}}),i.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}},sf={0:200,1223:204},ut=i.ajaxSettings.xhr(),f.cors=!!ut&&"withCredentials"in ut,f.ajax=ut=!!ut,i.ajaxTransport(function(t){var i,r;if(f.cors||ut&&!t.crossDomain)return{send:function(u,f){var o,e=t.xhr();if(e.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)e[o]=t.xhrFields[o];t.mimeType&&e.overrideMimeType&&e.overrideMimeType(t.mimeType);t.crossDomain||u["X-Requested-With"]||(u["X-Requested-With"]="XMLHttpRequest");for(o in u)e.setRequestHeader(o,u[o]);i=function(n){return function(){i&&(i=r=e.onload=e.onerror=e.onabort=e.onreadystatechange=null,n==="abort"?e.abort():n==="error"?typeof e.status!="number"?f(0,"error"):f(e.status,e.statusText):f(sf[e.status]||e.status,e.statusText,(e.responseType||"text")!=="text"||typeof e.responseText!="string"?{binary:e.response}:{text:e.responseText},e.getAllResponseHeaders()))}};e.onload=i();r=e.onerror=i("error");e.onabort!==undefined?e.onabort=r:e.onreadystatechange=function(){e.readyState===4&&n.setTimeout(function(){i&&r()})};i=i("abort");try{e.send(t.hasContent&&t.data||null)}catch(s){if(i)throw s;}},abort:function(){i&&i()}}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){n.cache===undefined&&(n.cache=!1);n.crossDomain&&(n.type="GET")}),i.ajaxTransport("script",function(n){if(n.crossDomain){var r,t;return{send:function(f,e){r=i("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",t=function(n){r.remove();t=null;n&&e(n.type==="error"?404:200,n.type)});u.head.appendChild(r[0])},abort:function(){t&&t()}}}}),ki=[],ni=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=ki.pop()||i.expando+"_"+ai++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,e,o,s=t.jsonp!==!1&&(ni.test(t.url)?"url":typeof t.data=="string"&&(t.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&ni.test(t.data)&&"data");if(s||t.dataTypes[0]==="jsonp")return f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ni,"$1"+f):t.jsonp!==!1&&(t.url+=(vi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return o||i.error(f+" was not called"),o[0]},t.dataTypes[0]="json",e=n[f],n[f]=function(){o=arguments},u.always(function(){e===undefined?i(n).removeProp(f):n[f]=e;t[f]&&(t.jsonpCallback=r.jsonpCallback,ki.push(f));o&&i.isFunction(e)&&e(o[0]);o=e=undefined}),"script"}),i.parseHTML=function(n,t,r){if(!n||typeof n!="string")return null;typeof t=="boolean"&&(r=t,t=!1);t=t||u;var f=rr.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=kr([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))},di=i.fn.load,i.fn.load=function(n,t,r){if(typeof n!="string"&&di)return di.apply(this,arguments);var f,o,s,u=this,e=n.indexOf(" ");return e>-1&&(f=i.trim(n.slice(e)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=undefined):t&&typeof t=="object"&&(o="POST"),u.length>0&&i.ajax({url:n,type:o||"GET",dataType:"html",data:t}).done(function(n){s=arguments;u.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).always(r&&function(n,t){u.each(function(){r.apply(u,s||[n.responseText,t,n])})}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};l==="static"&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=(l==="absolute"||l==="fixed")&&(s+c).indexOf("auto")>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,i.extend({},u)));t.top!=null&&(f.top=t.top-u.top+h);t.left!=null&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return n===undefined?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,r=this[0],u={top:0,left:0},e=r&&r.ownerDocument;if(e)return(t=e.documentElement,!i.contains(t,r))?u:(u=r.getBoundingClientRect(),f=hf(e),{top:u.top+f.pageYOffset-t.clientTop,left:u.left+f.pageXOffset-t.clientLeft})},position:function(){if(this[0]){var n,r,u=this[0],t={top:0,left:0};return i.css(u,"position")==="fixed"?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent;n&&i.css(n,"position")==="static";)n=n.offsetParent;return n||ht})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r="pageYOffset"===t;i.fn[n]=function(i){return a(this,function(n,i,u){var f=hf(n);if(u===undefined)return f?f[t]:n[i];f?f.scrollTo(r?f.pageXOffset:u,r?u:f.pageYOffset):n[i]=u},n,i,arguments.length)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=ci(f.pixelPosition,function(n,r){if(r)return r=tt(n,t),si.test(r)?i(n).position()[t]+"px":r})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||typeof u!="boolean"),o=r||(u===!0||f===!0?"margin":"border");return a(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:t.nodeType===9?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):u===undefined?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:undefined,e,null)}})}),i.fn.extend({bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return arguments.length===1?this.off(n,"**"):this.off(t,n||"**",i)},size:function(){return this.length}}),i.fn.andSelf=i.fn.addBack,typeof define=="function"&&define.amd&&define("jquery",[],function(){return i}),cf=n.jQuery,lf=n.$,i.noConflict=function(t){return n.$===i&&(n.$=lf),t&&n.jQuery===i&&(n.jQuery=cf),i},t||(n.jQuery=n.$=i),i});
/*! jQuery UI - v1.10.4 - 2015-09-23
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.resizable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-clip.js, jquery.ui.effect-fade.js, jquery.ui.effect-scale.js
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
(function(n,t){function i(t,i){var u,f,e,o=t.nodeName.toLowerCase();return"area"===o?(u=t.parentNode,f=u.name,!t.href||!f||u.nodeName.toLowerCase()!=="map")?!1:(e=n("img[usemap=#"+f+"]")[0],!!e&&r(e)):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&r(t)}function r(t){return n.expr.filters.visible(t)&&!n(t).parents().addBack().filter(function(){return n.css(this,"visibility")==="hidden"}).length}var u=0,f=/^ui-id-\d+$/;n.ui=n.ui||{};n.extend(n.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});n.fn.extend({focus:function(t){return function(i,r){return typeof i=="number"?this.each(function(){var t=this;setTimeout(function(){n(t).focus();r&&r.call(t)},i)}):t.apply(this,arguments)}}(n.fn.focus),scrollParent:function(){var t;return t=n.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(n.css(this,"position"))&&/(auto|scroll)/.test(n.css(this,"overflow")+n.css(this,"overflow-y")+n.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(n.css(this,"overflow")+n.css(this,"overflow-y")+n.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?n(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var r=n(this[0]),u,f;r.length&&r[0]!==document;){if(u=r.css("position"),(u==="absolute"||u==="relative"||u==="fixed")&&(f=parseInt(r.css("zIndex"),10),!isNaN(f)&&f!==0))return f;r=r.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})},removeUniqueId:function(){return this.each(function(){f.test(this.id)&&n(this).removeAttr("id")})}});n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])},focusable:function(t){return i(t,!isNaN(n.attr(t,"tabindex")))},tabbable:function(t){var r=n.attr(t,"tabindex"),u=isNaN(r);return(u||r>=0)&&i(t,!u)}});n("<a>").outerWidth(1).jquery||n.each(["Width","Height"],function(i,r){function e(t,i,r,u){return n.each(o,function(){i-=parseFloat(n.css(t,"padding"+this))||0;r&&(i-=parseFloat(n.css(t,"border"+this+"Width"))||0);u&&(i-=parseFloat(n.css(t,"margin"+this))||0)}),i}var o=r==="Width"?["Left","Right"]:["Top","Bottom"],u=r.toLowerCase(),f={innerWidth:n.fn.innerWidth,innerHeight:n.fn.innerHeight,outerWidth:n.fn.outerWidth,outerHeight:n.fn.outerHeight};n.fn["inner"+r]=function(i){return i===t?f["inner"+r].call(this):this.each(function(){n(this).css(u,e(this,i)+"px")})};n.fn["outer"+r]=function(t,i){return typeof t!="number"?f["outer"+r].call(this,t):this.each(function(){n(this).css(u,e(this,t,!0,i)+"px")})}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))});n("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(n.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,n.camelCase(i)):t.call(this)}}(n.fn.removeData));n.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());n.support.selectstart="onselectstart"in document.createElement("div");n.fn.extend({disableSelection:function(){return this.bind((n.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(n){n.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});n.extend(n.ui,{plugin:{add:function(t,i,r){var u,f=n.ui[t].prototype;for(u in r)f.plugins[u]=f.plugins[u]||[],f.plugins[u].push([i,r[u]])},call:function(n,t,i){var r,u=n.plugins[t];if(u&&n.element[0].parentNode&&n.element[0].parentNode.nodeType!==11)for(r=0;r<u.length;r++)n.options[u[r][0]]&&u[r][1].apply(n.element,i)}},hasScroll:function(t,i){if(n(t).css("overflow")==="hidden")return!1;var r=i&&i==="left"?"scrollLeft":"scrollTop",u=!1;return t[r]>0?!0:(t[r]=1,u=t[r]>0,t[r]=0,u)}})})(jQuery),function(n,t){var r=0,i=Array.prototype.slice,u=n.cleanData;n.cleanData=function(t){for(var i=0,r;(r=t[i])!=null;i++)try{n(r).triggerHandler("remove")}catch(f){}u(t)};n.widget=function(t,i,r){var s,f,u,o,h={},e=t.split(".")[0];t=t.split(".")[1];s=e+"-"+t;r||(r=i,i=n.Widget);n.expr[":"][s.toLowerCase()]=function(t){return!!n.data(t,s)};n[e]=n[e]||{};f=n[e][t];u=n[e][t]=function(n,t){if(!this._createWidget)return new u(n,t);arguments.length&&this._createWidget(n,t)};n.extend(u,f,{version:r.version,_proto:n.extend({},r),_childConstructors:[]});o=new i;o.options=n.widget.extend({},o.options);n.each(r,function(t,r){if(!n.isFunction(r)){h[t]=r;return}h[t]=function(){var n=function(){return i.prototype[t].apply(this,arguments)},u=function(n){return i.prototype[t].apply(this,n)};return function(){var i=this._super,f=this._superApply,t;return this._super=n,this._superApply=u,t=r.apply(this,arguments),this._super=i,this._superApply=f,t}}()});u.prototype=n.widget.extend(o,{widgetEventPrefix:f?o.widgetEventPrefix||t:t},h,{constructor:u,namespace:e,widgetName:t,widgetFullName:s});f?(n.each(f._childConstructors,function(t,i){var r=i.prototype;n.widget(r.namespace+"."+r.widgetName,u,i._proto)}),delete f._childConstructors):i._childConstructors.push(u);n.widget.bridge(t,u)};n.widget.extend=function(r){for(var o=i.call(arguments,1),e=0,s=o.length,u,f;e<s;e++)for(u in o[e])f=o[e][u],o[e].hasOwnProperty(u)&&f!==t&&(r[u]=n.isPlainObject(f)?n.isPlainObject(r[u])?n.widget.extend({},r[u],f):n.widget.extend({},f):f);return r};n.widget.bridge=function(r,u){var f=u.prototype.widgetFullName||r;n.fn[r]=function(e){var h=typeof e=="string",o=i.call(arguments,1),s=this;return e=!h&&o.length?n.widget.extend.apply(null,[e].concat(o)):e,h?this.each(function(){var i,u=n.data(this,f);return u?!n.isFunction(u[e])||e.charAt(0)==="_"?n.error("no such method '"+e+"' for "+r+" widget instance"):(i=u[e].apply(u,o),i!==u&&i!==t?(s=i&&i.jquery?s.pushStack(i.get()):i,!1):void 0):n.error("cannot call methods on "+r+" prior to initialization; attempted to call method '"+e+"'")}):this.each(function(){var t=n.data(this,f);t?t.option(e||{})._init():n.data(this,f,new u(e,this))}),s}};n.Widget=function(){};n.Widget._childConstructors=[];n.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=n(i||this.defaultElement||this)[0];this.element=n(i);this.uuid=r++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=n.widget.extend({},this.options,this._getCreateOptions(),t);this.bindings=n();this.hoverable=n();this.focusable=n();i!==this&&(n.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(n){n.target===i&&this.destroy()}}),this.document=n(i.style?i.ownerDocument:i.document||i),this.window=n(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:n.noop,_getCreateEventData:n.noop,_create:n.noop,_init:n.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(n.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:n.noop,widget:function(){return this.element},option:function(i,r){var o=i,u,f,e;if(arguments.length===0)return n.widget.extend({},this.options);if(typeof i=="string")if(o={},u=i.split("."),i=u.shift(),u.length){for(f=o[i]=n.widget.extend({},this.options[i]),e=0;e<u.length-1;e++)f[u[e]]=f[u[e]]||{},f=f[u[e]];if(i=u.pop(),arguments.length===1)return f[i]===t?null:f[i];f[i]=r}else{if(arguments.length===1)return this.options[i]===t?null:this.options[i];o[i]=r}return this._setOptions(o),this},_setOptions:function(n){for(var t in n)this._setOption(t,n[t]);return this},_setOption:function(n,t){return this.options[n]=t,n==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,i,r){var f,u=this;typeof t!="boolean"&&(r=i,i=t,t=!1);r?(i=f=n(i),this.bindings=this.bindings.add(i)):(r=i,i=this.element,f=this.widget());n.each(r,function(r,e){function o(){if(t||u.options.disabled!==!0&&!n(this).hasClass("ui-state-disabled"))return(typeof e=="string"?u[e]:e).apply(u,arguments)}typeof e!="string"&&(o.guid=e.guid=e.guid||o.guid||n.guid++);var s=r.match(/^(\w+)\s*(.*)$/),h=s[1]+u.eventNamespace,c=s[2];c?f.delegate(c,h,o):i.bind(h,o)})},_off:function(n,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;n.unbind(t).undelegate(t)},_delay:function(n,t){function r(){return(typeof n=="string"?i[n]:n).apply(i,arguments)}var i=this;return setTimeout(r,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){n(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){n(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){n(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){n(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,r){var u,f,e=this.options[t];if(r=r||{},i=n.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],f=i.originalEvent,f)for(u in f)u in i||(i[u]=f[u]);return this.element.trigger(i,r),!(n.isFunction(e)&&e.apply(this.element[0],[i].concat(r))===!1||i.isDefaultPrevented())}};n.each({show:"fadeIn",hide:"fadeOut"},function(t,i){n.Widget.prototype["_"+t]=function(r,u,f){typeof u=="string"&&(u={effect:u});var o,e=u?u===!0||typeof u=="number"?i:u.effect||i:t;u=u||{};typeof u=="number"&&(u={duration:u});o=!n.isEmptyObject(u);u.complete=f;u.delay&&r.delay(u.delay);o&&n.effects&&n.effects.effect[e]?r[t](u):e!==t&&r[e]?r[e](u.duration,u.easing,f):r.queue(function(i){n(this)[t]();f&&f.call(r[0]);i()})}})}(jQuery),function(n){var t=!1;n(document).mouseup(function(){t=!1});n.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(n){return t._mouseDown(n)}).bind("click."+this.widgetName,function(i){if(!0===n.data(i.target,t.widgetName+".preventClickEvent"))return n.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i);this._mouseDownEvent=i;var r=this,u=i.which===1,f=typeof this.options.cancel=="string"&&i.target.nodeName?n(i.target).closest(this.options.cancel).length:!1;return!u||f||!this._mouseCapture(i)?!0:(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted))?(i.preventDefault(),!0):(!0===n.data(i.target,this.widgetName+".preventClickEvent")&&n.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(n){return r._mouseMove(n)},this._mouseUpDelegate=function(n){return r._mouseUp(n)},n(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)}},_mouseMove:function(t){return n.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(n){return Math.max(Math.abs(this._mouseDownEvent.pageX-n.pageX),Math.abs(this._mouseDownEvent.pageY-n.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(n,t){function a(n,t,i){return[parseFloat(n[0])*(l.test(n[0])?t/100:1),parseFloat(n[1])*(l.test(n[1])?i/100:1)]}function u(t,i){return parseInt(n.css(t,i),10)||0}function y(t){var i=t[0];return i.nodeType===9?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:n.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}n.ui=n.ui||{};var f,r=Math.max,i=Math.abs,e=Math.round,o=/left|center|right/,s=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,l=/%$/,v=n.fn.position;n.position={scrollbarWidth:function(){if(f!==t)return f;var u,r,i=n("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'><\/div><\/div>"),e=i.children()[0];return n("body").append(i),u=e.offsetWidth,i.css("overflow","scroll"),r=e.offsetWidth,u===r&&(r=i[0].clientWidth),i.remove(),f=u-r},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),r=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),u=i==="scroll"||i==="auto"&&t.width<t.element[0].scrollWidth,f=r==="scroll"||r==="auto"&&t.height<t.element[0].scrollHeight;return{width:f?n.position.scrollbarWidth():0,height:u?n.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=n(t||window),r=n.isWindow(i[0]),u=!!i[0]&&i[0].nodeType===9;return{element:i,isWindow:r,isDocument:u,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:r?i.width():i.outerWidth(),height:r?i.height():i.outerHeight()}}};n.fn.position=function(t){if(!t||!t.of)return v.apply(this,arguments);t=n.extend({},t);var b,f,l,w,p,d,g=n(t.of),tt=n.position.getWithinInfo(t.within),it=n.position.getScrollInfo(tt),k=(t.collision||"flip").split(" "),nt={};return d=y(g),g[0].preventDefault&&(t.at="left top"),f=d.width,l=d.height,w=d.offset,p=n.extend({},w),n.each(["my","at"],function(){var n=(t[this]||"").split(" "),i,r;n.length===1&&(n=o.test(n[0])?n.concat(["center"]):s.test(n[0])?["center"].concat(n):["center","center"]);n[0]=o.test(n[0])?n[0]:"center";n[1]=s.test(n[1])?n[1]:"center";i=h.exec(n[0]);r=h.exec(n[1]);nt[this]=[i?i[0]:0,r?r[0]:0];t[this]=[c.exec(n[0])[0],c.exec(n[1])[0]]}),k.length===1&&(k[1]=k[0]),t.at[0]==="right"?p.left+=f:t.at[0]==="center"&&(p.left+=f/2),t.at[1]==="bottom"?p.top+=l:t.at[1]==="center"&&(p.top+=l/2),b=a(nt.at,f,l),p.left+=b[0],p.top+=b[1],this.each(function(){var y,d,s=n(this),h=s.outerWidth(),c=s.outerHeight(),rt=u(this,"marginLeft"),ut=u(this,"marginTop"),ft=h+rt+u(this,"marginRight")+it.width,et=c+ut+u(this,"marginBottom")+it.height,o=n.extend({},p),v=a(nt.my,s.outerWidth(),s.outerHeight());t.my[0]==="right"?o.left-=h:t.my[0]==="center"&&(o.left-=h/2);t.my[1]==="bottom"?o.top-=c:t.my[1]==="center"&&(o.top-=c/2);o.left+=v[0];o.top+=v[1];n.support.offsetFractions||(o.left=e(o.left),o.top=e(o.top));y={marginLeft:rt,marginTop:ut};n.each(["left","top"],function(i,r){n.ui.position[k[i]]&&n.ui.position[k[i]][r](o,{targetWidth:f,targetHeight:l,elemWidth:h,elemHeight:c,collisionPosition:y,collisionWidth:ft,collisionHeight:et,offset:[b[0]+v[0],b[1]+v[1]],my:t.my,at:t.at,within:tt,elem:s})});t.using&&(d=function(n){var u=w.left-o.left,v=u+f-h,e=w.top-o.top,y=e+l-c,a={target:{element:g,left:w.left,top:w.top,width:f,height:l},element:{element:s,left:o.left,top:o.top,width:h,height:c},horizontal:v<0?"left":u>0?"right":"center",vertical:y<0?"top":e>0?"bottom":"middle"};f<h&&i(u+v)<f&&(a.horizontal="center");l<c&&i(e+y)<l&&(a.vertical="middle");a.important=r(i(u),i(v))>r(i(e),i(y))?"horizontal":"vertical";t.using.call(this,n,a)});s.offset(n.extend(o,{using:d}))})};n.ui.position={fit:{left:function(n,t){var e=t.within,u=e.isWindow?e.scrollLeft:e.offset.left,o=e.width,s=n.left-t.collisionPosition.marginLeft,i=u-s,f=s+t.collisionWidth-o-u,h;t.collisionWidth>o?i>0&&f<=0?(h=n.left+i+t.collisionWidth-o-u,n.left+=i-h):n.left=f>0&&i<=0?u:i>f?u+o-t.collisionWidth:u:i>0?n.left+=i:f>0?n.left-=f:n.left=r(n.left-s,n.left)},top:function(n,t){var o=t.within,u=o.isWindow?o.scrollTop:o.offset.top,e=t.within.height,s=n.top-t.collisionPosition.marginTop,i=u-s,f=s+t.collisionHeight-e-u,h;t.collisionHeight>e?i>0&&f<=0?(h=n.top+i+t.collisionHeight-e-u,n.top+=i-h):n.top=f>0&&i<=0?u:i>f?u+e-t.collisionHeight:u:i>0?n.top+=i:f>0?n.top-=f:n.top=r(n.top-s,n.top)}},flip:{left:function(n,t){var r=t.within,y=r.offset.left+r.scrollLeft,c=r.width,o=r.isWindow?r.scrollLeft:r.offset.left,l=n.left-t.collisionPosition.marginLeft,a=l-o,v=l+t.collisionWidth-c-o,u=t.my[0]==="left"?-t.elemWidth:t.my[0]==="right"?t.elemWidth:0,f=t.at[0]==="left"?t.targetWidth:t.at[0]==="right"?-t.targetWidth:0,e=-2*t.offset[0],s,h;a<0?(s=n.left+u+f+e+t.collisionWidth-c-y,(s<0||s<i(a))&&(n.left+=u+f+e)):v>0&&(h=n.left-t.collisionPosition.marginLeft+u+f+e-o,(h>0||i(h)<v)&&(n.left+=u+f+e))},top:function(n,t){var r=t.within,y=r.offset.top+r.scrollTop,a=r.height,o=r.isWindow?r.scrollTop:r.offset.top,v=n.top-t.collisionPosition.marginTop,s=v-o,h=v+t.collisionHeight-a-o,p=t.my[1]==="top",u=p?-t.elemHeight:t.my[1]==="bottom"?t.elemHeight:0,f=t.at[1]==="top"?t.targetHeight:t.at[1]==="bottom"?-t.targetHeight:0,e=-2*t.offset[1],c,l;s<0?(l=n.top+u+f+e+t.collisionHeight-a-y,n.top+u+f+e>s&&(l<0||l<i(s))&&(n.top+=u+f+e)):h>0&&(c=n.top-t.collisionPosition.marginTop+u+f+e-o,n.top+u+f+e>h&&(c>0||i(c)<h)&&(n.top+=u+f+e))}},flipfit:{left:function(){n.ui.position.flip.left.apply(this,arguments);n.ui.position.fit.left.apply(this,arguments)},top:function(){n.ui.position.flip.top.apply(this,arguments);n.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,r,u,f,e=document.getElementsByTagName("body")[0],o=document.createElement("div");t=document.createElement(e?"div":"body");r={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};e&&n.extend(r,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in r)t.style[f]=r[f];t.appendChild(o);i=e||document.documentElement;i.insertBefore(t,i.firstChild);o.style.cssText="position: absolute; left: 10.7432222px;";u=n(o).offset().left;n.support.offsetFractions=u>10&&u<11;t.innerHTML="";i.removeChild(t)}()}(jQuery),function(n){n.widget("ui.draggable",n.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){this.options.helper!=="original"||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative");this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||n(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),!this.handle)?!1:(n(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){n("<div class='ui-draggable-iframeFix' style='background: #fff;'><\/div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(n(this).offset()).appendTo("body")}),!0)},_mouseStart:function(t){var i=this.options;return(this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),n.ui.ddmanager&&(n.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,n.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1)?(this._clear(),!1):(this._cacheHelperProportions(),n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),n.ui.ddmanager&&n.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if(this.offsetParentCssPosition==="fixed"&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}return this.options.axis&&this.options.axis==="y"||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&this.options.axis==="x"||(this.helper[0].style.top=this.position.top+"px"),n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var r=this,i=!1;return(n.ui.ddmanager&&!this.options.dropBehaviour&&(i=n.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),this.options.helper==="original"&&!n.contains(this.element[0].ownerDocument,this.element[0]))?!1:(this.options.revert==="invalid"&&!i||this.options.revert==="valid"&&i||this.options.revert===!0||n.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?n(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){r._trigger("stop",t)!==!1&&r._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1)},_mouseUp:function(t){return n("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),n.ui.ddmanager&&n.ui.ddmanager.dragStop(this,t),n.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!n(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var r=this.options,i=n.isFunction(r.helper)?n(r.helper.apply(this.element[0],[t])):r.helper==="clone"?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo(r.appendTo==="parent"?this.element[0].parentNode:r.appendTo),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" "));n.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&n.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var n=this.element.position();return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:n.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var u,t,i,r=this.options;if(!r.containment){this.containment=null;return}if(r.containment==="window"){this.containment=[n(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,n(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,n(window).scrollLeft()+n(window).width()-this.helperProportions.width-this.margins.left,n(window).scrollTop()+(n(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(r.containment==="document"){this.containment=[0,0,n(document).width()-this.helperProportions.width-this.margins.left,(n(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(r.containment.constructor===Array){this.containment=r.containment;return}(r.containment==="parent"&&(r.containment=this.helper[0].parentNode),t=n(r.containment),i=t[0],i)&&(u=t.css("overflow")!=="hidden",this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(u?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(u?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=t)},_convertPositionTo:function(t,i){i||(i=this.position);var r=t==="absolute"?1:-1,u=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent;return this.offset.scroll||(this.offset.scroll={top:u.scrollTop(),left:u.scrollLeft()}),{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():this.offset.scroll.top)*r,left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():this.offset.scroll.left)*r}},_generatePosition:function(t){var i,e,u,f,r=this.options,h=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&n.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,o=t.pageX,s=t.pageY;return this.offset.scroll||(this.offset.scroll={top:h.scrollTop(),left:h.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(e=this.relative_container.offset(),i=[this.containment[0]+e.left,this.containment[1]+e.top,this.containment[2]+e.left,this.containment[3]+e.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(s=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(s=i[3]+this.offset.click.top)),r.grid&&(u=r.grid[1]?this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,s=i?u-this.offset.click.top>=i[1]||u-this.offset.click.top>i[3]?u:u-this.offset.click.top>=i[1]?u-r.grid[1]:u+r.grid[1]:u,f=r.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,o=i?f-this.offset.click.left>=i[0]||f-this.offset.click.left>i[2]?f:f-this.offset.click.left>=i[0]?f-r.grid[0]:f+r.grid[0]:f)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1},_trigger:function(t,i,r){return r=r||this._uiHash(),n.ui.plugin.call(this,t,[i,r]),t==="drag"&&(this.positionAbs=this._convertPositionTo("absolute")),n.Widget.prototype._trigger.call(this,t,i,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});n.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var r=n(this).data("ui-draggable"),u=r.options,f=n.extend({},i,{item:r.element});r.sortables=[];n(u.connectToSortable).each(function(){var i=n.data(this,"ui-sortable");i&&!i.options.disabled&&(r.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,f))})},stop:function(t,i){var r=n(this).data("ui-draggable"),u=n.extend({},i,{item:r.element});n.each(r.sortables,function(){this.instance.isOver?(this.instance.isOver=0,r.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,r.options.helper==="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,u))})},drag:function(t,i){var r=n(this).data("ui-draggable"),u=this;n.each(r.sortables,function(){var f=!1,e=this;this.instance.positionAbs=r.positionAbs;this.instance.helperProportions=r.helperProportions;this.instance.offset.click=r.offset.click;this.instance._intersectsWith(this.instance.containerCache)&&(f=!0,n.each(r.sortables,function(){return this.instance.positionAbs=r.positionAbs,this.instance.helperProportions=r.helperProportions,this.instance.offset.click=r.offset.click,this!==e&&this.instance._intersectsWith(this.instance.containerCache)&&n.contains(e.instance.element[0],this.instance.element[0])&&(f=!1),f}));f?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=n(u).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=r.offset.click.top,this.instance.offset.click.left=r.offset.click.left,this.instance.offset.parent.left-=r.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=r.offset.parent.top-this.instance.offset.parent.top,r._trigger("toSortable",t),r.dropped=this.instance.element,r.currentItem=r.element,this.instance.fromOutside=r),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),r._trigger("fromSortable",t),r.dropped=!1)})}});n.ui.plugin.add("draggable","cursor",{start:function(){var t=n("body"),i=n(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor"));t.css("cursor",i.cursor)},stop:function(){var t=n(this).data("ui-draggable").options;t._cursor&&n("body").css("cursor",t._cursor)}});n.ui.plugin.add("draggable","opacity",{start:function(t,i){var r=n(i.helper),u=n(this).data("ui-draggable").options;r.css("opacity")&&(u._opacity=r.css("opacity"));r.css("opacity",u.opacity)},stop:function(t,i){var r=n(this).data("ui-draggable").options;r._opacity&&n(i.helper).css("opacity",r._opacity)}});n.ui.plugin.add("draggable","scroll",{start:function(){var t=n(this).data("ui-draggable");t.scrollParent[0]!==document&&t.scrollParent[0].tagName!=="HTML"&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var r=n(this).data("ui-draggable"),i=r.options,u=!1;r.scrollParent[0]!==document&&r.scrollParent[0].tagName!=="HTML"?(i.axis&&i.axis==="x"||(r.overflowOffset.top+r.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?r.scrollParent[0].scrollTop=u=r.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-r.overflowOffset.top<i.scrollSensitivity&&(r.scrollParent[0].scrollTop=u=r.scrollParent[0].scrollTop-i.scrollSpeed)),i.axis&&i.axis==="y"||(r.overflowOffset.left+r.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?r.scrollParent[0].scrollLeft=u=r.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-r.overflowOffset.left<i.scrollSensitivity&&(r.scrollParent[0].scrollLeft=u=r.scrollParent[0].scrollLeft-i.scrollSpeed))):(i.axis&&i.axis==="x"||(t.pageY-n(document).scrollTop()<i.scrollSensitivity?u=n(document).scrollTop(n(document).scrollTop()-i.scrollSpeed):n(window).height()-(t.pageY-n(document).scrollTop())<i.scrollSensitivity&&(u=n(document).scrollTop(n(document).scrollTop()+i.scrollSpeed))),i.axis&&i.axis==="y"||(t.pageX-n(document).scrollLeft()<i.scrollSensitivity?u=n(document).scrollLeft(n(document).scrollLeft()-i.scrollSpeed):n(window).width()-(t.pageX-n(document).scrollLeft())<i.scrollSensitivity&&(u=n(document).scrollLeft(n(document).scrollLeft()+i.scrollSpeed))));u!==!1&&n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(r,t)}});n.ui.plugin.add("draggable","snap",{start:function(){var t=n(this).data("ui-draggable"),i=t.options;t.snapElements=[];n(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=n(this),r=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:r.top,left:r.left})})},drag:function(t,i){for(var e,o,s,h,c,a,l,v,w,r=n(this).data("ui-draggable"),b=r.options,f=b.snapTolerance,y=i.offset.left,k=y+r.helperProportions.width,p=i.offset.top,d=p+r.helperProportions.height,u=r.snapElements.length-1;u>=0;u--){if(c=r.snapElements[u].left,a=c+r.snapElements[u].width,l=r.snapElements[u].top,v=l+r.snapElements[u].height,k<c-f||y>a+f||d<l-f||p>v+f||!n.contains(r.snapElements[u].item.ownerDocument,r.snapElements[u].item)){r.snapElements[u].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item}));r.snapElements[u].snapping=!1;continue}b.snapMode!=="inner"&&(e=Math.abs(l-d)<=f,o=Math.abs(v-p)<=f,s=Math.abs(c-k)<=f,h=Math.abs(a-y)<=f,e&&(i.position.top=r._convertPositionTo("relative",{top:l-r.helperProportions.height,left:0}).top-r.margins.top),o&&(i.position.top=r._convertPositionTo("relative",{top:v,left:0}).top-r.margins.top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left-r.margins.left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a}).left-r.margins.left));w=e||o||s||h;b.snapMode!=="outer"&&(e=Math.abs(l-p)<=f,o=Math.abs(v-d)<=f,s=Math.abs(c-y)<=f,h=Math.abs(a-k)<=f,e&&(i.position.top=r._convertPositionTo("relative",{top:l,left:0}).top-r.margins.top),o&&(i.position.top=r._convertPositionTo("relative",{top:v-r.helperProportions.height,left:0}).top-r.margins.top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c}).left-r.margins.left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a-r.helperProportions.width}).left-r.margins.left));!r.snapElements[u].snapping&&(e||o||s||h||w)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item}));r.snapElements[u].snapping=e||o||s||h||w}}});n.ui.plugin.add("draggable","stack",{start:function(){var i,r=this.data("ui-draggable").options,t=n.makeArray(n(r.stack)).sort(function(t,i){return(parseInt(n(t).css("zIndex"),10)||0)-(parseInt(n(i).css("zIndex"),10)||0)});t.length&&(i=parseInt(n(t[0]).css("zIndex"),10)||0,n(t).each(function(t){n(this).css("zIndex",i+t)}),this.css("zIndex",i+t.length))}});n.ui.plugin.add("draggable","zIndex",{start:function(t,i){var r=n(i.helper),u=n(this).data("ui-draggable").options;r.css("zIndex")&&(u._zIndex=r.css("zIndex"));r.css("zIndex",u.zIndex)},stop:function(t,i){var r=n(this).data("ui-draggable").options;r._zIndex&&n(i.helper).css("zIndex",r._zIndex)}})}(jQuery),function(n){function i(n){return parseInt(n,10)||0}function t(n){return!isNaN(parseInt(n,10))}n.widget("ui.resizable",n.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,f,r,i,o,u=this,t=this.options;if(this.element.addClass("ui-resizable"),n.extend(this,{_aspectRatio:!!t.aspectRatio,aspectRatio:t.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:t.helper||t.ghost||t.animate?t.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(n("<div class='ui-wrapper' style='overflow: hidden;'><\/div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=t.handles||(n(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for(this.handles==="all"&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},f=0;f<e.length;f++)r=n.trim(e[f]),o="ui-resizable-"+r,i=n("<div class='ui-resizable-handle "+o+"'><\/div>"),i.css({zIndex:t.zIndex}),"se"===r&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[r]=".ui-resizable-"+r,this.element.append(i);this._renderAxis=function(t){var i,r,u,f;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=n(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(r=n(this.handles[i],this.element),f=/sw|ne|nw|se|n|s/.test(i)?r.outerHeight():r.outerWidth(),u=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(u,f),this._proportionallyResize()),!n(this.handles[i]).length};this._renderAxis(this.element);this._handles=n(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){u.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),u.axis=i&&i[1]?i[1]:"se")});t.autoHide&&(this._handles.hide(),n(this.element).addClass("ui-resizable-autohide").mouseenter(function(){t.disabled||(n(this).removeClass("ui-resizable-autohide"),u._handles.show())}).mouseleave(function(){t.disabled||u.resizing||(n(this).addClass("ui-resizable-autohide"),u._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){n(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var r,i,u=!1;for(r in this.handles)i=n(this.handles[r])[0],(i===t.target||n.contains(i,t.target))&&(u=!0);return!this.options.disabled&&u},_mouseStart:function(t){var f,e,o,u=this.options,s=this.element.position(),r=this.element;return this.resizing=!0,/absolute/.test(r.css("position"))?r.css({position:"absolute",top:r.css("top"),left:r.css("left")}):r.is(".ui-draggable")&&r.css({position:"absolute",top:s.top,left:s.left}),this._renderProxy(),f=i(this.helper.css("left")),e=i(this.helper.css("top")),u.containment&&(f+=n(u.containment).scrollLeft()||0,e+=n(u.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:f,top:e},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.originalPosition={left:f,top:e},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof u.aspectRatio=="number"?u.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=n(".ui-resizable-"+this.axis).css("cursor"),n("body").css("cursor",o==="auto"?this.axis+"-resize":o),r.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,e=this.helper,r={},u=this.originalMousePosition,o=this.axis,s=this.position.top,h=this.position.left,c=this.size.width,l=this.size.height,a=t.pageX-u.left||0,v=t.pageY-u.top||0,f=this._change[o];return f?(i=f.apply(this,[t,a,v]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==s&&(r.top=this.position.top+"px"),this.position.left!==h&&(r.left=this.position.left+"px"),this.size.width!==c&&(r.width=this.size.width+"px"),this.size.height!==l&&(r.height=this.size.height+"px"),e.css(r),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),n.isEmptyObject(r)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var r,u,f,e,o,s,h,c=this.options,i=this;return this._helper&&(r=this._proportionallyResizeElements,u=r.length&&/textarea/i.test(r[0].nodeName),f=u&&n.ui.hasScroll(r[0],"left")?0:i.sizeDiff.height,e=u?0:i.sizeDiff.width,o={width:i.helper.width()-e,height:i.helper.height()-f},s=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,h=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null,c.animate||this.element.css(n.extend(o,{top:h,left:s})),i.helper.height(i.size.height),i.helper.width(i.size.width),this._helper&&!c.animate&&this._proportionallyResize()),n("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(n){var u,f,e,o,i,r=this.options;i={minWidth:t(r.minWidth)?r.minWidth:0,maxWidth:t(r.maxWidth)?r.maxWidth:Infinity,minHeight:t(r.minHeight)?r.minHeight:0,maxHeight:t(r.maxHeight)?r.maxHeight:Infinity};(this._aspectRatio||n)&&(u=i.minHeight*this.aspectRatio,e=i.minWidth/this.aspectRatio,f=i.maxHeight*this.aspectRatio,o=i.maxWidth/this.aspectRatio,u>i.minWidth&&(i.minWidth=u),e>i.minHeight&&(i.minHeight=e),f<i.maxWidth&&(i.maxWidth=f),o<i.maxHeight&&(i.maxHeight=o));this._vBoundaries=i},_updateCache:function(n){this.offset=this.helper.offset();t(n.left)&&(this.position.left=n.left);t(n.top)&&(this.position.top=n.top);t(n.height)&&(this.size.height=n.height);t(n.width)&&(this.size.width=n.width)},_updateRatio:function(n){var i=this.position,r=this.size,u=this.axis;return t(n.height)?n.width=n.height*this.aspectRatio:t(n.width)&&(n.height=n.width/this.aspectRatio),u==="sw"&&(n.left=i.left+(r.width-n.width),n.top=null),u==="nw"&&(n.top=i.top+(r.height-n.height),n.left=i.left+(r.width-n.width)),n},_respectSize:function(n){var i=this._vBoundaries,r=this.axis,u=t(n.width)&&i.maxWidth&&i.maxWidth<n.width,f=t(n.height)&&i.maxHeight&&i.maxHeight<n.height,e=t(n.width)&&i.minWidth&&i.minWidth>n.width,o=t(n.height)&&i.minHeight&&i.minHeight>n.height,s=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,c=/sw|nw|w/.test(r),l=/nw|ne|n/.test(r);return e&&(n.width=i.minWidth),o&&(n.height=i.minHeight),u&&(n.width=i.maxWidth),f&&(n.height=i.maxHeight),e&&c&&(n.left=s-i.minWidth),u&&c&&(n.left=s-i.maxWidth),o&&l&&(n.top=h-i.minHeight),f&&l&&(n.top=h-i.maxHeight),n.width||n.height||n.left||!n.top?n.width||n.height||n.top||!n.left||(n.left=null):n.top=null,n},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,r,u,n,f=this.helper||this.element,i=0;i<this._proportionallyResizeElements.length;i++){if(n=this._proportionallyResizeElements[i],!this.borderDif)for(this.borderDif=[],r=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],u=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;t<r.length;t++)this.borderDif[t]=(parseInt(r[t],10)||0)+(parseInt(u[t],10)||0);n.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset();this._helper?(this.helper=this.helper||n("<div style='overflow:hidden;'><\/div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(n,t){return{width:this.originalSize.width+t}},w:function(n,t){var i=this.originalSize,r=this.originalPosition;return{left:r.left+t,width:i.width-t}},n:function(n,t,i){var r=this.originalSize,u=this.originalPosition;return{top:u.top+i,height:r.height-i}},s:function(n,t,i){return{height:this.originalSize.height+i}},se:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},sw:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,r]))},ne:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},nw:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,r]))}},_propagate:function(t,i){n.ui.plugin.call(this,t,[i,this.ui()]);t!=="resize"&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});n.ui.plugin.add("resizable","animate",{stop:function(t){var i=n(this).data("ui-resizable"),u=i.options,r=i._proportionallyResizeElements,f=r.length&&/textarea/i.test(r[0].nodeName),s=f&&n.ui.hasScroll(r[0],"left")?0:i.sizeDiff.height,h=f?0:i.sizeDiff.width,c={width:i.size.width-h,height:i.size.height-s},e=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,o=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(n.extend(c,o&&e?{top:o,left:e}:{}),{duration:u.animateDuration,easing:u.animateEasing,step:function(){var u={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};r&&r.length&&n(r[0]).css({width:u.width,height:u.height});i._updateCache(u);i._propagate("resize",t)}})}});n.ui.plugin.add("resizable","containment",{start:function(){var u,e,o,s,h,c,l,t=n(this).data("ui-resizable"),a=t.options,v=t.element,f=a.containment,r=f instanceof n?f.get(0):/parent/.test(f)?v.parent().get(0):f;r&&(t.containerElement=n(r),/document/.test(f)||f===document?(t.containerOffset={left:0,top:0},t.containerPosition={left:0,top:0},t.parentData={element:n(document),left:0,top:0,width:n(document).width(),height:n(document).height()||document.body.parentNode.scrollHeight}):(u=n(r),e=[],n(["Top","Right","Left","Bottom"]).each(function(n,t){e[n]=i(u.css("padding"+t))}),t.containerOffset=u.offset(),t.containerPosition=u.position(),t.containerSize={height:u.innerHeight()-e[3],width:u.innerWidth()-e[1]},o=t.containerOffset,s=t.containerSize.height,h=t.containerSize.width,c=n.ui.hasScroll(r,"left")?r.scrollWidth:h,l=n.ui.hasScroll(r)?r.scrollHeight:s,t.parentData={element:r,left:o.left,top:o.top,width:c,height:l}))},resize:function(t){var f,o,s,h,i=n(this).data("ui-resizable"),a=i.options,r=i.containerOffset,c=i.position,e=i._aspectRatio||t.shiftKey,u={top:0,left:0},l=i.containerElement;l[0]!==document&&/static/.test(l.css("position"))&&(u=r);c.left<(i._helper?r.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-r.left:i.position.left-u.left),e&&(i.size.height=i.size.width/i.aspectRatio),i.position.left=a.helper?r.left:0);c.top<(i._helper?r.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-r.top:i.position.top),e&&(i.size.width=i.size.height*i.aspectRatio),i.position.top=i._helper?r.top:0);i.offset.left=i.parentData.left+i.position.left;i.offset.top=i.parentData.top+i.position.top;f=Math.abs((i._helper?i.offset.left-u.left:i.offset.left-u.left)+i.sizeDiff.width);o=Math.abs((i._helper?i.offset.top-u.top:i.offset.top-r.top)+i.sizeDiff.height);s=i.containerElement.get(0)===i.element.parent().get(0);h=/relative|absolute/.test(i.containerElement.css("position"));s&&h&&(f-=Math.abs(i.parentData.left));f+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-f,e&&(i.size.height=i.size.width/i.aspectRatio));o+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-o,e&&(i.size.width=i.size.height*i.aspectRatio))},stop:function(){var t=n(this).data("ui-resizable"),r=t.options,u=t.containerOffset,f=t.containerPosition,e=t.containerElement,i=n(t.helper),o=i.offset(),s=i.outerWidth()-t.sizeDiff.width,h=i.outerHeight()-t.sizeDiff.height;t._helper&&!r.animate&&/relative/.test(e.css("position"))&&n(this).css({left:o.left-f.left-u.left,width:s,height:h});t._helper&&!r.animate&&/static/.test(e.css("position"))&&n(this).css({left:o.left-f.left-u.left,width:s,height:h})}});n.ui.plugin.add("resizable","alsoResize",{start:function(){var r=n(this).data("ui-resizable"),t=r.options,i=function(t){n(t).each(function(){var t=n(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof t.alsoResize!="object"||t.alsoResize.parentNode?i(t.alsoResize):t.alsoResize.length?(t.alsoResize=t.alsoResize[0],i(t.alsoResize)):n.each(t.alsoResize,function(n){i(n)})},resize:function(t,i){var r=n(this).data("ui-resizable"),u=r.options,f=r.originalSize,e=r.originalPosition,s={height:r.size.height-f.height||0,width:r.size.width-f.width||0,top:r.position.top-e.top||0,left:r.position.left-e.left||0},o=function(t,r){n(t).each(function(){var t=n(this),f=n(this).data("ui-resizable-alsoresize"),u={},e=r&&r.length?r:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];n.each(e,function(n,t){var i=(f[t]||0)+(s[t]||0);i&&i>=0&&(u[t]=i||null)});t.css(u)})};typeof u.alsoResize!="object"||u.alsoResize.nodeType?o(u.alsoResize):n.each(u.alsoResize,function(n,t){o(n,t)})},stop:function(){n(this).removeData("resizable-alsoresize")}});n.ui.plugin.add("resizable","ghost",{start:function(){var t=n(this).data("ui-resizable"),i=t.options,r=t.size;t.ghost=t.originalElement.clone();t.ghost.css({opacity:.25,display:"block",position:"relative",height:r.height,width:r.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");t.ghost.appendTo(t.helper)},resize:function(){var t=n(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=n(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}});n.ui.plugin.add("resizable","grid",{resize:function(){var t=n(this).data("ui-resizable"),i=t.options,v=t.size,o=t.originalSize,s=t.originalPosition,h=t.axis,c=typeof i.grid=="number"?[i.grid,i.grid]:i.grid,f=c[0]||1,e=c[1]||1,l=Math.round((v.width-o.width)/f)*f,a=Math.round((v.height-o.height)/e)*e,r=o.width+l,u=o.height+a,y=i.maxWidth&&i.maxWidth<r,p=i.maxHeight&&i.maxHeight<u,w=i.minWidth&&i.minWidth>r,b=i.minHeight&&i.minHeight>u;i.grid=c;w&&(r=r+f);b&&(u=u+e);y&&(r=r-f);p&&(u=u-e);/^(se|s|e)$/.test(h)?(t.size.width=r,t.size.height=u):/^(ne)$/.test(h)?(t.size.width=r,t.size.height=u,t.position.top=s.top-a):/^(sw)$/.test(h)?(t.size.width=r,t.size.height=u,t.position.left=s.left-l):(u-e>0?(t.size.height=u,t.position.top=s.top-a):(t.size.height=e,t.position.top=s.top+o.height-e),r-f>0?(t.size.width=r,t.position.left=s.left-l):(t.size.width=f,t.position.left=s.left+o.width-f))}})}(jQuery),function(n){var r=0,t={},i={};t.height=t.paddingTop=t.paddingBottom=t.borderTopWidth=t.borderBottomWidth="hide";i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="show";n.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=n();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");t.collapsible||t.active!==!1&&t.active!=null||(t.active=0);this._processPanels();t.active<0&&(t.active+=this.headers.length);this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():n(),content:this.active.length?this.active.next():n()}},_createIcons:function(){var t=this.options.icons;t&&(n("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var n;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});this._destroyIcons();n=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});this.options.heightStyle!=="content"&&n.css("height","")},_setOption:function(n,t){if(n==="active"){this._activate(t);return}n==="event"&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t));this._super(n,t);n!=="collapsible"||t||this.options.active!==!1||this._activate(0);n==="icons"&&(this._destroyIcons(),t&&this._createIcons());n==="disabled"&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=n.ui.keyCode,u=this.headers.length,f=this.headers.index(t.target),r=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(f+1)%u];break;case i.LEFT:case i.UP:r=this.headers[(f-1+u)%u];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[u-1]}r&&(n(t.target).attr("tabIndex",-1),n(r).attr("tabIndex",0),r.focus(),t.currentTarget=n(r),this._eventHandler(t),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===n.ui.keyCode.UP&&t.ctrlKey&&n(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels();(t.active!==!1||t.collapsible!==!0)&&this.headers.length?t.active===!1?this._activate(0):this.active.length&&!n.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=n()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active):(t.active=!1,this.active=n());this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var t=this.options,i=this.accordionId="ui-accordion-"+(this.element.attr("id")||++r);this.active=this._findActive(t.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(t){var r=n(this),u=r.attr("id"),f=r.next();u||(u=i+"-header-"+t,r.attr("id",u))}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._setupEvents(t.event)},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:n.noop}))},_findActive:function(t){return typeof t=="number"?this.headers.eq(t):n()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&n.each(t.split(" "),function(n,t){i[t]="_eventHandler"});this._off(this.headers.add(this.headers.next()));this._on(this.headers,i);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,u=this.active,r=n(t.currentTarget),f=r[0]===u[0],e=f&&i.collapsible,s=e?n():r.next(),h=u.next(),o={oldHeader:u,oldPanel:h,newHeader:e?n():r,newPanel:s};(t.preventDefault(),(!f||i.collapsible)&&this._trigger("beforeActivate",t,o)!==!1)&&(i.active=e?!1:this.headers.index(r),this.active=f?n():r,this._toggle(o),u.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&u.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),f||(r.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&r.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),r.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var r=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0);this.prevShow=r;this.prevHide=i;this.options.animate?this._animate(r,i,t):(i.hide(),r.show(),this._toggleComplete(t));i.attr({"aria-hidden":"true"});i.prev().attr("aria-selected","false");r.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):r.length&&this.headers.filter(function(){return n(this).attr("tabIndex")===0}).attr("tabIndex",-1);r.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(n,r,u){var l,f,e,a=this,h=0,v=n.length&&(!r.length||n.index()<r.index()),s=this.options.animate||{},o=v&&s.down||s,c=function(){a._toggleComplete(u)};if(typeof o=="number"&&(e=o),typeof o=="string"&&(f=o),f=f||o.easing||s.easing,e=e||o.duration||s.duration,!r.length)return n.animate(i,e,f,c);if(!n.length)return r.animate(t,e,f,c);l=n.show().outerHeight();r.animate(t,{duration:e,easing:f,step:function(n,t){t.now=Math.round(n)}});n.hide().animate(i,{duration:e,easing:f,complete:c,step:function(n,t){t.now=Math.round(n);t.prop!=="height"?h+=t.now:a.options.heightStyle!=="content"&&(t.now=Math.round(l-r.outerHeight()-h),h=0)}})},_toggleComplete:function(n){var t=n.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");this._trigger("activate",null,n)}})}(jQuery),function(){}(jQuery),function(n){var t,i="ui-button ui-widget ui-state-default ui-corner-all",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",f=function(){var t=n(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},u=function(t){var i=t.name,r=t.form,u=n([]);return i&&(i=i.replace(/'/g,"\\'"),u=r?n(r).find("[name='"+i+"']"):n("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),u};n.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,f);typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var e=this,r=this.options,o=this.type==="checkbox"||this.type==="radio",s=o?"":"ui-state-active";r.label===null&&(r.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===t&&n(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||n(this).removeClass(s)}).bind("click"+this.eventNamespace,function(n){r.disabled&&(n.preventDefault(),n.stopImmediatePropagation())});this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}});o&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()});this.type==="checkbox"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled)return!1}):this.type==="radio"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled)return!1;n(this).addClass("ui-state-active");e.buttonElement.attr("aria-pressed","true");var t=e.element[0];u(t).not(t).map(function(){return n(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(r.disabled)return!1;n(this).addClass("ui-state-active");t=this;e.document.one("mouseup",function(){t=null})}).bind("mouseup"+this.eventNamespace,function(){if(r.disabled)return!1;n(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(r.disabled)return!1;(t.keyCode===n.ui.keyCode.SPACE||t.keyCode===n.ui.keyCode.ENTER)&&n(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){n(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===n.ui.keyCode.SPACE&&n(this).click()}));this._setOption("disabled",r.disabled);this._resetButton()},_determineButtonType:function(){var n,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button";this.type==="checkbox"||this.type==="radio"?(n=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=n.find(t),this.buttonElement.length||(n=n.length?n.siblings():this.element.siblings(),this.buttonElement=n.filter(t),this.buttonElement.length||(this.buttonElement=n.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(i+" ui-state-active "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(n,t){if(this._super(n,t),n==="disabled"){this.element.prop("disabled",!!t);t&&this.buttonElement.removeClass("ui-state-focus");return}this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t);this.type==="radio"?u(this.element[0]).each(function(){n(this).is(":checked")?n(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):n(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var i=this.buttonElement.removeClass(r),e=n("<span><\/span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(i.empty()).text(),t=this.options.icons,f=t.primary&&t.secondary,u=[];t.primary||t.secondary?(this.options.text&&u.push("ui-button-text-icon"+(f?"s":t.primary?"-primary":"-secondary")),t.primary&&i.prepend("<span class='ui-button-icon-primary ui-icon "+t.primary+"'><\/span>"),t.secondary&&i.append("<span class='ui-button-icon-secondary ui-icon "+t.secondary+"'><\/span>"),this.options.text||(u.push(f?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||i.attr("title",n.trim(e)))):u.push("ui-button-text-only");i.addClass(u.join(" "))}});n.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(n,t){n==="disabled"&&this.buttons.button("option",n,t);this._super(n,t)},refresh:function(){var t=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(){}(jQuery),function(n){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};n.widget("ui.dialog",{version:"1.10.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=n(this).css(t).offset().top;i<0&&n(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();this.options.draggable&&n.fn.draggable&&this._makeDraggable();this.options.resizable&&n.fn.resizable&&this._makeResizable();this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?n(t):this.document.find(t||"body").eq(0)},_destroy:function(){var n,t=this.originalPosition;this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(!0,!0).remove();this.originalTitle&&this.element.attr("title",this.originalTitle);n=t.parent.children().eq(t.index);n.length&&n[0]!==this.element[0]?n.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:n.noop,enable:n.noop,close:function(t){var i,r=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement;i&&i.nodeName.toLowerCase()!=="body"&&n(i).blur()}catch(u){}this._hide(this.uiDialog,this.options.hide,function(){r._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(n,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",n),i},open:function(){var t=this;if(this._isOpen){this._moveToTop()&&this._focusTabbable();return}this._isOpen=!0;this.opener=n(this.document[0].activeElement);this._size();this._position();this._createOverlay();this._moveToTop(null,!0);this._show(this.uiDialog,this.options.show,function(){t._focusTabbable();t._trigger("focus")});this._trigger("open")},_focusTabbable:function(){var n=this.element.find("[autofocus]");n.length||(n=this.element.find(":tabbable"));n.length||(n=this.uiDialogButtonPane.find(":tabbable"));n.length||(n=this.uiDialogTitlebarClose.filter(":tabbable"));n.length||(n=this.uiDialog);n.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||n.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault();i.call(this);this._delay(i)},_createWrapper:function(){this.uiDialog=n("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===n.ui.keyCode.ESCAPE){t.preventDefault();this.close(t);return}if(t.keyCode===n.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),r=i.filter(":first"),u=i.filter(":last");t.target!==u[0]&&t.target!==this.uiDialog[0]||t.shiftKey?(t.target===r[0]||t.target===this.uiDialog[0])&&t.shiftKey&&(u.focus(1),t.preventDefault()):(r.focus(1),t.preventDefault())}},mousedown:function(n){this._moveToTop(n)&&this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=n("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(t){n(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}});this.uiDialogTitlebarClose=n("<button type='button'><\/button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(n){n.preventDefault();this.close(n)}});t=n("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(t);this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(n){this.options.title||n.html("&#160;");n.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=n("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiButtonSet=n("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var i=this,t=this.options.buttons;if(this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),n.isEmptyObject(t)||n.isArray(t)&&!t.length){this.uiDialog.removeClass("ui-dialog-buttons");return}n.each(t,function(t,r){var u,f;r=n.isFunction(r)?{click:r,text:t}:r;r=n.extend({type:"button"},r);u=r.click;r.click=function(){u.apply(i.element[0],arguments)};f={icons:r.icons,text:r.showText};delete r.icons;delete r.showText;n("<button><\/button>",r).button(f).appendTo(i.uiButtonSet)});this.uiDialog.addClass("ui-dialog-buttons");this.uiDialogButtonPane.appendTo(this.uiDialog)},_makeDraggable:function(){function i(n){return{position:n.position,offset:n.offset}}var t=this,r=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(r,u){n(this).addClass("ui-dialog-dragging");t._blockFrames();t._trigger("dragStart",r,i(u))},drag:function(n,r){t._trigger("drag",n,i(r))},stop:function(u,f){r.position=[f.position.left-t.document.scrollLeft(),f.position.top-t.document.scrollTop()];n(this).removeClass("ui-dialog-dragging");t._unblockFrames();t._trigger("dragStop",u,i(f))}})},_makeResizable:function(){function r(n){return{originalPosition:n.originalPosition,originalSize:n.originalSize,position:n.position,size:n.size}}var i=this,t=this.options,u=t.resizable,f=this.uiDialog.css("position"),e=typeof u=="string"?u:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:t.maxWidth,maxHeight:t.maxHeight,minWidth:t.minWidth,minHeight:this._minHeight(),handles:e,start:function(t,u){n(this).addClass("ui-dialog-resizing");i._blockFrames();i._trigger("resizeStart",t,r(u))},resize:function(n,t){i._trigger("resize",n,r(t))},stop:function(u,f){t.height=n(this).height();t.width=n(this).width();n(this).removeClass("ui-dialog-resizing");i._unblockFrames();i._trigger("resizeStop",u,r(f))}}).css("position",f)},_minHeight:function(){var n=this.options;return n.height==="auto"?n.minHeight:Math.min(n.minHeight,n.height)},_position:function(){var n=this.uiDialog.is(":visible");n||this.uiDialog.show();this.uiDialog.position(this.options.position);n||this.uiDialog.hide()},_setOptions:function(r){var e=this,u=!1,f={};n.each(r,function(n,r){e._setOption(n,r);n in t&&(u=!0);n in i&&(f[n]=r)});u&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",f)},_setOption:function(n,t){var u,r,i=this.uiDialog;(n==="dialogClass"&&i.removeClass(this.options.dialogClass).addClass(t),n!=="disabled")&&(this._super(n,t),n==="appendTo"&&this.uiDialog.appendTo(this._appendTo()),n==="buttons"&&this._createButtons(),n==="closeText"&&this.uiDialogTitlebarClose.button({label:""+t}),n==="draggable"&&(u=i.is(":data(ui-draggable)"),u&&!t&&i.draggable("destroy"),!u&&t&&this._makeDraggable()),n==="position"&&this._position(),n==="resizable"&&(r=i.is(":data(ui-resizable)"),r&&!t&&i.resizable("destroy"),r&&typeof t=="string"&&i.resizable("option","handles",t),r||t===!1||this._makeResizable()),n==="title"&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,i,r,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});n.minWidth>n.width&&(n.width=n.minWidth);t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight();i=Math.max(0,n.minHeight-t);r=typeof n.maxHeight=="number"?Math.max(0,n.maxHeight-t):"none";n.height==="auto"?this.element.css({minHeight:i,maxHeight:r,height:"auto"}):this.element.height(Math.max(0,n.height-t));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=n(this);return n("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return n(t.target).closest(".ui-dialog").length?!0:!!n(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;n.ui.dialog.overlayInstances||this._delay(function(){n.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(r){t._allowInteraction(r)||(r.preventDefault(),n(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})});this.overlay=n("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo());this._on(this.overlay,{mousedown:"_keepFocus"});n.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(n.ui.dialog.overlayInstances--,n.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}});n.ui.dialog.overlayInstances=0;n.uiBackCompat!==!1&&n.widget("ui.dialog",n.ui.dialog,{_position:function(){var t=this.options.position,i=[],r=[0,0],u;t?((typeof t=="string"||typeof t=="object"&&"0"in t)&&(i=t.split?t.split(" "):[t[0],t[1]],i.length===1&&(i[1]=i[0]),n.each(["left","top"],function(n,t){+i[n]===i[n]&&(r[n]=i[n],i[n]=t)}),t={my:i[0]+(r[0]<0?r[0]:"+"+r[0])+" "+i[1]+(r[1]<0?r[1]:"+"+r[1]),at:i.join(" ")}),t=n.extend({},n.ui.dialog.prototype.options.position,t)):t=n.ui.dialog.prototype.options.position;u=this.uiDialog.is(":visible");u||this.uiDialog.show();this.uiDialog.position(t);u||this.uiDialog.hide()}})}(jQuery),function(n){n.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,n.proxy(function(n){this.options.disabled&&n.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(n){n.preventDefault()},"click .ui-state-disabled > a":function(n){n.preventDefault()},"click .ui-menu-item:has(a)":function(t){var i=n(t.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&n(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=n(t.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(n,t){var i=this.active||this.element.children(".ui-menu-item").eq(0);t||this.focus(n,i)},blur:function(t){this._delay(function(){n.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(t){n(t.target).closest(".ui-menu").length||this.collapseAll(t);this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=n(this);t.data("ui-menu-submenu-carat")&&t.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function s(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var i,f,r,e,u,o=!0;switch(t.keyCode){case n.ui.keyCode.PAGE_UP:this.previousPage(t);break;case n.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case n.ui.keyCode.HOME:this._move("first","first",t);break;case n.ui.keyCode.END:this._move("last","last",t);break;case n.ui.keyCode.UP:this.previous(t);break;case n.ui.keyCode.DOWN:this.next(t);break;case n.ui.keyCode.LEFT:this.collapse(t);break;case n.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case n.ui.keyCode.ENTER:case n.ui.keyCode.SPACE:this._activate(t);break;case n.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1;f=this.previousFilter||"";r=String.fromCharCode(t.keyCode);e=!1;clearTimeout(this.filterTimer);r===f?e=!0:r=f+r;u=new RegExp("^"+s(r),"i");i=this.activeMenu.children(".ui-menu-item").filter(function(){return u.test(n(this).children("a").text())});i=e&&i.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):i;i.length||(r=String.fromCharCode(t.keyCode),u=new RegExp("^"+s(r),"i"),i=this.activeMenu.children(".ui-menu-item").filter(function(){return u.test(n(this).children("a").text())}));i.length?(this.focus(t,i),i.length>1?(this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}o&&t.preventDefault()},_activate:function(n){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(n):this.select(n))},refresh:function(){var t,r=this.options.icons.submenu,i=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length);i.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=n(this),i=t.prev("a"),u=n("<span>").addClass("ui-menu-icon ui-icon "+r).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(u);t.attr("aria-labelledby",i.attr("id"))});t=i.add(this.element);t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});t.children(":not(.ui-menu-item)").each(function(){var t=n(this);/[^\-\u2014\u2013\s]/.test(t.text())||t.addClass("ui-widget-content ui-menu-divider")});t.children(".ui-state-disabled").attr("aria-disabled","true");this.active&&!n.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(n,t){n==="icons"&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu);this._super(n,t)},focus:function(n,t){var i,r;this.blur(n,n&&n.type==="focus");this._scrollIntoView(t);this.active=t.first();r=this.active.children("a").addClass("ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",r.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");n&&n.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay);i=t.children(".ui-menu");i.length&&n&&/^mouse/.test(n.type)&&this._startOpening(i);this.activeMenu=t.parent();this._trigger("focus",n,{item:t})},_scrollIntoView:function(t){var e,o,i,r,u,f;this._hasScroll()&&(e=parseFloat(n.css(this.activeMenu[0],"borderTopWidth"))||0,o=parseFloat(n.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-e-o,r=this.activeMenu.scrollTop(),u=this.activeMenu.height(),f=t.height(),i<0?this.activeMenu.scrollTop(r+i):i+f>u&&this.activeMenu.scrollTop(r+i-u+f))},blur:function(n,t){(t||clearTimeout(this.timer),this.active)&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",n,{item:this.active}))},_startOpening:function(n){(clearTimeout(this.timer),n.attr("aria-hidden")==="true")&&(this.timer=this._delay(function(){this._close();this._open(n)},this.delay))},_open:function(t){var i=n.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true");t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer);this.timer=this._delay(function(){var r=i?this.element:n(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element);this._close(r);this.blur(t);this.activeMenu=r},this.delay)},_close:function(n){n||(n=this.active?this.active.parent():this.element);n.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(n){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(n,t))},expand:function(n){var t=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(n,t)}))},next:function(n){this._move("next","first",n)},previous:function(n){this._move("prev","last",n)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(n,t,i){var r;this.active&&(r=n==="first"||n==="last"?this.active[n==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[n+"All"](".ui-menu-item").eq(0));r&&r.length&&this.active||(r=this.activeMenu.children(".ui-menu-item")[t]());this.focus(i,r)},nextPage:function(t){var i,r,u;if(!this.active){this.next(t);return}this.isLastItem()||(this._hasScroll()?(r=this.active.offset().top,u=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=n(this),i.offset().top-r-u<0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))},previousPage:function(t){var i,r,u;if(!this.active){this.next(t);return}this.isFirstItem()||(this._hasScroll()?(r=this.active.offset().top,u=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=n(this),i.offset().top-r+u>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(".ui-menu-item").first()))},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||n(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0);this._trigger("select",t,i)}})}(jQuery),function(n,t){n.widget("ui.progressbar",{version:"1.10.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=n("<div class='ui-progressbar-value ui-widget-header ui-corner-left'><\/div>").appendTo(this.element);this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove()},value:function(n){if(n===t)return this.options.value;this.options.value=this._constrainedValue(n);this._refreshValue()},_constrainedValue:function(n){return n===t&&(n=this.options.value),this.indeterminate=n===!1,typeof n!="number"&&(n=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,n))},_setOptions:function(n){var t=n.value;delete n.value;this._super(n);this.options.value=this._constrainedValue(t);this._refreshValue()},_setOption:function(n,t){n==="max"&&(t=Math.max(this.min,t));this._super(n,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=n("<div class='ui-progressbar-overlay'><\/div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==t&&(this.oldValue=t,this._trigger("change"));t===this.options.max&&this._trigger("complete")}})}(jQuery),function(){}(jQuery),function(){}(jQuery),function(n,t){function f(){return++u}function r(n){return n=n.cloneNode(!1),n.hash.length>1&&decodeURIComponent(n.href.replace(i,""))===decodeURIComponent(location.href.replace(i,""))}var u=0,i=/#.*$/;n.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var i=this,t=this.options;this.running=!1;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",t.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(t){n(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){n(this).closest("li").is(".ui-state-disabled")&&this.blur()});this._processTabs();t.active=this._initialActive();n.isArray(t.disabled)&&(t.disabled=n.unique(t.disabled.concat(n.map(this.tabs.filter(".ui-state-disabled"),function(n){return i.tabs.index(n)}))).sort());this.active=this.options.active!==!1&&this.anchors.length?this._findActive(t.active):n();this._refresh();this.active.length&&this.load(t.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,r=location.hash.substring(1);return t===null&&(r&&this.tabs.each(function(i,u){if(n(u).attr("aria-controls")===r)return t=i,!1}),t===null&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(t===null||t===-1)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),t===-1&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):n()}},_tabKeydown:function(t){var r=n(this.document[0].activeElement).closest("li"),i=this.tabs.index(r),u=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case n.ui.keyCode.RIGHT:case n.ui.keyCode.DOWN:i++;break;case n.ui.keyCode.UP:case n.ui.keyCode.LEFT:u=!1;i--;break;case n.ui.keyCode.END:i=this.anchors.length-1;break;case n.ui.keyCode.HOME:i=0;break;case n.ui.keyCode.SPACE:t.preventDefault();clearTimeout(this.activating);this._activate(i);return;case n.ui.keyCode.ENTER:t.preventDefault();clearTimeout(this.activating);this._activate(i===this.options.active?!1:i);return;default:return}t.preventDefault();clearTimeout(this.activating);i=this._focusNextTab(i,u);t.ctrlKey||(r.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===n.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===n.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===n.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function u(){return t>r&&(t=0),t<0&&(t=r),t}for(var r=this.tabs.length-1;n.inArray(u(),this.options.disabled)!==-1;)t=i?t+1:t-1;return t},_focusNextTab:function(n,t){return n=this._findNextTab(n,t),this.tabs.eq(n).focus(),n},_setOption:function(n,t){if(n==="active"){this._activate(t);return}if(n==="disabled"){this._setupDisabled(t);return}this._super(n,t);n==="collapsible"&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0));n==="event"&&this._setupEvents(t);n==="heightStyle"&&this._setupHeightStyle(t)},_tabId:function(n){return n.attr("aria-controls")||"ui-tabs-"+f()},_sanitizeSelector:function(n){return n?n.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=n.map(i.filter(".ui-state-disabled"),function(n){return i.index(n)});this._processTabs();t.active!==!1&&this.anchors.length?this.active.length&&!n.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=n()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=n());this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return n("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=n();this.anchors.each(function(i,u){var e,f,s,h=n(u).uniqueId().attr("id"),o=n(u).closest("li"),c=o.attr("aria-controls");r(u)?(e=u.hash,f=t.element.find(t._sanitizeSelector(e))):(s=t._tabId(o),e="#"+s,f=t.element.find(e),f.length||(f=t._createPanel(s),f.insertAfter(t.panels[i-1]||t.tablist)),f.attr("aria-live","polite"));f.length&&(t.panels=t.panels.add(f));c&&o.data("ui-tabs-aria-controls",c);o.attr({"aria-controls":e.substring(1),"aria-labelledby":h});f.attr("aria-labelledby",h)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return n("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){n.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i=0,r;r=this.tabs[i];i++)t===!0||n.inArray(i,t)!==-1?n(r).addClass("ui-state-disabled").attr("aria-disabled","true"):n(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={click:function(n){n.preventDefault()}};t&&n.each(t.split(" "),function(n,t){i[t]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,i);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,r=this.element.parent();t==="fill"?(i=r.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=n(this),r=t.css("position");r!=="absolute"&&r!=="fixed"&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=n(this).outerHeight(!0)}),this.panels.each(function(){n(this).height(Math.max(0,i-n(this).innerHeight()+n(this).height()))}).css("overflow","auto")):t==="auto"&&(i=0,this.panels.each(function(){i=Math.max(i,n(this).height("").height())}).height(i))},_eventHandler:function(t){var u=this.options,r=this.active,c=n(t.currentTarget),i=c.closest("li"),f=i[0]===r[0],e=f&&u.collapsible,o=e?n():this._getPanelForTab(i),s=r.length?this._getPanelForTab(r):n(),h={oldTab:r,oldPanel:s,newTab:e?n():i,newPanel:o};(t.preventDefault(),i.hasClass("ui-state-disabled")||i.hasClass("ui-tabs-loading")||this.running||f&&!u.collapsible||this._trigger("beforeActivate",t,h)===!1)||(u.active=e?!1:this.tabs.index(i),this.active=f?n():i,this.xhr&&this.xhr.abort(),s.length||o.length||n.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(i),t),this._toggle(t,h))},_toggle:function(t,i){function e(){u.running=!1;u._trigger("activate",t,i)}function o(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active");r.length&&u.options.show?u._show(r,u.options.show,e):(r.show(),e())}var u=this,r=i.newPanel,f=i.oldPanel;this.running=!0;f.length&&this.options.hide?this._hide(f,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");o()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),f.hide(),o());f.attr({"aria-expanded":"false","aria-hidden":"true"});i.oldTab.attr("aria-selected","false");r.length&&f.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return n(this).attr("tabIndex")===0}).attr("tabIndex",-1);r.attr({"aria-expanded":"true","aria-hidden":"false"});i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var r,i=this._findActive(t);i[0]!==this.active[0]&&(i.length||(i=this.active),r=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:r,currentTarget:r,preventDefault:n.noop}))},_findActive:function(t){return t===!1?n():this.tabs.eq(t)},_getIndex:function(n){return typeof n=="string"&&(n=this.anchors.index(this.anchors.filter("[href$='"+n+"']"))),n},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();this.tabs.add(this.panels).each(function(){n.data(this,"ui-tabs-destroy")?n(this).remove():n(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});this.tabs.each(function(){var t=n(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")});this.panels.show();this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(i){var r=this.options.disabled;r!==!1&&(i===t?r=!1:(i=this._getIndex(i),r=n.isArray(r)?n.map(r,function(n){return n!==i?n:null}):n.map(this.tabs,function(n,t){return t!==i?t:null})),this._setupDisabled(r))},disable:function(i){var r=this.options.disabled;if(r!==!0){if(i===t)r=!0;else{if(i=this._getIndex(i),n.inArray(i,r)!==-1)return;r=n.isArray(r)?n.merge([i],r).sort():[i]}this._setupDisabled(r)}},load:function(t,i){t=this._getIndex(t);var f=this,u=this.tabs.eq(t),o=u.find(".ui-tabs-anchor"),e=this._getPanelForTab(u),s={tab:u,panel:e};r(o[0])||(this.xhr=n.ajax(this._ajaxSettings(o,i,s)),this.xhr&&this.xhr.statusText!=="canceled"&&(u.addClass("ui-tabs-loading"),e.attr("aria-busy","true"),this.xhr.success(function(n){setTimeout(function(){e.html(n);f._trigger("load",i,s)},1)}).complete(function(n,t){setTimeout(function(){t==="abort"&&f.panels.stop(!1,!0);u.removeClass("ui-tabs-loading");e.removeAttr("aria-busy");n===f.xhr&&delete f.xhr},1)})))},_ajaxSettings:function(t,i,r){var u=this;return{url:t.attr("href"),beforeSend:function(t,f){return u._trigger("beforeLoad",i,n.extend({jqXHR:t,ajaxSettings:f},r))}}},_getPanelForTab:function(t){var i=n(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(n){function i(t,i){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(i);t.data("ui-tooltip-id",i).attr("aria-describedby",n.trim(r.join(" ")))}function r(t){var u=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),r=n.inArray(u,i);r!==-1&&i.splice(r,1);t.removeData("ui-tooltip-id");i=n.trim(i.join(" "));i?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")}var t=0;n.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var t=n(this).attr("title")||"";return n("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable()},_setOption:function(t,i){var r=this;if(t==="disabled"){this[i?"_disable":"_enable"]();this.options[t]=i;return}this._super(t,i);t==="content"&&n.each(this.tooltips,function(n,t){r._updateContent(t)})},_disable:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r[0];t.close(u,!0)});this.element.find(this.options.items).addBack().each(function(){var t=n(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=n(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var r=this,i=n(t?t.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),t&&t.type==="mouseover"&&i.parents().each(function(){var t=n(this),i;t.data("ui-tooltip-open")&&(i=n.Event("blur"),i.target=i.currentTarget=this,r.close(i,!0));t.attr("title")&&(t.uniqueId(),r.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(i,t))},_updateContent:function(n,t){var i,r=this.options.content,u=this,f=t?t.type:null;if(typeof r=="string")return this._open(t,n,r);i=r.call(n[0],function(i){n.data("ui-tooltip-open")&&u._delay(function(){t&&(t.type=f);this._open(t,n,i)})});i&&this._open(t,n,i)},_open:function(t,r,u){function s(n){(o.of=n,f.is(":hidden"))||f.position(o)}var f,e,h,o=n.extend({},this.options.position);if(u){if(f=this._find(r),f.length){f.find(".ui-tooltip-content").html(u);return}r.is("[title]")&&(t&&t.type==="mouseover"?r.attr("title",""):r.removeAttr("title"));f=this._tooltip(r);i(r,f.attr("id"));f.find(".ui-tooltip-content").html(u);this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:s}),s(t)):f.position(n.extend({of:r},this.options.position));f.hide();this._show(f,this.options.show);this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){f.is(":visible")&&(s(o.of),clearInterval(h))},n.fx.interval));this._trigger("open",t,{tooltip:f});e={keyup:function(t){if(t.keyCode===n.ui.keyCode.ESCAPE){var i=n.Event(t);i.currentTarget=r[0];this.close(i,!0)}},remove:function(){this._removeTooltip(f)}};t&&t.type!=="mouseover"||(e.mouseleave="close");t&&t.type!=="focusin"||(e.focusout="close");this._on(!0,r,e)}},close:function(t){var f=this,i=n(t?t.currentTarget:this.element),u=this._find(i);this.closing||(clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&i.attr("title",i.data("ui-tooltip-title")),r(i),u.stop(!0),this._hide(u,this.options.hide,function(){f._removeTooltip(n(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&t.type==="mouseleave"&&n.each(this.parents,function(t,i){n(i.element).attr("title",i.title);delete f.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:u}),this.closing=!1)},_tooltip:function(i){var u="ui-tooltip-"+t++,r=n("<div>").attr({id:u,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return n("<div>").addClass("ui-tooltip-content").appendTo(r),r.appendTo(this.document[0].body),this.tooltips[u]=i,r},_find:function(t){var i=t.data("ui-tooltip-id");return i?n("#"+i):n()},_removeTooltip:function(n){n.remove();delete this.tooltips[n.attr("id")]},_destroy:function(){var t=this;n.each(this.tooltips,function(i,r){var u=n.Event("blur");u.target=u.currentTarget=r[0];t.close(u,!0);n("#"+i).remove();r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})}(jQuery),function(n,t){var i="ui-effects-";n.effects={effect:{}};
/*!
 * jQuery Color Animations v2.1.2
 * https://github.com/jquery/jquery-color
 *
 * Copyright 2013 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * Date: Wed Jan 16 08:47:09 2013 -0600
 */
(function(n,t){function e(n,t,i){var r=s[t.type]||{};return n==null?i||!t.def?null:t.def:(n=r.floor?~~n:parseFloat(n),isNaN(n))?t.def:r.mod?(n+r.mod)%r.mod:0>n?0:r.max<n?r.max:n}function l(t){var e=i(),o=e._rgba=[];return(t=t.toLowerCase(),r(v,function(n,i){var r,s=i.re.exec(t),h=s&&i.parse(s),f=i.space||"rgba";if(h)return r=e[f](h),e[u[f].cache]=r[u[f].cache],o=e._rgba=r._rgba,!1}),o.length)?(o.join()==="0,0,0,0"&&n.extend(o,f.transparent),e):f[t]}function o(n,t,i){return(i=(i+1)%1,i*6<1)?n+(t-n)*i*6:i*2<1?t:i*3<2?n+(t-n)*(2/3-i)*6:n}var a=/^([\-+])=\s*(\d+\.?\d*)/,v=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1],n[2],n[3],n[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1]*2.55,n[2]*2.55,n[3]*2.55,n[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(n){return[n[1],n[2]/100,n[3]/100,n[4]]}}],i=n.Color=function(t,i,r,u){return new n.Color.fn.parse(t,i,r,u)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},s={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=i.support={},c=n("<p>")[0],f,r=n.each;c.style.cssText="background-color:rgba(1,1,1,.5)";h.rgba=c.style.backgroundColor.indexOf("rgba")>-1;r(u,function(n,t){t.cache="_"+n;t.props.alpha={idx:3,type:"percent",def:1}});i.fn=n.extend(i.prototype,{parse:function(o,s,h,c){if(o===t)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=n(o).css(s),s=t);var a=this,v=n.type(o),y=this._rgba=[];return(s!==t&&(o=[o,s,h,c],v="array"),v==="string")?this.parse(l(o)||f._default):v==="array"?(r(u.rgba.props,function(n,t){y[t.idx]=e(o[t.idx],t)}),this):v==="object"?(o instanceof i?r(u,function(n,t){o[t.cache]&&(a[t.cache]=o[t.cache].slice())}):r(u,function(t,i){var u=i.cache;r(i.props,function(n,t){if(!a[u]&&i.to){if(n==="alpha"||o[n]==null)return;a[u]=i.to(a._rgba)}a[u][t.idx]=e(o[n],t,!0)});a[u]&&n.inArray(null,a[u].slice(0,3))<0&&(a[u][3]=1,i.from&&(a._rgba=i.from(a[u])))}),this):void 0},is:function(n){var e=i(n),t=!0,f=this;return r(u,function(n,i){var o,u=e[i.cache];return u&&(o=f[i.cache]||i.to&&i.to(f._rgba)||[],r(i.props,function(n,i){if(u[i.idx]!=null)return t=u[i.idx]===o[i.idx]})),t}),t},_space:function(){var n=[],t=this;return r(u,function(i,r){t[r.cache]&&n.push(i)}),n.pop()},transition:function(n,t){var f=i(n),c=f._space(),o=u[c],l=this.alpha()===0?i("transparent"):this,a=l[o.cache]||o.to(l._rgba),h=a.slice();return f=f[o.cache],r(o.props,function(n,i){var c=i.idx,r=a[c],u=f[c],o=s[i.type]||{};u!==null&&(r===null?h[c]=u:(o.mod&&(u-r>o.mod/2?r+=o.mod:r-u>o.mod/2&&(r-=o.mod)),h[c]=e((u-r)*t+r,i)))}),this[c](h)},blend:function(t){if(this._rgba[3]===1)return this;var r=this._rgba.slice(),u=r.pop(),f=i(t)._rgba;return i(n.map(r,function(n,t){return(1-u)*f[t]+u*n}))},toRgbaString:function(){var i="rgba(",t=n.map(this._rgba,function(n,t){return n==null?t>2?1:0:n});return t[3]===1&&(t.pop(),i="rgb("),i+t.join()+")"},toHslaString:function(){var i="hsla(",t=n.map(this.hsla(),function(n,t){return n==null&&(n=t>2?1:0),t&&t<3&&(n=Math.round(n*100)+"%"),n});return t[3]===1&&(t.pop(),i="hsl("),i+t.join()+")"},toHexString:function(t){var i=this._rgba.slice(),r=i.pop();return t&&i.push(~~(r*255)),"#"+n.map(i,function(n){return n=(n||0).toString(16),n.length===1?"0"+n:n}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});i.fn.parse.prototype=i.fn;u.hsla.to=function(n){if(n[0]==null||n[1]==null||n[2]==null)return[null,null,null,n[3]];var i=n[0]/255,r=n[1]/255,f=n[2]/255,s=n[3],u=Math.max(i,r,f),e=Math.min(i,r,f),t=u-e,o=u+e,h=o*.5,c,l;return c=e===u?0:i===u?60*(r-f)/t+360:r===u?60*(f-i)/t+120:60*(i-r)/t+240,l=t===0?0:h<=.5?t/o:t/(2-o),[Math.round(c)%360,l,h,s==null?1:s]};u.hsla.from=function(n){if(n[0]==null||n[1]==null||n[2]==null)return[null,null,null,n[3]];var r=n[0]/360,u=n[1],t=n[2],e=n[3],i=t<=.5?t*(1+u):t+u-t*u,f=2*t-i;return[Math.round(o(f,i,r+1/3)*255),Math.round(o(f,i,r)*255),Math.round(o(f,i,r-1/3)*255),e]};r(u,function(u,f){var s=f.props,o=f.cache,h=f.to,c=f.from;i.fn[u]=function(u){if(h&&!this[o]&&(this[o]=h(this._rgba)),u===t)return this[o].slice();var l,a=n.type(u),v=a==="array"||a==="object"?u:arguments,f=this[o].slice();return r(s,function(n,t){var i=v[a==="object"?n:t.idx];i==null&&(i=f[t.idx]);f[t.idx]=e(i,t)}),c?(l=i(c(f)),l[o]=f,l):i(f)};r(s,function(t,r){i.fn[t]||(i.fn[t]=function(i){var f=n.type(i),h=t==="alpha"?this._hsla?"hsla":"rgba":u,o=this[h](),s=o[r.idx],e;return f==="undefined"?s:(f==="function"&&(i=i.call(this,s),f=n.type(i)),i==null&&r.empty)?this:(f==="string"&&(e=a.exec(i),e&&(i=s+parseFloat(e[2])*(e[1]==="+"?1:-1))),o[r.idx]=i,this[h](o))})})});i.hook=function(t){var u=t.split(" ");r(u,function(t,r){n.cssHooks[r]={set:function(t,u){var o,f,e="";if(u!=="transparent"&&(n.type(u)!=="string"||(o=l(u)))){if(u=i(o||u),!h.rgba&&u._rgba[3]!==1){for(f=r==="backgroundColor"?t.parentNode:t;(e===""||e==="transparent")&&f&&f.style;)try{e=n.css(f,"backgroundColor");f=f.parentNode}catch(s){}u=u.blend(e&&e!=="transparent"?e:"_default")}u=u.toRgbaString()}try{t.style[r]=u}catch(s){}}};n.fx.step[r]=function(t){t.colorInit||(t.start=i(t.elem,r),t.end=i(t.end),t.colorInit=!0);n.cssHooks[r].set(t.elem,t.start.transition(t.end,t.pos))}})};i.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");n.cssHooks.borderColor={expand:function(n){var t={};return r(["Top","Right","Bottom","Left"],function(i,r){t["border"+r+"Color"]=n}),t}};f=n.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery),function(){function i(t){var r,u,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,f={};if(i&&i.length&&i[0]&&i[i[0]])for(u=i.length;u--;)r=i[u],typeof i[r]=="string"&&(f[n.camelCase(r)]=i[r]);else for(r in i)typeof i[r]=="string"&&(f[r]=i[r]);return f}function f(t,i){var e={},r,f;for(r in i)f=i[r],t[r]!==f&&(u[r]||(n.fx.step[r]||!isNaN(parseFloat(f)))&&(e[r]=f));return e}var r=["add","remove","toggle"],u={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};n.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){n.fx.step[i]=function(n){(n.end==="none"||n.setAttr)&&(n.pos!==1||n.setAttr)||(jQuery.style(n.elem,i,n.end),n.setAttr=!0)}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))});n.effects.animateClass=function(t,u,e,o){var s=n.speed(u,e,o);return this.queue(function(){var e=n(this),h=e.attr("class")||"",o,u=s.children?e.find("*").addBack():e;u=u.map(function(){var t=n(this);return{el:t,start:i(this)}});o=function(){n.each(r,function(n,i){t[i]&&e[i+"Class"](t[i])})};o();u=u.map(function(){return this.end=i(this.el[0]),this.diff=f(this.start,this.end),this});e.attr("class",h);u=u.map(function(){var i=this,t=n.Deferred(),r=n.extend({},s,{queue:!1,complete:function(){t.resolve(i)}});return this.el.animate(this.diff,r),t.promise()});n.when.apply(n,u.get()).done(function(){o();n.each(arguments,function(){var t=this.el;n.each(this.diff,function(n){t.css(n,"")})});s.complete.call(e[0])})})};n.fn.extend({addClass:function(t){return function(i,r,u,f){return r?n.effects.animateClass.call(this,{add:i},r,u,f):t.apply(this,arguments)}}(n.fn.addClass),removeClass:function(t){return function(i,r,u,f){return arguments.length>1?n.effects.animateClass.call(this,{remove:i},r,u,f):t.apply(this,arguments)}}(n.fn.removeClass),toggleClass:function(i){return function(r,u,f,e,o){return typeof u=="boolean"||u===t?f?n.effects.animateClass.call(this,u?{add:r}:{remove:r},f,e,o):i.apply(this,arguments):n.effects.animateClass.call(this,{toggle:r},u,f,e)}}(n.fn.toggleClass),switchClass:function(t,i,r,u,f){return n.effects.animateClass.call(this,{add:i,remove:t},r,u,f)}})}(),function(){function r(t,i,r,u){return n.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},i==null&&(i={}),n.isFunction(i)&&(u=i,r=null,i={}),(typeof i=="number"||n.fx.speeds[i])&&(u=r,r=i,i={}),n.isFunction(r)&&(u=r,r=null),i&&n.extend(t,i),r=r||i.duration,t.duration=n.fx.off?0:typeof r=="number"?r:r in n.fx.speeds?n.fx.speeds[r]:n.fx.speeds._default,t.complete=u||i.complete,t}function u(t){return!t||typeof t=="number"||n.fx.speeds[t]?!0:typeof t=="string"&&!n.effects.effect[t]?!0:n.isFunction(t)?!0:typeof t=="object"&&!t.effect?!0:!1}n.extend(n.effects,{version:"1.10.4",save:function(n,t){for(var r=0;r<t.length;r++)t[r]!==null&&n.data(i+t[r],n[0].style[t[r]])},restore:function(n,r){for(var f,u=0;u<r.length;u++)r[u]!==null&&(f=n.data(i+r[u]),f===t&&(f=""),n.css(r[u],f))},setMode:function(n,t){return t==="toggle"&&(t=n.is(":hidden")?"show":"hide"),t},getBaseline:function(n,t){var i,r;switch(n[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=n[0]/t.height}switch(n[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=n[1]/t.width}return{x:r,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),float:t.css("float")},u=n("<div><\/div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(e){r=document.body}return t.wrap(u),(t[0]===r||n.contains(t[0],r))&&n(r).focus(),u=t.parent(),t.css("position")==="static"?(u.css({position:"relative"}),t.css({position:"relative"})):(n.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),n.each(["top","left","bottom","right"],function(n,r){i[r]=t.css(r);isNaN(parseInt(i[r],10))&&(i[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(f),u.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||n.contains(t[0],i))&&n(i).focus()),t},setTransition:function(t,i,r,u){return u=u||{},n.each(i,function(n,i){var f=t.cssUnit(i);f[0]>0&&(u[i]=f[0]*r+f[1])}),u}});n.fn.extend({effect:function(){function e(i){function o(){n.isFunction(e)&&e.call(r[0]);n.isFunction(i)&&i()}var r=n(this),e=t.complete,u=t.mode;(r.is(":hidden")?u==="hide":u==="show")?(r[u](),o()):f.call(r[0],t,o)}var t=r.apply(this,arguments),i=t.mode,u=t.queue,f=n.effects.effect[t.effect];return n.fx.off||!f?i?this[i](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):u===!1?this.each(e):this.queue(u||"fx",e)},show:function(n){return function(t){if(u(t))return n.apply(this,arguments);var i=r.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(n.fn.show),hide:function(n){return function(t){if(u(t))return n.apply(this,arguments);var i=r.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(n.fn.hide),toggle:function(n){return function(t){if(u(t)||typeof t=="boolean")return n.apply(this,arguments);var i=r.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(n.fn.toggle),cssUnit:function(t){var i=this.css(t),r=[];return n.each(["em","px","%","pt"],function(n,t){i.indexOf(t)>0&&(r=[parseFloat(i),t])}),r}})}(),function(){var t={};n.each(["Quad","Cubic","Quart","Quint","Expo"],function(n,i){t[i]=function(t){return Math.pow(t,n+2)}});n.extend(t,{Sine:function(n){return 1-Math.cos(n*Math.PI/2)},Circ:function(n){return 1-Math.sqrt(1-n*n)},Elastic:function(n){return n===0||n===1?n:-Math.pow(2,8*(n-1))*Math.sin(((n-1)*80-7.5)*Math.PI/15)},Back:function(n){return n*n*(3*n-2)},Bounce:function(n){for(var t,i=4;n<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((t*3-2)/22-n,2)}});n.each(t,function(t,i){n.easing["easeIn"+t]=i;n.easing["easeOut"+t]=function(n){return 1-i(1-n)};n.easing["easeInOut"+t]=function(n){return n<.5?i(n*2)/2:1-i(n*-2+2)/2}})}()}(jQuery),function(n){n.effects.effect.clip=function(t,i){var r=n(this),h=["position","top","bottom","left","right","height","width"],v=n.effects.setMode(r,t.mode||"hide"),f=v==="show",y=t.direction||"vertical",c=y==="vertical",o=c?"height":"width",l=c?"top":"left",s={},a,u,e;n.effects.save(r,h);r.show();a=n.effects.createWrapper(r).css({overflow:"hidden"});u=r[0].tagName==="IMG"?a:r;e=u[o]();f&&(u.css(o,0),u.css(l,e/2));s[o]=f?e:0;s[l]=f?0:e/2;u.animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){f||r.hide();n.effects.restore(r,h);n.effects.removeWrapper(r);i()}})}}(jQuery),function(n){n.effects.effect.fade=function(t,i){var r=n(this),u=n.effects.setMode(r,t.mode||"toggle");r.animate({opacity:u},{queue:!1,duration:t.duration,easing:t.easing,complete:i})}}(jQuery),function(n){n.effects.effect.puff=function(t,i){var r=n(this),e=n.effects.setMode(r,t.mode||"hide"),o=e==="hide",s=parseInt(t.percent,10)||150,f=s/100,u={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};n.extend(t,{effect:"scale",queue:!1,fade:!0,mode:e,complete:i,percent:o?s:100,from:o?u:{height:u.height*f,width:u.width*f,outerHeight:u.outerHeight*f,outerWidth:u.outerWidth*f}});r.effect(t)};n.effects.effect.scale=function(t,i){var u=n(this),r=n.extend(!0,{},t),f=n.effects.setMode(u,t.mode||"effect"),s=parseInt(t.percent,10)||(parseInt(t.percent,10)===0?0:f==="hide"?0:100),h=t.direction||"both",c=t.origin,e={height:u.height(),width:u.width(),outerHeight:u.outerHeight(),outerWidth:u.outerWidth()},o={y:h!=="horizontal"?s/100:1,x:h!=="vertical"?s/100:1};r.effect="size";r.queue=!1;r.complete=i;f!=="effect"&&(r.origin=c||["middle","center"],r.restore=!0);r.from=t.from||(f==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:e);r.to={height:e.height*o.y,width:e.width*o.x,outerHeight:e.outerHeight*o.y,outerWidth:e.outerWidth*o.x};r.fade&&(f==="show"&&(r.from.opacity=0,r.to.opacity=1),f==="hide"&&(r.from.opacity=1,r.to.opacity=0));u.effect(r)};n.effects.effect.size=function(t,i){var f,l,u,r=n(this),w=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["width","height","overflow"],v=["fontSize"],e=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],o=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],h=n.effects.setMode(r,t.mode||"effect"),y=t.restore||h!=="effect",c=t.scale||"both",b=t.origin||["middle","center"],k=r.css("position"),s=y?w:["position","top","bottom","left","right","overflow","opacity"],p={height:0,width:0,outerHeight:0,outerWidth:0};h==="show"&&r.show();f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};t.mode==="toggle"&&h==="show"?(r.from=t.to||p,r.to=t.from||f):(r.from=t.from||(h==="show"?p:f),r.to=t.to||(h==="hide"?p:f));u={from:{y:r.from.height/f.height,x:r.from.width/f.width},to:{y:r.to.height/f.height,x:r.to.width/f.width}};(c==="box"||c==="both")&&(u.from.y!==u.to.y&&(s=s.concat(e),r.from=n.effects.setTransition(r,e,u.from.y,r.from),r.to=n.effects.setTransition(r,e,u.to.y,r.to)),u.from.x!==u.to.x&&(s=s.concat(o),r.from=n.effects.setTransition(r,o,u.from.x,r.from),r.to=n.effects.setTransition(r,o,u.to.x,r.to)));(c==="content"||c==="both")&&u.from.y!==u.to.y&&(s=s.concat(v).concat(a),r.from=n.effects.setTransition(r,v,u.from.y,r.from),r.to=n.effects.setTransition(r,v,u.to.y,r.to));n.effects.save(r,s);r.show();n.effects.createWrapper(r);r.css("overflow","hidden").css(r.from);b&&(l=n.effects.getBaseline(b,f),r.from.top=(f.outerHeight-r.outerHeight())*l.y,r.from.left=(f.outerWidth-r.outerWidth())*l.x,r.to.top=(f.outerHeight-r.to.outerHeight)*l.y,r.to.left=(f.outerWidth-r.to.outerWidth)*l.x);r.css(r.from);(c==="content"||c==="both")&&(e=e.concat(["marginTop","marginBottom"]).concat(v),o=o.concat(["marginLeft","marginRight"]),a=w.concat(e).concat(o),r.find("*[width]").each(function(){var i=n(this),r={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};y&&n.effects.save(i,a);i.from={height:r.height*u.from.y,width:r.width*u.from.x,outerHeight:r.outerHeight*u.from.y,outerWidth:r.outerWidth*u.from.x};i.to={height:r.height*u.to.y,width:r.width*u.to.x,outerHeight:r.height*u.to.y,outerWidth:r.width*u.to.x};u.from.y!==u.to.y&&(i.from=n.effects.setTransition(i,e,u.from.y,i.from),i.to=n.effects.setTransition(i,e,u.to.y,i.to));u.from.x!==u.to.x&&(i.from=n.effects.setTransition(i,o,u.from.x,i.from),i.to=n.effects.setTransition(i,o,u.to.x,i.to));i.css(i.from);i.animate(i.to,t.duration,t.easing,function(){y&&n.effects.restore(i,a)})}));r.animate(r.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){r.to.opacity===0&&r.css("opacity",r.from.opacity);h==="hide"&&r.hide();n.effects.restore(r,s);y||(k==="static"?r.css({position:"relative",top:r.to.top,left:r.to.left}):n.each(["top","left"],function(n,t){r.css(t,function(t,i){var f=parseInt(i,10),u=n?r.to.left:r.to.top;return i==="auto"?u+"px":f+u+"px"})}));n.effects.removeWrapper(r);i()}})}}(jQuery);GraphTypes={DATADISPLAY:0,CALIBRATION:1,REFSPECTRUM:2,STREAMING:3};
/*! Javascript plotting library for jQuery, version 0.8.1.
Copyright (c) 2007-2013 IOLA and Ole Laursen.
Licensed under the MIT license.
*/
(function(n){n.color={};n.color.make=function(t,i,r,u){var f={};return f.r=t||0,f.g=i||0,f.b=r||0,f.a=u!=null?u:1,f.add=function(n,t){for(var i=0,r=n.length;i<r;++i)f[n.charAt(i)]+=t;return f.normalize()},f.scale=function(n,t){for(var i=0,r=n.length;i<r;++i)f[n.charAt(i)]*=t;return f.normalize()},f.toString=function(){return f.a>=1?"rgb("+[f.r,f.g,f.b].join(",")+")":"rgba("+[f.r,f.g,f.b,f.a].join(",")+")"},f.normalize=function(){function n(n,t,i){return t<n?n:t>i?i:t}return f.r=n(0,parseInt(f.r,10),255),f.g=n(0,parseInt(f.g,10),255),f.b=n(0,parseInt(f.b,10),255),f.a=n(0,f.a,1),f},f.clone=function(){return n.color.make(f.r,f.b,f.g,f.a)},f.normalize()};n.color.extract=function(t,i){var r;do{if(r=t.css(i).toLowerCase(),r!=""&&r!="transparent")break;t=t.parent()}while(!n.nodeName(t.get(0),"body"));return r=="rgba(0, 0, 0, 0)"&&(r="transparent"),n.color.parse(r)};n.color.parse=function(i){var r,u=n.color.make,f;return(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(i))?u(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10)):(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(i))?u(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4])):(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(i))?u(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55):(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(i))?u(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4])):(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(i))?u(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)):(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(i))?u(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16)):(f=n.trim(i).toLowerCase(),f=="transparent"?u(255,255,255,0):(r=t[f]||[0,0,0],u(r[0],r[1],r[2])))};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery),function(n){function t(t,i){var r=i.children("."+t)[0];if(r==null&&(r=document.createElement("canvas"),r.className=t,n(r).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(i),!r.getContext))if(window.G_vmlCanvasManager)r=window.G_vmlCanvasManager.initElement(r);else throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");this.element=r;var u=this.context=r.getContext("2d"),f=window.devicePixelRatio||1,e=u.webkitBackingStorePixelRatio||u.mozBackingStorePixelRatio||u.msBackingStorePixelRatio||u.oBackingStorePixelRatio||u.backingStorePixelRatio||1;this.pixelRatio=f/e;this.resize(i.width(),i.height());this.textContainer=null;this.text={};this._textCache={}}function r(i,r,f,e,o){function tt(n,t){t=[a].concat(t);for(var i=0,r=n.length;i<r;++i)n[i].apply(this,t)}function ui(){for(var i,u={Canvas:t},r=0,f=o.length;r<f;++r)i=o[r],i.init(a,u),i.options&&n.extend(!0,s,i.options)}function fi(t){var u,r,o,e,f;for(n.extend(!0,s,t),t&&t.colors&&(s.colors=t.colors),s.xaxis.color==null&&(s.xaxis.color=n.color.parse(s.grid.color).scale("a",.22).toString()),s.yaxis.color==null&&(s.yaxis.color=n.color.parse(s.grid.color).scale("a",.22).toString()),s.xaxis.tickColor==null&&(s.xaxis.tickColor=s.grid.tickColor||s.xaxis.color),s.yaxis.tickColor==null&&(s.yaxis.tickColor=s.grid.tickColor||s.yaxis.color),s.grid.borderColor==null&&(s.grid.borderColor=s.grid.color),s.grid.tickColor==null&&(s.grid.tickColor=n.color.parse(s.grid.color).scale("a",.22).toString()),e={style:i.css("font-style"),size:Math.round(.8*(+i.css("font-size").replace("px","")||13)),variant:i.css("font-variant"),weight:i.css("font-weight"),family:i.css("font-family")},e.lineHeight=e.size*1.15,o=s.xaxes.length||1,u=0;u<o;++u)r=s.xaxes[u],r&&!r.tickColor&&(r.tickColor=r.color),r=n.extend(!0,{},s.xaxis,r),s.xaxes[u]=r,r.font&&(r.font=n.extend({},e,r.font),r.font.color||(r.font.color=r.color));for(o=s.yaxes.length||1,u=0;u<o;++u)r=s.yaxes[u],r&&!r.tickColor&&(r.tickColor=r.color),r=n.extend(!0,{},s.yaxis,r),s.yaxes[u]=r,r.font&&(r.font=n.extend({},e,r.font),r.font.color||(r.font.color=r.color));for(s.xaxis.noTicks&&s.xaxis.ticks==null&&(s.xaxis.ticks=s.xaxis.noTicks),s.yaxis.noTicks&&s.yaxis.ticks==null&&(s.yaxis.ticks=s.yaxis.noTicks),s.x2axis&&(s.xaxes[1]=n.extend(!0,{},s.xaxis,s.x2axis),s.xaxes[1].position="top"),s.y2axis&&(s.yaxes[1]=n.extend(!0,{},s.yaxis,s.y2axis),s.yaxes[1].position="right"),s.grid.coloredAreas&&(s.grid.markings=s.grid.coloredAreas),s.grid.coloredAreasColor&&(s.grid.markingsColor=s.grid.coloredAreasColor),s.lines&&n.extend(!0,s.series.lines,s.lines),s.points&&n.extend(!0,s.series.points,s.points),s.bars&&n.extend(!0,s.series.bars,s.bars),s.shadowSize!=null&&(s.series.shadowSize=s.shadowSize),s.highlightColor!=null&&(s.series.highlightColor=s.highlightColor),u=0,ol=s.xaxes.length;u<ol;++u)ot(p,u+1).options=s.xaxes[u];for(u=0,oy=s.yaxes.length;u<oy;++u)ot(k,u+1).options=s.yaxes[u];for(f in b)s.hooks[f]&&s.hooks[f].length&&(b[f]=b[f].concat(s.hooks[f]));tt(b.processOptions,[s])}function ct(n){l=ei(n);si();hi()}function ei(t){for(var r,u=[],i=0,f=t.length;i<f;++i)r=n.extend(!0,{},s.series),t[i].data!=null?(r.data=t[i].data,delete t[i].data,n.extend(!0,r,t[i]),t[i].data=r.data):r.data=t[i],u.push(r);return u}function et(n,t){var i=n[t+"axis"];return typeof i=="object"&&(i=i.n),typeof i!="number"&&(i=1),i}function it(){return n.grep(p.concat(k),function(n){return n})}function lt(n){for(var u,i={},t,r=0,f=p.length;r<f;++r)t=p[r],t&&t.used&&(i["x"+t.n]=t.c2p(n.left));for(r=0,u=k.length;r<u;++r)t=k[r],t&&t.used&&(i["y"+t.n]=t.c2p(n.top));return i.x1!==undefined&&(i.x=i.x1),i.y1!==undefined&&(i.y=i.y1),i}function oi(n){for(var f,u={},t,i,r=0,e=p.length;r<e;++r)if(t=p[r],t&&t.used&&(i="x"+t.n,n[i]==null&&t.n==1&&(i="x"),n[i]!=null)){u.left=t.p2c(n[i]);break}for(r=0,f=k.length;r<f;++r)if(t=k[r],t&&t.used&&(i="y"+t.n,n[i]==null&&t.n==1&&(i="y"),n[i]!=null)){u.top=t.p2c(n[i]);break}return u}function ot(t,i){return t[i-1]||(t[i-1]={n:i,direction:t==p?"x":"y",options:n.extend(!0,{},t==p?s.xaxis:s.yaxis)}),t[i-1]}function si(){for(var u,h,t,b,c,a,f=l.length,e=-1,i=0,d=l.length;i<d;++i)u=l[i].color,u!=null&&(f--,typeof u=="number"&&u>e&&(e=u));f<=e&&(f=e+1);var v,o=[],y=s.colors,w=y.length,r=0;for(i=0;i<f;i++)v=n.color.parse(y[i%w]||"#666"),i%w==0&&i&&(r=r>=0?r<.5?-r-.2:0:-r),o[i]=v.scale("rgb",1+r);for(h=0,i=0,b=l.length;i<b;++i){if(t=l[i],t.color==null?(t.color=o[h].toString(),++h):typeof t.color=="number"&&(t.color=o[t.color].toString()),t.lines.show==null){a=!0;for(c in t)if(t[c]&&t[c].show){a=!1;break}a&&(t.lines.show=!0)}t.lines.zero==null&&(t.lines.zero=!!t.lines.fill);t.xaxis=ot(p,et(t,"x"));t.yaxis=ot(k,et(t,"y"))}}function hi(){function w(n,t,i){t<n.datamin&&t!=-v&&(n.datamin=t);i>n.datamax&&i!=v&&(n.datamax=i)}var y=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY,v=Number.MAX_VALUE,e,r,t,u,h,i,s,ut,ft,o,et,ot,st,ht,ct,k,lt,f,at,c,vt,a;for(n.each(it(),function(n,t){t.datamin=y;t.datamax=p;t.used=!1}),f=0,et=l.length;f<et;++f)t=l[f],t.datapoints={points:[]},tt(b.processRawData,[t,t.data,t.datapoints]);for(f=0,ot=l.length;f<ot;++f)if(t=l[f],ft=t.data,o=t.datapoints.format,o||(o=[],o.push({x:!0,number:!0,required:!0}),o.push({y:!0,number:!0,required:!0}),(t.bars.show||t.lines.show&&t.lines.fill)&&(st=!!(t.bars.show&&t.bars.zero||t.lines.show&&t.lines.zero),o.push({y:!0,number:!0,required:!1,defaultValue:adjustOffset,autoscale:st}),t.bars.horizontal&&(delete o[o.length-1].y,o[o.length-1].x=!0)),t.datapoints.format=o),t.datapoints.pointsize==null)for(t.datapoints.pointsize=o.length,h=t.datapoints.pointsize,u=t.datapoints.points,ht=t.lines.show&&t.lines.steps,t.xaxis.used=t.yaxis.used=!0,c=e=0,ct=ft.length;c<ct;++c,e+=h){if(ut=ft[c],k=ut==null,!k)for(r=0;r<h;++r)i=ut[r],s=o[r],s&&(s.number&&i!=null&&(i=+i,isNaN(i)?i=null:i==Infinity?i=v:i==-Infinity&&(i=-v)),i==null&&(s.required&&(k=!0),s.defaultValue!=null&&(i=s.defaultValue))),u[e+r]=i;if(k)for(r=0;r<h;++r)i=u[e+r],i!=null&&(s=o[r],s.autoscale&&(s.x&&w(t.xaxis,i,i),s.y&&w(t.yaxis,i,i))),u[e+r]=null;else if(ht&&e>0&&u[e-h]!=null&&u[e-h]!=u[e]&&u[e-h+1]!=u[e+1]){for(r=0;r<h;++r)u[e+h+r]=u[e+r];u[e+1]=u[e-h+1];e+=h}}for(f=0,lt=l.length;f<lt;++f)t=l[f],tt(b.processDatapoints,[t,t.datapoints]);for(f=0,at=l.length;f<at;++f){t=l[f];u=t.datapoints.points;h=t.datapoints.pointsize;o=t.datapoints.format;var d=y,g=y,nt=p,rt=p;for(c=0,vt=u.length;c<vt;c+=h)if(u[c]!=null)for(r=0;r<h;++r)(i=u[c+r],s=o[r],s&&s.autoscale!==!1&&i!=v&&i!=-v)&&(s.x&&(i<d&&(d=i),i>nt&&(nt=i)),s.y&&(i<g&&(g=i),i>rt&&(rt=i)));if(t.bars.show){switch(t.bars.align){case"left":a=0;break;case"right":a=-t.bars.barWidth;break;case"center":a=-t.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+t.bars.align);}t.bars.horizontal?(g+=a,rt+=a+t.bars.barWidth):(d+=a,nt+=a+t.bars.barWidth)}w(t.xaxis,d,nt);w(t.yaxis,g,rt)}n.each(it(),function(n,t){t.datamin==y&&(t.datamin=null);t.datamax==p&&(t.datamax=null)})}function ci(){i.css("padding",0).children(":not(.flot-base,.flot-overlay)").remove();i.css("position")=="static"&&i.css("position","relative");v=new t("flot-base",i,e);rt=new t("flot-overlay",i,e);h=v.context;y=rt.context;g=n(rt.element).unbind();var r=i.data("plot");r&&(r.shutdown(),rt.clear());i.data("plot",a)}function li(){s.grid.hoverable&&(g.mousemove(bt),g.bind("mouseleave",kt));s.grid.clickable&&g.click(dt);tt(b.bindEvents,[g])}function ai(){ut&&clearTimeout(ut);g.unbind("mousemove",bt);g.unbind("mouseleave",kt);g.unbind("click",dt);tt(b.shutdown,[g])}function vi(n){function u(n){return n}var i,r,t=n.options.transform||u,f=n.options.inverseTransform;n.direction=="x"?(i=n.scale=d/Math.abs(t(n.max)-t(n.min)),r=Math.min(t(n.max),t(n.min))):(i=n.scale=w/Math.abs(t(n.max)-t(n.min)),i=-i,r=Math.max(t(n.max),t(n.min)));n.p2c=t==u?function(n){return(n-r)*i}:function(n){return(t(n)-r)*i};n.c2p=f?function(n){return f(r+n/i)}:function(n){return r+n/i}}function yi(n){var t=n.options,u=n.ticks||[],i=t.labelWidth||0,f=t.labelHeight||0,h=i||n.direction=="x"?Math.floor(v.width/(u.length||1)):null,r,s,e,o;for(legacyStyles=n.direction+"Axis "+n.direction+n.n+"Axis",layer="flot-"+n.direction+"-axis flot-"+n.direction+n.n+"-axis "+legacyStyles,font=t.font||"flot-tick-label tickLabel",r=0,s=u.length;r<s;++r)(e=u[r],e.label)&&(o=v.getTextInfo(layer,e.label,font,null,h),i=Math.max(i,o.width),f=Math.max(f,o.height));n.labelWidth=t.labelWidth||i;n.labelHeight=t.labelHeight||f}function pi(t){var r=t.labelWidth,u=t.labelHeight,e=t.options.position,f=t.options.tickLength,i=s.grid.axisMargin,o=s.grid.labelMargin,l=t.direction=="x"?p:k,h,a=n.grep(l,function(n){return n&&n.options.position==e&&n.reserveSpace}),y;n.inArray(t,a)==a.length-1&&(i=0);f==null&&(y=n.grep(l,function(n){return n&&n.reserveSpace}),h=n.inArray(t,y)==0,f=h?"full":5);isNaN(+f)||(o+=+f);t.direction=="x"?(u+=o,e=="bottom"?(c.bottom+=u+i,t.box={top:v.height-c.bottom,height:u}):(t.box={top:c.top+i,height:u},c.top+=u+i)):(r+=o,e=="left"?(t.box={left:c.left+i,width:r},c.left+=r+i):(c.right+=r+i,t.box={left:v.width-c.right,width:r}));t.position=e;t.tickLength=f;t.box.padding=o;t.innermost=h}function wi(n){n.direction=="x"?(n.box.left=c.left-n.labelWidth/2,n.box.width=v.width-c.left-c.right+n.labelWidth):(n.box.top=c.top-n.labelHeight/2,n.box.height=v.height-c.bottom-c.top+n.labelHeight)}function bi(){var i=s.grid.minBorderMargin,t={x:0,y:0},r,u;if(i==null)for(i=0,r=0,u=l.length;r<u;++r)i=Math.max(i,2*(l[r].points.radius+l[r].points.lineWidth/2));t.x=t.y=Math.ceil(i);n.each(it(),function(n,i){var r=i.direction;i.reserveSpace&&(t[r]=Math.ceil(Math.max(t[r],(r=="x"?i.labelWidth:i.labelHeight)/2)))});c.left=Math.max(t.x,c.left);c.right=Math.max(t.x,c.right);c.top=Math.max(t.y,c.top);c.bottom=Math.max(t.y,c.bottom)}function at(){var r,e=it(),u=s.grid.show,f,t,i;for(t in c)f=s.grid.margin||0,c[t]=typeof f=="number"?f:f[t]||0;tt(b.processOffset,[c]);for(t in c)c[t]+=typeof s.grid.borderWidth=="object"?u?s.grid.borderWidth[t]:0:u?s.grid.borderWidth:0;if(n.each(e,function(n,t){t.show=t.options.show;t.show==null&&(t.show=t.used);t.reserveSpace=t.show||t.options.reserveSpace;ki(t)}),u){for(i=n.grep(e,function(n){return n.reserveSpace}),n.each(i,function(n,t){di(t);gi(t);nr(t,t.ticks);yi(t)}),r=i.length-1;r>=0;--r)pi(i[r]);bi();n.each(i,function(n,t){wi(t)})}d=v.width-c.left-c.right;w=v.height-c.bottom-c.top;n.each(e,function(n,t){vi(t)});u&&ir();or()}function ki(n){var t=n.options,r=+(t.min!=null?t.min:n.datamin),i=+(t.max!=null?t.max:n.datamax),f=i-r,e,u;f==0?(e=i==0?1:.01,t.min==null&&(r-=e),(t.max==null||t.min!=null)&&(i+=e)):(u=t.autoscaleMargin,u!=null&&(t.min==null&&(r-=f*u,r<0&&n.datamin!=null&&n.datamin>=0&&(r=0)),t.max==null&&(i+=f*u,i>0&&n.datamax!=null&&n.datamax<=0&&(i=0))));n.min=r;n.max=i}function di(t){var i=t.options,w,a,h,f,r,s,y,c;w=typeof i.ticks=="number"&&i.ticks>0?i.ticks:.3*Math.sqrt(t.direction=="x"?v.width:v.height);var l=(t.max-t.min)/w,o=-Math.floor(Math.log(l)/Math.LN10),e=i.tickDecimals;if(e!=null&&o>e&&(o=e),a=Math.pow(10,-o),h=l/a,h<1.5?f=1:h<3?(f=2,h>2.25&&(e==null||o+1<=e)&&(f=2.5,++o)):f=h<7.5?5:10,f*=a,i.minTickSize!=null&&f<i.minTickSize&&(f=i.minTickSize),t.delta=l,t.tickDecimals=Math.max(0,e!=null?e:o),t.tickSize=i.tickSize||f,i.mode=="time"&&!t.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");t.tickGenerator||(t.tickGenerator=function(n){var i=[],e=u(n.min,n.tickSize),r=0,t=Number.NaN,f;do f=t,t=e+r*n.tickSize,i.push(t),++r;while(t<n.max&&t!=f);return i},t.tickFormatter=function(n,t){var u=t.tickDecimals?Math.pow(10,t.tickDecimals):1,i=""+Math.round(n*u)/u,f,r;return t.tickDecimals!=null&&(f=i.indexOf("."),r=f==-1?0:i.length-f-1,r<t.tickDecimals)?(r?i:i+".")+(""+u).substr(1,t.tickDecimals-r):i});n.isFunction(i.tickFormatter)&&(t.tickFormatter=function(n,t){return""+i.tickFormatter(n,t)});i.alignTicksWithAxis!=null&&(r=(t.direction=="x"?p:k)[i.alignTicksWithAxis-1],r&&r.used&&r!=t&&(s=t.tickGenerator(t),s.length>0&&(i.min==null&&(t.min=Math.min(t.min,s[0])),i.max==null&&s.length>1&&(t.max=Math.max(t.max,s[s.length-1]))),t.tickGenerator=function(n){for(var u=[],t,i=0,f=r.ticks.length;i<f;++i)t=(r.ticks[i].v-r.min)/(r.max-r.min),t=n.min+t*(n.max-n.min),u.push(t);return u},t.mode||i.tickDecimals!=null||(y=Math.max(0,-Math.floor(Math.log(t.delta)/Math.LN10)+1),c=t.tickGenerator(t),c.length>1&&/\..*0$/.test((c[1]-c[0]).toFixed(y))||(t.tickDecimals=y))))}function gi(t){var i=t.options.ticks,e=[],u,o,s,f,r;for(i==null||typeof i=="number"&&i>0?e=t.tickGenerator(t):i&&(e=n.isFunction(i)?i(t):i),t.ticks=[],o=0,s=e.length;o<s;++o)f=null,r=e[o],typeof r=="object"?(u=+r[0],r.length>1&&(f=r[1])):u=+r,f==null&&(f=t.tickFormatter(u,t)),isNaN(u)||t.ticks.push({v:u,label:f})}function nr(n,t){n.options.autoscaleMargin&&t.length>0&&(n.options.min==null&&(n.min=Math.min(n.min,t[0].v)),n.options.max==null&&t.length>1&&(n.max=Math.max(n.max,t[t.length-1].v)))}function vt(){var n,t,i;for(v.clear(),tt(b.drawBackground,[h]),n=s.grid,n.show&&n.backgroundColor&&tr(),n.show&&!n.aboveData&&pt(),t=0,i=l.length;t<i;++t)tt(b.drawSeries,[h,l[t]]),rr(l[t]);tt(b.draw,[h]);n.show&&n.aboveData&&pt();v.render();ft()}function yt(n,t){for(var s,f,i,r,u,o=it(),e=0,h=o.length;e<h;++e)if(f=o[e],f.direction==t&&(u=t+f.n+"axis",n[u]||f.n!=1||(u=t+"axis"),n[u])){i=n[u].from;r=n[u].to;break}return n[u]||(f=t=="x"?p[0]:k[0],i=n[t+"1"],r=n[t+"2"]),i!=null&&r!=null&&i>r&&(s=i,i=r,r=s),{from:i,to:r,axis:f}}function tr(){h.save();h.translate(c.left,c.top);h.fillStyle=ri(s.grid.backgroundColor,w,0,"rgba(255, 255, 255, 0)");h.fillRect(0,0,d,w);h.restore()}function pt(){var f,t,e,k,ut,tt,ft,v,et,b;if(h.save(),h.translate(c.left,c.top),k=s.grid.markings,k)for(n.isFunction(k)&&(f=a.getAxes(),f.xmin=f.xaxis.min,f.xmax=f.xaxis.max,f.ymin=f.yaxis.min,f.ymax=f.yaxis.max,k=k(f)),v=0,ut=k.length;v<ut;++v){var nt=k[v],i=yt(nt,"x"),r=yt(nt,"y");(i.from==null&&(i.from=i.axis.min),i.to==null&&(i.to=i.axis.max),r.from==null&&(r.from=r.axis.min),r.to==null&&(r.to=r.axis.max),i.to<i.axis.min||i.from>i.axis.max||r.to<r.axis.min||r.from>r.axis.max)||(i.from=Math.max(i.from,i.axis.min),i.to=Math.min(i.to,i.axis.max),r.from=Math.max(r.from,r.axis.min),r.to=Math.min(r.to,r.axis.max),i.from!=i.to||r.from!=r.to)&&(i.from=i.axis.p2c(i.from),i.to=i.axis.p2c(i.to),r.from=r.axis.p2c(r.from),r.to=r.axis.p2c(r.to),i.from==i.to||r.from==r.to?(h.beginPath(),h.strokeStyle=nt.color||s.grid.markingsColor,h.lineWidth=nt.lineWidth||s.grid.markingsLineWidth,h.moveTo(i.from,r.from),h.lineTo(i.to,r.to),h.stroke()):(h.fillStyle=nt.color||s.grid.markingsColor,h.fillRect(i.from,r.to,i.to-i.from,r.from-r.to)))}for(f=it(),t=s.grid.borderWidth,tt=0,ft=f.length;tt<ft;++tt){var u=f[tt],rt=u.box,g=u.tickLength,o,l,y,p;if(u.show&&u.ticks.length!=0){for(h.lineWidth=1,u.direction=="x"?(o=0,l=g=="full"?u.position=="top"?0:w:rt.top-c.top+(u.position=="top"?rt.height:0)):(l=0,o=g=="full"?u.position=="left"?0:d:rt.left-c.left+(u.position=="left"?rt.width:0)),u.innermost||(h.strokeStyle=u.options.color,h.beginPath(),y=p=0,u.direction=="x"?y=d+1:p=w+1,h.lineWidth==1&&(u.direction=="x"?l=Math.floor(l)+.5:o=Math.floor(o)+.5),h.moveTo(o,l),h.lineTo(o+y,l+p),h.stroke()),h.strokeStyle=u.options.tickColor,h.beginPath(),v=0,et=u.ticks.length;v<et;++v)(b=u.ticks[v].v,y=p=0,isNaN(b)||b<u.min||b>u.max||g=="full"&&(typeof t=="object"&&t[u.position]>0||t>0)&&(b==u.min||b==u.max))||(u.direction=="x"?(o=u.p2c(b),p=g=="full"?-w:g,u.position=="top"&&(p=-p)):(l=u.p2c(b),y=g=="full"?-d:g,u.position=="left"&&(y=-y)),h.lineWidth==1&&(u.direction=="x"?o=Math.floor(o)+.5:l=Math.floor(l)+.5),h.moveTo(o,l),h.lineTo(o+y,l+p));h.stroke()}}t&&(e=s.grid.borderColor,typeof t=="object"||typeof e=="object"?(typeof t!="object"&&(t={top:t,right:t,bottom:t,left:t}),typeof e!="object"&&(e={top:e,right:e,bottom:e,left:e}),t.top>0&&(h.strokeStyle=e.top,h.lineWidth=t.top,h.beginPath(),h.moveTo(0-t.left,0-t.top/2),h.lineTo(d,0-t.top/2),h.stroke()),t.right>0&&(h.strokeStyle=e.right,h.lineWidth=t.right,h.beginPath(),h.moveTo(d+t.right/2,0-t.top),h.lineTo(d+t.right/2,w),h.stroke()),t.bottom>0&&(h.strokeStyle=e.bottom,h.lineWidth=t.bottom,h.beginPath(),h.moveTo(d+t.right,w+t.bottom/2),h.lineTo(0,w+t.bottom/2),h.stroke()),t.left>0&&(h.strokeStyle=e.left,h.lineWidth=t.left,h.beginPath(),h.moveTo(0-t.left/2,w+t.bottom),h.lineTo(0-t.left/2,0),h.stroke())):(h.lineWidth=t,h.strokeStyle=s.grid.borderColor,h.strokeRect(-t/2,-t/2,d+t,w+t)));h.restore()}function ir(){n.each(it(),function(n,t){var e,l;if(t.show&&t.ticks.length!=0){var i=t.box,a=t.direction+"Axis "+t.direction+t.n+"Axis",h="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+a,y=t.options.font||"flot-tick-label tickLabel",r,u,f,o,s;for(v.removeText(h),e=0,l=t.ticks.length;e<l;++e)(r=t.ticks[e],!r.label||r.v<t.min||r.v>t.max)||(t.direction=="x"?(o="center",u=c.left+t.p2c(r.v),t.position=="bottom"?f=i.top+i.padding:(f=i.top+i.height-i.padding,s="bottom")):(s="middle",f=c.top+t.p2c(r.v),t.position=="left"?(u=i.left+i.width-i.padding,o="right"):u=i.left+i.padding),v.addText(h,u,f,r.label,y,null,null,o,s))}})}function rr(n){n.lines.show&&ur(n);n.bars.show&&er(n);n.points.show&&fr(n)}function ur(n){function u(n,t,i,r,u){var l=n.points,a=n.pointsize,v=null,y=null,c,p;for(h.beginPath(),c=a,p=l.length;c<p;c+=a){var f=l[c-a],e=l[c-a+1],o=l[c],s=l[c+1];if(f!=null&&o!=null){if(e<=s&&e<u.min){if(s<u.min)continue;f=(u.min-e)/(s-e)*(o-f)+f;e=u.min}else if(s<=e&&s<u.min){if(e<u.min)continue;o=(u.min-e)/(s-e)*(o-f)+f;s=u.min}if(e>=s&&e>u.max){if(s>u.max)continue;f=(u.max-e)/(s-e)*(o-f)+f;e=u.max}else if(s>=e&&s>u.max){if(e>u.max)continue;o=(u.max-e)/(s-e)*(o-f)+f;s=u.max}if(f<=o&&f<r.min){if(o<r.min)continue;e=(r.min-f)/(o-f)*(s-e)+e;f=r.min}else if(o<=f&&o<r.min){if(f<r.min)continue;s=(r.min-f)/(o-f)*(s-e)+e;o=r.min}if(f>=o&&f>r.max){if(o>r.max)continue;e=(r.max-f)/(o-f)*(s-e)+e;f=r.max}else if(o>=f&&o>r.max){if(f>r.max)continue;s=(r.max-f)/(o-f)*(s-e)+e;o=r.max}(f!=v||e!=y)&&h.moveTo(r.p2c(f)+t,u.p2c(e)+i);v=o;y=s;h.lineTo(r.p2c(o)+t,u.p2c(s)+i)}}h.stroke()}function e(n,t,i){for(var c=n.points,o=n.pointsize,b=Math.min(Math.max(0,i.min),i.max),s=0,l=!1,a=1,p=0,w=0,v,y;;){if(o>0&&s>c.length+o)break;s+=o;var r=c[s-o],u=c[s-o+a],f=c[s],e=c[s+a];if(l){if(o>0&&r!=null&&f==null){w=s;o=-o;a=2;continue}if(o<0&&s==p+o){h.fill();l=!1;o=-o;a=1;s=p=w+o;continue}}if(r!=null&&f!=null){if(r<=f&&r<t.min){if(f<t.min)continue;u=(t.min-r)/(f-r)*(e-u)+u;r=t.min}else if(f<=r&&f<t.min){if(r<t.min)continue;e=(t.min-r)/(f-r)*(e-u)+u;f=t.min}if(r>=f&&r>t.max){if(f>t.max)continue;u=(t.max-r)/(f-r)*(e-u)+u;r=t.max}else if(f>=r&&f>t.max){if(r>t.max)continue;e=(t.max-r)/(f-r)*(e-u)+u;f=t.max}if(l||(h.beginPath(),h.moveTo(t.p2c(r),i.p2c(b)),l=!0),u>=i.max&&e>=i.max){h.lineTo(t.p2c(r),i.p2c(i.max));h.lineTo(t.p2c(f),i.p2c(i.max));continue}else if(u<=i.min&&e<=i.min){h.lineTo(t.p2c(r),i.p2c(i.min));h.lineTo(t.p2c(f),i.p2c(i.min));continue}v=r;y=f;u<=e&&u<i.min&&e>=i.min?(r=(i.min-u)/(e-u)*(f-r)+r,u=i.min):e<=u&&e<i.min&&u>=i.min&&(f=(i.min-u)/(e-u)*(f-r)+r,e=i.min);u>=e&&u>i.max&&e<=i.max?(r=(i.max-u)/(e-u)*(f-r)+r,u=i.max):e>=u&&e>i.max&&u<=i.max&&(f=(i.max-u)/(e-u)*(f-r)+r,e=i.max);r!=v&&h.lineTo(t.p2c(v),i.p2c(u));h.lineTo(t.p2c(r),i.p2c(u));h.lineTo(t.p2c(f),i.p2c(e));f!=y&&(h.lineTo(t.p2c(f),i.p2c(e)),h.lineTo(t.p2c(y),i.p2c(e)))}}}var t,i,r,f;h.save();h.translate(c.left,c.top);h.lineJoin="round";t=n.lines.lineWidth;i=n.shadowSize;t>0&&i>0&&(h.lineWidth=i,h.strokeStyle="rgba(0,0,0,0.1)",r=Math.PI/18,u(n.datapoints,Math.sin(r)*(t/2+i/2),Math.cos(r)*(t/2+i/2),n.xaxis,n.yaxis),h.lineWidth=i/2,u(n.datapoints,Math.sin(r)*(t/2+i/4),Math.cos(r)*(t/2+i/4),n.xaxis,n.yaxis));h.lineWidth=t;h.strokeStyle=n.color;f=st(n.lines,n.color,0,w);f&&(h.fillStyle=f,e(n.datapoints,n.xaxis,n.yaxis));t>0&&u(n.datapoints,0,0,n.xaxis,n.yaxis);h.restore()}function fr(n){function r(n,t,i,r,u,f,e,o){for(var s,c,a=n.points,v=n.pointsize,l=0,y=a.length;l<y;l+=v)(s=a[l],c=a[l+1],s==null||s<f.min||s>f.max||c<e.min||c>e.max)||(h.beginPath(),s=f.p2c(s),c=e.p2c(c)+r,o=="circle"?h.arc(s,c,t,0,u?Math.PI:Math.PI*2,!1):o(h,s,c,t,u),h.closePath(),i&&(h.fillStyle=i,h.fill()),h.stroke())}var t;h.save();h.translate(c.left,c.top);var i=n.points.lineWidth,e=n.shadowSize,u=n.points.radius,f=n.points.symbol;i==0&&(i=.0001);i>0&&e>0&&(t=e/2,h.lineWidth=t,h.strokeStyle="rgba(0,0,0,0.1)",r(n.datapoints,u,null,t+t/2,!0,n.xaxis,n.yaxis,f),h.strokeStyle="rgba(0,0,0,0.2)",r(n.datapoints,u,null,t/2,!0,n.xaxis,n.yaxis,f));h.lineWidth=i;h.strokeStyle=n.color;r(n.datapoints,u,st(n.points,n.color),0,!1,n.xaxis,n.yaxis,f);h.restore()}function wt(n,t,i,r,u,f,e,o,s,h,c,l){var v,p,a,y,b,k,w,d,g;(c?(d=k=w=!0,b=!1,v=i,p=n,y=t+r,a=t+u,p<v&&(g=p,p=v,v=g,b=!0,k=!1)):(b=k=w=!1,w=!0,d=!1,v=n+r,p=n+u,a=i,y=t,y<a&&(g=y,y=a,a=g,d=!0,w=!1)),p<o.min||v>o.max||y<s.min||a>s.max)||(v<o.min&&(v=o.min,b=!1),p>o.max&&(p=o.max,k=!1),a<s.min&&(a=s.min,d=!1),y>s.max&&(y=s.max,w=!1),v=o.p2c(v),a=s.p2c(a),p=o.p2c(p),y=s.p2c(y),e&&(h.beginPath(),h.moveTo(v,a),h.lineTo(v,y),h.lineTo(p,y),h.lineTo(p,a),h.fillStyle=e(a,y),h.fill()),l>0&&(b||k||w||d)&&(h.beginPath(),h.moveTo(v,a+f),b?h.lineTo(v,y+f):h.moveTo(v,y+f),w?h.lineTo(p,y+f):h.moveTo(p,y+f),k?h.lineTo(p,a+f):h.moveTo(p,a+f),d?h.lineTo(v,a+f):h.moveTo(v,a+f),h.stroke()))}function er(t){function f(n,i,r,u,f,e,o){for(var c=n.points,l=n.pointsize,s=0,a=c.length;s<a;s+=l)c[s]!=null&&wt(c[s],c[s+1],c[s+2],i,r,u,f,e,o,h,t.bars.horizontal,t.bars.lineWidth)}var i,r,u;h.save();h.translate(c.left,c.top);h.lineWidth=t.bars.lineWidth;h.strokeStyle=t.color;switch(t.bars.align){case"left":i=0;break;case"right":i=-t.bars.barWidth;break;case"center":i=-t.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+t.bars.align);}r=n.extend({},t.bars);t.fill&&(r.fill=t.fill);t.fillColor&&(r.fillColor=t.fillColor);u=r.fill?function(n,i){return st(r,t.color,n,i)}:null;f(t.datapoints,i,i+t.bars.barWidth,0,u,t.xaxis,t.yaxis);h.restore()}function st(t,i,r,u){var e=t.fill,f;return e?t.fillColor?ri(t.fillColor,r,u,i):(f=n.color.parse(i),f.a=typeof e=="number"?e:.4,f.normalize(),f.toString()):null}function or(){var g,nt,r,tt,w,b,v,t,k;if(i.find(".legend").remove(),s.legend.show){var f=[],e=[],y=!1,d=s.legend.labelFormatter,o,p;for(r=0,g=l.length;r<g;++r)o=l[r],o.label&&(p=d?d(o.label,o):o.label,p&&e.push({label:p,color:o.color}));for(s.legend.sorted&&(n.isFunction(s.legend.sorted)?e.sort(s.legend.sorted):s.legend.sorted=="reverse"?e.reverse():(nt=s.legend.sorted!="descending",e.sort(function(n,t){return n.label==t.label?0:n.label<t.label!=nt?1:-1}))),r=0,tt=e.length;r<tt;++r)w=e[r],r%s.legend.noColumns==0&&(y&&f.push("<\/tr>"),f.push("<tr>"),y=!0),f.push('<td class="legendColorBox"><div style="border:1px solid '+s.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+w.color+';overflow:hidden"><\/div><\/div><\/td><td class="legendLabel">'+w.label+"<\/td>");if(y&&f.push("<\/tr>"),f.length!=0)if(b='<table style="font-size:smaller;color:'+s.grid.color+'">'+f.join("")+"<\/table>",s.legend.container!=null)n(s.legend.container).html(b);else{var h="",a=s.legend.position,u=s.legend.margin;u[0]==null&&(u=[u,u]);a.charAt(0)=="n"?h+="top:"+(u[1]+c.top)+"px;":a.charAt(0)=="s"&&(h+="bottom:"+(u[1]+c.bottom)+"px;");a.charAt(1)=="e"?h+="right:"+(u[0]+c.right)+"px;":a.charAt(1)=="w"&&(h+="left:"+(u[0]+c.left)+"px;");v=n('<div class="legend">'+b.replace('style="','style="position:absolute;'+h+";")+"<\/div>").appendTo(i);s.legend.backgroundOpacity!=0&&(t=s.legend.backgroundColor,t==null&&(t=s.grid.backgroundColor,t=t&&typeof t=="string"?n.color.parse(t):n.color.extract(v,"background-color"),t.a=1,t=t.toString()),k=v.children(),n('<div style="position:absolute;width:'+k.width()+"px;height:"+k.height()+"px;"+h+"background-color:"+t+';"> <\/div>').prependTo(v).css("opacity",s.legend.backgroundOpacity))}}}function sr(n,t,i){for(var e,h,d,it,r,k,p=s.grid.mouseActiveRadius,rt=p*p+1,a=null,o,u=l.length-1;u>=0;--u)if(i(l[u])){var f=l[u],w=f.xaxis,b=f.yaxis,c=f.datapoints.points,v=w.c2p(n),y=b.c2p(t),nt=p/w.scale,tt=p/b.scale;if(o=f.datapoints.pointsize,w.options.inverseTransform&&(nt=Number.MAX_VALUE),b.options.inverseTransform&&(tt=Number.MAX_VALUE),f.lines.show||f.points.show)for(r=0,k=c.length;r<k;r+=o)if((e=c[r],h=c[r+1],e!=null)&&!(e-v>nt)&&!(e-v<-nt)&&!(h-y>tt)&&!(h-y<-tt)){var ut=Math.abs(w.p2c(e)-n),ft=Math.abs(b.p2c(h)-t),et=ut*ut+ft*ft;et<rt&&(rt=et,a=[u,r/o])}if(f.bars.show&&!a)for(d=f.bars.align=="left"?0:-f.bars.barWidth/2,it=d+f.bars.barWidth,r=0,k=c.length;r<k;r+=o){var e=c[r],h=c[r+1],g=c[r+2];e!=null&&(l[u].bars.horizontal?v<=Math.max(g,e)&&v>=Math.min(g,e)&&y>=h+d&&y<=h+it:v>=e+d&&v<=e+it&&y>=Math.min(g,h)&&y<=Math.max(g,h))&&(a=[u,r/o])}}return a?(u=a[0],r=a[1],o=l[u].datapoints.pointsize,{datapoint:l[u].datapoints.points.slice(r*o,(r+1)*o),dataIndex:r,series:l[u],seriesIndex:u}):null}function bt(n){s.grid.hoverable&&ht("plothover",n,function(n){return n.hoverable!=!1})}function kt(n){s.grid.hoverable&&ht("plothover",n,function(){return!1})}function dt(n){ht("plotclick",n,function(n){return n.clickable!=!1})}function ht(n,t,r){var e=g.offset(),l=t.pageX-e.left-c.left,a=t.pageY-e.top-c.top,h=lt({left:l,top:a}),u,o,v,f;if(h.pageX=t.pageX,h.pageY=t.pageY,u=sr(l,a,r),u&&(u.pageX=parseInt(u.series.xaxis.p2c(u.datapoint[0])+e.left+c.left,10),u.pageY=parseInt(u.series.yaxis.p2c(u.datapoint[1])+e.top+c.top,10)),s.grid.autoHighlight){for(o=0,v=nt.length;o<v;++o)f=nt[o],f.auto!=n||u&&f.series==u.series&&f.point[0]==u.datapoint[0]&&f.point[1]==u.datapoint[1]||ti(f.series,f.point);u&&ni(u.series,u.datapoint,n)}i.trigger(n,[h,u])}function ft(){var n=s.interaction.redrawOverlayInterval;if(n==-1){gt();return}ut||(ut=setTimeout(gt,n))}function gt(){var n,t,i;for(ut=null,y.save(),rt.clear(),y.translate(c.left,c.top),t=0,i=nt.length;t<i;++t)n=nt[t],n.series.bars.show?cr(n.series,n.point):hr(n.series,n.point);y.restore();tt(b.drawOverlay,[y])}function ni(n,t,i){var r,u;typeof n=="number"&&(n=l[n]);typeof t=="number"&&(r=n.datapoints.pointsize,t=n.datapoints.points.slice(r*t,r*(t+1)));u=ii(n,t);u==-1?(nt.push({series:n,point:t,auto:i}),ft()):i||(nt[u].auto=!1)}function ti(n,t){var i,r;if(n==null&&t==null){nt=[];ft();return}typeof n=="number"&&(n=l[n]);typeof t=="number"&&(i=n.datapoints.pointsize,t=n.datapoints.points.slice(i*t,i*(t+1)));r=ii(n,t);r!=-1&&(nt.splice(r,1),ft())}function ii(n,t){for(var r,i=0,u=nt.length;i<u;++i)if(r=nt[i],r.series==n&&r.point[0]==t[0]&&r.point[1]==t[1])return i;return-1}function hr(t,i){var r=i[0],u=i[1],f=t.xaxis,e=t.yaxis,h=typeof t.highlightColor=="string"?t.highlightColor:n.color.parse(t.color).scale("a",.5).toString(),o,s;r<f.min||r>f.max||u<e.min||u>e.max||(o=t.points.radius+t.points.lineWidth/2,y.lineWidth=o,y.strokeStyle=h,s=1.5*o,r=f.p2c(r),u=e.p2c(u),y.beginPath(),t.points.symbol=="circle"?y.arc(r,u,s,0,2*Math.PI,!1):t.points.symbol(y,r,u,s,!1),y.closePath(),y.stroke())}function cr(t,i){var r=typeof t.highlightColor=="string"?t.highlightColor:n.color.parse(t.color).scale("a",.5).toString(),f=r,u=t.bars.align=="left"?0:-t.bars.barWidth/2;y.lineWidth=t.bars.lineWidth;y.strokeStyle=r;wt(i[0],i[1],i[2]||0,u,u+t.bars.barWidth,0,function(){return f},t.xaxis,t.yaxis,y,t.bars.horizontal,t.bars.lineWidth)}function ri(t,i,r,u){var s,e,c,f,o;if(typeof t=="string")return t;for(s=h.createLinearGradient(0,r,0,i),e=0,c=t.colors.length;e<c;++e)f=t.colors[e],typeof f!="string"&&(o=n.color.parse(u),f.brightness!=null&&(o=o.scale("rgb",f.brightness)),f.opacity!=null&&(o.a*=f.opacity),f=o.toString()),s.addColorStop(e/(c-1),f);return s}var l=[],s={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:250},hooks:{}},v=null,rt=null,g=null,h=null,y=null,p=[],k=[],c={left:0,right:0,top:0,bottom:0},d=0,w=0,b={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},a=this,nt,ut;a.setData=ct;a.setupGrid=at;a.draw=vt;a.getPlaceholder=function(){return i};a.getCanvas=function(){return v.element};a.getPlotOffset=function(){return c};a.width=function(){return d};a.height=function(){return w};a.offset=function(){var n=g.offset();return n.left+=c.left,n.top+=c.top,n};a.getData=function(){return l};a.getAxes=function(){var t={};return n.each(p.concat(k),function(n,i){i&&(t[i.direction+(i.n!=1?i.n:"")+"axis"]=i)}),t};a.getXAxes=function(){return p};a.getYAxes=function(){return k};a.c2p=lt;a.p2c=oi;a.getOptions=function(){return s};a.highlight=ni;a.unhighlight=ti;a.triggerRedrawOverlay=ft;a.pointOffset=function(n){return{left:parseInt(p[et(n,"x")-1].p2c(+n.x)+c.left,10),top:parseInt(k[et(n,"y")-1].p2c(+n.y)+c.top,10)}};a.shutdown=ai;a.resize=function(){var n=i.width(),t=i.height();v.resize(n,t);rt.resize(n,t)};a.hooks=b;ui(a);fi(f);ci();ct(r);at();vt();li();nt=[];ut=null}function u(n,t){return t*Math.floor(n/t)}var i=Object.prototype.hasOwnProperty;t.prototype.resize=function(n,t){if(n<=0||t<=0)throw new Error("Invalid dimensions for plot, width = "+n+", height = "+t);var i=this.element,u=this.context,r=this.pixelRatio;this.width!=n&&(i.width=n*r,i.style.width=n+"px",this.width=n);this.height!=t&&(i.height=t*r,i.style.height=t+"px",this.height=t);u.restore();u.save();u.scale(r,r)};t.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)};t.prototype.render=function(){var h=this._textCache,r,u,f,c,t,e,o,s,n;for(r in h)if(i.call(h,r)){u=this.getTextLayer(r);f=h[r];u.hide();for(c in f)if(i.call(f,c)){t=f[c];for(e in t)if(i.call(t,e)){for(o=t[e].positions,s=0;n=o[s];s++)n.active?n.rendered||(u.append(n.element),n.rendered=!0):(o.splice(s--,1),n.rendered&&n.element.detach());o.length==0&&delete t[e]}}u.show()}};t.prototype.getTextLayer=function(t){var i=this.text[t];return i==null&&(this.textContainer==null&&(this.textContainer=n("<div class='flot-text'><\/div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),i=this.text[t]=n("<div><\/div>").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),i};t.prototype.getTextInfo=function(t,i,r,u,f){var h,o,s,c,e;return i=""+i,h=typeof r=="object"?r.style+" "+r.variant+" "+r.weight+" "+r.size+"px/"+r.lineHeight+"px "+r.family:r,o=this._textCache[t],o==null&&(o=this._textCache[t]={}),s=o[h],s==null&&(s=o[h]={}),c=s[i],c==null&&(e=n("<div><\/div>").html(i).css({position:"absolute","max-width":f,top:-9999}).appendTo(this.getTextLayer(t)),typeof r=="object"?e.css({font:h,color:r.color}):typeof r=="string"&&e.addClass(r),c=s[i]={width:e.outerWidth(!0),height:e.outerHeight(!0),element:e,positions:[]},e.detach()),c};t.prototype.addText=function(n,t,i,r,u,f,e,o,s){var h=this.getTextInfo(n,r,u,f,e),l=h.positions,a,c;for(o=="center"?t-=h.width/2:o=="right"&&(t-=h.width),s=="middle"?i-=h.height/2:s=="bottom"&&(i-=h.height),a=0;c=l[a];a++)if(c.x==t&&c.y==i){c.active=!0;return}c={active:!0,rendered:!1,element:l.length?h.element.clone():h.element,x:t,y:i};l.push(c);c.element.css({top:Math.round(i),left:Math.round(t),"text-align":o})};t.prototype.removeText=function(n,t,r,u,f,e){var h,a,c,v,l,o,s;if(u==null){if(h=this._textCache[n],h!=null)for(a in h)if(i.call(h,a)){c=h[a];for(v in c)if(i.call(c,v))for(l=c[v].positions,o=0;s=l[o];o++)s.active=!1}}else for(l=this.getTextInfo(n,u,f,e).positions,o=0;s=l[o];o++)s.x==t&&s.y==r&&(s.active=!1)};n.plot=function(t,i,u,f){return new r(n(t),i,u,f,n.plot.plugins)};n.plot.version="0.8.1";n.plot.plugins=[];n.fn.plot=function(t,i,r){return this.each(function(){n.plot(this,t,i,r)})}}(jQuery),function(n){function r(n,t){return t*Math.floor(n/t)}function u(n,t,i,r){var c,o,u;if(typeof n.strftime=="function")return n.strftime(t);var f=function(n,t){return n=""+n,t=""+(t==null?"0":t),n.length==1?t+n:n},s=[],h=!1,e=n.getHours(),l=e<12;for(i==null&&(i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),r==null&&(r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),c=e>12?e-12:e==0?12:e,o=0;o<t.length;++o)if(u=t.charAt(o),h){switch(u){case"a":u=""+r[n.getDay()];break;case"b":u=""+i[n.getMonth()];break;case"d":u=f(n.getDate());break;case"e":u=f(n.getDate()," ");break;case"H":u=f(e);break;case"I":u=f(c);break;case"l":u=f(c," ");break;case"m":u=f(n.getMonth()+1);break;case"M":u=f(n.getMinutes());break;case"S":u=f(n.getSeconds());break;case"y":u=f(n.getFullYear()%100);break;case"Y":u=""+n.getFullYear();break;case"p":u=l?"am":"pm";break;case"P":u=l?"AM":"PM";break;case"w":u=""+n.getDay()}s.push(u);h=!1}else u=="%"?h=!0:s.push(u);return s.join("")}function f(n){function u(n,t,i,r){n[t]=function(){return i[r].apply(i,arguments)}}var i={date:n},r,t;for(n.strftime!=undefined&&u(i,"strftime",n,"strftime"),u(i,"getTime",n,"getTime"),u(i,"setTime",n,"setTime"),r=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"],t=0;t<r.length;t++)u(i,"get"+r[t],n,"getUTC"+r[t]),u(i,"set"+r[t],n,"setUTC"+r[t]);return i}function e(n,t){if(t.timezone=="browser")return new Date(n);if(t.timezone&&t.timezone!="utc"){if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var i=new timezoneJS.Date;return i.setTimezone(t.timezone),i.setTime(n),i}return f(new Date(n))}return f(new Date(n))}function o(f){f.hooks.processDatapoints.push(function(f){n.each(f.getAxes(),function(n,f){var o=f.options;o.mode=="time"&&(f.tickGenerator=function(n){var w=[],u=e(n.min,o),b=0,s,a,f,y,v,h,l,p,c,k,d,g;for(o.minTickSize!=null&&(b=typeof o.tickSize=="number"?o.tickSize:o.minTickSize[0]*t[o.minTickSize[1]]),s=0;s<i.length-1;++s)if(n.delta<(i[s][0]*t[i[s][1]]+i[s+1][0]*t[i[s+1][1]])/2&&i[s][0]*t[i[s][1]]>=b)break;a=i[s][0];f=i[s][1];f=="year"&&(o.minTickSize!=null&&o.minTickSize[1]=="year"?a=Math.floor(o.minTickSize[0]):(y=Math.pow(10,Math.floor(Math.log(n.delta/t.year)/Math.LN10)),v=n.delta/t.year/y,a=(v<1.5?1:v<3?2:v<7.5?5:10)*y),a<1&&(a=1));n.tickSize=o.tickSize||[a,f];h=n.tickSize[0];f=n.tickSize[1];l=h*t[f];f=="second"&&u.setSeconds(r(u.getSeconds(),h));f=="minute"&&u.setMinutes(r(u.getMinutes(),h));f=="hour"&&u.setHours(r(u.getHours(),h));f=="month"&&u.setMonth(r(u.getMonth(),h));f=="year"&&u.setFullYear(r(u.getFullYear(),h));u.setMilliseconds(0);l>=t.minute&&u.setSeconds(0);l>=t.hour&&u.setMinutes(0);l>=t.day&&u.setHours(0);l>=t.day*4&&u.setDate(1);l>=t.year&&u.setMonth(0);p=0;c=Number.NaN;do k=c,c=u.getTime(),w.push(c),f=="month"?h<1?(u.setDate(1),d=u.getTime(),u.setMonth(u.getMonth()+1),g=u.getTime(),u.setTime(c+p*t.hour+(g-d)*h),p=u.getHours(),u.setHours(0)):u.setMonth(u.getMonth()+h):f=="year"?u.setFullYear(u.getFullYear()+h):u.setTime(c+l);while(c<n.max&&c!=k);return w},f.tickFormatter=function(n,i){var h=e(n,i.options);if(o.timeformat!=null)return u(h,o.timeformat,o.monthNames,o.dayNames);var r=i.tickSize[0]*t[i.tickSize[1]],c=i.max-i.min,f=o.twelveHourClock?" %p":"",s=o.twelveHourClock?"%I":"%H";return fmt=r<t.minute?s+":%M:%S"+f:r<t.day?c<2*t.day?s+":%M"+f:"%b %d "+s+":%M"+f:r<t.month?"%b %d":r<t.year?c<t.year?"%b":"%b %Y":"%Y",u(h,fmt,o.monthNames,o.dayNames)})})})}var t={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,year:365.2425*864e5},i=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]];n.plot.plugins.push({init:o,options:{},name:"time",version:"1.0"})}(jQuery);
/*! Javascript plotting library for jQuery, version 0.8.1.
Copyright (c) 2007-2013 IOLA and Ole Laursen.
Licensed under the MIT license.
Modified by Brent Iverson to add function (plot.mouseMover) and variables (index, xVal, yVal)
*/
(function(n){function i(i){function r(){crosshair.locked||crosshair.x!=-1&&(crosshair.x=-1,i.triggerRedrawOverlay())}function u(){i.crosshair.locked=!0;t=!1;return}function f(n){i.crosshair.locked=!1;t=!0;i.mouseMover(n);return}i.crosshair={x:0,y:0,locked:!0,index:0,xVal:0,yVal:0};i.crosshair.index=0;i.crosshair.updateIndex=function(){var n=parseInt(i.getXAxes()[0].max,10),t=i.width()/n;i.crosshair.index=Math.max(Math.round(i.crosshair.x/t),0)};i.setCrosshair=function(n){if(n){var t=i.p2c(n);i.crosshair.x=Math.max(0,Math.min(t.left,i.width()));i.crosshair.y=Math.max(0,Math.min(t.top,i.height()))}else i.crosshair.x=-1;i.triggerRedrawOverlay();i.crosshair.updateIndex()};i.clearCrosshair=i.setCrosshair;i.lockCrosshair=function(n){n&&i.setCrosshair(n);i.crosshair.locked=!0};i.unlockCrosshair=function(){i.crosshair.locked=!1};i.mouseMover=function(r){var e;if(!i.crosshair.locked&&t!=!1){if(i.getSelection&&i.getSelection()){i.crosshair.x=-1;return}e=1;document.body.style.zoom!=""?e=parseInt(document.body.style.zoom,10)/100:n(document.body).css("zoom")>0&&(e=n(document.body).css("zoom"));var s=i.offset(),o=parseInt(i.getXAxes()[0].max,10),f=i.width()/o,u=Math.round((r.pageX/e-s.left)/f),c=f*.7*(o/2-u)/o,h=i.getData()[0].data.length-1;u>h&&(u=h);i.crosshair.x=Math.max(0,Math.min(u*f+c,i.width()));i.crosshair.x<f/3&&(i.crosshair.x=f/3,u=0);i.crosshair.y=Math.max(0,Math.min(r.pageY-s.top,i.height()));i.crosshair.index=u;i.triggerRedrawOverlay()}};i.bumpCHIndex=function(n,t){var c=n.lastBar||1.3,o=n.direction||1,s=i.getData(),h=s[0]&&s[0].data.length,f=t||parseInt(i.getXAxes()[0].max,10),u=i.width()/f,r=Math.round(i.crosshair.x/u),e;return(r<h||o<0)&&(r=r+o),n.index!=undefined&&(r=n.index),e=u*.7*(f/2-r)/f,i.getOptions().series.bars.show||(e=0),i.crosshair.x=Math.min(r*u+e,i.width()-u/3),i.crosshair.x<u/3&&(i.crosshair.x=u/3,r=0),i.crosshair.y=10,i.crosshair.index=r,i.triggerRedrawOverlay(),r};i.hooks.bindEvents.push(function(n,t){n.getOptions().crosshair.mode&&(t.mouseup(u),t.mousemove(n.mouseMover),t.mousedown(f))});i.hooks.drawOverlay.push(function(n,t){var i=n.getOptions().crosshair,r;i.mode&&(r=n.getPlotOffset(),t.save(),t.translate(r.left,r.top),n.crosshair.x!=-1&&(t.strokeStyle=i.color,t.lineWidth=i.lineWidth,t.lineJoin="round",t.beginPath(),i.mode.indexOf("x")!=-1&&(t.moveTo(n.crosshair.x,0),t.lineTo(n.crosshair.x,n.height())),i.mode.indexOf("y")!=-1&&(t.moveTo(0,n.crosshair.y),t.lineTo(n.width(),n.crosshair.y)),t.stroke()),t.restore())});i.hooks.shutdown.push(function(n,t){t.unbind("mouseout",r);t.unbind("mousemove",n.mouseMover)})}var t=!1;n.plot.plugins.push({init:i,options:{crosshair:{mode:null,color:"rgba(170, 0, 0, 0.30)",index:0,lineWidth:1}},name:"crosshair",version:"1.0"})})(jQuery);
/*! jQuery File Tree Plugin
Version 1.01
Cory S.N. LaViska
Copyright (c) 2008 A Beautiful Site, LLC (http://abeautifulsite.net/)
24 March 2008
Modified by Brent Iverson 2015
*/
jQuery&&function(n){n.extend(n.fn,{fileTree:function(t,i){var r=this,t;return r.selFile={},t||(t={}),t.root==undefined&&(t.root="/"),t.script==undefined&&(t.script="/sdk?func=getdatafilelist"),t.folderEvent==undefined&&(t.folderEvent="dblclick"),t.selectEvent==undefined&&(t.selectEvent="click"),t.expandSpeed==undefined&&(t.expandSpeed=500),t.collapseSpeed==undefined&&(t.collapseSpeed=500),t.expandEasing==undefined&&(t.expandEasing=null),t.collapseEasing==undefined&&(t.collapseEasing=null),t.multiFolder==undefined&&(t.multiFolder=!0),t.loadMessage==undefined&&(t.loadMessage="Loading..."),n(this).each(function(){function f(n){var t=function(){};return t.prototype=n,new t}function e(n){var l,e,w,o,r,a,y,i,h,c,p,v;for(console.log(n),SysPropFiles=f(n.DataFiles),l=SysPropFiles.length,console.log("numFiles: "+l),e="",y=0,w="/images/Gear.png",i=y;i<l;++i){var u=SysPropFiles[i].name.split("."),o=u[0],t=undefined,s=undefined;u.length>1&&(t=u[1].toLowerCase());u.length>2&&(s=u[2].toLowerCase());undefined!=t&&("hvm2"!=t||"raw"!=t)&&undefined!=s&&("rc0"==t?t+=s:(o+="."+t,t=s));r=new Date(SysPropFiles[i].startTime*1e3);h=r.getUTCHours();c=r.getUTCMinutes();a=r.getUTCFullYear()+"/"+(r.getMonth()+1)+"/"+r.getDate()+" "+(h<10?"0"+h.toString():h.toString())+":"+(c<10?"0"+c.toString():c.toString());p=getFSz(SysPropFiles[i].size);e='\t<li class="file ext_'+t+'"><a href="#" rel="'+o+"\" data-fname='"+o+"."+t+"' data-index='"+SysPropFiles[i].index+"' title='Ended: "+a+"'>"+o+"<\/a><span>&nbsp;&nbsp;&nbsp;&nbsp;"+a+"&nbsp;&nbsp;&nbsp;"+p+"<\/span><\/li>\n"+e}return v='<ul class="jqueryFileTree',IsHvm()&&(v+=" listFormatHVM valText"),v+('" style="display: block;">\n'+e+"<\/ul>")}function u(i,r){n(i).addClass("wait");n(".jqueryFileTree.start").remove();n.post(t.script,{dir:r},function(u){var f=e(u);n(i).find(".start").html("");n(i).removeClass("wait").append(f);t.root==r?n(i).find("UL:hidden").show():n(i).find("UL:hidden").slideDown({duration:t.expandSpeed,easing:t.expandEasing});o(i)})}function o(f){n(f).find("LI A").bind(t.folderEvent,function(){return n(this).parent().hasClass("directory")?n(this).parent().hasClass("collapsed")?(t.multiFolder||(n(this).parent().parent().find("UL").slideUp({duration:t.collapseSpeed,easing:t.collapseEasing}),n(this).parent().parent().find("LI.directory").removeClass("expanded").addClass("collapsed")),n(this).parent().find("UL").remove(),u(n(this).parent(),escape(n(this).attr("rel").match(/.*\//))),n(this).parent().removeClass("collapsed").addClass("expanded")):(n(this).parent().find("UL").slideUp({duration:t.collapseSpeed,easing:t.collapseEasing}),n(this).parent().removeClass("expanded").addClass("collapsed")):i(n(this)),!1}).bind(t.selectEvent,function(){return r.selFile=n(this),r.selFile.parent().addClass("selected").siblings("li").removeClass("selected"),!1});t.folderEvent.toLowerCase!="click"&&t.selectEvent.toLowerCase()!="click"&&n(f).find("LI A").bind("click",function(){return!1})}n(this).html('<ul class="jqueryFileTree start"><li class="wait">'+t.loadMessage+"<li><\/ul>");u(n(this),escape(t.root))}),this}})}(jQuery),function(n){typeof define=="function"&&define.amd&&define.amd.jQuery?define(["jquery"],n):n(jQuery)}(function(n){"use strict";function ft(t){return t&&t.allowPageScroll===undefined&&(t.swipe!==undefined||t.swipeStatus!==undefined)&&(t.allowPageScroll=y),t.click!==undefined&&t.tap===undefined&&(t.tap=t.click),t||(t={}),t=n.extend({},n.fn.swipe.defaults,t),this.each(function(){var r=n(this),i=r.data(s);i||(i=new et(this,t),r.data(s,i))})}function et(ft,et){function tr(t){if(!vu()&&!(n(t.target).closest(et.excludedElements,ot).length>0)){var r=t.originalEvent?t.originalEvent:t,f,u=r.touches,e=u?u[0]:r;return(st=rt,u?ct=u.length:et.preventDefaultEvents!==!1&&t.preventDefault(),at=0,vt=null,bt=null,lt=0,dt=0,gt=0,yt=1,wt=0,si=wu(),gr(),pi(0,e),!u||ct===et.fingers||et.fingers===c||ui()?(di=ti(),ct==2&&(pi(1,u[1]),dt=gt=hr(ht[0].start,ht[1].start)),(et.swipeStatus||et.pinchStatus)&&(f=pt(r,st))):f=!1,f===!1)?(st=i,pt(r,st),f):(et.hold&&(nr=setTimeout(n.proxy(function(){ot.trigger("hold",[r.target]);et.hold&&(f=et.hold.call(ot,r,r.target))},this),et.longTapThreshold)),yi(!0),null)}}function ir(n){var u=n.originalEvent?n.originalEvent:n,e,h;if(st!==t&&st!==i&&!vi()){var s,r=u.touches,l=r?r[0]:u,f=nu(l);hi=ti();r&&(ct=r.length);et.hold&&clearTimeout(nr);st=o;ct==2&&(dt==0?(pi(1,r[1]),dt=gt=hr(ht[0].start,ht[1].start)):(nu(r[1]),gt=hr(ht[0].end,ht[1].end),bt=ku(ht[0].end,ht[1].end)),yt=bu(dt,gt),wt=Math.abs(dt-gt));ct===et.fingers||et.fingers===c||!r||ui()?(vt=nf(f.start,f.end),uu(n,vt),at=du(f.start,f.end),lt=iu(),pu(vt,at),(et.swipeStatus||et.pinchStatus)&&(s=pt(u,st)),(!et.triggerOnTouchEnd||et.triggerOnTouchLeave)&&(e=!0,et.triggerOnTouchLeave&&(h=tf(this),e=rf(f.end,h)),!et.triggerOnTouchEnd&&e?st=fr(o):et.triggerOnTouchLeave&&!e&&(st=fr(t)),(st==i||st==t)&&pt(u,st))):(st=i,pt(u,st));s===!1&&(st=i,pt(u,st))}}function rr(n){var r=n.originalEvent?n.originalEvent:n,u=r.touches;if(u){if(u.length&&!vi())return au(),!0;if(u.length&&vi())return!0}return vi()&&(ct=gi),hi=ti(),lt=iu(),or()||!er()?(st=i,pt(r,st)):et.triggerOnTouchEnd||et.triggerOnTouchEnd==!1&&st===o?(et.preventDefaultEvents!==!1&&n.preventDefault(),st=t,pt(r,st)):!et.triggerOnTouchEnd&&kr()?(st=t,kt(r,st,b)):st===o&&(st=i,pt(r,st)),yi(!1),null}function ri(){ct=0;hi=0;di=0;dt=0;gt=0;yt=1;gr();yi(!1)}function ur(n){var i=n.originalEvent?n.originalEvent:n;et.triggerOnTouchLeave&&(st=fr(t),pt(i,st))}function cr(){ot.unbind(ei,tr);ot.unbind(oi,ri);ot.unbind(bi,ir);ot.unbind(ki,rr);ii&&ot.unbind(ii,ur);yi(!1)}function fr(n){var r=n,f=lr(),u=er(),e=or();return!f||e?r=i:u&&n==o&&(!et.triggerOnTouchEnd||et.triggerOnTouchLeave)?r=t:!u&&n==t&&et.triggerOnTouchLeave&&(r=i),r}function pt(n,r){var u,f=n.touches;return pr()&&ai()||vr()&&ui()?(pr()&&ai()&&(u=kt(n,r,p)),vr()&&ui()&&u!==!1&&(u=kt(n,r,w))):cu()&&u!==!1?u=kt(n,r,tt):lu()&&u!==!1?u=kt(n,r,it):hu()&&u!==!1&&(u=kt(n,r,b)),r===i&&(ai()&&(u=kt(n,r,p)),ui()&&(u=kt(n,r,w)),ri(n)),r===t&&(f?f.length||ri(n):ri(n)),u}function kt(o,s,h){var c;if(h==p){if(ot.trigger("swipeStatus",[s,vt||null,at||0,lt||0,ct,ht]),et.swipeStatus&&(c=et.swipeStatus.call(ot,o,s,vt||null,at||0,lt||0,ct,ht),c===!1))return!1;if(s==t&&yr()){if(ot.trigger("swipe",[vt,at,lt,ct,ht]),et.swipe&&(c=et.swipe.call(ot,o,vt,at,lt,ct,ht),c===!1))return!1;switch(vt){case r:ot.trigger("swipeLeft",[vt,at,lt,ct,ht]);et.swipeLeft&&(c=et.swipeLeft.call(ot,o,vt,at,lt,ct,ht));break;case u:ot.trigger("swipeRight",[vt,at,lt,ct,ht]);et.swipeRight&&(c=et.swipeRight.call(ot,o,vt,at,lt,ct,ht));break;case f:ot.trigger("swipeUp",[vt,at,lt,ct,ht]);et.swipeUp&&(c=et.swipeUp.call(ot,o,vt,at,lt,ct,ht));break;case e:ot.trigger("swipeDown",[vt,at,lt,ct,ht]);et.swipeDown&&(c=et.swipeDown.call(ot,o,vt,at,lt,ct,ht))}}}if(h==w){if(ot.trigger("pinchStatus",[s,bt||null,wt||0,lt||0,ct,yt,ht]),et.pinchStatus&&(c=et.pinchStatus.call(ot,o,s,bt||null,wt||0,lt||0,ct,yt,ht),c===!1))return!1;if(s==t&&ar())switch(bt){case a:ot.trigger("pinchIn",[bt||null,wt||0,lt||0,ct,yt,ht]);et.pinchIn&&(c=et.pinchIn.call(ot,o,bt||null,wt||0,lt||0,ct,yt,ht));break;case v:ot.trigger("pinchOut",[bt||null,wt||0,lt||0,ct,yt,ht]);et.pinchOut&&(c=et.pinchOut.call(ot,o,bt||null,wt||0,lt||0,ct,yt,ht))}}return h==b?(s===i||s===t)&&(clearTimeout(li),clearTimeout(nr),sr()&&!eu()?(ni=ti(),li=setTimeout(n.proxy(function(){ni=null;ot.trigger("tap",[o.target]);et.tap&&(c=et.tap.call(ot,o,o.target))},this),et.doubleTapThreshold)):(ni=null,ot.trigger("tap",[o.target]),et.tap&&(c=et.tap.call(ot,o,o.target)))):h==tt?(s===i||s===t)&&(clearTimeout(li),ni=null,ot.trigger("doubletap",[o.target]),et.doubleTap&&(c=et.doubleTap.call(ot,o,o.target))):h==it&&(s===i||s===t)&&(clearTimeout(li),ni=null,ot.trigger("longtap",[o.target]),et.longTap&&(c=et.longTap.call(ot,o,o.target))),c}function er(){var n=!0;return et.threshold!==null&&(n=at>=et.threshold),n}function or(){var n=!1;return et.cancelThreshold!==null&&vt!==null&&(n=tu(vt)-at>=et.cancelThreshold),n}function ru(){return et.pinchThreshold!==null?wt>=et.pinchThreshold:!0}function lr(){return et.maxTimeThreshold?lt>=et.maxTimeThreshold?!1:!0:!0}function uu(n,t){if(et.preventDefaultEvents!==!1)if(et.allowPageScroll===y)n.preventDefault();else{var i=et.allowPageScroll===nt;switch(t){case r:(et.swipeLeft&&i||!i&&et.allowPageScroll!=k)&&n.preventDefault();break;case u:(et.swipeRight&&i||!i&&et.allowPageScroll!=k)&&n.preventDefault();break;case f:(et.swipeUp&&i||!i&&et.allowPageScroll!=d)&&n.preventDefault();break;case e:(et.swipeDown&&i||!i&&et.allowPageScroll!=d)&&n.preventDefault()}}}function ar(){var n=wr(),t=br(),i=ru();return n&&t&&i}function ui(){return!!(et.pinchStatus||et.pinchIn||et.pinchOut)}function vr(){return!!(ar()&&ui())}function yr(){var n=lr(),t=er(),i=wr(),r=br(),u=or();return!u&&r&&i&&t&&n}function ai(){return!!(et.swipe||et.swipeStatus||et.swipeLeft||et.swipeRight||et.swipeUp||et.swipeDown)}function pr(){return!!(yr()&&ai())}function wr(){return ct===et.fingers||et.fingers===c||!g}function br(){return ht[0].end.x!==0}function kr(){return!!et.tap}function sr(){return!!et.doubleTap}function fu(){return!!et.longTap}function dr(){if(ni==null)return!1;var n=ti();return sr()&&n-ni<=et.doubleTapThreshold}function eu(){return dr()}function ou(){return(ct===1||!g)&&(isNaN(at)||at<et.threshold)}function su(){return lt>et.longTapThreshold&&at<ut}function hu(){return!!(ou()&&kr())}function cu(){return!!(dr()&&sr())}function lu(){return!!(su()&&fu())}function au(){ci=ti();gi=event.touches.length+1}function gr(){ci=0;gi=0}function vi(){var n=!1,t;return ci&&(t=ti()-ci,t<=et.fingerReleaseThreshold&&(n=!0)),n}function vu(){return!!(ot.data(s+"_intouch")===!0)}function yi(n){n===!0?(ot.bind(bi,ir),ot.bind(ki,rr),ii&&ot.bind(ii,ur)):(ot.unbind(bi,ir,!1),ot.unbind(ki,rr,!1),ii&&ot.unbind(ii,ur,!1));ot.data(s+"_intouch",n===!0)}function pi(n,t){var i={start:{x:0,y:0},end:{x:0,y:0}};return i.start.x=i.end.x=t.pageX||t.clientX,i.start.y=i.end.y=t.pageY||t.clientY,ht[n]=i,i}function nu(n){var i=n.identifier!==undefined?n.identifier:0,t=yu(i);return t===null&&(t=pi(i,n)),t.end.x=n.pageX||n.clientX,t.end.y=n.pageY||n.clientY,t}function yu(n){return ht[n]||null}function pu(n,t){t=Math.max(t,tu(n));si[n].distance=t}function tu(n){return si[n]?si[n].distance:undefined}function wu(){var n={};return n[r]=wi(r),n[u]=wi(u),n[f]=wi(f),n[e]=wi(e),n}function wi(n){return{direction:n,distance:0}}function iu(){return hi-di}function hr(n,t){var i=Math.abs(n.x-t.x),r=Math.abs(n.y-t.y);return Math.round(Math.sqrt(i*i+r*r))}function bu(n,t){var i=t/n*1;return i.toFixed(2)}function ku(){return yt<1?v:a}function du(n,t){return Math.round(Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)))}function gu(n,t){var r=n.x-t.x,u=t.y-n.y,f=Math.atan2(u,r),i=Math.round(f*180/Math.PI);return i<0&&(i=360-Math.abs(i)),i}function nf(n,t){var i=gu(n,t);return i<=45&&i>=0?r:i<=360&&i>=315?r:i>=135&&i<=225?u:i>45&&i<135?e:f}function ti(){var n=new Date;return n.getTime()}function tf(t){t=n(t);var i=t.offset();return{left:i.left,right:i.left+t.outerWidth(),top:i.top,bottom:i.top+t.outerHeight()}}function rf(n,t){return n.x>t.left&&n.x<t.right&&n.y>t.top&&n.y<t.bottom}var et=n.extend({},et),fi=g||h||!et.fallbackToMouseEvents,ei=fi?h?l?"MSPointerDown":"pointerdown":"touchstart":"mousedown",bi=fi?h?l?"MSPointerMove":"pointermove":"touchmove":"mousemove",ki=fi?h?l?"MSPointerUp":"pointerup":"touchend":"mouseup",ii=fi?null:"mouseleave",oi=h?l?"MSPointerCancel":"pointercancel":"touchcancel",at=0,vt=null,lt=0,dt=0,gt=0,yt=1,wt=0,bt=0,si=null,ot=n(ft),st="start",ct=0,ht={},di=0,hi=0,ci=0,gi=0,ni=0,li=null,nr=null;try{ot.bind(ei,tr);ot.bind(oi,ri)}catch(uf){n.error("events not supported "+ei+","+oi+" on jQuery.swipe")}this.enable=function(){return ot.bind(ei,tr),ot.bind(oi,ri),ot};this.disable=function(){return cr(),ot};this.destroy=function(){cr();ot.data(s,null);ot=null};this.option=function(t,i){if(typeof t=="object")et=n.extend(et,t);else if(et[t]!==undefined){if(i===undefined)return et[t];et[t]=i}else if(t)n.error("Option "+t+" does not exist on jQuery.swipe.options");else return et;return null}}var r="left",u="right",f="up",e="down",a="in",v="out",y="none",nt="auto",p="swipe",w="pinch",b="tap",tt="doubletap",it="longtap",k="horizontal",d="vertical",c="all",ut=10,rt="start",o="move",t="end",i="cancel",g="ontouchstart"in window,l=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,h=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,s="TouchSwipe";n.fn.swipe=function(t){var r=n(this),i=r.data(s);if(i&&typeof t=="string"){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));n.error("Method "+t+" does not exist on jQuery.swipe")}else if(i&&typeof t=="object")i.option.apply(this,arguments);else if(!i&&(typeof t=="object"||!t))return ft.apply(this,arguments);return r};n.fn.swipe.version="1.6.12";n.fn.swipe.defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};n.fn.swipe.phases={PHASE_START:rt,PHASE_MOVE:o,PHASE_END:t,PHASE_CANCEL:i};n.fn.swipe.directions={LEFT:r,RIGHT:u,UP:f,DOWN:e,IN:a,OUT:v};n.fn.swipe.pageScroll={NONE:y,HORIZONTAL:k,VERTICAL:d,AUTO:nt};n.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:c}});
/*!
 * jQuery MobiScroll v2.6.2
 * http://mobiscroll.com
 *
 * Copyright 2010-2013, Acid Media
 * Licensed under the MIT license.
 *
 */
(function(n){function tt(o,a){function tr(n,t,i){if(n.stopPropagation(),n.preventDefault(),!vt&&!si(t)&&!t.hasClass("dwa")){vt=!0;var r=t.find(".dw-ul");ir(r);clearInterval(wi);i(r)}}function si(t){if(n.isArray(b.readonly)){var i=n(".dwwl",tt).index(t);return b.readonly[i]}return b.readonly}function cr(t){var i='<div class="dw-bf">',r=nr[t],u=r.values?r:y(r),f=1,e=u.labels||[],o=u.values,s=u.keys||o;return n.each(o,function(n,t){f%20==0&&(i+='<\/div><div class="dw-bf">');i+='<div role="option" aria-selected="false" class="dw-li dw-v" data-val="'+s[n]+'"'+(e[n]?' aria-label="'+e[n]+'"':"")+' style="height:'+ft+"px;line-height:"+ft+'px;"><div class="dw-i">'+t+"<\/div><\/div>";f++}),i+="<\/div>"}function ir(t){dt=n(".dw-li",t).index(n(".dw-v",t).eq(0));gt=n(".dw-li",t).index(n(".dw-v",t).eq(-1));ct=n(".dw-ul",tt).index(t)}function gr(n){var t=b.headerText;return t?typeof t=="function"?t.call(pt,n):t.replace(/\{value\}/i,n):""}function lr(){p.temp=ti&&p.val!==null&&p.val!=rt.val()||p.values===null?b.parseValue(rt.val()||"",p):p.values.slice(0);ai()}function nu(t){var r=window.getComputedStyle?getComputedStyle(t[0]):t[0].style,i,u;return c?(n.each(["t","webkitT","MozT","OT","msT"],function(n,t){if(r[t+"ransform"]!==undefined)return i=r[t+"ransform"],!1}),i=i.split(")")[0].split(", "),u=i[13]||i[5]):u=r.top.replace("px",""),Math.round(vi-u/ft)}function ar(n,t){clearTimeout(ni[t]);delete ni[t];n.closest(".dwwl").removeClass("dwa")}function hi(n,t,i,r,u){var f=(vi-i)*ft,e=n[0].style;f==oi[t]&&ni[t]||(r&&f!=oi[t]&&et("onAnimStart",[tt,t,r]),oi[t]=f,e[k+"Transition"]="all "+(r?r.toFixed(3):0)+"s ease-out",c?e[k+"Transform"]="translate3d(0,"+f+"px,0)":e.top=f+"px",ni[t]&&ar(n,t),r&&u&&(n.closest(".dwwl").addClass("dwa"),ni[t]=setTimeout(function(){ar(n,t)},r*1e3)),ui[t]=i)}function ci(t,i,r,u,f){et("validate",[tt,i,t])!==!1&&(n(".dw-ul",tt).each(function(r){var c=n(this),e=n('.dw-li[data-val="'+p.temp[r]+'"]',c),l=n(".dw-li",c),o=l.index(e),w=l.length,v=r==i||i===undefined;if(!e.hasClass("dw-v")){for(var y=e,a=e,s=0,h=0;o-s>=0&&!y.hasClass("dw-v");)s++,y=l.eq(o-s);while(o+h<w&&!a.hasClass("dw-v"))h++,a=l.eq(o+h);(h<s&&h&&u!==2||!s||o-s<0||u==1)&&a.hasClass("dw-v")?(e=a,o=o+h):(e=y,o=o-s)}(!e.hasClass("dw-sel")||v)&&(p.temp[r]=e.attr("data-val"),n(".dw-sel",c).removeClass("dw-sel"),b.multiple||(n(".dw-sel",c).removeAttr("aria-selected"),e.attr("aria-selected","true")),e.addClass("dw-sel"),hi(c,r,o,v?t:.1,v?f:!1))}),it=b.formatResult(p.temp),b.display=="inline"?ai(r,0,!0):n(".dwv",tt).html(gr(it)),r&&et("onChange",[it]))}function et(t,i){var r;return i.push(p),n.each([fi.defaults,gi,a],function(n,u){u[t]&&(r=u[t].apply(pt,i))}),r}function li(t,i,u,f,e){i=r(i,dt,gt);var h=n(".dw-li",t).eq(i),c=e===undefined?i:e,o=ct,s=0;p.temp[o]=h.attr("data-val");hi(t,o,i,s,e);setTimeout(function(){ci(s,o,!0,u,e!==undefined)},10)}function vr(n){var t=ui[ct]+1;li(n,t>gt?dt:t,1,!0)}function yr(n){var t=ui[ct]-1;li(n,t<dt?gt:t,2,!0)}function ai(n,t,i,r){var f,u;if(bt&&!i&&ci(t),b.hcap!=undefined&&b.hcap>24){it="";for(f in p.temp){for(u=p.temp[f].toString();u.length<2;)u="0"+u;it=it+u+":"}it=it.substr(0,it.length-1);b.minval!=undefined&&b.minval>it&&(it=b.minval)}else it=b.formatResult(p.temp);r||(p.values=p.temp.slice(0),p.val=it);n&&ti&&rt.val(it).trigger("change")}var vi,ft,it,tt,lt,ot,yi,kt,ht,pi,at,rr,fi,ur,vt,ii,ei,wt,fr,er,yt,ri,dt,gt,st,ct,wi,bi,ki,p=this,di=n.mobiscroll,pt=o,rt=n(pt),b=t({},nt),gi={},ni={},ui={},oi={},nr=[],ti=rt.is("input"),bt=!1,pr=function(t){if(v(t)&&!e&&!si(this)&&!vt){t.preventDefault();e=!0;ii=b.mode!="clickpick";st=n(".dw-ul",this);ir(st);ei=ni[ct]!==undefined;ri=ei?nu(st):ui[ct];wt=i(t,"Y");fr=new Date;yt=wt;hi(st,ct,ri,.001);ii&&st.closest(".dwwl").addClass("dwa");n(document).on(g,or).on(f,sr)}},or=function(n){ii&&(n.preventDefault(),n.stopPropagation(),yt=i(n,"Y"),hi(st,ct,r(ri+(wt-yt)/ft,dt-1,gt+1)));ei=!0},sr=function(){var s=new Date-fr,l=r(ri+(wt-yt)/ft,dt-1,gt+1),i,t,u,a=st.offset().top;if(s<300?(i=(yt-wt)/s,t=i*i/b.speedUnit,yt-wt<0&&(t=-t)):t=yt-wt,u=Math.round(ri-t/ft),!t&&!ei){var h=Math.floor((yt-a)/ft),o=n(".dw-li",st).eq(h),c=ii;et("onValueTap",[o])!==!1?u=h:c=!0;c&&(o.addClass("dw-hl"),setTimeout(function(){o.removeClass("dw-hl")},200))}ii&&li(st,u,0,!0,Math.round(l));e=!1;st=null;n(document).off(g,or).off(f,sr)},wr=function(t){var i=n(this);n(document).on(f,hr);i.hasClass("dwb-d")||i.addClass("dwb-a");setTimeout(function(){i.blur()},10);i.hasClass("dwwb")&&v(t)&&tr(t,i.closest(".dwwl"),i.hasClass("dwwbp")?vr:yr)},hr=function(){vt&&(clearInterval(wi),vt=!1);n(document).off(f,hr);n(".dwb-a",tt).removeClass("dwb-a")},br=function(t){if(!si(this)){if(vt=!1,t.timeStamp-er<80)return;er=t.timeStamp;var i=n(this);t.keyCode==13?p.select():t.keyCode==27?p.cancel():t.keyCode==38?(i.find(".dw-i").removeClass("tpDg"),tr(t,i,yr),setTimeout(function(){i.find(".dw-sel").find(".dw-i").addClass("tpDg")},50)):t.keyCode==40?(i.find(".dw-i").removeClass("tpDg"),tr(t,i,vr),setTimeout(function(){i.find(".dw-sel").find(".dw-i").addClass("tpDg")},50)):(t.keyCode==37||t.keyCode==39)&&(t.keyCode==37?i.hasClass("dwwl0")||(i.find(".dw-i").removeClass("tpDg"),i.closest("td").prev().find(".dwww").focus(),i.closest("td").prev().find(".dw-sel").find(".dw-i").addClass("tpDg")):t.keyCode==39&&(i.hasClass("dwwl2")||(i.find(".dw-i").removeClass("tpDg"),i.closest("td").next().find(".dwww").focus(),i.closest("td").next().find(".dw-sel").find(".dw-i").addClass("tpDg"))));t.preventDefault();t.stopPropagation()}},kr=function(){vt&&(clearInterval(wi),vt=!1)},dr=function(t){var i,r,u;si(this)||(i=n(this),t.preventDefault(),t=t.originalEvent||t,r=t.wheelDelta?t.wheelDelta/120:t.detail?-t.detail/3:0,u=n(".dw-ul",this),i.parent().parent().find(".tpDg").removeClass("tpDg"),ir(u),li(u,Math.round(ui[ct]-r),r<0?1:2),setTimeout(function(){i.find(".dw-sel").find(".dw-i").addClass("tpDg");i.closest("td").find(".dwww").focus()},30))};p.position=function(t){if(b.display!="inline"&&(lt!==n(window).width()||yi!==n(window).height()||!t)&&et("onPosition",[tt])!==!1){var e,u,i,a,k,v,s,y,d,p,g,nt,h=0,c=0,f=n(window).scrollTop(),it=n(".dwwr",tt),o=n(".dw",tt),l={},w=b.anchor===undefined?rt:b.anchor;lt=n(window).width();yi=n(window).height();ot=window.innerHeight;ot=ot||yi;/modal|bubble/.test(b.display)&&(n(".dwc",tt).each(function(){e=n(this).outerWidth(!0);h+=e;c=e>c?e:c}),e=h>lt?c:h,it.width(e).css("white-space",h>lt?"":"nowrap"));kt=o.outerWidth();ht=o.outerHeight(!0);pi=ht<=ot&&kt<=lt;b.display=="modal"?(u=(lt-kt)/2,i=f+(ot-ht)/2):b.display=="bubble"?(nt=!0,d=n(".dw-arrw-i",tt),v=w.offset(),s=v.top,y=v.left,a=w.outerWidth(),k=w.outerHeight(),u=y-(o.outerWidth(!0)-a)/2,u=u>lt-kt?lt-(kt+20):u,u=u>=0?u:20,i=s-ht,i<f||s>f+ot?(o.removeClass("dw-bubble-top").addClass("dw-bubble-bottom"),i=s+k):o.removeClass("dw-bubble-bottom").addClass("dw-bubble-top"),p=d.outerWidth(),g=y+a/2-(u+(kt-p)/2),n(".dw-arr",tt).css({left:r(g,0,p)})):(l.width="95%",b.display=="top"?i=f:b.display=="bottom"&&(i=f+ot-ht));l.top=i<0?0:i;l.left=u;o.css(l);n(".dw-persp",tt).height(0).height(i+ht>n(document).height()?i+ht:n(document).height());nt&&(i+ht>f+ot||s>f+ot)&&n(window).scrollTop(i+ht-ot)}};p.enable=function(){b.disabled=!1;ti&&rt.prop("disabled",!1)};p.disable=function(){b.disabled=!0;ti&&rt.prop("disabled",!0)};p.setValue=function(t,i,r,u){p.temp=n.isArray(t)?t.slice(0):b.parseValue.call(pt,t+"",p);ai(i,r,!1,u)};p.getValue=function(){return p.values};p.getValues=function(){var n=[];for(var t in p._selectedValues)n.push(p._selectedValues[t]);return n};p.changeWheel=function(t,i){if(tt){var r=0,u=t.length;n.each(b.wheels,function(f,e){return n.each(e,function(f,e){if(n.inArray(r,t)>-1&&(nr[r]=e,n(".dw-ul",tt).eq(r).html(cr(r)),u--,!u))return p.position(),ci(i,undefined,!0),!1;r++}),u?void 0:!1})}};p.isVisible=function(){return bt};p.tap=function(n,t){var r,f;if(b.tap)n.on("touchstart.dw",function(n){n.preventDefault();r=i(n,"X");f=i(n,"Y")}).on("touchend.dw",function(n){Math.abs(i(n,"X")-r)<20&&Math.abs(i(n,"Y")-f)<20&&t.call(this,n);u=!0;setTimeout(function(){u=!1},300)});n.on("click.dw",function(n){u||t.call(this,n)})};p.show=function(t){var f,r,u,i;if(b.disabled||bt)return!1;if(b.display=="top"&&(at="slidedown"),b.display=="bottom"&&(at="slideup"),lr(),et("onBeforeShow",[]),r=0,u="",at&&!t&&(u="dw-"+at+" dw-in"),i='<div role="dialog" id="mbScrl" class="'+b.theme+" dw-"+b.display+(l?" dw"+l:"")+'">'+(b.display=="inline"?'<div class="dw dwbg dwi dwtrs"><div class="dwwr dwtrs">':'<div class="dw-persp"><div class="dwo"><\/div><div class="dw dwtrs dwbg '+u+'"><div class="dw-arrw"><div class="dw-arrw-i"><div class="dw-arr"><\/div><\/div><\/div><div class="dwwr dwtrs"><div aria-live="assertive" id="txtBar" class="dwv'+(b.headerText?"":" dw-hidden")+'"><\/div>')+'<div class="dwcc tpBg">',n.each(b.wheels,function(t,u){i+='<div class="dwc'+(b.mode!="scroller"?" dwpm":" dwsc")+(b.showLabel?"":" dwhl")+'"><div class="dwwc dwrc"><table cellpadding="0" cellspacing="0"><tr>';n.each(u,function(n,t){nr[r]=t;f=t.label!==undefined?t.label:n;i+='<td><div class="dwwl dwrc dwwl'+r+'">'+(b.mode!="scroller"?'<div class="dwb-e dwwb dwwbp" style="height:'+ft+"px;line-height:"+ft+'px;"><span>+<\/span><\/div><div class="dwb-e dwwb dwwbm" style="height:'+ft+"px;line-height:"+ft+'px;"><span>&ndash;<\/span><\/div>':"")+'<div class="dwl dtpLbl cLbl">'+f+'<\/div><div tabindex="0" aria-live="off" aria-label="'+f+'" role="listbox" class="dwww"><div class="dww" style="height:'+b.rows*ft+"px;min-width:"+b.width+'px;"><div class="dw-ul">';i+=cr(r);i+='<\/div><div class="dwwol"><\/div><\/div><div class="dwwo"><\/div><\/div><div class="dwwol"><\/div><\/div><\/td>';r++});i+="<\/tr><\/table><\/div><\/div>"}),i+="<\/div>",i+=!0===g4||ModelNumber===mHVM200||ModelNumber===mHVM100?'<div style="margin-left:10px"><div id="acptBtn" role="button" class="yes dwBtn" tabindex="1">OK<\/div><div id="cnclBtn" role="button" class="yes dwBtn" tabindex="0">Cancel<\/div>':'<div id="clickSpace" class="dwtrs" style="width:100%; height:100px"><\/div>',i+="<\/div><\/div><\/div>",tt=n(i),ci(),et("onMarkupReady",[tt]),b.display!="inline"?(tt.appendTo("body"),at&&!t&&(tt.addClass("dw-trans"),setTimeout(function(){tt.removeClass("dw-trans").find(".dw").removeClass(u)},350))):rt.is("div")?rt.html(tt):tt.insertAfter(rt),et("onMarkupInserted",[tt]),bt=!0,fi.init(tt,p),b.display!="inline"){p.tap(n(".dwb-s div",tt),function(){p.select()});p.tap(n(".dwb-c div",tt),function(){p.cancel()});b.button3&&p.tap(n(".dwb-n span",tt),b.button3);n(window).on("keydown.dw",function(n){n.keyCode==13?p.select():n.keyCode==27&&p.cancel()});if(b.scrollLock)tt.on("touchmove touchstart",function(n){pi&&n.preventDefault()});n("input,select,button").each(function(){this.disabled||(n(this).attr("autocomplete")&&n(this).data("autocomplete",n(this).attr("autocomplete")),n(this).addClass("dwtd").prop("disabled",!0).attr("autocomplete","off"))});p.position();n(window).on("orientationchange.dw resize.dw scroll.dw",function(n){clearTimeout(rr);rr=setTimeout(function(){var t=n.type=="scroll";(t&&pi||!t)&&p.position(!t)},100)});p.alert(b.ariaDesc)}n(".dwwl",tt).on("DOMMouseScroll mousewheel",dr).on(d,pr).on("keydown",br).on("keyup",kr);tt.on(d,".dwb-e",wr).on("keydown",".dwb-e",function(t){t.keyCode==32&&(t.preventDefault(),t.stopPropagation(),n(this).click())});if(window.mobiOpen=!0,et("onShow",[tt,it]),n(".dwwl",tt).first().find(".dwww:first").focus(),n(".dwwl",tt).first().find(".dw-sel").find(".dw-i").addClass("tpDg"),n("#txtBar").css("display","none"),g4==!1||ModelNumber===mHVM200||ModelNumber===mHVM100)n("#clickSpace").on("click touch touchend",function(){p.select()});n("#acptBtn").on("click touch touchend",function(){p.select()});n("#cnclBtn").on("click touch touchend",function(){p.cancel()})};p.hide=function(t,i){if(!bt||et("onClose",[it,i])===!1)return!1;n(".dwtd").each(function(){n(this).prop("disabled",!1).removeClass("dwtd");n(this).data("autocomplete")?n(this).attr("autocomplete",n(this).data("autocomplete")):n(this).removeAttr("autocomplete")});tt&&(b.display!="inline"&&at&&!t?(tt.addClass("dw-trans").find(".dw").addClass("dw-"+at+" dw-out"),setTimeout(function(){tt.remove();tt=null},350)):(tt.remove(),tt=null),n(window).off(".dw"));oi={};bt=!1;ki=!0;window.mobiOpen=!1;rt.focus()};p.select=function(){p.hide(!1,"set")!==!1&&(ai(!0,0,!0),et("onSelect",[p.val]))};p.alert=function(n){s.text(n);clearTimeout(w);w=setTimeout(function(){s.text("")},5e3)};p.cancel=function(){p.hide(!1,"cancel")!==!1&&et("onCancel",[p.val])};p.init=function(n){fi=t({defaults:{},init:ut},di.themes[n.theme||b.theme]);ur=di.i18n[n.lang||b.lang];t(a,n);t(b,fi.defaults,ur,a);p.settings=b;rt.off(".dw");var i=di.presets[b.preset];if(i&&(gi=i.call(pt,p),t(b,gi,a)),vi=Math.floor(b.rows/2),ft=b.height,at=b.animate,bt&&p.hide(),b.display=="inline")p.show();else{if(lr(),ti&&(bi===undefined&&(bi=pt.readOnly),b.showOnFocus))rt.on("focus.dw",function(){ki||p.show();ki=!1});b.showOnTap&&p.tap(rt,function(){p.show()})}};p.trigger=function(n,t){return et(n,t)};p.option=function(n,t){var i={};typeof n=="object"?i=n:i[n]=t;p.init(i)};p.destroy=function(){p.hide();rt.off(".dw");delete h[pt.id];ti&&(pt.readOnly=bi)};p.getInst=function(){return p};p.values=null;p.val=null;p.temp=null;p._selectedValues={};p.init(a)}function a(n){for(var t in n)if(ft[n[t]]!==undefined)return!0;return!1}function it(){var n=["Webkit","Moz","O","ms"];for(var t in n)if(a([n[t]+"Transform"]))return"-"+n[t].toLowerCase();return""}function v(n){if(n.type==="touchstart")o=!0;else if(o)return o=!1,!1;return!0}function i(n,t){var i=n.originalEvent,r=n.changedTouches;return r||i&&i.changedTouches?i?i.changedTouches[0]["page"+t]:r[0]["page"+t]:n["page"+t]}function r(n,t,i){return Math.max(t,Math.min(n,i))}function y(t){var i={values:[],keys:[]};return n.each(t,function(n,t){i.keys.push(n);i.values.push(t)}),i}function p(n,t,i){var r=n;return typeof t=="object"?n.each(function(){this.id||(b+=1,this.id="mobiscroll"+b);h[this.id]=new tt(this,t)}):(typeof t=="string"&&n.each(function(){var n,u=h[this.id];if(u&&u[t]&&(n=u[t].apply(this,Array.prototype.slice.call(i,1)),n!==undefined))return r=n,!1}),r)}var e,u,o,w,s,rt=new Date,b=rt.getTime(),h={},ut=function(){},ft=document.createElement("modernizr").style,c=a(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]),l=it(),k=l.replace(/^\-/,"").replace("moz","Moz"),t=n.extend,d="touchstart mousedown",g="touchmove mousemove",f="touchend mouseup",nt={width:70,height:40,rows:3,delay:300,disabled:!1,readonly:!1,showOnFocus:!1,showOnTap:!0,showLabel:!0,wheels:[],theme:"",headerText:"{value}",display:"modal",mode:"scroller",preset:"",lang:"en-US",setText:"Set",cancelText:"Cancel",ariaDesc:"Select a value",scrollLock:!0,tap:!0,speedUnit:.0012,timeUnit:.1,formatResult:function(n){return n.join(" ")},parseValue:function(t,i){var e=t.split(" "),r=[],u=0,f;return n.each(i.settings.wheels,function(t,i){n.each(i,function(t,i){i=i.values?i:y(i);f=i.keys||i.values;n.inArray(e[u],f)!==-1?r.push(e[u]):r.push(f[0]);u++})}),r}};n(function(){s=n('<div class="dw-hidden" role="alert"><\/div>').appendTo("body")});n(document).on("mouseover mouseup mousedown click",function(n){if(u)return n.stopPropagation(),n.preventDefault(),!1});n.fn.mobiscroll=function(i){return t(this,n.mobiscroll.shorts),p(this,i,arguments)};n.mobiscroll=n.mobiscroll||{setDefaults:function(n){t(nt,n)},presetShort:function(n){this.shorts[n]=function(i){return p(this,t(i,{preset:n}),arguments)}},has3d:c,shorts:{},presets:{},themes:{},i18n:{}};n.scroller=n.scroller||n.mobiscroll;n.fn.scroller=n.fn.scroller||n.fn.mobiscroll})(jQuery),function(n){var t=n.mobiscroll,r=new Date,i={dateFormat:"dd-mm-yy",dateOrder:"ddmmyy",timeWheels:"HHiiss",timeFormat:"HH:ii:ss",startYear:r.getFullYear()-1,endYear:r.getFullYear()+10,monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortYearCutoff:"+10",monthText:"Month",dayText:"Day",yearText:"Year",hourText:"Hours",minuteText:"Minutes",secText:"Seconds",ampmText:"&nbsp;",nowText:"Now",showNow:!1,stepHour:1,stepMinute:1,stepSecond:1,separator:" "},u=function(r){function y(n,t,i){return s[t]!==undefined?+n[s[t]]:i!==undefined?i:st[h[t]]?st[h[t]]():h[t](st)}function b(n,t,i,r){n.push({values:i,keys:t,label:r})}function g(n,t){return Math.floor(n/t)*t}function bt(n){var t=n.getHours();return t=d&&t>0?d:rt&&t>=12?t-12:t,g(t,stepH)}function kt(n){return g(n.getMinutes(),stepM)}function dt(n){return g(n.getSeconds(),stepS)}function gt(n){return wt&&n.getHours()>11?1:0}function ht(n){var t=y(n,"h",0);return new Date(y(n,"y"),y(n,"m"),y(n,"d",1),y(n,"a")?t+12:t,y(n,"i",0),y(n,"s",0))}var nt=n(this),tt={},l,ft,et,ut,vt;if(nt.is("input")){switch(nt.attr("type")){case"date":l="yyyy-mm-dd";break;case"datetime":l="yy-mm-ddTHH:ii:ssZ";break;case"datetime-local":l="yy-mm-ddTHH:ii:ss";break;case"month":l="yy-mm";tt.dateOrder="mmyy";break;case"time":l="HH:ii:ss"}ft=nt.attr("min");et=nt.attr("max");ft&&(tt.minDate=t.parseDate(l,ft));et&&(tt.maxDate=t.parseDate(l,et))}var u,c,e,o,a,ct,lt,yt=n.extend({},r.settings),f=n.extend(r.settings,i,tt,yt),v=0,ot=[],p=[],s={},h={y:"getFullYear",m:"getMonth",d:"getDate",h:bt,i:kt,s:dt,a:gt},it=f.preset,k=f.dateOrder,w=f.timeWheels,pt=k.match(/D/),wt=w.match(/a/i),rt=w.match(/h/),at=it=="datetime"?f.dateFormat+f.separator+f.timeFormat:it=="time"?f.timeFormat:f.dateFormat,st=new Date,d=f.hcap;if(stepH=f.stepHour,stepM=f.stepMinute,stepS=f.stepSecond,mind=f.minDate||new Date(f.startYear,0,1),maxd=f.maxDate||new Date(f.endYear,11,31,23,59,59),l=l||at,it.match(/date/i)){for(n.each(["y","m","d"],function(n,t){u=k.search(new RegExp(t,"i"));u>-1&&p.push({o:u,v:t})}),p.sort(function(n,t){return n.o>t.o?1:-1}),n.each(p,function(n,t){s[t.v]=n}),a=[],c=0;c<3;c++)if(c==s.y){for(v++,o=[],e=[],ct=mind.getFullYear(),lt=maxd.getFullYear(),u=ct;u<=lt;u++)e.push(u),o.push(k.match(/yy/i)?u:(u+"").substr(2,2));b(a,e,o,f.yearText)}else if(c==s.m){for(v++,o=[],e=[],u=0;u<12;u++)ut=k.replace(/[dy]/gi,"").replace(/mm/,u<9?"0"+(u+1):u+1).replace(/m/,u+1),e.push(u),o.push(ut.match(/MM/)?ut.replace(/MM/,'<span class="dw-mon">'+f.monthNames[u]+"<\/span>"):ut.replace(/M/,'<span class="dw-mon">'+f.monthNamesShort[u]+"<\/span>"));b(a,e,o,f.monthText)}else if(c==s.d){for(v++,o=[],e=[],u=1;u<32;u++)e.push(u),o.push(k.match(/dd/i)&&u<10?"0"+u:u);b(a,e,o,f.dayText)}ot.push(a)}if(it.match(/time/i)){for(p=[],n.each(["h","i","s","a"],function(n,t){n=w.search(new RegExp(t,"i"));n>-1&&p.push({o:n,v:t})}),p.sort(function(n,t){return n.o>t.o?1:-1}),n.each(p,function(n,t){s[t.v]=v+n}),a=[],c=v;c<v+4;c++)if(c==s.h){for(v++,o=[],e=[],u=0;u<(d!=undefined?d:rt?12:24);u+=stepH)e.push(u),o.push(rt&&u==0?12:w.match(/hh/i)&&u<10?"0"+u:u);b(a,e,o,f.hourText)}else if(c==s.i){for(v++,o=[],e=[],u=0;u<60;u+=stepM)e.push(u),o.push(w.match(/ii/)&&u<10?"0"+u:u);b(a,e,o,f.minuteText)}else if(c==s.s){for(v++,o=[],e=[],u=0;u<60;u+=stepS)e.push(u),o.push(w.match(/ss/)&&u<10?"0"+u:u);b(a,e,o,f.secText)}else c==s.a&&(v++,vt=w.match(/A/),b(a,[0,1],vt?["AM","PM"]:["am","pm"],f.ampmText));ot.push(a)}return r.setDate=function(n,t,i,u){for(var f in s)r.temp[s[f]]=n[h[f]]?n[h[f]]():h[f](n);r.setValue(r.temp,t,i,u)},r.getDate=function(n){return ht(n?r.temp:r.values)},{button3Text:f.showNow?f.nowText:undefined,button3:f.showNow?function(){r.setDate(new Date,!1,.3,!0)}:undefined,wheels:ot,headerText:function(){return t.formatDate(at,ht(r.temp),f)},formatResult:function(n){return t.formatDate(l,ht(n),f)},parseValue:function(n){var r=new Date,i,u=[];try{r=t.parseDate(l,n,f)}catch(e){}for(i in s)u[s[i]]=r[h[i]]?r[h[i]]():h[i](r);return u},validate:function(t){var i=r.temp,o={y:mind.getFullYear(),m:0,d:1,h:0,i:0,s:0,a:0},c={y:maxd.getFullYear(),m:11,d:31,h:g(d!=undefined?d:rt?11:23,stepH),i:g(59,stepM),s:g(59,stepS),a:1},u=!0,e=!0;n.each(["y","m","d","a","h","i","s"],function(r,l){var b,ut,nt;if(s[l]!==undefined){var d=o[l],p=c[l],tt=31,v=y(i,l),a=n(".dw-ul",t).eq(s[l]),g,w;if(l=="d"&&(g=y(i,"y"),w=y(i,"m"),tt=32-new Date(g,w,32).getDate(),p=tt,pt&&n(".dw-li",a).each(function(){var r=n(this),t=r.data("val"),u=new Date(g,w,t).getDay(),i=k.replace(/[my]/gi,"").replace(/dd/,t<10?"0"+t:t).replace(/d/,t);n(".dw-i",r).html(i.match(/DD/)?i.replace(/DD/,'<span class="dw-day">'+f.dayNames[u]+"<\/span>"):i.replace(/D/,'<span class="dw-day">'+f.dayNamesShort[u]+"<\/span>"))})),u&&mind&&(d=mind[h[l]]?mind[h[l]]():h[l](mind)),e&&maxd&&(p=maxd[h[l]]?maxd[h[l]]():h[l](maxd)),l!="y"){var ft=n(".dw-li",a).index(n('.dw-li[data-val="'+d+'"]',a)),it=n(".dw-li",a).index(n('.dw-li[data-val="'+p+'"]',a)),rt=n(".dw-li",a);rt.removeClass("dw-v");it==-1?it=rt.length:it+=1;rt.slice(ft,it).addClass("dw-v");l=="d"&&n(".dw-li",a).removeClass("dw-h").slice(tt).addClass("dw-h")}v<d&&(v=d);v>p&&(v=p);u&&(u=v==d);e&&(e=v==p);f.invalid&&l=="d"&&(b=[],f.invalid.dates&&n.each(f.invalid.dates,function(n,t){t.getFullYear()==g&&t.getMonth()==w&&b.push(t.getDate()-1)}),f.invalid.daysOfWeek&&(ut=new Date(g,w,1).getDay(),n.each(f.invalid.daysOfWeek,function(n,t){for(nt=t-ut;nt<tt;nt+=7)nt>=0&&b.push(nt)})),f.invalid.daysOfMonth&&n.each(f.invalid.daysOfMonth,function(n,t){t=(t+"").split("/");t[1]?t[0]-1==w&&b.push(t[1]-1):b.push(t[0]-1)}),n.each(b,function(t,i){n(".dw-li",a).eq(i).removeClass("dw-v")}));i[s[l]]=v}})}}};n.each(["date","time","datetime"],function(n,i){t.presets[i]=u;t.presetShort(i)});t.formatDate=function(t,r,u){var h;if(!r)return null;for(var c=n.extend({},i,u),s=function(n){for(var i=0;e+1<t.length&&t.charAt(e+1)==n;)i++,e++;return i},o=function(n,t,i){var r=""+t;if(s(n))while(r.length<i)r="0"+r;return r},a=function(n,t,i,r){return s(n)?r[t]:i[t]},f="",l=!1,e=0;e<t.length;e++)if(l)t.charAt(e)!="'"||s("'")?f+=t.charAt(e):l=!1;else switch(t.charAt(e)){case"d":f+=o("d",r.getDate(),2);break;case"D":f+=a("D",r.getDay(),c.dayNamesShort,c.dayNames);break;case"o":f+=o("o",(r.getTime()-new Date(r.getFullYear(),0,0).getTime())/864e5,3);break;case"m":f+=o("m",r.getMonth()+1,2);break;case"M":f+=a("M",r.getMonth(),c.monthNamesShort,c.monthNames);break;case"y":f+=s("y")?r.getFullYear():(r.getYear()%100<10?"0":"")+r.getYear()%100;break;case"h":h=r.getHours();f+=o("h",h>12?h-12:h==0?12:h,2);break;case"H":f+=u.hcap?o("H",r.getHours()+r.getDay()*24,2):o("H",r.getHours(),2);break;case"i":f+=o("i",r.getMinutes(),2);break;case"s":f+=o("s",r.getSeconds(),2);break;case"a":f+=r.getHours()>11?"pm":"am";break;case"A":f+=r.getHours()>11?"PM":"AM";break;case"'":s("'")?f+="'":l=!0;break;default:f+=t.charAt(e)}return f};t.parseDate=function(t,r,u){var c=new Date,tt,p;if(!t||!r)return c;r=typeof r=="object"?r.toString():r+"";for(var a=n.extend({},i,u),k=a.shortYearCutoff,s=c.getFullYear(),h=c.getMonth()+1,l=c.getDate(),d=-1,f=c.getHours(),it=c.getMinutes(),rt=0,v=-1,g=!1,w=function(n){var i=o+1<t.length&&t.charAt(o+1)==n;return i&&o++,i},e=function(n){w(n);var i=n=="@"?14:n=="!"?20:n=="y"?4:n=="o"?3:2,u=new RegExp("^\\d{1,"+i+"}"),t=r.substr(y).match(u);return t?(y+=t[0].length,parseInt(t[0],10)):0},b=function(n,t,i){for(var f=w(n)?i:t,u=0;u<f.length;u++)if(r.substr(y,f[u].length).toLowerCase()==f[u].toLowerCase())return y+=f[u].length,u+1;return 0},nt=function(){y++},y=0,o=0;o<t.length;o++)if(g)t.charAt(o)!="'"||w("'")?nt():g=!1;else switch(t.charAt(o)){case"d":l=e("d");break;case"D":b("D",a.dayNamesShort,a.dayNames);break;case"o":d=e("o");break;case"m":h=e("m");break;case"M":h=b("M",a.monthNamesShort,a.monthNames);break;case"y":s=e("y");break;case"H":f=e("H");break;case"h":f=e("h");break;case"i":it=e("i");break;case"s":rt=e("s");break;case"a":v=b("a",["am","pm"],["am","pm"])-1;break;case"A":v=b("A",["am","pm"],["am","pm"])-1;break;case"'":w("'")?nt():g=!0;break;default:nt()}if(s<100&&(s+=(new Date).getFullYear()-(new Date).getFullYear()%100+(s<=(typeof k!="string"?k:(new Date).getFullYear()%100+parseInt(k,10))?0:-100)),d>-1){h=1;l=d;do{if(tt=32-new Date(s,h-1,32).getDate(),l<=tt)break;h++;l-=tt}while(1)}if(f=v==-1?f:v&&f<12?f+12:!v&&f==12?0:f,p=new Date(s,h-1,l,f,it,rt),p.getFullYear()!=s||p.getMonth()+1!=h||p.getDate()!=l)throw"Invalid date";return p}}(jQuery),function(n){var t=n.mobiscroll,i={invalid:[],showInput:!0,inputClass:""},r=function(t){function p(t,i,r,u){for(var f=0,e,o;f<i;)e=n(".dwwl"+f,t),o=it(u,f,r),n.each(o,function(t,i){n('.dw-li[data-val="'+i+'"]',e).removeClass("dw-v")}),f++}function it(n,t,i){for(var r=0,f,u=i,e=[],o;r<t;){o=n[r];for(f in u)if(u[f].key==o){u=u[f].children;break}r++}for(r=0;r<u.length;)u[r].invalid&&e.push(u[r].key),r++;return e}function rt(n,t){for(var i=[];n;)i[--n]=!0;return i[t]=!1,i}function ut(n){for(var i=[],t=0;t<n;t++)i[t]=r.labels&&r.labels[t]?r.labels[t]:t;return i}function v(n,t,i){var f=0,r,c,s,h=[],u=e;if(t)for(r=0;r<t;r++)h[r]=[{}];while(f<n.length){for(h[f]=[ft(u,g[f])],r=0,s=undefined;r<u.length&&s===undefined;)u[r].key==n[f]&&(i!==undefined&&f<=i||i===undefined)&&(s=r),r++;if(s!==undefined&&u[s].children)f++,u=u[s].children;else if((c=o(u))&&c.children)f++,u=c.children;else return h}return h}function o(n,t){if(!n)return!1;for(var i=0,r;i<n.length;)if(!(r=n[i++]).invalid)return t?i-1:r;return!1}function ft(n,t){for(var r={keys:[],values:[],label:t},i=0;i<n.length;)r.values.push(n[i].value),r.keys.push(n[i].key),i++;return r}function w(t,i){n(".dwc",t).css("display","").slice(i).hide()}function et(n){for(var i=[],r=n,t,u=!0,f=0;u;)t=o(r),i[f++]=t.key,(u=t.children)&&(r=t.children);return i}function b(n,t){var c=[],r=e,u=0,h=!1,f,s,i;if(n[u]!==undefined&&u<=t)for(f=0,s=n[u],i=undefined;f<r.length&&i===undefined;)r[f].key!=n[u]||r[f].invalid||(i=f),f++;else i=o(r,!0),s=r[i].key;for(h=i!==undefined?r[i].children:!1,c[u]=s;h;){if(r=r[i].children,u++,h=!1,i=undefined,n[u]!==undefined&&u<=t)for(f=0,s=n[u],i=undefined;f<r.length&&i===undefined;)r[f].key!=n[u]||r[f].invalid||(i=f),f++;else i=o(r,!0),i=i===!1?undefined:i,s=r[i].key;h=i!==undefined&&o(r[i].children)?r[i].children:!1;c[u]=s}return{lvl:u+1,nVector:c}}function k(t){var i=[];return f=f>c++?f:c,t.children("li").each(function(t){var r=n(this),u=r.clone();u.children("ul,ol").remove();var o=u.html().replace(/^\s\s*/,"").replace(/\s\s*$/,""),s=r.data("invalid")?!0:!1,f={key:r.data("val")||t,value:o,invalid:s,children:null},e=r.children("ul,ol");e.length&&(f.children=k(e));i.push(f)}),c--,i}var d=n.extend({},t.settings),r=n.extend(t.settings,i,d),h=n(this),u,s,y=this.id+"_dummy",f=0,c=0,l={},e=r.wheelArray||k(h),g=ut(f),a=[],nt=et(e),tt=v(nt,f);return n("#"+y).remove(),r.showInput&&(u=n('<input type="text" id="'+y+'" value="" class="'+r.inputClass+'" readonly />').insertBefore(h),t.settings.anchor=u,r.showOnFocus&&u.focus(function(){t.show()}),r.showOnTap&&t.tap(u,function(){t.show()})),r.wheelArray||h.hide().closest(".ui-field-contain").trigger("create"),{width:50,wheels:tt,headerText:!1,onBeforeShow:function(){var n=t.temp;a=n.slice(0);t.settings.wheels=v(n,f,f);s=!0},onSelect:function(n){u&&u.val(n)},onChange:function(n){u&&r.display=="inline"&&u.val(n)},onClose:function(){u&&u.blur()},onShow:function(t){n(".dwwl",t).on("mousedown touchstart",function(){clearTimeout(l[n(".dwwl",t).index(this)])})},validate:function(n,i,r){var o=t.temp,u;if((i===undefined||a[i]==o[i])&&(i!==undefined||s))u=b(o,o.length),p(n,u.lvl,e,o),w(n,u.lvl);else{t.settings.wheels=v(o,null,i);var h=[],c=(i||0)+1,u=b(o,i);for(i!==undefined&&(t.temp=u.nVector.slice(0));c<u.lvl;)h.push(c++);if(w(n,u.lvl),a=t.temp.slice(0),h.length)return s=!0,t.settings.readonly=rt(f,i),clearTimeout(l[i]),l[i]=setTimeout(function(){t.changeWheel(h);t.settings.readonly=!1},r*1e3),!1;p(n,u.lvl,e,t.temp)}s=!1}}};n.each(["list","image","treelist"],function(n,i){t.presets[i]=r;t.presetShort(i)})}(jQuery),function(n){var t={inputClass:"",invalid:[],rtl:!1,group:!1,groupLabel:"Groups"};n.mobiscroll.presetShort("select");n.mobiscroll.presets.select=function(i){function nt(){var e,f=0,t=[],i=[],o=[[]];return r.group?(r.rtl&&(f=1),n("optgroup",u).each(function(r){t.push(n(this).attr("label"));i.push(r)}),o[f]=[{values:t,keys:i,label:r.groupLabel}],e=h,f+=r.rtl?-1:1):e=u,t=[],i=[],n("option",e).each(function(){var r=n(this).attr("value");t.push(n(this).text());i.push(r);n(this).prop("disabled")&&it.push(r)}),o[f]=[{values:t,keys:i,label:et}],o}function k(n,t){var f=[],o,r;if(s){o=[];r=0;for(r in i._selectedValues)o.push(v[r]),f.push(r);c.val(o.join(", "))}else c.val(n),f=t?i.values[e]:null;t&&(w=!0,u.val(f).trigger("change"))}function ut(n){if(s&&n.hasClass("dw-v")&&n.closest(".dw").find(".dw-ul").index(n.closest(".dw-ul"))==e){var t=n.attr("data-val"),u=n.hasClass("dw-msel");return u?(n.removeClass("dw-msel").removeAttr("aria-selected"),delete i._selectedValues[t]):(n.addClass("dw-msel").attr("aria-selected","true"),i._selectedValues[t]=t),r.display=="inline"&&k(t,!0),!1}}var ft=n.extend({},i.settings),r=n.extend(i.settings,t,ft),u=n(this),s=u.prop("multiple"),p=this.id+"_dummy",f=s?u.val()?u.val()[0]:n("option",u).attr("value"):u.val(),h=u.find('option[value="'+f+'"]').parent(),l=h.index()+"",o=l,w,st=n('label[for="'+this.id+'"]').attr("for",p),tt=n('label[for="'+p+'"]'),et=r.label!==undefined?r.label:tt.length?tt.text():u.attr("name"),it=[],b=[],v={},a,e,g,c,rt=r.readonly,ot,d,y;for(r.group&&!n("optgroup",u).length&&(r.group=!1),r.invalid.length||(r.invalid=it),r.group?r.rtl?(a=1,e=0):(a=0,e=1):(a=-1,e=0),n("#"+p).remove(),c=n('<input type="text" id="'+p+'" class="'+r.inputClass+'" readonly />').insertBefore(u),n("option",u).each(function(){v[n(this).attr("value")]=n(this).text()}),r.showOnFocus&&c.focus(function(){i.show()}),r.showOnTap&&i.tap(c,function(){i.show()}),d=u.val()||[],y=0;y<d.length;y++)i._selectedValues[d[y]]=d[y];return k(v[f]),u.off(".dwsel").on("change.dwsel",function(){w||i.setValue(s?u.val()||[]:[u.val()],!0);w=!1}).hide().closest(".ui-field-contain").trigger("create"),i._setValue||(i._setValue=i.setValue),i.setValue=function(t,c,a,y,p){var b,d=n.isArray(t)?t[0]:t,w,g;if(f=d!==undefined?d:n("option",u).attr("value"),s)for(i._selectedValues={},w=0;w<t.length;w++)i._selectedValues[t[w]]=t[w];r.group?(h=u.find('option[value="'+f+'"]').parent(),o=h.index(),b=r.rtl?[f,h.index()]:[h.index(),f],o!==l&&(r.wheels=nt(),i.changeWheel([e]),l=o+"")):b=[f];i._setValue(b,c,a,y,p);c&&(g=s?!0:f!==u.val(),k(v[f],g))},i.getValue=function(n){var t=n?i.temp:i.values;return t[e]},{width:50,wheels:ot,headerText:!1,multiple:s,anchor:c,formatResult:function(n){return v[n[e]]},parseValue:function(){var e=u.val()||[],t=0;if(s)for(i._selectedValues={};t<e.length;t++)i._selectedValues[e[t]]=e[t];return f=s?u.val()?u.val()[0]:n("option",u).attr("value"):u.val(),h=u.find('option[value="'+f+'"]').parent(),o=h.index(),l=o+"",r.group&&r.rtl?[f,o]:r.group?[o,f]:[f]},validate:function(t,c,v){var y,p,w;if(c===undefined&&s){y=i._selectedValues;p=0;n(".dwwl"+e+" .dw-li",t).removeClass("dw-msel").removeAttr("aria-selected");for(p in y)n(".dwwl"+e+' .dw-li[data-val="'+y[p]+'"]',t).addClass("dw-msel").attr("aria-selected","true")}if(c===a)if(o=i.temp[a],o!==l){if(h=u.find("optgroup").eq(o),o=h.index(),f=h.find("option").eq(0).val(),f=f||u.val(),r.wheels=nt(),r.group)return i.temp=r.rtl?[f,o]:[o,f],r.readonly=[r.rtl,!r.rtl],clearTimeout(g),g=setTimeout(function(){i.changeWheel([e]);r.readonly=rt;l=o+""},v*1e3),!1}else r.readonly=rt;else f=i.temp[e];w=n(".dw-ul",t).eq(e);n.each(r.invalid,function(t,i){n('.dw-li[data-val="'+i+'"]',w).removeClass("dw-v")})},onBeforeShow:function(){r.wheels=nt();r.group&&(i.temp=r.rtl?[f,h.index()]:[h.index(),f])},onMarkupReady:function(t){n(".dwwl"+a,t).on("mousedown touchstart",function(){clearTimeout(g)});if(s){t.addClass("dwms");n(".dwwl",t).eq(e).addClass("dwwms").attr("aria-multiselectable","true");n(".dwwl",t).on("keydown",function(t){t.keyCode==32&&(t.preventDefault(),t.stopPropagation(),ut(n(".dw-sel",this)))});b={};for(var r in i._selectedValues)b[r]=i._selectedValues[r]}},onValueTap:ut,onSelect:function(n){k(n,!0);r.group&&(i.values=null)},onCancel:function(){if(r.group&&(i.values=null),s){i._selectedValues={};for(var n in b)i._selectedValues[n]=b[n]}},onChange:function(n){r.display!="inline"||s||(c.val(n),w=!0,u.val(i.temp[e]).trigger("change"))},onClose:function(){c.blur()}}}}(jQuery),function(n){var t;n.mobiscroll.themes.wp={defaults:{width:70,height:76,accent:"none",dateOrder:"mmMMddDDyy",showLabel:!1,onAnimStart:function(i,r,u){n(".dwwl"+r,i).addClass("wpam");clearTimeout(t[r]);t[r]=setTimeout(function(){n(".dwwl"+r,i).removeClass("wpam")},u*1e3+100)}},init:function(i,r){var u,f;t={};n(".dw",i).addClass("wp-"+r.settings.accent);n(".dwwl",i).on("touchstart mousedown DOMMouseScroll mousewheel",".dw-sel",function(){u=!0;f=n(this).closest(".dwwl").hasClass("wpa");n(".dwwl",i).removeClass("wpa");n(this).closest(".dwwl").addClass("wpa")}).on("touchmove mousemove",function(){u=!1}).on("touchend mouseup",function(){u&&f&&n(this).closest(".dwwl").removeClass("wpa")})}};n.mobiscroll.themes["wp light"]=n.mobiscroll.themes.wp}(jQuery);
/*! Copyright 2014-2015 PCB Piezotronics
	Original dev by Brent Iverson
	*/
var MainView=$("#MainView"),screenWidth=480,screenHeight=640,ActiveColor="white",ActiveLblColor="#26b3f7",DisactColor="gray",SubActiveColor="#002030",DarkGrey="#111111",numFixed=1,RefreshRates={ms250:250,ms333:333,ms500:500,ms1000:1e3},TypeUnknown=0,TypeInt=1,TypeUInt=2,TypeFloat=3,TypeFloatSeries=4,TypeFloatWithFlags=5,TypeString=6,TypeByteSeries=7,TypeUIntSeries=8,TypeEnum=9,TypeUIntWithFlags=10,TypeFloatWithFlagsSeries=11,lifespan_in_days=100,DataType={Unknown:0,Int:1,UInt:2,Float:3,FloatSeries:4,FloatWithFlags:5,String:6,ByteSeries:7,UIntSeries:8,Enum:9,UIntWithFlags:10,properties:{0:{name:"unknown",value:0},1:{name:"int",value:1},2:{name:"uint",value:2},3:{name:"float",value:3},4:{name:"floatseries",value:4},5:{name:"floatwithflags",value:5},6:{name:"string",value:6},7:{name:"byteseries",value:7},8:{name:"uintseries",value:8},9:{name:"enum",value:9},10:{name:"uintwithflags",value:10}}};Object.freeze&&Object.freeze(DataType);var RESET_REQ=1,STOP_REQ=2,FILTER_RESET_REQ=4,IMMEDIATE=268435456,WARN_ONLY=536870912,mUnknown=0,mLxT=1,mLxTSE=2,m831=3,mHVM100=4,mHVM200=5,m831C=6,Model="831",ModelNumber=m831,fullFreqs=[8,16,31.5,63,125,250,500,"1k","2k","4k","8k","16k"],thirdFreqs=[6.3,8,10,12.5,16,20,25,31.5,40,50,63,80,100,125,160,200,250,315,400,500,630,800,"1k","1.25k","1.6k","2k","2.5k","3.15k","4k","5k","6.3k","8k","10k","12.5k","16k","20k"],adjustOffset=-20,ErrorFlags={None:0,FlashReadFailure:1,FlashReadDismissed:2,FileSystemCorrupt:4,SerialNumberError:33554432,UpgradeStat3:67108864,UpgradeStat2:134217728,UpgradeStat1:268435456,UpgradeType:536870912,NoUserSDCard:1073741824,NoSensorConnected:2147483648,UC:1006632960,UCMask:469762048,UCUpgStarted:67108864,UCUpgSuccess:134217728,UCDowngrade:201326592,UCSameVersion:268435456,UCError:469762048};PauseGetRunState=!1;stopGrabbing=!1;jQuery.fn.extend({disableSelection:function(){return this.each(function(){this.onselectstart=function(){return!1};this.unselectable="on";jQuery(this).css("user-select","none");jQuery(this).css("-o-user-select","none");jQuery(this).css("-moz-user-select","none");jQuery(this).css("-khtml-user-select","none");jQuery(this).css("-webkit-user-select","none")})},enableSelection:function(){return this.each(function(){this.onselectstart=function(){return!0};this.unselectable="off";jQuery(this).css("user-select","text");jQuery(this).css("-o-user-select","text");jQuery(this).css("-moz-user-select","text");jQuery(this).css("-khtml-user-select","text");jQuery(this).css("-webkit-user-select","text")})}});String.format||(String.format=function(n){var t=Array.prototype.slice.call(arguments,1);return n.replace(/{(\d+)}/g,function(n,i){return typeof t[i]!="undefined"?t[i]:n})});setZoom=setZoom||function(n,t){n=n||10;t=t||145;(g4!==!0||Model==="831C")&&setTimeout(function(){if(window.location.href.toLowerCase().indexOf("nozoom")>=0)document.body.style.zoom=1;else{var i=Math.min((window.innerWidth-n)/240*100,(window.innerHeight-t)/320*100);document.body.style.zoom=Math.floor(i)+"%"}},250)};var CMD_RESET=1,CMD_RUN=256,CMD_STOP=257,CMD_STORE=263,CMD_EA_ON=267,CMD_EA_OFF=268,CMD_CALCHECK_INIT=269,CMD_CALCHECK_END=270,CMD_CLOSE_FILE=278,CMD_LATCH_SETTINGS=37140,CMD_METER_SHUTDOWN=524,CMD_METER_REBOOT=33699,CMD_SET_TH_MARKERS=32880,CMD_CHECK_SMTP_HOST=294,CMD_SEND_TEST_EMAIL=295,RUNNING=1,POST_RESET=2,POST_RUN=4,POST_STOP=8,POST_STOP_INSIDEAPP=16,SOUND_RECORD=32,INSTRUMENT_RESTART_WD=64,INSTRUMENT_RESTART=128,POST_PAUSE=256,PAUSED=512,SET_NEXT_ALARM=8388608,POWERING_ON=16777216,DATA_OVERRUN_SLM=33554432,DATA_OVERRUN_FFT=67108864,DATA_WAIT=134217728,DATA_RESET=268435456,DATA_STORED=536870912,RECORD_MESSAGE=1073741824,DATA_VALID=2147483648,FFTMeasCountMin=1;timeOffset=(new Date).getTimezoneOffset();Date.prototype.formatMMDDYYYYHHMM=function(){var n=this.getUTCHours(),t=this.getUTCMinutes();return this.getMonth()+1+"/"+this.getDate()+"/"+this.getFullYear()+" "+(n<10?"0"+n.toString():n.toString())+":"+(t<10?"0"+t.toString():t.toString())};Date.prototype.formatYYYYMMDDHHMM=function(){var n=this.getUTCHours(),t=this.getUTCMinutes();return this.getFullYear()+"/"+(this.getMonth()+1)+"/"+this.getDate()+" "+(n<10?"0"+n.toString():n.toString())+":"+(t<10?"0"+t.toString():t.toString())};var checkboxHeight="25",radioHeight="25",selectWidth="50";Custom={init:function(){return},pushed:function(){element=this.nextSibling;this.style.backgroundPosition=element.checked==!0&&element.type=="checkbox"?"0 -"+checkboxHeight*3+"px":element.checked==!0&&element.type=="radio"?"0 -"+radioHeight*3+"px":element.checked!=!0&&element.type=="checkbox"?"0 -"+checkboxHeight+"px":"0 -"+radioHeight+"px"},check:function(){if(element=this.nextSibling,element.checked==!0&&element.type=="checkbox")this.style.backgroundPosition="0 0",element.checked=!1,$(element).trigger("change.pop");else{if(element.type=="checkbox")this.style.backgroundPosition="0 -"+checkboxHeight*2+"px";else{this.style.backgroundPosition="0 -"+radioHeight*2+"px";group=this.nextSibling.name;inputs=document.getElementsByTagName("input");for(var n=0,t=inputs.length;n<t;n++)inputs[n].name==group&&inputs[n]!=this.nextSibling&&(inputs[n].previousSibling.style.backgroundPosition="0 0")}element.checked=!0;$(element).trigger("change.pop")}},clear:function(){inputs=document.getElementsByTagName("input");for(var n=0,t=inputs.length;n<t;n++)inputs[n].type=="checkbox"&&inputs[n].checked==!0&&inputs[n].className.indexOf("styled")>-1?inputs[n].previousSibling.style.backgroundPosition="0 -"+checkboxHeight*2+"px":inputs[n].type=="checkbox"&&inputs[n].className.indexOf("styled")>-1?inputs[n].previousSibling.style.backgroundPosition="0 0":inputs[n].type=="radio"&&inputs[n].checked==!0&&inputs[n].className.indexOf("styled")>-1?inputs[n].previousSibling.style.backgroundPosition="0 -"+radioHeight*2+"px":inputs[n].type=="radio"&&inputs[n].className.indexOf("styled")>-1&&(inputs[n].previousSibling.style.backgroundPosition="0 0")},choose:function(){option=this.getElementsByTagName("option");for(var n=0,t=option.length;n<t;n++)option[n].selected==!0&&(document.getElementById("select"+this.name).childNodes[0].nodeValue=option[n].childNodes[0].nodeValue)}};Date.prototype.getMonthName=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"][this.getMonth()]};Date.prototype.getMonthAbbr=function(){return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][this.getMonth()]};Date.prototype.getDayFull=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][this.getDay()]};Date.prototype.getDayAbbr=function(){return["Sun","Mon","Tue","Wed","Thur","Fri","Sat"][this.getDay()]};Date.prototype.getDayOfYear=function(){var n=new Date(this.getFullYear(),0,1);return Math.ceil((this-n)/864e5)};Date.prototype.getDaySuffix=function(){var i=this.getDate(),n=["th","st","nd","rd"],t=i%100;return n[(t-20)%10]||n[t]||n[0]};Date.prototype.getWeekOfYear=function(){var n=new Date(this.getFullYear(),0,1);return Math.ceil(((this-n)/864e5+n.getDay()+1)/7)};Date.prototype.isLeapYear=function(){var n=this.getFullYear();if(parseInt(n,10)%4==0){if(parseInt(n,10)%100==0){if(parseInt(n,10)%400!=0)return!1;if(parseInt(n,10)%400==0)return!0}if(parseInt(n,10)%100!=0)return!0}if(parseInt(n,10)%4!=0)return!1};Date.prototype.getMonthDayCount=function(){var n=[31,this.isLeapYear()?29:28,31,30,31,30,31,31,30,31,30,31];return n[this.getMonth()]};Date.prototype.format=function(n){var u,c,i;n=n.split("");var f=this.getDate(),r=this.getMonth(),t=this.getHours(),e=this.getMinutes(),o=this.getSeconds(),l=this.getMilliseconds(),a=Math.floor(l/100),s={d:f<10?"0"+f:f,D:this.getDayAbbr(),j:this.getDate(),l:this.getDayFull(),S:this.getDaySuffix(),w:this.getDay(),z:this.getDayOfYear(),W:this.getWeekOfYear(),F:this.getMonthName(),m:r<9?"0"+(r+1):r+1,M:this.getMonthAbbr(),n:r+1,t:this.getMonthDayCount(),L:this.isLeapYear()?"1":"0",Y:this.getFullYear(),y:this.getFullYear()+"".substring(2,4),a:t>12?"pm":"am",A:t>12?"PM":"AM",g:t%12>0?t%12:12,G:t>0?t:"12",h:t%12>0?t%12:12,H:t<10?"0"+t:t,i:e<10?"0"+e:e,s:o<10?"0"+o:o,p:""+a},h="";for(u=0,c=n.length;u<c;u++)i=n[u],h+=i.match(/[a-zA-Z]/g)?s[i]?s[i]:"":i;return h};SlmConstants={Weights:["A","C","Z"],Detectors:["I","F","S"],DetectorsLong:["Impl","Fast","Slow"],WindDirs:["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],WindDirUnits:["Compass","\u00b0 Degress","% Percent","V Volts"],RICorrections:["Off","RI:FF","FF:RI","FF:RI 2106/8","FF:FF 2106/8","FF:90 2106/8","FF:RI 2116","FF:FF 2116","FF:90 2116"]};var style_cookie_name="style",style_cookie_duration=365,Theme={DARK:0,LIGHT:1,DARK1:2,LIGHT1:3,DARK2:4,LIGHT2:5},currentTheme=Theme.DARK1,gStyles=["dark1","light3","dark2","light1","dark3","light2",];var maxClr="rgba(50,255,0,1)",minClr="rgba(255,255,0,1)",mainClr="rgba(55,160,240,1)",tickClr="rgba(10, 180, 240, 0.5)",chClr="rgba(200, 220, 240, 0.4)",bkGrad=["#001b60","#000000"],refreshViewData,spClr=[];stTmCnt=5;setStyleIfCookie(swiClrs);wrapFunction=function(n,t,i){return function(){n.apply(t,i)}};var failCnt=0,conFail=function(n,t,i){var r=t+", "+i;console.log("Request Failed: ",r,i);g4!=!0&&(failCnt++,failCnt>8&&(console.log("Failed to getStats"),typeof confDialog=="undefined"&&initConfDlg(),IsHvm()?confDialog.callConfirm("Warning","Connection to HVM200 lost. Select 'Home' to return to the meter list.",retHome,{Can:{on:"off"}}):confDialog.callConfirm("Warning","HLD failed to restart, please reboot the meter.",retHome,{Can:{on:"off"}})))},bGoHome=!1;window.goHome=function(){return bGoHome};cnfCon={};searchFocDef="button,input,textarea,select,a:not(.ydisabled,.mid),.header,.ui-accordion-header,.trNav";fixedLen=1;var totalOvly=window.totalOvly,upperBgOvly=window.upperBgOvly,hourGlass=$("#hg"),hgWatchdog=undefined;fnDlgCtl={inited:!1,accept:function(){upperBgOvly&&upperBgOvly.hide();ftr.lf.pop();ftr.mi.pop();ftr.rt.pop();dispHG(!0);fnDlgCtl._accept();kbCon&&kbCon.pop();$("#fnDlg").hide();fnDlgCtl.isOpen=!1},cancel:function(){upperBgOvly&&upperBgOvly.hide();ftr.lf.pop();ftr.mi.pop();ftr.rt.pop();dispHG(!0);setTimeout(function(){fnDlgCtl._cancel()},0);kbCon&&kbCon.pop();$("#fnDlg").hide();fnDlgCtl.isOpen=!1},abort:function(){upperBgOvly&&upperBgOvly.hide();totalOvly&&totalOvly.hide();bgOvly.hide();ftr.lf.pop();ftr.mi.pop();ftr.rt.pop();kbCon&&kbCon.pop();$("#fnDlg").hide();fnDlgCtl.isOpen=!1},open:function(n,t,i,r,u){var f,e,o;fnDlgCtl.isOpen=!0;upperBgOvly&&upperBgOvly.show();fnDlgCtl.inited||fnDlgCtl.init();fnDlgCtl._accept=t;fnDlgCtl._cancel=i;ftr.lf.push(!1);ftr.mi.push(!1);ftr.rt.push(!1);f=$("#fnDlg");dispHG(!1);kbCon&&kbCon.push(dlgCon,f);f.show();f.find("h1").html(n);e=$("#rnNFN");e.val(r);$("#rnOK").focus();o=f.find(".selectable:not(.greyed):visible");o.removeClass("selected");e.addClass("selected");u||$("#rnBrow").addClass("greyed")},fn:function(){return $("#rnNFN").val().replace(/[^a-z0-9_\-.]+/ig,"")},init:function(){var n=fnDlgCtl;$("#rnOK").on("click",n.accept);$("#rnCncl").on("click",n.cancel);$("#rnBrow").on("click",n.browse);onlyAlphaNumeric($("#rnNFN"),"^[a-zA-Z0-9_\\-.]+$");n.inited=!0}};PropertyTags={TAG_DATE_YEAR_0:{ID:0,Type:TypeUInt,MinVal:0,MaxVal:9999,Flags:STOP_REQ},TAG_DATE_MONTH_1:{ID:1,Type:TypeUInt,MinVal:0,MaxVal:12,Flags:STOP_REQ},TAG_DATE_DAY_2:{ID:2,Type:TypeUInt,MinVal:0,MaxVal:31,Flags:STOP_REQ},TAG_TIME_HOUR_3:{ID:3,Type:TypeUInt,MinVal:0,MaxVal:24,Flags:STOP_REQ},TAG_TIME_MINUTE_4:{ID:4,Type:TypeUInt,MinVal:0,MaxVal:59,Flags:STOP_REQ},TAG_TIME_SECOND_5:{ID:5,Type:TypeUInt,MinVal:0,MaxVal:59,Flags:STOP_REQ},TAG_REPORT_HEADER_0_6:{ID:6,Type:TypeString,MinVal:1,MaxVal:16},TAG_REPORT_HEADER_1_7:{ID:7,Type:TypeString,MinVal:1,MaxVal:16},TAG_REPORT_HEADER_2_8:{ID:8,Type:TypeString,MinVal:1,MaxVal:16},TAG_BAUD_RATE_9:{ID:9,Type:TypeUInt,MinVal:0,MaxVal:4294967295},TAG_OPERATING_MODE_20:{ID:20,Type:TypeUInt,MinVal:0,MaxVal:3,Flags:STOP_REQ},TAG_DETECTOR_RATE_21:{ID:21,Type:TypeUInt,MinVal:0,MaxVal:13,Flags:STOP_REQ},TAG_GAIN_X_22:{ID:22,Type:TypeUInt,MinVal:0,MaxVal:3,Flags:STOP_REQ},TAG_GAIN_Y_23:{ID:23,Type:TypeUInt,MinVal:0,MaxVal:60,Flags:STOP_REQ},TAG_GAIN_Z_24:{ID:24,Type:TypeUInt,MinVal:0,MaxVal:60,Flags:STOP_REQ},TAG_STORE_TIME_28:{ID:28,Type:TypeUInt,MinVal:60,MaxVal:359940,Flags:STOP_REQ},TAG_ACCELEROMETER_30:{ID:30,Type:TypeUInt,MinVal:0,MaxVal:4294967295,Flags:STOP_REQ},TAG_DISPLAY_UNIT_31:{ID:31,Type:TypeUInt,MinVal:0,MaxVal:10,Flags:STOP_REQ},TAG_INTEGRATION_32:{ID:32,Type:TypeUInt,MinVal:0,MaxVal:2,Flags:STOP_REQ},TAG_SUM_FACTOR_KX_34:{ID:34,Type:TypeFloat,Prec:4,MinVal:.1,MaxVal:9.9999,Flags:STOP_REQ},TAG_SUM_FACTOR_KY_35:{ID:35,Type:TypeFloat,Prec:4,MinVal:.1,MaxVal:9.9999,Flags:STOP_REQ},TAG_SUM_FACTOR_KZ_36:{ID:36,Type:TypeFloat,Prec:4,MinVal:.1,MaxVal:9.9999,Flags:STOP_REQ},TAG_WEIGHTING_X_37:{ID:37,Type:TypeUInt,MinVal:0,MaxVal:13,Flags:STOP_REQ},TAG_WEIGHTING_Y_38:{ID:38,Type:TypeUInt,MinVal:0,MaxVal:13,Flags:STOP_REQ},TAG_WEIGHTING_Z_39:{ID:39,Type:TypeUInt,MinVal:0,MaxVal:13,Flags:STOP_REQ},TAG_AC_DC_OUTPUT_X_40:{ID:40,Type:TypeUInt,MinVal:0,MaxVal:9,Flags:STOP_REQ},TAG_AC_DC_OUTPUT_Y_41:{ID:41,Type:TypeUInt,MinVal:0,MaxVal:9,Flags:STOP_REQ},TAG_AC_DC_OUTPUT_Z_42:{ID:42,Type:TypeUInt,MinVal:0,MaxVal:9,Flags:STOP_REQ},TAG_AUTO_STORE_43:{ID:43,Type:TypeUInt,MinVal:0,MaxVal:2,Flags:STOP_REQ},TAG_HISTORY_VALUE_44:{ID:44,Type:TypeUInt,MinVal:0,MaxVal:1,Flags:STOP_REQ},TAG_SETUP_OR_FILE_NAME_45:{ID:45,Type:TypeString,MinVal:1,MaxVal:10},TAG_SENSITIVITY_X_46:{ID:46,Type:TypeFloat,Prec:8,MinVal:1e-8,MaxVal:9999.9999,Flags:STOP_REQ},TAG_SENSITIVITY_Y_47:{ID:47,Type:TypeFloat,Prec:8,MinVal:1e-8,MaxVal:9999.9999,Flags:STOP_REQ},TAG_SENSITIVITY_Z_48:{ID:48,Type:TypeFloat,Prec:8,MinVal:1e-8,MaxVal:9999.9999,Flags:STOP_REQ},tbSensx:{ID:46,Type:TypeFloat,Prec:8,MinVal:1e-8,MaxVal:9999.9999,Flags:STOP_REQ},tbSensy:{ID:47,Type:TypeFloat,Prec:8,MinVal:1e-8,MaxVal:9999.9999,Flags:STOP_REQ},tbSensz:{ID:48,Type:TypeFloat,Prec:8,MinVal:1e-8,MaxVal:9999.9999,Flags:STOP_REQ},TAG_CAL_LEVEL_49:{ID:49,Type:TypeFloat,Prec:3,MinVal:0,MaxVal:9999.999,Flags:STOP_REQ},TAG_PRINT_HISTORY_50:{ID:50,Type:TypeUInt,MinVal:0,MaxVal:1},TAG_DB_REFERENCE_51:{ID:51,Type:TypeUInt,MinVal:0,MaxVal:1,Flags:STOP_REQ},TAG_HAND_ARM_EXPOSURE_RE_52:{ID:52,Type:TypeUInt,MinVal:0,MaxVal:3,Flags:STOP_REQ},TAG_STORE_RAW_53:{ID:53,Type:TypeInt,MinVal:0,MaxVal:1,Flags:STOP_REQ},TAG_FULL_OCTAVE_54:{ID:54,Type:TypeInt,MinVal:0,MaxVal:1,Flags:STOP_REQ},TAG_THIRD_OCTAVE_55:{ID:55,Type:TypeInt,MinVal:0,MaxVal:1,Flags:STOP_REQ},TAG_START_TIME_56:{ID:56,Type:TypeUInt,MinVal:0,MaxVal:36e4,Flags:STOP_REQ},TAG_DURATION_57:{ID:57,Type:TypeUInt,MinVal:0,MaxVal:36e4,Flags:STOP_REQ},TAG_DELAY_58:{ID:58,Type:TypeUInt,MinVal:0,MaxVal:5},TAG_BASENAME_61:{ID:61,Type:TypeString,MinVal:0,MaxVal:10},TAG_START_DATE_62:{ID:62,Type:TypeUInt,MinVal:0,MaxVal:4294967295},TAG_END_DATE_63:{ID:63,Type:TypeUInt,MinVal:0,MaxVal:4294967295},TAG_ENABLE_SCHED_64:{ID:64,Type:TypeUInt,MinVal:0,MaxVal:1},TAG_EXPOSURELIMIT_65:{ID:65,Type:TypeFloat,Prec:2,MinVal:.1,MaxVal:10,Flags:STOP_REQ},TAG_EXPOSUREACTION_66:{ID:66,Type:TypeFloat,Prec:2,MinVal:.1,MaxVal:10,Flags:STOP_REQ},TAG_IDLE_SHUTODWN_67:{ID:67,Type:TypeInt,MinVal:0,MaxVal:2}};SystemTags={TAG_MASK_OPTION:{ID:1297304368,Type:TypeUInt,MinVal:0,MaxVal:7},TAG_OPTION_FLAGS:{ID:1330664497,Type:TypeUInt,MinVal:0,MaxVal:4294967295,readOnly:!0}};GatingCondition={hOptionsTab:{numGates:1,gate:[{gateType:"EnableIf",EVAL:["Model == 'HVM200' && OnMeter"]}],message:[""]},hSensorTab:{numGates:1,gate:[{gateType:"EnableIf",EVAL:["activeSetupLoaded == true"]}],message:[""]},hConfigWifiTab:{numGates:1,gate:[{gateType:"EnableIf",EVAL:["Model === 'HVM200' && OnMeter && activeSetupLoaded === true"]}],message:[""]},hTimeTab:{numGates:1,gate:[{gateType:"EnableIf",EVAL:["Model === 'HVM200' && OnMeter && activeSetupLoaded === true"]}],message:[""]},hScheduleTab:{numGates:1,gate:[{gateType:"EnableIf",EVAL:["Model == 'HVM200'"]}],message:[""]},TAG_DETECTOR_RATE_21:{numGates:8,gate:[{gateType:"DisplayIf",value:0,validValue:1,EVAL:["Model == 'HVM100'"]},{gateType:"DisplayIf",value:8,validValue:7,EVAL:["Model == 'HVM200'"]},{gateType:"DisplayIf",value:9,validValue:7,EVAL:["Model == 'HVM200'"]},{gateType:"DisplayIf",value:10,validValue:7,EVAL:["Model == 'HVM200'"]},{gateType:"DisplayIf",value:11,validValue:7,EVAL:["Model == 'HVM200'"]},{gateType:"DisplayIf",value:12,validValue:7,EVAL:["Model == 'HVM200'"]},{gateType:"DisplayIf",value:13,validValue:7,EVAL:["Model == 'HVM200'"]},{gateType:"forceData",Set:[{TAG_DETECTOR_RATE_21:1}],AND:[{TAG_DETECTOR_RATE_21:0},{TAG_MODEL:"'HVM200'"}]}],message:["","Only available on HVM200","Only available on HVM200","Only available on HVM200","Only available on HVM200","Only available on HVM200","Only available on HVM200",""]},TAG_STORE_RAW_53:{numGates:2,gate:[{gateType:"DisplayIf",EVAL:["Model === 'HVM200'"]},{gateType:"EnableIf",EVAL:["(SystemProperties.TAG_MASK_OPTION & SystemProperties.TAG_OPTION_FLAGS & 0x4)"]}],message:["You must have the Raw File Option enabled.",""]},TAG_FULL_OCTAVE_54:{numGates:1,gate:[{gateType:"EnableIf",EVAL:["Model == 'HVM200' && (SystemProperties.TAG_MASK_OPTION & SystemProperties.TAG_OPTION_FLAGS & 0x2)"]}],message:["You must have the Full Octave Option enabled."]},TAG_THIRD_OCTAVE_55:{numGates:1,gate:[{gateType:"EnableIf",EVAL:["Model == 'HVM200' && (SystemProperties.TAG_MASK_OPTION & SystemProperties.TAG_OPTION_FLAGS & 0x1)"]}],message:["You must have the Third Octave Option enabled."]},TAG_TH_OCTAVES:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM200'"}]}],message:["Only available for HVM200."]},TAG_EXPOSURELIMIT_65:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM200'"}]}],message:["Only available for HVM200."]},TAG_EXPOSUREACTION_66:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM200'"}]}],message:["Only available for HVM200."]},TAG_IDLE_SHUTDOWN_67:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM200'"}]}],message:["Only available for HVM200."]},TAG_DELAY_58:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM200'"}]}],message:["Only available for HVM200."]},TAG_DURATION_57:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM200'"}]}],message:["Only available for HVM200."]},TAG_START_TIME_56:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM200'"}]}],message:["Only available for HVM200."]},hTools2Tab:{numGates:1,gate:[{gateType:"EnableIf",EVAL:["Model == 'HVM100'"]}],message:[""]},TAG_ACCELEROMETER_30:{numGates:2,gate:[{gateType:"DisplayIf",EVAL:["Model == 'HVM100'"]},{gateType:"forceData",Set:[{TAG_ACCELEROMETER_30:1}],AND:[{NOT:[{TAG_ACCELEROMETER_30:1}]},{TAG_MODEL:"'HVM200'"}]}],message:["",""]},TAG_HAND_ARM_EXPOSURE_RE_52_Par:{numGates:1,gate:[{gateType:"DisplayIf",EVAL:["Model == 'HVM100'"]}],message:[""]},TAG_SETUP_OR_FILE_NAME_45:{numGates:1,gate:[{gateType:"DisplayIf",EVAL:["Model == 'HVM100' && OnMeter"]}],message:[""]},TAG_STORE_TIME_28:{numGates:2,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM100'"}]},{gateType:"forceData",Set:[{TAG_STORE_TIME_28:60}],AND:[{EVAL:["MeasurementProperties.TAG_STORE_TIME_28 < 60"]},{TAG_MODEL:"'HVM100'"}]}],message:[""]},TAG_HISTORY_VALUE_44:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM100'"}]}],message:[""]},TAG_AUTO_STORE_43:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM100'"}]}],message:[""]},TAG_GAINS_GROUP:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM100'"}]}],message:["Only available for HVM100."]},TAG_INTEGRATION_32:{numGates:2,gate:[{gateType:"EnableIf",NOT:[{OR:[{TAG_DISPLAY_UNIT_31:4},{TAG_DISPLAY_UNIT_31:5}]}]},{gateType:"forceData",Set:[{TAG_INTEGRATION_32:0}],OR:[{TAG_DISPLAY_UNIT_31:4},{TAG_DISPLAY_UNIT_31:5}]}],message:["Integration not available.","Integration must be set to None for this unit."]},TAG_DISPLAY_UNIT_31:{numGates:1,gate:[{gateType:"forceData",Set:[{TAG_INTEGRATION_32:0}],OR:[{TAG_DISPLAY_UNIT_31:4},{TAG_DISPLAY_UNIT_31:5}]}],message:[""]},TAG_BASENAME_61:{numGates:1,gate:[{gateType:"DisplayIf",AND:[{TAG_MODEL:"'HVM200'"}]}],message:[""]}};OptionsHVM={OPT_ONE_OCTAVE:{title:"1/1 Octave",optionsMask:"TAG_MASK_OPTION",optionsPurch:"TAG_OPTION_FLAGS",mask:"0x00000002"},OPT_THIRD_OCTAVE:{title:"1/3 Octave",optionsMask:"TAG_MASK_OPTION",optionsPurch:"TAG_OPTION_FLAGS",mask:"0x00000001"},OPT_RAWDATA:{title:"Raw Data",optionsMask:"TAG_MASK_OPTION",optionsPurch:"TAG_OPTION_FLAGS",mask:"0x00000004"}};
/*! Copyright 2013-2014 PCB Piezotronics, Inc.  --  Larson Davis
	Created and modified by Scott Lockwood and Brent Iverson
	JavaScript functions and variables used by Index.html */
var queryStr=url=window.location.href.toLowerCase(),OnMeter=!1,OnSystemTabs=!1,OnSettingTabs=!1,enableLiveTimers=!1,enableOverallTimers=!1,enableSessionLogTimers=!1,enableCurrentTimers=!1,OnWhichTab="Live",DateTimePickerActiveFlag=!1,CommitCompleteCnt=0,activeSetupLoaded=!0,setupBeingEdited=0,LastSelectedTab,ScrollRightMinShift,ScrollRightMaxShift,ScrollLeftMaxShift,ScrollLeftMinShift,ScrollRightOffset,TabBarWidth,ArrowWidth,UserProperties,SystemConstants,AboutProps={},SelectedFile={},MeasurementProperties={},SystemProperties={},MeasPropFiles={},SysPropFiles={},OptionTags={},MainOptions={},BtnMenu,SetupManagerTab=0,GeneralTab=1,SLMTab=2,OBATab=3,LnTab=4,ControlTab=5,TimeHistoryTab=6,TriggersTab=7,EventHistoryTab=8,MarkersTab=9,DayNightTab=10,SoundTab=11,WeatherTab=12,Dosimeter1Tab=13,Dosimeter2Tab=14,FFTGeneralTab=15,FFTTab=16,FFTControlTab=17,FFTTonalityTab=18,RAGeneralTab=19,RT60Tab=20,RT60AdvTab=21,RASourceTab=22,DeviceTab=1,TimeTab=2,PowerTab=3,PreferencesTab=4,LocalizationTab=5,DisplaysTab=6,OptionsTab=7,ModemTab=8,RS232Tab=9,WirelessTab=10,SMS_OutTab=11,NetworkTab=12,OtherTab=13,RefSpecTab=14,AboutTab=0,StandardsTab=1,AboutOptionsTab=2,UserTab=3,hSetupTab=1,hScheduleTab=2,hRangeTab=3,hTools1Tab=4,hTools2Tab=5,hSensorTab=6,hOptionsTab=7,hConfigWifiTab=8,hTimeTab=9;runAvailMem=10240;playKey=!0;$(function(){$("#BtnMenu").click(function(n){if(OnMeter&&OnSystemTabs)console.log("Sys Prop on Meter. Active screen: "+activeScreen);else{console.log("Moving to main tab. Active screen: "+activeScreen);tabContainer.tabs("option","active",0);TabClick();n.preventDefault();return}activeScreen==="TabsSystemProperties.html"&&(console.log("In System Properties Tabs, load SLMTabs"),CheckForChanges());n.preventDefault()})});$(function(){$("#MenuPopup").dialog({position:{my:"center center",at:"center center",of:MainView},autoOpen:!1})});$(function(){$("#SavePopup").dialog({position:{my:"center center",at:"center center",of:MainView},autoOpen:!1})});$(function(){$("#SaveSystemPropertiesPopup").dialog({position:{my:"center center",at:"center center",of:MainView},autoOpen:!1,modal:!0,width:190,height:235})});nonMeter=!1;var DefDataFile="831_Data",MeasDescription="Default",FrequencyWeighting="",Detector="",PeakWeighting="",IntegrationMethod="",GainPlus20dB=!1,SerialNumber="987654",ManufacturedDate="12/25/2012",FirmwareRevision="1.2.3",DspRevision="0.6",Preamp="PRM831",ActiveFileInfo={},lockedGetData=0,resetFilter=!1,settingsTabs=$("#settingsTabContainer"),ftr;var defMeas={TAG_ADC1_DESCRIPTION:"Temperature",TAG_ADC1_OFFSET:-40,TAG_ADC1_SCALE:184.32,TAG_ADC1_UNITS:"\u00b0F",TAG_ADC2_DESCRIPTION:"Humidity",TAG_ADC2_OFFSET:0,TAG_ADC2_SCALE:102.4,TAG_ADC2_UNITS:"% RH",TAG_CAL_CHECK_TIME:9e3,TAG_DAILY_CAL_CHECK:0,TAG_DAILY_STORE:0,TAG_DAILY_STORE_TIME:0,TAG_DAY_TIME:25200,TAG_DEFAULT_FILENAME:"831_Data",TAG_DET_WEIGHTING:2,TAG_DOSE_C_LEVEL_0:90,TAG_DOSE_C_LEVEL_1:90,TAG_DOSE_C_TIME_0:8,TAG_DOSE_C_TIME_1:8,TAG_DOSE_EXCHANGE_RATE_0:2,TAG_DOSE_EXCHANGE_RATE_1:2,TAG_DOSE_NAME_0:"OSHA-1",TAG_DOSE_NAME_1:"OSHA-2",TAG_DOSE_THRESHOLD_0:90,TAG_DOSE_THRESHOLD_1:80,TAG_DOSE_THRESHOLD_ENABLE_0:1,TAG_DOSE_THRESHOLD_ENABLE_1:1,TAG_EVENING_PENALTY:5,TAG_EVENING_TIME:68400,TAG_EVENT_CONT_PERIOD:2,TAG_EVENT_DET_WEIGHING:0,TAG_EVENT_DYNAMIC_RESPONSE:3,TAG_EVENT_DYN_TRIG_OFFSET:20,TAG_EVENT_HISTORY_ENABLE:0,TAG_EVENT_LEVEL_0:65,TAG_EVENT_LEVEL_1:85,TAG_EVENT_LEVEL_2:135,TAG_EVENT_LEVEL_3:137,TAG_EVENT_LEVEL_4:140,TAG_EVENT_LEVEL_5:20,TAG_EVENT_MIN_DURATION:3,TAG_EVENT_PRETRIGGER_PERIOD:4,TAG_EVENT_SNAPSHOT_ENABLE:0,TAG_EVENT_SNAPSHOT_PERIOD:7,TAG_EVENT_TH_ENABLE:0,TAG_EVENT_TH_MAX_SAMPLES:1e3,TAG_EVENT_TH_PERIOD:5,TAG_EVENT_TH_POST_TRIG:10,TAG_EVENT_TH_PRE_TRIG:10,TAG_EVENT_TH_SPECTRA_ENABLE:0,TAG_EVENT_TRIG_METHOD:0,TAG_FFT_FREQSPAN:0,TAG_FFT_NUM_LINES:0,TAG_FFT_RUN_MODE:0,TAG_FFT_WINDOW_TYPE:0,TAG_FILE_NAME:"831_Data",TAG_FREQ_WEIGHTING:0,TAG_INSTRUMENT_MODE:0,TAG_INTEGRATION_INPUT:0,TAG_INTERVAL_CLOCK_SYNC:0,TAG_INTERVAL_TIME:3600,TAG_LN_0:5,TAG_LN_1:10,TAG_LN_2:33.3,TAG_LN_3:50,TAG_LN_4:66.6,TAG_LN_5:90,TAG_MARKER_AUDIO_RECORD_0:0,TAG_MARKER_AUDIO_RECORD_1:0,TAG_MARKER_AUDIO_RECORD_2:0,TAG_MARKER_AUDIO_RECORD_3:0,TAG_MARKER_AUDIO_RECORD_4:0,TAG_MARKER_AUDIO_RECORD_5:0,TAG_MARKER_AUDIO_RECORD_6:0,TAG_MARKER_AUDIO_RECORD_7:0,TAG_MARKER_AUDIO_RECORD_8:0,TAG_MARKER_AUDIO_RECORD_9:0,TAG_MARKER_NAMES_0:"Truck",TAG_MARKER_NAMES_1:"Automobile",TAG_MARKER_NAMES_2:"Motorcycle",TAG_MARKER_NAMES_3:"Aircraft",TAG_MARKER_NAMES_4:"Exclude",TAG_MARKER_NAMES_5:"#6",TAG_MARKER_NAMES_6:"#7",TAG_MARKER_NAMES_7:"#8",TAG_MARKER_NAMES_8:"#9",TAG_MARKER_NAMES_9:"#10",TAG_MARKER_PRERECORD_PERIOD:4,TAG_MARKER_RECORD_PERIOD:5,TAG_MEASUREMENT_COUNTS:1,TAG_MEASUREMENT_HISTORY:0,TAG_MEASUREMENT_SNAPSHOT_ENABLE:0,TAG_MEASUREMENT_SNAPSHOT_PERIOD:5,TAG_NIGHT_PENALTY:10,TAG_NIGHT_TIME:79200,TAG_NUM_BLOCK_TIMERS:0,TAG_OBA_BANDWIDTH:0,TAG_OBA_MAX_MODE:1,TAG_OBA_RANGE:1,TAG_OBA_WEIGHTING:2,TAG_OVERALL_TITLE:"",TAG_PEAK_WEIGHTING:2,TAG_PREAMPTYPE:"PRM831",TAG_RA_EXIT_TIME:10,TAG_RA_HIGHEST_FREQ:33,TAG_RA_LOWEST_FREQ:12,TAG_REGRESSION_SPAN:1,TAG_RT60_BANDWIDTH:1,TAG_RT60_BUILD_TIME:2,TAG_RT60_METHOD:0,TAG_RT60_NOISE_ATTENUATION:0,TAG_RT60_NOISE_TYPE:0,TAG_RT60_RUN_COUNT:1,TAG_RT60_RUN_TIME:4,TAG_RT60_SAMPLE_PERIOD:1,TAG_RT60_TRIGGER_LEVEL:80,TAG_RT60_TRIGGER_SOURCE:30,TAG_RUN_MODE:0,TAG_RUN_TIME:20,TAG_SAVE_ALL_TIME_SERIES:1,TAG_SAVE_AVERAGE_TIME_SERIES:1,TAG_SLM_GAIN:0,TAG_SNAPSHOT_SAMPLING_RATE:3,TAG_SPECTRAL_LN:0,TAG_SR_RANGE:0,TAG_STABLE_LEVEL:.2,TAG_STABLE_TIME:20,TAG_STREAM_HISTORY_OPTIONS:0,TAG_STREAM_HISTORY_PERIOD:2,TAG_TIE_SOURCE_TO_CONTROL:0,TAG_TIMER_START_DATE:1450656e3,TAG_TIMER_START_TIME_1:28800,TAG_TIMER_START_TIME_2:46800,TAG_TIMER_START_TIME_3:82800,TAG_TIMER_STOP_DATE:1608336e3,TAG_TIMER_STOP_TIME_1:43200,TAG_TIMER_STOP_TIME_2:61200,TAG_TIMER_STOP_TIME_3:82800,TAG_TIME_HISTORY_ENABLE:0,TAG_TIME_HISTORY_MISC:2,TAG_TIME_HISTORY_OPTIONS:3072,TAG_TIME_HISTORY_OPTIONS3:0,TAG_TIME_HISTORY_PERIOD:8,TAG_TONE_1996_2:0,TAG_TONE_SEEK_DELTA:0,TAG_VHEAT_DIS_TIME:46800,TAG_VHEAT_ENA_TIME:43200,TAG_VHEAT_STATE:1,TAG_WEATHER_ENABLE:0,TAG_WIND_DIRECTION:0,TAG_WIND_HYSTERESIS:10,TAG_WIND_LEVEL:40,TAG_WIND_PAUSE:0,TAG_WIND_SCALE:.2192,TAG_WIND_THRESHOLD:5,TAG_WIND_UNITS:"mi/h"},defSys={TAG_ANYLEVEL_ITEM_1:0,TAG_ANYLEVEL_ITEM_2:16,TAG_ANYLEVEL_ITEM_3:0,TAG_ANYLEVEL_ITEM_4:16,TAG_AUTOSYNC:0,TAG_AUTO_STORE:0,TAG_CALDATE:0,TAG_CALIBRATOR_FREQ_0:1e3,TAG_CALIBRATOR_FREQ_1:1e3,TAG_CALIBRATOR_FREQ_2:250,TAG_CALIBRATOR_FREQ_3:1e3,TAG_CALIBRATOR_LEVEL_0:114,TAG_CALIBRATOR_LEVEL_1:94,TAG_CALIBRATOR_LEVEL_2:114,TAG_CALIBRATOR_LEVEL_3:114,TAG_CALIBRATOR_STRING_0:"LD CAL200, 114.0dB 1kHz ",TAG_CALIBRATOR_STRING_1:"LD CAL200,  94.0dB 1kHz ",TAG_CALIBRATOR_STRING_2:"LD CAL250, 114.0dB 250Hz ",TAG_CALIBRATOR_STRING_3:"           114.0dB 1kHz ",TAG_CALSCALE:0,TAG_CERTIFICATION_INTERVAL:4,TAG_CERTIFICATION_REMIND:4,TAG_CERTIFICATION_STRING_0:"",TAG_CERTIFICATION_STRING_1:"",TAG_CERTIFICATION_STRING_2:"",TAG_CERTIFICATION_STRING_3:"",TAG_CERTIFICATION_STRING_4:"",TAG_CERTIFICATION_XTIME:0,TAG_COMPRESS_DATA_FILES:0,TAG_CURRENT_FILE_INDEX:0,TAG_DATE_TIME:0,TAG_NTP_SERVERS_0:"0.pool.ntp.org",TAG_NTP_SERVERS_1:"1.pool.ntp.org",TAG_NTP_SERVERS_2:"2.pool.ntp.org",TAG_NTP_SERVERS_3:"3.pool.ntp.org",TAG_DISPLAYOPTIONS1:-1,TAG_DISPLAYOPTIONS2:-1,TAG_DISPLAYOPTIONS3:-1,TAG_DISPLAYOPTIONS4:-1,TAG_DISPLAYOPTIONS5:-1,TAG_DISPLAYOPTIONS6:-1,TAG_DISPLAYOPTIONS7:-1,TAG_DISPLAYOPTIONS8:-1,TAG_DISPLAY_CONTRAST:0,TAG_DISPLAY_DATE:0,TAG_DISPLAY_DECIMAL:0,TAG_EXT_IP_ADDRESS:"",TAG_EXT_MAC_ADDRESS:"",TAG_FILE_EXTENSION:1,TAG_FULL_OCTAVE_REFERENCE_SPECTRA1:[0,0,0,0,0,0,0,0,0,0,0,0],TAG_FULL_OCTAVE_REFERENCE_SPECTRA2:[0,0,0,0,0,0,0,0,0,0,0,0],TAG_FULL_OCTAVE_REFERENCE_SPECTRA3:[0,0,0,0,0,0,0,0,0,0,0,0],TAG_FULL_OCTAVE_REFERENCE_SPECTRA4:[0,0,0,0,0,0,0,0,0,0,0,0],TAG_FULL_REF_SP1:"1",TAG_FULL_REF_SP2:"2",TAG_FULL_REF_SP3:"3",TAG_FULL_REF_SP4:"4",TAG_GPS_MODE:0,TAG_IP_ADDRESS:"",TAG_LANGUAGE:0,TAG_LOCK_CAL:0,TAG_LOCK_COM:0,TAG_LOCK_MODE:0,TAG_LOCK_TASK:0,TAG_LOGIC_IN:0,TAG_LOGIC_OUT:0,TAG_LTM5_ENABLE:0,TAG_MAC_ADDRESS:"",TAG_MASK_OPTION:536870911,TAG_MIC_INFO:"Other ",TAG_MIC_NOISE_FLOOR:-20,TAG_MIC_SENSITIVITY:50,TAG_MODEL:"",TAG_MODEM_DIAL_OUT:0,TAG_MODEM_MODEM_INIT:"ATEVX4",TAG_MODEM_MONITER_NO:1,TAG_MODEM_ON_OFF:0,TAG_MODEM_PASSWD:"11111111",TAG_MODEM_PHONE_NO:"",TAG_NETWORK_PASSWORD:"",TAG_OUTPUTS:0,TAG_OVERWRITE_OLD_FILES:0,TAG_PHOENIX_STATE:0,TAG_POWER_BATT:0,TAG_POWER_EXT_SHUTOFF:10.8,TAG_POWER_LIGHT:0,TAG_POWER_LIGHT_TIME:1,TAG_POWER_OFF_TIME:4,TAG_POWER_SLEEP_TIME:4,TAG_PRM2103_HEATER:1,TAG_RANDOMCORRECTION:0,TAG_RESET_PROMPT:1,TAG_RS232_BAUD:3,TAG_RS232_ON_OFF:0,TAG_SENSITIVITY:0,TAG_SMS_OUT_NUMBER_0:"1234567899",TAG_SMS_OUT_NUMBER_1:"1234567899",TAG_SMS_OUT_NUMBER_2:"1234567899",TAG_SMS_OUT_TYPE_0:0,TAG_SMS_OUT_TYPE_1:0,TAG_SMS_OUT_TYPE_2:0,TAG_STARTUPTAB:0,TAG_THIRD_OCTAVE_REFERENCE_SPECTRA1:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],TAG_THIRD_OCTAVE_REFERENCE_SPECTRA2:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],TAG_THIRD_OCTAVE_REFERENCE_SPECTRA3:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],TAG_THIRD_OCTAVE_REFERENCE_SPECTRA4:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],TAG_THRD_REF_SP1:"1",TAG_THRD_REF_SP2:"2",TAG_THRD_REF_SP3:"3",TAG_THRD_REF_SP4:"4",TAG_TIMEZONECORRECTION_HRS:0,TAG_TIMEZONECORRECTION_MIN:0,TAG_UNIT_CONV:1,TAG_USB_HOST_POWER:0,TAG_USB_STORAGE:0,TAG_USER_STRING_0:"",TAG_USER_STRING_1:"",TAG_USER_STRING_2:"",TAG_VOICE_COMPRESSION:0,TAG_WIRELESS_APN:"isp.cingular",TAG_WIRELESS_APNPASSWD:"CINGULAR1",TAG_WIRELESS_MONITOR_NUM:0,TAG_WIRELESS_ON_OFF:0,TAG_WIRELESS_PASSWD:"11111111",TAG_WIRELESS_USR_NAME:"ISPDA@cingularGPRS.com"},gettingProps=!1;updatePropsMenu=updatePropsMenu||function(){};lastStat={};var state_Error=0,state_Initializing=0,state_Stopped=2,state_StopReset=3,state_StopStored=4,state_Waiting=5,state_Running=6,state_Paused=7,state_PrevOk=state_Paused,state_Sleeping=8,state_Calibrating=9,state_Recording=10,state_RecordDone=11,state_Playing=12,state_CheckingCal=13,state_USBRC0=14,state_WaitFileRecovery=15,state_Maintenance=16,state_RestorePrev=17;PageStatus={};var CurrentStatus={},isRunningState=!1,tmrLastRunState=-1,previousMode=99,statusTmr,stsTmrCnt=0;statusTmr=setTimeout(getRunningState,1e3);var bAlreadyDisplayedResetMessage=!1,bAlreadyDisplayedStopMessage=!1,midRequiredTesting=!1,resetFunctionCallback;resetCancelled=!1;var posterChild={},testData={},SaveAsRequired=!1;LatchWhich={};fdCallBack={};ctrlTab=$("#mpCtrl");SessionData={};var ID_50PS=0,ID_20PS=1,ID_10PS=2,ID_5PS=3,ID_2PS=4,ID_1S=5,ID_2S=6,ID_5S=7,ID_10S=8,ID_15S=9,ID_20S=10,ID_30S=11,ID_1MIN=12,ID_2MIN=13,ID_5MIN=14,ID_10MIN=15,ID_15MIN=16,ID_20MIN=17,ID_30MIN=18,ID_1HR=19,ID_24HR=20,ID_400PS=21,ID_200PS=22,ID_100PS=23;(function(n){n.fn.disableTab=function(t,i){var r=this.tabs("option","disabled"),u;return n.isArray(r)?(u=n.inArray(t,r),u<0&&r.push(t)):r=[t],this.tabs("option","disabled",r),i===!0&&n(this).find("li:eq("+t+")").addClass("ui-state-hidden"),this};n.fn.enableTab=function(t){return checkGate(t,0,OptionTags)&&(n(this).find("li:eq("+eval(t)+")").removeClass("ui-state-hidden"),this.tabs("enable",eval(t))),this}})(jQuery);rulesCausedChange=!1;filenameModded=!1;
/*! Verify.js - v0.0.1 - 2013/06/12
 * https://github.com/jpillora/verify
 * Copyright (c) 2013 Jaime Pillora - MIT
 * and Modifications full implementation of revised Notify.js
 * Copyright (c) 2013-2015 PCB Piezotronics Larson Davis.
 * merge and mods made by Brent Iverson
 */
kbCon!=null&&(kbCon=kbCon||{});bCurrentlyDisplaying=!1;$(document).on("click",".notifyjs-CommonAlert-base .yes",function(){var n=$(this);$(document).data("forceTag")!=""&&forceConfirm($(document).data("forceTag"),$(document).data("forcewhichGate"));forceDataCallBack!=undefined&&forceDataCallBack();n.trigger("notify-hide");bCurrentlyDisplaying=!1;var t=n.siblings(".hidden[data-notify-text='command']").text(),e=n.siblings(".hidden[data-notify-text='value']").text(),i=n.siblings(".hidden[data-notify-text='tag']").text(),r=n.siblings(".hidden[data-notify-text='whenToCall']").text(),u,f=eval(i);u=typeof PropertyTags[f]!="undefined"?PropertyTags:SystemTags;t!=""&&(r=="Both"||r=="Confirm"||r=="")&&(typeof u[f]!="undefined"&&u[f].Type==TypeString?eval(t+"('"+e+"', "+i+", 'Confirm')"):eval(t+"("+e+", "+i+", 'Confirm')"));kbCon&&kbCon.pop();lastFocus!=undefined&&lastFocus.focus()});$(document).on("click",".notifyjs-CommonAlert-base .no",function(){var n=$(this),e,r,o;forceDeny($(document).data("forceTag"),$(document).data("forcewhichGate"));forceDataCallBack!=undefined&&forceDataCallBack();$(this).trigger("notify-hide");bCurrentlyDisplaying=!1;var t=n.siblings(".hidden[data-notify-text='command']").text(),u=n.siblings(".hidden[data-notify-text='value']").text(),i=n.siblings(".hidden[data-notify-text='tag']").text(),f=n.siblings(".hidden[data-notify-text='whenToCall']").text();t!=""&&(f=="Both"||f=="Deny")&&(r=eval(i),e=typeof PropertyTags[r]!="undefined"?PropertyTags:SystemTags,o=bAlreadyDisplayedResetMessage,bAlreadyDisplayedResetMessage=!0,e[r].Type==TypeString?eval(t+"('"+u+"', "+i+", 'Deny')"):eval(t+"("+u+", "+i+", 'Deny')"),bAlreadyDisplayedResetMessage=o);kbCon&&kbCon.pop();lastFocus!=undefined&&lastFocus.focus()});$(document).on("click",".notifyjs-CommonAlert2-base .yes",function(){var n=$(this),u;forceCallBack!=undefined&&forceCallBack();n.trigger("notify-hide");var i=n.siblings(".hidden[data-notify-text='command']").text(),r=n.siblings(".hidden[data-notify-text='value']").text(),t=n.siblings(".hidden[data-notify-text='tag']").text(),f=n.siblings(".hidden[data-notify-text='whenToCall']").text();i!=""&&(t!=""?(u=typeof PropertyTags[t]!="undefined"?PropertyTags:SystemTags,u[t].Type==TypeString?eval(i+"('"+r+"', "+t+")"):eval(i+"("+r+", "+t+")")):eval(i+"("+r+")"));lastFocus!=undefined&&lastFocus.focus()});$(document).on("click",".notifyjs-CommonAlert2-base .no",function(){forceCallBack!=undefined&&forceCallBack();$(this).trigger("notify-hide");lastFocus!=undefined&&lastFocus.focus()});SaveBothProperties=!1,function(n,t,i){function nt(n,t){function w(){a("ajax error");t.callback("There has been an error")}function l(){e.prompt(u,!1);for(var n=f.loading[i];n.length;)n.pop().success.apply(t,arguments);f.loaded[i]=arguments}var r=t._exec,u=r.type==="GroupRuleExecution"?r.element.domElem:t.field,y=n.success,p=n.error,e=r.element.options,i=JSON?JSON.stringify(n):s(),o={success:y,error:p||w},h,c,v;if(f.loaded[i]){h=f.loaded[i];c=o.success;c.apply(t,h);return}(f.loading[i]||(f.loading[i]=[]),f.loading[i].push(o),f.loading[i].length===1)&&(e.prompt(u,"Checking...","load"),v={success:l,error:l},r.ajax=$.ajax($.extend({method:"GET",timeout:15e3},n,v)))}function d(n){$.extend(!0,this,n)}var f,s,h,v,c,l;(function(n,t,i,r){"use strict";var k,ft,y,et,p,ot,l,d,g,nt,st,tt,a,f,ht,it,h,rt,ct,u,s,w,e,v,ut,c,b,o=[].indexOf||function(n){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===n)return t;return-1};s="notify";u=s+"js";y=s+"!blank";e={t:"top",m:"middle",b:"bottom",l:"left",c:"center",r:"right"};a=["l","c","r"];b=["t","m","b"];h=["t","b","l","r"];rt={t:"b",m:null,b:"t",l:"r",c:null,r:"l"};ct=function(n){var t;return t=[],i.each(n.split(/\W+/),function(n,i){var r;return r=i.toLowerCase().charAt(0),e[r]?t.push(r):void 0}),t};c={};et={name:"core",html:'<div class="'+u+'-wrapper">\n  <div class="'+u+'-arrow"><\/div>\n  <div class="'+u+'-container"><\/div>\n<\/div>',css:"."+u+"-corner {\n  position: absolute;\n height: 100%;\n width: 0;\n z-index: 1050;\n}\n\n."+u+"-corner ."+u+"-wrapper,\n."+u+"-corner ."+u+"-container {\n  position: relative;\n  display: block;\n  height: 100%;\n  width: 100%;\n margin: 0;\n}\n\n."+u+"-wrapper {\n  z-index: 1;\n  position: absolute;\n  display: inline-block;\n  height: 0;\n  width: 0;\n}\n\n."+u+"-container {\n  display: none;\n  z-index: 1;\n  position: absolute;\n  cursor: pointer;\n}\n\n[data-notify-text],[data-notify-html] {\n  position: relative;\n}\n\n."+u+"-arrow {\n  position: absolute;\n  z-index: 2;\n  width: 2px;\n  height: 0;\n}"};ut={"border-radius":["-webkit-","-moz-"]};st=function(n){return c[n]};ft=function(t,r){var f,o,e,h;if(!t)throw"Missing Style name";if(!r)throw"Missing Style definition";if(!r.html)throw"Missing Style HTML";return((h=c[t])!=null?h.cssElem:void 0)&&(n.console&&console.warn(""+s+": overwriting style '"+t+"'"),c[t].cssElem.remove()),r.name=t,c[t]=r,f="",r.classes&&i.each(r.classes,function(n,t){return f+="."+u+"-"+r.name+"-"+n+" {\n",i.each(t,function(n,t){return ut[n]&&i.each(ut[n],function(i,r){return f+="  "+r+n+": "+t+";\n"}),f+="  "+n+": "+t+";\n"}),f+="}\n"}),r.css&&(f+="/* styles for "+r.name+" */\n"+r.css),f&&(r.cssElem=it(f),r.cssElem.attr("id","notify-"+r.name)),e={},o=i(r.html),g("html",o,e),g("text",o,e),r.fields=e};it=function(n){var t;t=p("style");t.attr("type","text/css");i("head").append(t);try{t.html(n)}catch(r){t[0].styleSheet.cssText=n}return t};g=function(n,t,r){var u;return n!=="html"&&(n="text"),u="data-notify-"+n,d(t,"["+u+"]").each(function(){var t;return t=i(this).attr(u),t||(t=y),r[t]=n})};d=function(n,t){return n.is(t)?n:n.find(t)};w={clickToHide:!0,autoHide:!0,autoHideDelay:5e3,arrowShow:!0,arrowSize:8,breakNewLines:!0,elementPosition:"top center",globalPosition:"top center",style:"bootstrap",className:"error",showAnimation:"fadeIn",showDuration:10,hideAnimation:"fadeOut",hideDuration:0,gap:4};ht=function(n,t){var r;return r=function(){},r.prototype=n,i.extend(!0,new r,t)};ot=function(n){return i.extend(w,n)};p=function(n){return i("<"+n+"><\/"+n+">")};tt={};nt=function(n){var t;return n.is("[type=radio]")&&(t=n.parents("form:first").find("[type=radio]").filter(function(t,r){return i(r).attr("name")===n.attr("name")}),n=t.first()),n};f=function(n,t,i){var u,f;if(typeof i=="string")i=parseInt(i,10);else if(typeof i!="number")return;if(!isNaN(i))return u=e[rt[t.charAt(0)]],f=t,n[u]!==r&&(t=e[u.charAt(0)],i=-i),n[t]===r?n[t]=i:n[t]+=i,null};v=function(n,t,i,r){if(n==="l"||n==="t")return 0;if(n==="c"||n==="m")return i/2-t/2;if(n==="r"||n==="b"){var u=i-t;return r!="undefined"&&i<t&&(u=Math.max(10-r,u)),u}throw"Invalid alignment";};l=function(n){return l.e=l.e||p("div"),l.e.text(n).html()};k=function(){function n(n,t,r){typeof r=="string"&&(r={className:r});this.options=ht(w,i.isPlainObject(r)?r:{});this.loadHTML();n==null?this.userContainer.attr("id","Note_Spec"):this.userContainer.attr("id","Note_"+n.attr("id"));this.wrapper=i(et.html);this.wrapper.data(u,this);this.arrow=this.wrapper.find("."+u+"-arrow");this.container=this.wrapper.find("."+u+"-container");this.container.append(this.userContainer);n&&n.length&&(this.elementType=n.attr("type"),this.originalElement=n,this.elem=nt(n),this.elem.data(u,this),this.elem.before(this.wrapper));this.container.hide();this.run(t)}return n.prototype.loadHTML=function(){var n;return n=this.getStyle(),this.userContainer=i(n.html),this.rawHTML=!0,this.userFields=n.fields},n.prototype.show=function(n,t){var i,f,e,r,u,o=this;if(f=function(){return n||o.elem||o.destroy(),t?t():void 0},u=this.container.parent().parents(":hidden").length>0,e=this.container.add(this.arrow),i=[],u&&n)r="show",this.wrapper.parent(".notifyjs-corner").css("width","100%");else if(u&&!n)r="hide";else if(!u&&n)r=this.options.showAnimation,i.push(this.options.showDuration),this.wrapper.parent(".notifyjs-corner").css("width","100%");else{if(u||n)return f();r=this.options.hideAnimation;i.push(this.options.hideDuration)}return i.push(f),e[r].apply(e,i)},n.prototype.setGlobalPosition=function(){var r,n,t,f,c,o,s,h;return h=this.getPosition(),s=h[0],o=h[1],c=e[s],r=e[o],f=s+"|"+o,n=tt[f],n||(n=tt[f]=p("div"),t={},t[c]=0,r==="middle"?t.top="45%":r==="center"?t.left="0":t[r]=0,n.css(t).addClass(""+u+"-corner"),i("#MainView").append(n)),n.prepend(this.wrapper)},n.prototype.setElementPosition=function(){var st,t,s,ht,tt,w,n,k,ct,lt,y,it,at,vt,ut,d,ft,c,wt,r,l,et,u,p,g,nt,yt,pt,ot;for(u=this.getPosition(),r=u[0],c=u[1],wt=u[2],y=this.elem.position(),k=this.elem.outerHeight(),it=this.elem.outerWidth(),ct=this.elem.innerHeight(),lt=this.elem.innerWidth(),p=this.wrapper.position(),tt=this.container.height(),w=this.container.width(),screenHeight<this.wrapper.offset().top+tt+k+30&&u[0]=="b"&&(u[0]="t",r=u[0]),screenWidth<y.left+w+5&&u[1]=="r"&&(p.left+=p.left+w+5-screenWidth),vt=e[r],d=rt[r],ft=e[d],n={},n[ft]=r==="b"?k:r==="r"?it:0,f(n,"top",y.top-p.top),f(n,"left",y.left-p.left),ot=["top","left"],g=0,yt=ot.length;g<yt;g++)l=ot[g],ut=parseInt(this.elem.css("margin-"+l),10),ut&&f(n,l,ut);if(at=Math.max(0,this.options.gap-(this.options.arrowShow?s:0)),f(n,ft,at),this.options.arrowShow){for(s=this.options.arrowSize,t=i.extend({},n),st=this.userContainer.css("border-color")||this.userContainer.css("background-color")||"white",nt=0,pt=h.length;nt<pt;nt++)(l=h[nt],et=e[l],l!==d)&&(ht=et===vt?st:"transparent",t["border-"+et]=""+s+"px solid "+ht);f(n,e[d],s);o.call(h,c)>=0&&f(t,e[c],s*2)}else this.arrow.hide();return o.call(b,r)>=0?(f(n,"left",v(c,w,it,y.left)),t&&f(t,"left",v(c,s,lt))):o.call(a,r)>=0&&(f(n,"top",v(c,tt,k)),t&&f(t,"top",v(c,s,ct))),this.container.is(":visible")&&(n.display="block"),this.container.removeAttr("style").css(n),t?this.arrow.removeAttr("style").css(t):void 0},n.prototype.getPosition=function(){var n,t,i,r,u,f,e,s;if(t=this.options.position||(this.elem?this.options.elementPosition:this.options.globalPosition),n=ct(t),n.length===0&&(n[0]="b"),i=n[0],o.call(h,i)<0)throw"Must be one of ["+h+"]";return(n.length===1||(r=n[0],o.call(b,r)>=0)&&(u=n[1],o.call(a,u)<0)||(f=n[0],o.call(a,f)>=0)&&(e=n[1],o.call(b,e)<0))&&(n[1]=(s=n[0],o.call(a,s)>=0)?"m":"l"),n.length===2&&(n[2]=n[1]),n},n.prototype.getStyle=function(n){var t;if(n||(n=this.options.style),n||(n="default"),t=c[n],!t)throw"Missing style: "+n;return t},n.prototype.updateClasses=function(){var n,t;return n=["base"],i.isArray(this.options.className)?n=n.concat(this.options.className):this.options.className&&n.push(this.options.className),t=this.getStyle(),n=i.map(n,function(n){return""+u+"-"+t.name+"-"+n}).join(" "),this.userContainer.attr("class",n)},n.prototype.run=function(n,t){var r,u,f,e,o,s=this;if(i.isPlainObject(t)?i.extend(this.options,t):i.type(t)==="string"&&(this.options.color=t),this.container&&!n){this.show(!1);return}if(this.container||n){u={};i.isPlainObject(n)?u=n:u[y]=n;for(f in u)(r=u[f],e=this.userFields[f],e)&&(e==="text"&&(r=l(r),this.options.breakNewLines&&(r=r.replace(/\n/g,"<br/>"))),o=f===y?"":"="+f,d(this.userContainer,"[data-notify-"+e+o+"]").html(r));return this.updateClasses(),this.elem?this.setGlobalPosition():this.setGlobalPosition(),this.show(!0),this.wrapper.parent(".notifyjs-corner").css("width","100%"),this.options.autoHide?(clearTimeout(this.autohideTimer),this.autohideTimer=setTimeout(function(){return s.wrapper.parent(".notifyjs-corner").css("width","0"),s.show(!1)},this.options.autoHideDelay)):void 0}},n.prototype.destroy=function(){return this.wrapper.parent(".notifyjs-corner").css("width",0),this.wrapper.remove()},n}();i[s]=function(n,t,r){return n&&n.nodeName||n.jquery?i(n)[s](t,r):(r=t,t=n,new k(null,t,r)),n};i.fn[s]=function(n,t){return i(this).each(function(){var r;return r=nt(i(this)).data(u),r?r.run(n,t):new k(i(this),n,t)}),this};i.extend(i[s],{defaults:ot,addStyle:ft,pluginOptions:w,getStyle:st,insertCSS:it});i(function(){return i(t).on("click notify-hide","."+u+"-wrapper",function(n){var t;return t=i(this).data(u),t&&(t.options.clickToHide||n.type==="notify-hide")?t.show(!1):void 0})})})(n,t,jQuery);$.notify.addStyle("bootstrap",{html:"<div>\n<span data-notify-text><\/span><span data-notify-html><\/span>\n<\/div>"}),function(t){function h(){this.suppressLog||e("log",this,arguments)}function c(){e("warn",this,arguments)}function l(){e("info",this,arguments)}function e(r,u,f){var e,s;n.console!==i&&n.console.isFake!==!0&&(e=t.map(f,o),e[0]=[u.prefix,e[0],u.postfix].join(""),s=t.type(e[e.length-1])==="boolean"?e.pop():null,s===!0&&n.console.group(e[0]),e[0]&&s===null&&(n.navigator.userAgent.indexOf("MSIE")>=0?n.console.log(e.join(",")):n.console[r].apply(n.console,e)),s===!1&&n.console.groupEnd())}function s(n){return{log:function(){h.apply(n,arguments)},warn:function(){c.apply(n,arguments)},info:function(){l.apply(n,arguments)}}}var f,u,o,r;for(n.console===i&&(n.console={isFake:!0}),f=["log","warn","info","group","groupCollapsed","groupEnd"],u=f.length-1;u>=0;u--)n.console[f[u]]===i&&(n.console[f[u]]=t.noop);t&&(o=function(n){return n},r=function(n){return n=t.extend({},r.defaults,n),s(n)},r.defaults={suppressLog:!1,prefix:"",postfix:""},t.extend(r,s(r.defaults)),t.console===i&&(t.console=r),t.consoleNoConflict=r)}(jQuery);f={loading:{},loaded:{}};s=function(){return s.curr++};s.curr=1;$.fn.verifyScrollView=function(n){var t=$(this).first();return t.length!==1?$(this):$(this).verifyScrollTo(t,n)};$.fn.verifyScrollTo=function(n,t,i){typeof t=="function"&&arguments.length==2&&(i=t,t=n);var r=$.extend({scrollTarget:n,offsetTop:50,duration:500,easing:"swing"},t);return this.each(function(){var t=$(this),n=typeof r.scrollTarget=="number"?r.scrollTarget:$(r.scrollTarget),u=typeof n=="number"?n:n.offset().top+t.scrollTop()-parseInt(r.offsetTop,10);t.animate({scrollTop:u},parseInt(r.duration,10),r.easing,function(){typeof i=="function"&&i.call(this)})})};$.fn.equals=function(n){if($(this).length!==n.length)return!1;for(var t=0,i=$(this).length;t<i;++t)if($(this)[t]!==n[t])return!1;return!0};h=null,function(){var n=!1,t=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;h=function(){};h.extend=function(i){function u(){!n&&this.init&&this.init.apply(this,arguments)}var e=this.prototype,f,r;n=!0;f=new this;n=!1;for(r in i)f[r]=typeof i[r]=="function"&&typeof e[r]=="function"&&t.test(i[r])?function(n,t){return function(){var r=this._super,i;return this._super=e[n],i=t.apply(this,arguments),this._super=r,i}}(r,i[r]):i[r];return u.prototype=f,u.prototype.constructor=u,u.extend=arguments.callee,u}}();var tt=h.extend({init:function(n,t){this.name=t?t:"Set_"+s();this.array=[];this.addAll(n)},indexOf:function(n){for(var t=0,i=this.array.length;t<i;++t)if($.isFunction(n)?n(this.get(t)):this.equals(this.get(t),n))return t;return-1},find:function(n){return this.get(this.indexOf(n))||null},get:function(n){return this.array[n]},has:function(n){return!!this.find(n)},add:function(n){return this.has(n)?!1:(this.array.push(n),!0)},addAll:function(n){var i,t,r;if(!n)return 0;for($.isArray(n)||(n=[n]),i=0,t=0,r=n.length;t<r;++t)this.add(n[t])&&i++;return i},remove:function(n){for(var i=[],t=0,r=this.array.length;t<r;++t)this.equals(this.get(t),n)||i.push(this.get(t));return this.array=i,n},removeAll:function(){this.array=[]},equals:function(n,t){return n&&t&&n.equals!==i&&t.equals!==i?n.equals(t):n===t},each:function(n){for(var t=0,i=this.array.length;t<i;++t)if(n(this.get(t))===!1)return},map:function(n){return $.map(this.array,n)},filter:function(n){return $.grep(this.array,n)},size:function(){return this.array.length},getArray:function(){return this.array}}),y=tt.extend({init:function(n,t,i){this.type=n;this._super(t,i)},add:function(n){n instanceof this.type?this._super(n):this.log("add failed - invalid type")}}),e={create:function(n){function t(){}return t.prototype=n,new t},bind:$.proxy,checkOptions:function(n){if(n)for(var t in n)o[t]===i&&r("Invalid option: '"+t+"'")},appendArg:function(n,t,i){i||(i=0);var r=[].slice.call(n,i);return r[i]=t+r[i],r},memoize:function(n){return function(){for(var r=Array.prototype.slice.call(arguments),i="",u=r.length,t=null;u--;)t=r[u],i+=t===Object(t)?JSON.stringify(t):t,n.memoize||(n.memoize={});return i in n.memoize?n.memoize[i]:n.memoize[i]=n.apply(this,r)}},dateToString:function(n){return n.getFullYear()+"-"+(n.getMonth()+1)+"-"+n.getDate()},parseDate:function(n){var t;return(SystemProperties.TAG_DISPLAY_DATE?(t=n.match(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/),t||(n.match(/^(\d{1,2})\-(\d{1,2})\-(\d{2,4})$/),t||n.match(/^(\d{1,2}) ([A-Za-z]+) (\d{2,4})$/))):(t=n.match(/^(\d{2,4})\/(\d{1,2})\/(\d{1,2})$/),t||(t=n.match(/^(\d{2,4})\-(\d{1,2})\-(\d{1,2})$/),t||n.match(/^(\d{2,4}) ([A-Za-z]+) (\d{1,2})$/))),!t&&(t=n.match(/^([A-Za-z]+) (\d{1,2}) (\d{2,4})$/),!t))?null:SystemProperties.TAG_DISPLAY_DATE?new Date(parseInt(t[3],10),parseInt(t[2],10)-1,parseInt(t[1],10)):new Date(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10))},isRTL:function(n){var i=$(t),r=$("body"),u=n&&n.hasClass("rtl")||n&&(n.attr("dir")||"").toLowerCase()==="rtl"||i.hasClass("rtl")||(i.attr("dir")||"").toLowerCase()==="rtl"||r.hasClass("rtl")||(r.attr("dir")||"").toLowerCase()==="rtl";return Boolean(u)}},b="0.0.1",p=$.consoleNoConflict({prefix:"verify.js: "}),a=p.log,r=p.warn,k=p.info,o={debug:!1,autoInit:!1,validateAttribute:"data-validate",validationEventTrigger:"blur,click",scroll:!0,focusFirstField:!0,hideErrorOnChange:!1,skipHiddenFields:!0,skipDisabledFields:!0,errorClass:"error",errorContainer:function(n){return n},reskinContainer:function(n){return n},beforeSubmit:function(n,t){return t},track:$.noop,showPrompt:!0,prompt:function(n,t,i){$.type($.notify)==="function"&&(i||(i={color:"red"}),$.notify(n,t,i))}};d.prototype=o;var w=h.extend({name:"Class",toString:function(){return(this.type?this.type+": ":"")+(this.name?this.name+": ":"")},log:function(){o.debug&&a.apply(this,e.appendArg(arguments,this.toString()))},warn:function(){r.apply(this,e.appendArg(arguments,this.toString()))},info:function(){k.apply(this,e.appendArg(arguments,this.toString()))},bind:function(n){var t=this[n];t&&$.isFunction(t)&&(this[n]=e.bind(t,this))},bindAll:function(){for(var n in this)this.bind(n)},nextTick:function(n,t){var i=this;n.apply(i,t)}}),g=w.extend({init:function(n,t){if(this.name=n,!$.isPlainObject(t))return this.warn("rule definition must be a function or an object");this.type=t.__ruleType;this.extendInterface(t.extend);this.userObj||(this.userObj={});$.extend(this.userObj,t);this.buildFn();this.ready=this.fn!==i},extendInterface:function(n){var r,t,f,i;if(n&&typeof n=="string"){for(t=n,f=[];t;){if(t===this.name)return this.error("Rule already extends '%s'",t);r=u.getRawRule(t);t=r?r.extend:null}if(i=u.getRule(n),!i)return this.warn("Rule missing '%s'",t);if(this.parent=i,!(i instanceof g))return this.error("Cannot extend: '"+otherName+"' invalid type");this.userObj=e.create(i.userObj);this.userObj.parent=i.userObj}},buildFn:function(){if($.isFunction(this.userObj.fn))this.fn=this.userObj.fn;else if($.type(this.userObj.regex)==="regexp")this.fn=function(n){return function(t){var i=new RegExp(n);return t.val().match(i)?!0:t.message||"Invalid Format"}}(this.userObj.regex);else return this.error("Rule has no function")},defaultInterface:{log:a,warn:r,ajax:function(n){nt(n,this)}},defaultFieldInterface:{val:function(){return this.field.val.apply(this.field,arguments)}},defaultGroupInterface:{val:function(n,t){var r=this.field(n);if(r)return t===i?r.val():r.val(t)},field:function(n){var t=$.grep(this._exec.members,function(t){return t.id===n}),i=t.length?t[0].element.domElem:null;return i||this.warn("Cannot find group element with id: '"+n+"'"),i},fields:function(){return $().add($.map(this._exec.members,function(n){return n.element.domElem}))}},buildInterface:function(n){var t=[];return t.push({}),t.push(this.userObj),t.push(this.defaultInterface),this.type==="field"&&(t.push(this.defaultFieldInterface),t.push({field:n.element.domElem})),this.type==="group"&&t.push(this.defaultGroupInterface),t.push({prompt:n.element.options.prompt,form:n.element.form.domElem,callback:n.callback,args:n.args,_exec:n}),$.extend.apply(this,t)}}),u=null;(function(){var i=function(n){for(var u=n.split(""),o=[],f,t,i=0,e=0,s=u.length;e<s;++e){if(f=u[e],f==="("&&i++,f===")"&&i--,i>1)return null;f===","&&i===1&&(u[e]=";")}return i!==0?null:($.each(u.join("").split(","),function(i,u){if(t=u.match(/^(\w+)(\.(\w+))?(\#(\w+))?(\(([^;\)]+(\;[^;\)]+)*)\))?$/),!t)return r("Invalid validate attribute: "+n);u={};u.name=t[1];t[3]&&(u.scope=t[3]);t[5]&&(u.id=t[5]);u.args=t[7]?t[7].split(";"):[];o.push(u)}),o)},s=e.memoize(i),n={},t={},f=function(t,i){for(var u in i)n[u]&&r("validator '%s' already exists",u),$.isFunction(i[u])&&(i[u]={fn:i[u]}),i[u].__ruleType=t;$.extend(!0,n,i)},h=function(n){f("field",n)},c=function(n){f("group",n)},y=function(i){var f={};for(var u in i)n[u]?f[u]=i[u]:r("cannot update validator '%s' doesn't exist yet",u),t[u]&&delete t[u];$.extend(!0,n,f)},l=function(t){return n[t]},o=function(i){var u=t[i],f=n[i];return f?u||(u=t[i]=new g(i,f)):r("Missing rule: "+i),u},a=function(n){var i=n.form.options.validateAttribute,t=n.domElem.attr(i);return t?s(t):null},v=function(n){var u=!1,i=null,t=[];return n.type!=="ValidationField"?r("Cannot get rules from invalid type"):n.domElem?(i=this.parseAttribute(n),!i||!i.length)?t:($.each(i,function(n,i){/required/.test(i.name)&&(u=!0);i.rule=o(i.name);i.rule&&t.push(i)}),t.required=u,t):t};u={addFieldRules:h,addGroupRules:c,getRule:o,getRawRule:l,parseString:i,parseAttribute:a,parseElement:v}})();v=null,function(){var n=w.extend({type:"ValidationElement",init:function(n){if(!n||!n.length)throw"Missing Element";return(this.domElem=n,this.bindAll(),this.name=this.domElem.attr("name")||this.domElem.attr("id")||s(),this.execution=null,n.data("verify"))?!1:(n.data("verify",this),!0)},equals:function(t){var r,i;if(this.domElem)r=this.domElem;else return!1;return(t.jquery?i=t:t instanceof n&&t.domElem&&(i=t.domElem),r&&i)?r.equals(i):!1}}),r=n.extend({type:"ValidationField",init:function(n,t){this._super(n);this.form=t;this.options=t.options;this.groups=t.groups;this.ruleNames=null;this.touched=!1},validate:function(n){n||(n=$.noop);var t=new l(this);t.execute().done(function(){n(!0)}).fail(function(){n(!1)});return},update:function(){var t,n,i;for(this.rules=u.parseElement(this),t=0;t<this.rules.length;++t)(n=this.rules[t],n.rule)&&n.rule.type==="group"&&(this.groups[n.name]||(this.groups[n.name]={}),i=n.scope||"default",this.groups[n.name][i]||(this.groups[n.name][i]=new y(r)),this.groups[n.name][i].add(this))},handleResult:function(n){var t=this.options,i=t.reskinContainer(this.domElem),r;if(!i||!i.length)return this.warn("No reskin element found. Check 'reskinContainer' option.");t.showPrompt&&t.prompt(i,n.response,{color:"green"});r=t.errorContainer(i);r&&r.length&&r.toggleClass(t.errorClass,!n.success);this.options.track("Validate",[this.form.name,this.name].join(" "),n.success?"Valid":n.response?'"'+n.response+'"':"Silent Fail")},scrollFocus:function(n){var t=$.noop;this.options.focusFirstField&&(t=function(){n.focus()});this.options.scroll?n.verifyScrollView(t):this.options.focusFirstField&&field.focus()}});v=n.extend({type:"ValidationForm",init:function(n,u){if(this._super(n),!n.is("form"))throw"Must be a form";this.options=new d(u);this.fields=new y(r);this.groups={};this.fieldByName={};this.invalidFields={};this.fieldHistory={};this.submitResult=i;this.submitPending=!1;this.cache={ruleNames:{},ajax:{loading:{},loaded:{}}};$(t).ready(this.domReady)},extendOptions:function(n){$.extend(!0,this.options,n)},domReady:function(){this.bindEvents();this.updateFields();this.log("bound to "+this.fields.size()+" elems")},bindEvents:function(){this.domElem.on("keyup.jqv","input",this.onKeyup).on("blur.jqv","input[type=text]:not(.hasDatepicker),input:not([type].hasDatepicker)",this.onValidate).on("change.jqv","input[type=text].hasDatepicker,select,[type=checkbox],[type=radio]",this.onValidate).on("submit.jqv",this.onSubmit).trigger("initialised.jqv")},unbindEvents:function(){this.domElem.off(".jqv")},updateFields:function(){var n="["+this.options.validateAttribute+"]";this.domElem.find(n).each(this.updateField)},updateField:function(n,t){n.jquery!==i&&(t=n);t.jquery===i&&(t=$(t));var u,f;return t.is("input:not([type=hidden]),select,textarea")?(f=t,u=this.fields.find(f),u||(u=new r(f,this),this.fields.add(u)),u.update(),u):this.warn("Validators will not work on container elements ("+t.prop("tagName")+"). Please use INPUT, SELECT or TEXTAREA.")},onSubmit:function(n){var t=!1;return this.submitPending&&this.warn("pending..."),this.submitPending||this.submitResult!==i?this.submitResult!==i&&(t=this.options.beforeSubmit.call(this.domElem,n,this.submitResult)):(this.submitPending=!0,this.validate(this.doSubmit)),t||n.preventDefault(),t},doSubmit:function(n){this.log("doSubmit",n);this.submitPending=!1;this.submitResult=n;this.domElem.submit();this.submitResult=i},onKeyup:function(n){this.options.hideErrorOnChange&&this.options.prompt($(n.currentTarget),null)},onValidate:function(n){var t=$(n.currentTarget),i=t.data("verify")||this.updateField(t);i.log("validate");i.validate($.noop)},validate:function(n){n||(n=$.noop);this.updateFields();var t=new c(this);t.execute().done(function(){n(!0)}).fail(function(){n(!1)});return}})}();c=null;l=null,function(){var n={NOT_STARTED:0,RUNNING:1,COMPLETE:2},t=w.extend({type:"Execution",init:function(t,i){this.element=t;t&&(this.prevExec=t.execution,t.execution=this,this.options=this.element.options,this.domElem=t.domElem);this.parent=i;this.name="#"+s();this.status=n.NOT_STARTED;this.bindAll();this.d=this.restrictDeferred();this.d.done(this.executePassed);this.d.fail(this.executeFailed)},isPending:function(){return this.prevExec&&this.prevExec.status!==n.COMPLETE},toString:function(){return this._super()+"["+this.element.name+(this.rule?":"+this.rule.name:"")+"] "},serialize:function(n){var t=this.mapExecutables(n);if(!$.isArray(t)||t.length===0)return this.resolve();var i=t[0](),r=1,u=t.length;if(this.log("SERIALIZE",u),!i||!i.pipe)throw"Invalid Deferred Object";for(;r<u;r++)i=i.pipe(t[r]);return i.done(this.resolve).fail(this.reject),this.d.promise()},parallelize:function(n){function s(n){e++;e===i&&f.resolve(n)}function h(n){o||(o=!0,f.reject(n))}var r=this.mapExecutables(n),f=this,e=0,u=0,i=r.length,o=!1,t;if(this.log("PARALLELIZE",i),!$.isArray(r)||i===0)return this.resolve();for(;u<i;++u){if(t=r[u](),!t||!t.done||!t.fail)throw"Invalid Deferred Object";t.done(s).fail(h)}return this.d.promise()},mapExecutables:function(n){return $.map(n,function(n){if($.isFunction(n))return n;if($.isFunction(n.execute))return n.execute;throw"Invalid executable";})},linkPass:function(n){n.d.done(this.resolve)},linkFail:function(n){n.d.fail(this.reject)},link:function(n){this.linkPass(n);this.linkFail(n)},execute:function(){for(var t=this.parent,i=[],r;t;)i.unshift(t.name),t=t.parent;return r="("+i.join(" < ")+")",this.log(this.parent?r:"","executing..."),this.status=n.RUNNING,this.domElem&&this.domElem.triggerHandler("validating"),!0},executePassed:function(n){this.success=!0;this.response=this.filterResponse(n);this.executed()},executeFailed:function(n){this.success=!1;this.response=this.filterResponse(n);this.executed()},executed:function(){this.status=n.COMPLETE;this.log((this.success?"Passed":"Failed")+": "+this.response);this.domElem&&this.domElem.triggerHandler("validated",this.success)},resolve:function(n){return this.resolveOrReject(!0,n)},reject:function(n){return this.resolveOrReject(!1,n)},resolveOrReject:function(n,t){var i=n?"__resolve":"__reject";if(!this.d||!this.d[i])throw"Invalid Deferred Object";return this.nextTick(this.d[i],[t],0),this.d.promise()},filterResponse:function(n){return typeof n=="string"?n:null},restrictDeferred:function(n){return n||(n=$.Deferred()),n.__reject=n.reject,n.__resolve=n.resolve,n.reject=n.resolve=function(){console.error("Use execution.resolve|reject()")},n}}),r,f;c=t.extend({type:"FormExecution",init:function(n){this._super(n);this.ajaxs=[];this.children=this.element.fields.map($.proxy(function(n){return new l(n,this)},this))},execute:function(){return(this._super(),this.isPending())?(this.warn("pending... (waiting for %s)",this.prevExec.name),this.reject()):(this.log("exec fields #"+this.children.length),this.parallelize(this.children))}});l=t.extend({type:"FieldExecution",init:function(n,t){this._super(n,t);t instanceof c&&(this.formExecution=t);n.touched=!0;this.children=[]},execute:function(){if(this._super(),this.isPending())return this.warn("pending... (waiting for %s)",this.prevExec.name),this.reject();var n=u.parseElement(this.element);return(this.skip=this.skipValidations(n),this.skip)?this.resolve():(this.children=$.map(n,$.proxy(function(n){return n.rule.type==="group"?new f(n,this):new r(n,this)},this)),this.serialize(this.children))},skipValidations:function(n){return n.length===0?(this.log("skip (no validators)"),!0):!n.required&&!$.trim(this.domElem.val())?(this.warn("skip (not required)"),!0):this.options.skipHiddenFields&&this.options.reskinContainer(this.domElem).is(":hidden")?(this.log("skip (hidden)"),!0):this.options.skipDisabledFields&&this.domElem.is("[disabled]")?(this.log("skip (disabled)"),!0):!1},executed:function(){this._super();for(var i=this,t=this.children,n=0;n<t.length;++n)if(t[n].success===!1){i=t[n];break}this.element.handleResult(i)}});r=t.extend({type:"RuleExecution",init:function(n,t){this._super(null,t);this.rule=n.rule;this.args=n.args;this.element=this.parent.element;this.options=this.element.options;this.rObj={}},callback:function(n){(clearTimeout(this.t),this.callbackCount++,this.log(this.rule.name+" (cb:"+this.callbackCount+"): "+n),this.callbackCount>1)||(n===i&&this.warn("Undefined result"),n===!0?this.resolve(n):this.reject(n))},timeout:function(){this.warn("timeout!");this.callback("Timeout")},execute:function(){if(this._super(),this.callbackCount=0,!this.element||!this.rule.ready)return this.warn(this.element?"not  ready.":"invalid parent."),this.resolve();this.t=setTimeout(this.timeout,1e4);this.r=this.rule.buildInterface(this);var n;try{n=this.rule.fn(this.r)}catch(t){n=!0;console.error("Error caught in validation rule: '"+this.rule.name+"', skipping.\nERROR: "+t.toString()+"\nSTACK:"+t.stack)}return n!==i&&this.nextTick(this.callback,[n]),this.d.promise()}});f=r.extend({type:"GroupRuleExecution",init:function(n,t){if(this._super(n,t),this.groupName=n.name,this.id=n.id,this.scope=n.scope||"default",this.group=this.element.groups[this.groupName][this.scope],!this.group)throw"Missing Group Set";this.group.size()===1&&this.warn("Group only has 1 field. Consider a field rule.")},execute:function(){var t=this.group.exec,h=this.parent,e=h&&h.parent,p=e instanceof f,v=!e,y=e instanceof c,w=this,i,r,u,a=!1,o,s;if(t&&t.status!==n.COMPLETE){for(this.members=t.members,i=0;i<this.members.length;++i)this.element===this.members[i].element&&(a=!0);if(a){this.log("ALREADY A MEMBER OF %s",t.name);this.reject();return}this.log("SLAVE TO %s",t.name);this.members.push(this);this.link(t);this.parent&&t.linkFail(this.parent)}else this.log("MASTER"),this.members=[this],this.executeGroup=this._super,t=this.group.exec=this,y&&t.linkFail(e);if(v)for(i=0;i<this.group.size();++i)if(r=this.group.get(i),this.element!==r){if(this.log("CHECK:",r.name),!r.touched)return this.log("FIELD NOT READY: ",r.name),this.reject();u=r.execution;u&&u.status!==n.COMPLETE&&u.reject();this.log("STARTING ",r.name);u=new l(r,this);u.execute()}return o=this.group.size(),s=t.members.length,o===s&&t.status===n.NOT_STARTED?(t.log("RUN"),t.executeGroup()):this.log("WAIT ("+s+"/"+o+")"),this.d.promise()},filterResponse:function(n){if(!n||!this.members.length)return this._super(n);var t=$.isPlainObject(n),i=typeof n=="string";return i&&this===this.group.exec?n:t&&n[this.id]?n[this.id]:null}})}();$.fn.validate=function(n){var t=$(this).data("verify");t?t.validate(n):r("element does not have verifyjs attached")};$.fn.validate.version=b;$.fn.verify=function(n){return this.each(function(){var t=$.verify.forms.find($(this));if(n===!1||n==="destroy"){t&&(t.unbindEvents(),$.verify.forms.remove(t));return}e.checkOptions(n);t?(t.extendOptions(n),t.updateFields()):(t=new v($(this),n),$.verify.forms.add(t))})};$.verify=function(n){e.checkOptions(n);$.extend(o,n)};$.extend($.verify,{version:b,updateRules:u.updateRules,addRules:u.addFieldRules,addFieldRules:u.addFieldRules,addGroupRules:u.addGroupRules,log:k,warn:r,defaults:o,globals:o,utils:e,forms:new y(v,[],"FormSet"),_hidden:{ruleManager:u}});$(function(){o.autoInit&&$("form").filter(function(){return $(this).find("["+o.validateAttribute+"]").length>0}).verify()});a("plugin added."),function(t){if(t.verify===i){n.alert("Please include verify.js before each rule file");return}t.verify.addFieldRules({currency:{regex:/^\-?\$?\d{1,2}(,?\d{3})*(\.\d+)?$/,message:"Invalid monetary value"},email:{regex:/^(([^<>()\[\]\\.,;:\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,}))$/,message:"Invalid email address"},url:{regex:/^https?:\/\/[\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_|]/,message:"Invalid URL"},alphanumeric:{regex:/^[0-9A-Za-z]+$/,message:"Use digits and letters only"},street_number:{regex:/^\d+[A-Za-z]?(-\d+)?[A-Za-z]?$/,message:"Street Number only"},number:{regex:/^\d+$/,message:"Use digits only"},numberSpace:{regex:/^[\d\ ]+$/,message:"Use digits and spaces only"},postcode:{regex:/^\d{4}$/,message:"Invalid postcode"},timeHHMM:{regex:/^\d{2}:\d{2}/,message:"Invalid time"},date:{fn:function(n){return t.verify.utils.parseDate(n.val())?!0:n.message},message:"Invalid date"},required:{fn:function(n){return n.requiredField(n,n.field)},requiredField:function(n,i){var f=i.val(),u,r;switch(i.prop("type")){case"radio":case"checkbox":if(u=i.attr("name"),r=i.data("fieldGroup"),r||(r=n.form.find("input[name='"+u+"']"),i.data("fieldGroup",r)),r.is(":checked"))break;return r.size()===1?n.messages.single:n.messages.multiple;default:if(!t.trim(f))return n.messages.all}return!0},messages:{all:"This field is required",multiple:"Please select an option",single:"This checkbox is required"}},regex:{fn:function(n){var i,t;try{t=n.args[0];i=new RegExp(t)}catch(r){return n.warn("Invalid regex: "+t),!0}return n.val().match(i)?!0:n.args[1]||n.message},message:"Invalid format"},pattern:{extend:"regex"},asyncTest:function(n){n.prompt(n.field,"Please wait...");setTimeout(function(){n.callback()},2e3)},phone:function(n){n.val(n.val().replace(/\D/g,""));var t=n.val();return t.match(/^\+?[\d\s]+$/)?t.match(/^\+/)?!0:t.replace(/\s/g,"").length!==10?"Must be 10 digits long":!0:"Use digits and spaces only"},size:function(n){var e=n.val(),r=n.args[0],t=n.args[1],u,f;if(r!==i&&t===i){if(u=parseInt(r,10),n.val().length!==u)return"Must be "+u+" characters"}else if(r!==i&&t!==i){if(f=parseInt(r,10),t=parseInt(t,10),e.length<f||t<e.length)return"Must be between "+f+" and "+t+" characters"}else n.warn("size validator parameter error on field: "+n.field.attr("name"));return!0},sizer:function(n){var u=n.val(),r,t,f,e;if(propTags=typeof PropertyTags[n.args[0]]!="undefined"?PropertyTags:SystemTags,r=propTags[n.args[0]].MinVal,t=propTags[n.args[0]].MaxVal,r!==i&&t===i){if(f=parseInt(r,10),n.val().length!==f)return"Must be "+f+" characters"}else if(r!==i&&t!==i){if(e=parseInt(r,10),t=parseInt(t,10),u.length<e||t<u.length)return n.field.val(u.substr(0,t)),"Must be between "+e+" and "+t+" characters"}else n.warn("size validator parameter error on field: "+n.field.attr("name"));return!0},min:function(n){var i=n.val(),t=parseInt(n.args[0],10);return i.length<t?"Must be at least "+t+" characters":!0},max:function(n){var i=n.val(),t=parseInt(n.args[0],10);return i.length>t?"Must be at most "+t+" characters":!0},decimal:function(n){var t=n.val(),r=n.args[0]?parseInt(n.args[0],10):2,i,u;return(t=swiToDec(t).toString(),t=t.replace(/[^-?\d\.]/g,""),!t.match(/^-?\d+(,\d{3})*(\.\d+)?$/))?(n.field.val(1..toFixed(r)),"Invalid decimal value"):(i=parseFloat(t.replace(/[^-?\d\.]/g,"")),r===-1?n.field.val(i):(u=Math.pow(10,r),i=Math.round(i*u)/u,n.field.val(swiToComma(i.toFixed(r)))),!0)},minVal:function(n){var i=parseFloat(swiToDec(n.val()).toString().replace(/[^\d\.]/g,"")),r=n.args[1]||"",t=parseFloat(eval(n.args[0]));return i<t?(n.val(swiToComma(t)),"Must be greater than "+t+r):!0},maxVal:function(n){var i=parseFloat(swiToDec(n.val()).toString().replace(/[^\d\.]/g,"")),r=n.args[1]||"",t=parseFloat(eval(n.args[0]));return i>t?(n.val(swiToComma(t)),"Must be less than "+t+r):!0},rangeVal:function(n){var t=parseFloat(swiToDec(n.val()).toString().replace(/[^-?\d\.]/g,"")),l=n.args[2]||"",a=n.args[3]||"",u,r,o,s;u=typeof PropertyTags[n.args[0]]!="undefined"?PropertyTags:SystemTags;var h=parseFloat(u[n.args[0]].MinVal),c=parseFloat(u[n.args[0]].MaxVal),e=n.field.attr("tagtype"),f=n.val();if(e==="time"||e==="timeHHMM"?t=stringToSecs(f):e==="timeHHMMSS"?t=stringToSecs(f):e==="date"&&(t=dateToSecs(f)),t>c||t<h){r=0;(u[n.args[0]].Type==TypeFloat||u[n.args[0]].Type==TypeFloatSeries)&&(r=1,o=n.field.attr("data-validate"),s=o.indexOf("decimal"),s>=0&&o.length>s&&(r=parseInt(o.substr(s+8,2)),(isNaN(r)||r<0)&&(r=u[n.args[0]].Prec!=i?u[n.args[0]].Prec:1)));var f=dateTimeFmt(t,n.field),v=dateTimeFmt(swiToComma(h.toFixed(r)),n.field),y=dateTimeFmt(swiToComma(c.toFixed(r)),n.field);return t<h&&(f=v),t>c&&(f=y),n.field.val(f),"Must be between "+l+v+a+" and "+l+y+a}return!0},availProp:function(n){var l,e,s,h;console.log("Verify Me");var a=parseFloat(n.val().replace(/[^\d\.]/g,"")),v=n.args[2]||"",y=n.args[3]||"",r=n.args[0].toString(),u=0,c=t(n.field).prop("type"),f,o;for(typeof PropertyTags[r]!="undefined"?(f=MeasurementProperties,o=PropertyTags[r]):(f=SystemProperties,o=SystemTags[r]),l=GatingCondition[r]!=i?GatingCondition[r].numGates:0,u=0;u<l;u++)if((c!="select-one"||(val=parseInt(a),val==GatingCondition[r].gate[u].value))&&(e=GatingCondition[r].gate[u].gateType,e!=i&&(e=="EnableIf"||e=="EnableMask"||e=="SubEnableMask")&&(passGate=checkGate(r,u),!passGate)))return c=="select-one"?(t(t(n.field).children()).attr("selected",!1),o.def!==i?s=t(n.field).val(o.def):(s=t(t(n.field).children(".available")[0]),s.attr("selected",!0)),f[r]=s.val()):c=="radio"&&(h=t(n.field).attr("name"),f[h]=GatingCondition[r].gate[u].validValue,t("input:radio[name="+h+"]").filter("[value="+f[h]+"]").prop("checked",!0)),GatingCondition[r].message[u];return!0},forceData:function(n){forceData(n.args[0],t(n.field))},rangeVal1:function(n){var t=parseFloat(n.val().replace(/[^\d\.]/g,"")),i=n.args[2]||"",r=n.args[3]||"",u=parseFloat(n.args[0]),f=parseFloat(n.args[1]);return t>f||t<u?"Must be between "+i+u+r+"\nand "+i+f+r:!0},agreement:function(n){return n.field.is(":checked")?!0:"You must agree to continue"},minAge:function(n){var i=parseInt(n.args[0],10),f,r,u;return!i||isNaN(i)?(console.log("WARNING: Invalid Age Param: "+i),!0):(f=new Date,r=new Date,r.setFullYear(r.getFullYear()-i),u=t.verify.utils.parseDate(n.val()),u==="Invalid Date")?"Invalid Date":u>r?"You must be at least "+i:!0}});t.verify.addGroupRules({dateRange:function(n){var u=n.field("start"),f=n.field("end"),i,r;return u.length===0||f.length===0?(n.warn("Missing dateRange fields, skipping..."),!0):(i=t.verify.utils.parseDate(u.val()),!i)?"Invalid Start Date":(r=t.verify.utils.parseDate(f.val()),!r)?"Invalid End Date":i>=r?"Start Date must come before End Date":!0},requiredAll:{extend:"required",fn:function(n){var f=n.fields().length,i,u=[],r=[];return(n.fields().each(function(t,f){i=n.requiredField(n,f);i===!0?u.push(f):r.push({field:f,message:i})}),u.length>0&&r.length>0)?(t.each(r,function(t,i){n.prompt(i.field,i.message)}),!1):!0}}});t.notify.addStyle("CommonAlert",{html:"<div style='margin-top: 8px;'><div style='background-color:rgba(92,92,92,0.8);filter:alpha(opacity=3);height:100%;width:100%; position:absolute; border:none; top:-8px; left:0px; z-index:-1'><\/div><div><div class='clearfix custom_info'><div class='title' data-notify-html='title' style='font-size:12px; font-family:Arial'>Test<\/div><div class='buttons'><button class='yes' data-notify-text='buttonYes'><\/button><button class='no'  data-notify-text='buttonNo'>Cancel<\/button><div class='hidden' data-notify-text='command'><\/div><div class='hidden' data-notify-text='value'><\/div><div class='hidden' data-notify-text='tag'><\/div><div class='hidden' data-notify-text='whenToCall'><\/div><\/div><\/div><\/div><\/div>"});t.notify.addStyle("CommonAlert2",{html:"<div><div class='clearfix custom_info'><div class='title' data-notify-html='title' style='font-size:12px; font-family:Arial'>Test<\/div><div class='buttons'><button class='yes' data-notify-text='buttonYes'><\/button><div class='hidden' data-notify-text='command'><\/div><div class='hidden' data-notify-text='value'><\/div><div class='hidden' data-notify-text='tag'><\/div><\/div><\/div><\/div>"})}(jQuery)}(window,document);var SetupManager={},HostIsDirectIO=!1,SaveAsButtonIsRename=!1,ListOfLDSetups=[],pageAccord={};setPop=$("#SettingsPopup");setupManagerInit=!1;cntTries=2;setupMode="";var page,tbId,pgId,maxPageLength=0,maxTabLen=5,minTabLen=0,inFileDsp=!1,PageArray=[],pageData={},pFlags={},pageTimers=[],prevLockMode=0,prevLockCom=0,prevLockCal=0;globalDataNeeded=["TAG_IO_POWER_STATUS"];initialGet=!0;rtcnt=0;var SettingsFooter={lf:{type:"arrow",text:"",handlr:keyLeftArrow,visible:!0},mi:{type:"button",text:"Close",handlr:function(n){!IsRemote&&typeof propTabs!="undefined"&&$(".jqx-menu-wrapper:visible").length>0&&propTabs.find(".jqx-menu-minimized-button").trigger("click");dispHG(!0);OnSettingTabs&&(SelectAccordionItem("ui-accordion-accordion-header-0"),OnSettingTabs=!1);OnSystemTabs&&(OnSystemTabs=!1);clearCache(function(){$.getJSON("/sdk?func=lockui&false").always(function(){getMeasSysProps(100,!0).always(function(){getMeasSysProps(200,!0).always(function(){typeof prpMenu!="undefined"&&(propTabs.jqxMenu("close"),prpMenu.hide());window.location.href.indexOf("debug")===-1&&SystemProperties.TAG_LANGUAGE!==SettingsFooter.lang&&location.reload();setTouchScreen();$(document.activeElement).blur();setupPageCounts();popPage();menuOpen=!1;n instanceof Function&&n();dispHG(!1)})})})})},visible:!0},rt:{type:"arrow",text:"",handlr:keyRightArrow,visible:!0}},GenericGroupFooter={lf:{type:"arrow",text:"",handlr:keyLeftArrow,visible:!0},mi:{type:"button",text:"Close",handlr:function(){popPage();menuOpen=!1},visible:!0},rt:{type:"arrow",text:"",handlr:keyRightArrow,visible:!0}},GenericSingleFooter={mi:{type:"button",text:"Close",handlr:function(){popPage();menuOpen=!1},visible:!0}},pageStack=[];var curTabIndex=0,curPageIndex=1,prevPage=1,prevTab=0,getDataTimeout,validDisp;setupPageCounts=function(){for(var i,r,t,u=PageArray.length,n=0;n<u;++n)if(PageArray[n]!==undefined){for(i=0,r=PageArray[n].length,t=0;t<r;++t)PageArray[n][t]!==undefined&&((PageArray[n][t].condition===undefined||PageArray[n][t].condition())&&validDisp(n,t)?(PageArray[n][t].vis=!0,++i,PageArray[n][t].idx=i):PageArray[n][t].vis=!1);PageArray[n].pCnt=i}};prevTitle="Filename";var screenOn=!0,dataRate=undefined,centTmr,wdTmr,wdCnt=0,stsZroCnt=0,ollTime=0,finGDN=!0,refTime=250;(function(n){var t=0;n[n.Live=t++]="Live";n[n.Overall=t++]="Overall";n[n.SessLog=t++]="SessLog";n[n.Current=t++]="Current";n[n.Measure=t++]="Measure";n[n.Events=t++]="Events";n[n.SetupMgr=t++]="SetupMgr";n[n.mpSetup=t++]="mpSetup";n[n.mpSched=t++]="mpSched";n[n.mpMisc=t++]="mpMisc";n[n.mpTools1=t++]="mpTools1";n[n.mpTools2=t++]="mpTools2";n[n.mpSensor=t++]="mpSensor";n[n.mpOptions=t++]="mpOptions";n[n.mpTime=t++]="mpTime";n[n.mpWifi=t++]="mpWifi";n[n.Lock=t++]="Lock";n[n.LockedScreen=t++]="LockedScreen";n[n.TabCount=t++]="TabCount"})(tbId||(tbId={})),function(n){var t=0;n[n.History=t++]="History";n[n.Profile=t++]="Profile";n[n.Memory=t++]="Memory";n[n.SessionLog=t++]="SessionLog";maxPageLength=t-1}(pgId||(pgId={}));PageArray[tbId.Live]=[];PageArray[tbId.Overall]=[];PageArray[tbId.SessLog]=[];PageArray[tbId.Current]=[];PageArray[tbId.Measure]=[];PageArray[tbId.Events]=[];PageArray[tbId.SetupMgr]=[];PageArray[tbId.mpSetup]=[];PageArray[tbId.mpSched]=[];PageArray[tbId.mpMisc]=[];PageArray[tbId.mpTools1]=[];PageArray[tbId.mpTools2]=[];PageArray[tbId.mpSensor]=[];PageArray[tbId.mpOptions]=[];PageArray[tbId.mpTime]=[];PageArray[tbId.mpWifi]=[];PageArray[tbId.Lock]=[];PageArray[tbId.LockedScreen]=[];PageArray[tbId.TabCount]=[];PageArray[tbId.Live].lastPgId=0;PageArray[tbId.Overall].lastPgId=0;PageArray[tbId.SessLog].lastPgId=0;PageArray[tbId.Current].lastPgId=0;PageArray[tbId.Measure].lastPgId=0;PageArray[tbId.Events].lastPgId=0;PageArray[tbId.SetupMgr].lastPgId=0;PageArray[tbId.mpSetup].lastPgId=0;PageArray[tbId.mpSched].lastPgId=0;PageArray[tbId.mpMisc].lastPgId=0;PageArray[tbId.mpTools1].lastPgId=0;PageArray[tbId.mpTools2].lastPgId=0;PageArray[tbId.mpSensor].lastPgId=0;PageArray[tbId.mpOptions].lastPgId=0;PageArray[tbId.mpTime].lastPgId=0;PageArray[tbId.mpWifi].lastPgId=0;PageArray[tbId.LockedScreen].lastPgId=0;PageArray[tbId.TabCount].lastPgId=0;PageArray[tbId.Live].Name="Live";PageArray[tbId.Overall].Name="Overall";PageArray[tbId.SessLog].Name="Session Log";PageArray[tbId.Current].Name="Current";PageArray[tbId.Measure].Name="Measurement";PageArray[tbId.Events].Name="Events";PageArray[tbId.SetupMgr].Name="Setup Manager";PageArray[tbId.mpSetup].Name="Setup";PageArray[tbId.mpSched].Name="Schedule";PageArray[tbId.mpMisc].Name="Misc";PageArray[tbId.mpTools1].Name="Tools";PageArray[tbId.mpTools2].Name="Tools 2";PageArray[tbId.mpSensor].Name="Sensor";PageArray[tbId.mpOptions].Name="Options";PageArray[tbId.mpTime].Name="Time";PageArray[tbId.mpWifi].Name="WiFi";PageArray[tbId.LockedScreen].Name="LockedScreen";PageArray[tbId.TabCount].Name="TabCount";PageArray[tbId.Live].sName="Live";PageArray[tbId.Overall].sName="Overall";PageArray[tbId.SessLog].sName="Log";PageArray[tbId.Current].sName="Current";PageArray[tbId.Measure].sName="Measure";PageArray[tbId.Events].sName="Events";PageArray[tbId.SetupMgr].sName="Setup Mgr";PageArray[tbId.mpSetup].sName="Setup";PageArray[tbId.mpSched].sName="Schedule";PageArray[tbId.mpMisc].sName="Misc";PageArray[tbId.mpTools1].sName="Tools";PageArray[tbId.mpTools2].sName="Tools 2";PageArray[tbId.mpSensor].sName="Sensor";PageArray[tbId.mpOptions].sName="Options";PageArray[tbId.mpTime].sName="Time";PageArray[tbId.mpWifi].sName="WiFi";PageArray[tbId.LockedScreen].sName="LockedScreen";PageArray[tbId.TabCount].sName="TabCount";PageArray[tbId.Live].disp=!0;PageArray[tbId.Overall].disp=!1;PageArray[tbId.SessLog].disp=!1;PageArray[tbId.Current].disp=function(){return inFileDsp==!1&&(SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&256)>0&&MeasurementProperties.TAG_MEASUREMENT_HISTORY===1};PageArray[tbId.Measure].disp=function(){return(SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&256)>0&&MeasurementProperties.TAG_MEASUREMENT_HISTORY===1};PageArray[tbId.Events].disp=function(){return(SystemProperties.TAG_MASK_OPTION&SystemProperties.TAG_OPTION_FLAGS&16)>0&&MeasurementProperties.TAG_EVENT_HISTORY_ENABLE==1};PageArray[tbId.SetupMgr].disp=!0;PageArray[tbId.mpSetup].disp=!0;PageArray[tbId.mpSched].disp=function(){return IsHvm200()};PageArray[tbId.mpMisc].disp=!0;PageArray[tbId.mpTools1].disp=!0;PageArray[tbId.mpTools2].disp=function(){return IsHvm100()};PageArray[tbId.mpSensor].disp=function(){return OnMeter&&activeSetupLoaded&&IsHvm200()};PageArray[tbId.mpOptions].disp=function(){return IsHvm200()};PageArray[tbId.mpTime].disp=function(){return OnMeter};PageArray[tbId.mpWifi].disp=function(){return OnMeter};PageArray[tbId.Lock].disp=!1;PageArray[tbId.LockedScreen].disp=!1;maxTabLen=tbId.mpWifi;minTabLen=tbId.SetupMgr;prevTab=curTabIndex=tbId.SetupMgr;prevPage=curPageIndex=0;validDisp=function(n){var t=!1;return n>=tbId.SetupMgr&&n<=tbId.mpWifi&&(t=!0),t};SetupMgr={id:"SetupMgr",html:"",refreshRate:1e3,isInit:!1,Active:!1,init:function(){function i(){return!1}var n=SetupMgr,t;n.isInit=!0;n.started=!1;t=$("#SetupManager");n.enter=function(){return n.Active=!0,SystemProperties.TAG_MASK_OPTION!=undefined&&(OptionTags=SystemProperties),n.started?setTimeout(CheckForChanges,0):(console.log("PopulateSetupManagerRecords !!!"),$("#ApplyChangesPopup").hasClass("ui-dialog-content")||PrepSetupMgr(),PopulateSetupManagerRecords(),n.started=!0),dispHG(!1),$(document).bind("contextmenu",i),t.show(),!0};n.update=function(){};n.leave=function(){$(document).unbind("contextmenu",i);n.Active=!1;t.hide();dispHG(!0)};BtnMenu=$({})}};PageArray[tbId.SetupMgr][0]={controls:[SetupMgr],refDRate:1e3,condition:function(){return!0},dataNeeded:[]};mpSetup={id:"mpSetup",html:"",refreshRate:1e3,isInit:!1,init:function(){var n=mpSetup,t;n.isInit=!0;t=$("#Setup");n.main=t;n.enter=function(){return mTabName="Setup",console.log("pop Setup"),getAllPropertyData("TAG_OPERATING_MODE_20",toLoadSetup),LastSelectedTab=tbId.mpSetup,t.show(),!0};n.update=function(){};n.leave=function(){t.hide()}}};PageArray[tbId.mpSetup][0]={controls:[mpSetup],refDRate:1e3,dataNeeded:[]};mpMisc={id:"mpMisc",html:"",refreshRate:1e3,isInit:!1,init:function(){var n=mpMisc,t;n.isInit=!0;t=$("#Range");n.main=t;n.enter=function(){return mTabName="Misc",console.log("pop Misc"),getAllPropertyData("TAG_WEIGHTING_X_37",doMisc),LastSelectedTab=tbId.mpMisc,t.show(),!0};n.update=function(){};n.leave=function(){t.hide()}}};PageArray[tbId.mpMisc][0]={controls:[mpMisc],refDRate:1e3,dataNeeded:[]};mpSched={id:"mpSched",html:"",refreshRate:1e3,isInit:!1,init:function(){var n=mpSched,t;n.isInit=!0;t=$("#Schedule");InitializeSch(t);n.main=t;n.enter=function(){return mTabName="Sched",console.log("pop Sched"),getAllPropertyData("TAG_WEIGHTING_X_37",doSched),enterSched(),LastSelectedTab=tbId.mpSched,t.show(),!0};n.update=function(){};n.leave=function(){t.hide()}}};PageArray[tbId.mpSched][0]={controls:[mpSched],refDRate:1e3,dataNeeded:[]};mpTools1={id:"mpTools1",html:"",refreshRate:1e3,isInit:!1,init:function(){var n=mpTools1,t;n.isInit=!0;t=$("#Tools1");n.main=t;n.enter=function(){return mTabName="Tools1",console.log("pop Tools1"),getAllPropertyData("TAG_WEIGHTING_X_37",doTools1),LastSelectedTab=tbId.mpTools1,t.show(),!0};n.update=function(){};n.leave=function(){t.hide()}}};PageArray[tbId.mpTools1][0]={controls:[mpTools1],refDRate:1e3,dataNeeded:[]};mpTools2={id:"mpTools2",html:"",refreshRate:1e3,isInit:!1,init:function(){var n=mpTools2,t;n.isInit=!0;t=$("#Tools2");n.main=t;n.enter=function(){return mTabName="Tools2",console.log("popul Tools2"),getAllPropertyData("TAG_WEIGHTING_X_37",doTools2),LastSelectedTab=tbId.mpTools2,t.show(),!0};n.update=function(){};n.leave=function(){t.hide()}}};PageArray[tbId.mpTools2][0]={controls:[mpTools2],refDRate:1e3,dataNeeded:[]};mpSensor={id:"mpSensor",html:"",refreshRate:1e3,isInit:!1,init:function(){var n=mpSensor,t;n.isInit=!0;t=$("#mpSensor");n.main=t;n.enter=function(){return mTabName="Sensor",sensorPop=$("#senModal"),onlyDecimal($("#tbSensx")),onlyDecimal($("#tbSensy")),onlyDecimal($("#tbSensz")),onlyAlphaNumeric($("#tbSerial"),"^[a-zA-Z0-9_.\\-]+$"),onlyAlphaNumeric($("#tbModel"),"^[a-zA-Z0-9_.\\-]+$"),console.log("popul Sensor"),getAllPropertyData("TAG_WEIGHTING_X_37",doSensor),LastSelectedTab=tbId.mpSensor,t.show(),!0};n.update=function(){};n.leave=function(){t.hide()}}};PageArray[tbId.mpSensor][0]={controls:[mpSensor],refDRate:1e3,dataNeeded:[]};mpOptions={id:"mpOptions",html:"",refreshRate:1e3,isInit:!1,init:function(){var n=mpOptions,t;n.isInit=!0;t=$("#Options");n.enter=function(){return console.log("popul Options"),LastSelectedTab=tbId.mpOptions,ConfigFrameSizeAndScroll("#Options"),getAllPropertyData("TAG_WEIGHTING_X_37",function(){doOptExtra();dispHG(!1)}),t.show(),setTimeout(function(){t.find(searchFocDef).not(":hidden").first().focus()},500),!0};n.update=function(){};n.leave=function(){t.hide()}}};PageArray[tbId.mpOptions][0]={controls:[mpOptions],refDRate:1e3,dataNeeded:[]};mpTime={id:"mpTime",html:"",refreshRate:1e3,isInit:!1,init:function(){var n=mpTime,t;n.isInit=!0;t=$("#Time");InitializeTm();n.enter=function(){return console.log("pop Time"),LastSelectedTab=tbId.Time,getAllPropertyData("TAG_OPERATING_MODE_20",emptyFun,doExtTm),ldDtTm(),t.show(),dispHG(!1),!0};n.update=function(){};n.leave=function(){t.hide()}}};PageArray[tbId.mpTime][0]={controls:[mpTime],refDRate:1e3,dataNeeded:[]};var ftr={init:function(){function t(n,t,i,r){function o(){var t=!1,i=!1,n=!1;if(u.length>0)switch(u[f][0]){case"arrow":t=!0;n=!0;a.show();h.show();break;case"button":i=!0;l.show();break;case"label":n=!0;h.show()}else console.error("You are broken.  Fix the states before trying to change them.");t?null:a.hide();i?null:l.hide();n?null:h.hide()}function s(){$(n+"t").html(u[f][1]);$(n+"bt").html(u[f][1])}function c(){u[f][3]?e.show():e.hide()}var e=$(n);this.elem=e;var l=e.find(n+"b"),h=e.find(n+"c"),a=e.find(n+"a"),u=[[t,i,r,!0]],f=0;this.hide=function(){e.hide();u[f][3]=!1};this.show=function(){u[f][3]=!0;o();e.show()};this.type=function(n){if(n!=undefined)u[f][0]!=n&&(u[f][0]=n,o());else return u[f][0]};this.text=function(n){if(n!=undefined&&n!=u[f][1])u[f][1]=n,s();else return u[f][1]};this.handler=function(n){if(n!=undefined&&n!=u[f][2])u[f][2]=n;else return u[f][2]};this.invoke=function(n){if(u[f][3]&&u[f][2]!=null){var t;return u[f][2].length>0?t=u[f][2](n):(t=u[f][2](),n!=undefined&&n instanceof Function&&n()),t!=undefined?t:!0}};this.push=function(n,t,i,r){if(t==undefined&&i==undefined&&r==undefined)if(n!=undefined)if(n===!1)r=n,n="",t="",i=null;else{var e=n;n=e.type;t=e.text;i=e.handlr;r=e.visible}else r=!1;r==undefined&&(r=u[f][3]);u.push([n,t,i,r]);++f;o();s();c();console.log("push: "+u.length)};this.pop=function(){u.length>1?(u.pop(),--f):console.error("What are you doing Lucy?");console.log("popd: "+u.length);o();s();c()};o();s();c();e.on("click",this.invoke)}var n=ftr;n.lf=new t("#lf","arrow","",keyLeftArrow);n.rt=new t("#rt","arrow","",keyRightArrow);n.mi=new t("#mi","button","Menu",showMenu);n.ovlf=$("#ovlf").bind("click",function(){n.lf.invoke()})}},selCNet=0,selANet=0,curNet=[],isAP=!1,mTblCurrent=$("#tblCurrent");bScan=!1;bScanLeftAP=!0;wfOnPage=!0;wfStatCnt=0;wfCurState="Connecting";cfIpAdd=$("#cfIpAdd");onAwesome=!1;wfGener=!1;enabled=!0;addWifiCb=undefined;isWifiInitd=!1;maxSignal=30;WifiMan={id:"WifiMan",html:"",isInit:!1,refreshRate:1e3,init:function(){function f(t){return t.originalEvent.wheelDeltaY<0?n.selChange(n.lastIndex+1):n.selChange(n.lastIndex-1),!1}var n=WifiMan,i,e,u,t,o,r;n.isInit=!0;i=$("#Networks");mTblCurrent=$("#tblCurrent");mTblCurrent.off("click").on("click",".sens",function(){var n=$(this);selCNet=n.data("num");WifiMan.selChange(selCNet);n.addClass("selected").siblings("tr").removeClass("selected");openNetDetails()});mTblCurrent.on("mousewheel",f);e=!1;u=$("#wifiMenu");n.menuItems=$("#wifiMItems");n.wifiListParent=mTblCurrent;n.wifiList=n.wifiListParent.children().first();t=undefined;typeof Networks=="undefined"||Networks.length===0?(initWifi(),setupNets()):setupNets();n.enter=function(){wfOnPage=!0;mainTitle.push("Tools");tabBar.html("WiFi");pageArrows.hide();onAwesome=!0;cfOnAwesome();kbCon.push(r,mTblCurrent);i.show()};n.update=function(){(CurrentStatus.indicators&IND_WIFI_ALL_BITS)==0&&closeWifi()};n.leave=function(){i!=undefined&&i.hide();wfOnPage=!1;kbCon.pop();pageArrows.show();mainTitle.pop()};u.on("click",".mnuItem:not(.greyed)",function(t){var i=$(t.currentTarget).data("func");i!==undefined&&i!==""&&n[i]();console.log(i)});n.setAP=function(){n.closeWifiMenu();setAsAP()};n.RefreshNetwork=function(){n.closeWifiMenu();refreshNetworks()};n.AddNetwork=function(){n.closeWifiMenu();netAddPop()};o=0;n.lastIndex=0;n.selChange=function(i){var u=n.wifiListParent.children().children(),e,h;if(u.length>0){i<0?i=u.length-1:i>=u.length&&(i=0);t!=undefined&&t.removeClass("selected");t=$(u[i]);t.addClass("selected").focus();var r=n.wifiListParent.parent().parent(),f=r.offset().top+r.innerHeight()/2,o=r.scrollTop(),s=t.offset().top;r.scrollTop(s-f+o+t.innerHeight()/2);e=f;h=e+r.innerHeight();n.lastIndex=i}};n.openMenu=function(){n.wifiMenuOpen=!0;u.show();$("#bgOvly").show();Object.keys(ftr).length>1&&(ftr.lf.push(!1),ftr.rt.push(!1),ftr.mi.push("button","Close",n.closeWifiMenu));kbCon.push(menuCon,n.menuItems);n.menuItems.find(".mnuItem").removeClass("hover");var t=n.menuItems.find(".mnuItem").filter(":not(.greyed):visible");t.length>0&&t.first().addClass("hover");$("#RefreshNet").focus()};n.closeWifiMenu=function(){n.wifiMenuOpen&&(n.wifiMenuOpen=!1,$("#wifiMenu").hide(),$("#bgOvly").hide(),popFooters(),kbCon.pop())};$("#wifiMnCl").on("click",n.closeWifiMenu);r={name:"wifiCon",keyUp:function(n){if(n!=KEY_SOFT_MID)return!0},keyDown:function(i){var u=!1,f;return t==undefined||t.length==0?n.selChange(0):i==KEY_ENTER?(selCNet=t.data("num"),openNetDetails(),u=!0,r.__rn=!0):(i==KEY_ARR_DOWN||i==KEY_ARR_UP)&&(f=parseInt(t.data("num"),10),i==KEY_ARR_UP?(f--,u=!0,console.log("up")):(f++,u=!0,console.log("down")),n.selChange(f),r.__rn=!0),u}}},footer:function(){return WifiMan.isInit||WifiMan.init(),{mi:{type:"button",text:"Close",handlr:closeWifi,visible:!0},rt:{type:"button",text:"Menu",handlr:WifiMan.openMenu,visible:!0}}}};typeof tbId!="undefined"&&tbId.Wifi&&(PageArray[tbId.Wifi][0]={controls:[WifiMan],refDRate:1e3,dataNeeded:["TAG_IO_NUM_FILES","TAG_IO_TOTAL_FLASH","TAG_IO_FREE_FLASH",{g:"overall",data:["TAG_IO_DURATION"]}]});wifiStrength=0,function(n){for(var t,i,u={},f=u.hasOwnProperty,o=u.toString,e="Boolean Number String Function Array Date RegExp Object Error".split(" "),r=0;r<e.length;r++)u["[object "+e[r]+"]"]=e[r].toLowerCase();(t=function(n){var f,r,e,i,o,s,h,u;if(n.expando!==undefined)return n;if(typeof n=="string"){if(f=n,n.indexOf("<")>=0){for(e=document.createDocumentFragment(),i=document.createElement("div"),e.appendChild(i),o=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,s=/<([\w:]+)/,n=n.replace(o,"<$1><\/$2>"),h=(s.exec(n)||["",""])[1].toLowerCase(),u=[0,"",""],depth=u[0],i.innerHTML=u[1]+n+u[2];depth--;)i=i.lastChild;n=i.childNodes;i.parentNode.removeChild(i);r=n[0]}else r=document.querySelector(f);if(r)n=r;else throw new Error("Invalid HTML Element Selector");}return this.init?(this.init(n),this):new t(n)},t.isWindow=function(n){return n!=null&&n==n.window},t.type=function(n){return n==null?n+"":typeof n=="object"||typeof n=="function"?u[o.call(n)]||"object":typeof n},t.isPlainObject=function(n){var i=this,t;if(!n||i.type(n)!=="object"||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!f.call(n,"constructor")&&!f.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}for(t in n);return t===undefined||f.call(n,t)},t.isArray=function(n){if(Array&&Array.isArray)return Array.isArray(n);return Object.prototype.toString.call(n)==="[object Array]"},t.extend=function(){var u=this,i,e,t,f,o,s,n=arguments[0]||{},r=1,c=arguments.length,h=!1;for(typeof n=="boolean"&&(h=n,n=arguments[r]||{},r++),typeof n!="object"&&u.type(n)!=="function"&&(n={}),r===c&&(n=this,r--);r<c;r++)if((o=arguments[r])!=null)for(f in o)(i=n[f],t=o[f],n!==t)&&(h&&t&&(u.isPlainObject(t)||(e=u.isArray(t)))?(e?(e=!1,s=i&&u.isArray(i)?i:[]):s=i&&u.isPlainObject(i)?i:{},n[f]=u.extend(h,s,t)):t!==undefined&&(n[f]=t));return n},t.prototype={constructor:t,init:function(n){this[0]=n;this.length=1;this.element=n;var i=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return this.uuid="jqx"+ +(new Date).getTime()+i()+"-"+i(),t.guid++,this}},t.extend({that:this,cache:{},event:{},expando:"jqx"+(new Date).getTime(),uuid:0,guid:0,ischildof:function(n){return n.contains(element)?!0:!1},sibling:function(n){for(var i=this,r=i.element,t=[];n;n=n.nextSibling)n.nodeType===1&&n!==r&&t.push(n);return t},children:function(){var n=this;return n.sibling(n.element.firstChild)},makeArray:function(n,t){var u=this,i,r=t||[],f=function(n,t){var u=t.length,r=n.length,i=0;if(typeof u=="number")for(;i<u;i++)n[r++]=t[i];else while(t[i]!==undefined)n[r++]=t[i++];return n.length=r,n};return n!=null&&(i=u.type(n),n.length==null||i==="string"||i==="function"||i==="regexp"||u.isWindow(n)?Array.prototype.push.call(r,n):f(r,n)),r},Event:function(n,t){var e=this,f,r=n.type||n,u=[];return r.indexOf(".")>=0&&(u=r.split("."),r=u.shift(),u.sort()),typeof n=="string"&&(n=document.createEvent("Event"),n.initEvent(r,!0,!0)),n.target=t,n=i.createEvent(n),n.type=r,n.isTrigger=!0,n.namespace=u.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+u.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,f=r.indexOf(":")<0?"on"+r:"",n.result=undefined,n.target||(n.target=elem),n.type=r,n},trigger:function(n,t){var r=this;i.trigger(n,t,r.element)},addHandler:function(n,r,u){var f=this;r.guid=r.guid||(r.guid=t.guid++);i.add(f.element,n,r,u)},removeHandler:function(n,t){var r=this;i.remove(r.element,n,t)},on:function(n,i,r){r&&t.isFunction(r)?this.addHandler(n,r,i):this.addHandler(n,i,r)},off:function(n,t){this.removeHandler(n,t)},isRendered:function(){var n=this;return n.element.parentNode==null||n.element.offsetWidth===0||n.element.offsetHeight===0?!1:!0},getSizeFromStyle:function(){var t=null,i=null,r=this,u;return r.element.style.width&&(t=r.element.style.width),r.element.style.height&&(i=r.element.style.height),u=n.getComputedStyle?getComputedStyle(r.element,null):r.element.currentStyle,u&&(u.width&&(t=u.width),u.height&&(i=u.height)),t==="0px"&&(t=0),i==="0px"&&(i=0),t===null&&(t=0),i===null&&(i=0),{width:t,height:i}},sizeStyleChanged:function(n){var t=this,i,r=function(n){var r=i;n&&n[0]&&n[0].attributeName==="style"&&n[0].type==="attributes"&&(r.element.offsetWidth!==r.offsetWidth||r.element.offsetHeight!==r.offsetHeight)&&(r.offsetWidth=r.element.offsetWidth,r.offsetHeight=r.element.offsetHeight,t.isRendered()&&r.callback())};i={element:t.element,offsetWidth:t.element.offsetWidth,offsetHeight:t.element.offsetHeight,callback:n};t.elementStyleObserver||(t.elementStyleObserver=new MutationObserver(r),t.elementStyleObserver.observe(t.element,{attributes:!0,childList:!1,characterData:!1}))},cleanData:function(){var n=this,t=n.element[n.expando];t!==undefined&&delete n.cache[t]},append:function(n){(n.nodeType===1||n.nodeType===11||n.nodeType===3)&&this.element.appendChild(n)},prepend:function(n){(n.nodeType===1||n.nodeType===11)&&this.element.insertBefore(elem,this.element.firstChild)},appendTo:function(n){var t=this.detach();$(n).append(t[0])},prependTo:function(n){var t=this.detach();$(n).prepend(t[0])},detach:function(){var n=this;return n.remove(!0)},remove:function(n){var i=this,r,u,f,e,o;if(n!==!0){if(i.data()&&(r=i.data().jqxWidget,r&&r.destroy&&!r._destroying)){r._destroying=!0;r.destroy();r._destroying=!1;return}if(i.cleanData(),i.element.querySelectorAll&&(u=i.element.querySelectorAll("*"),u))for(f=0;f<u.length;f++)e=t(u[f]),o=e.element[e.expando],o!==undefined&&e.remove()}return i.elementStyleObserver&&(i.elementStyleObserver.disconnect(),i.elementStyleObserver=null),i.element.parentNode&&i.element.parentNode.removeChild(i.element),this},sizeChanged:function(n){var t=this,i,r=function(){var n=i;(n.element.offsetWidth!==n.offsetWidth||n.element.offsetHeight!==n.offsetHeight)&&(n.offsetWidth=n.element.offsetWidth,n.offsetHeight=n.element.offsetHeight,t.isRendered()&&(n.callback(),t.observer.disconnect(),t.elementObserver.disconnect()))};i={element:t.element,offsetWidth:t.element.offsetWidth,offsetHeight:t.element.offsetHeight,callback:n};t.observer||(t.observer=new MutationObserver(r),t.observer.observe(document.body,{attributes:!0,childList:!0,characterData:!0}),t.elementObserver=new MutationObserver(r),t.elementObserver.observe(t.element,{attributes:!0,childList:!0,characterData:!0}))},data:function(n,i,r){var f=this,e=n,o,u;if(n||(e=this.element),r===undefined){if(u=e[f.expando],o=u&&f.cache[u],i===undefined)return o;if(o&&i in o)return o[i]}else if(i!==undefined)return u=e[f.expando],u||(e[f.expando]=++t.guid,u=e[f.expando]),f.cache[u]=f.cache[u]||{},f.cache[u][i]=r,r},removeData:function(n,t){var i=this,u=n,r,f;u||(u=i.element);r=u[i.expando];f=r&&i.cache[r];f&&(t?$.each(t,function(n,t){delete f[t]}):delete i.cache[r].data)},trim:function(n){var t=new RegExp("[\\x20\\t\\r\\n\\f]+","g");return rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,n==null?"":(n+"").replace(rtrim,"")},getClass:function(){var n=this;return n.element.getAttribute("class")||""},hasClass:function(n){var t=this,i=" "+n+" ";return t.element.nodeType===1&&(" "+t.element.className+" ").replace(/[\t\r\n]/g," ").indexOf(i)>=0?!0:!1},addClass:function(n){var i=this,o,t,u,f,s,e,r;if(typeof n=="string"&&n&&(o=n.match(/\S+/g)||[],r=i.element,u=i.getClass(),t=r.nodeType===1&&(" "+u+" ").replace(/[\t\r\n]/g," "),t)){for(s=0;f=o[s++];)t.indexOf(" "+f+" ")<0&&(t+=f+" ");e=i.trim(t);u!==e&&r.setAttribute("class",e)}},removeClass:function(n){var i=this,o,t,u,f,s,e,r;if(0==arguments.length)return i.element.setAttribute("class","");if(typeof n=="string"&&n&&(o=n.match(/\S+/g)||[],r=i.element,u=i.getClass(),t=r.nodeType===1&&(" "+u+" ").replace(/[\t\r\n]/g," "),t)){for(s=0;f=o[s++];)while(t.indexOf(" "+f+" ")>-1)t=t.replace(" "+f+" "," ");e=i.trim(t);u!==e&&r.setAttribute("class",e)}},html:function(n){var t=this,u,f;try{var i=t.element||{},o=t.element.length;if(n===undefined)return i.nodeType===1?i.innerHTML.replace(rinlinejQuery,""):undefined;var e=new RegExp("<(?:abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)[\\s/>]","i"),r=document.createElement("div"),s=document.createDocumentFragment(),h=document.createElement("input");r.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";u=r.firstChild.nodeType===3;f=!!r.getElementsByTagName("link").length;typeof n!="string"||/<(?:script|style|link)/i.test(n)||!f&&e.test(n)||!u&&/^\s+/.test(n)||{option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],area:[1,"<map>","<\/map>"],_default:[0,"",""]}[(/<([\w:]+)/.exec(n)||["",""])[1].toLowerCase()]?(t.element.innerHTML="",t.element.appendChild(n)):(n=n.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1><\/$2>"),i.innerHTML=n)}catch(c){}},isBoolean:function(n){return typeof n=="boolean"},isFunction:function(n){return!!(n&&n.constructor&&n.call&&n.apply)},isObject:function(n){return n&&(typeof n=="object"||that.isFunction(n))||!1},isDate:function(n){return n instanceof Date},isString:function(n){return typeof n=="string"},isNumber:function(n){return typeof n=="number"&&isFinite(n)},isNull:function(n){return n===null},isUndefined:function(n){return typeof n=="undefined"},isEmpty:function(n){return!this.isString(n)&&this.isValue(n)?!1:this.isValue(n)?(n=that.trim(n).replace(/\&nbsp\;/ig,"").replace(/\&#160\;/ig,""),n===""):!0},text:function(){var n=this,u,r="",f=0,t=n.element.nodeType,i=n.element;if(t){if(t===1||t===9||t===11){if(typeof n.element.textContent=="string")return n.element.textContent;for(i=i.firstChild;i;i=i.nextSibling)r+=getText(i)}else if(t===3||t===4)return n.element.nodeValue}else while(u=n.element[f++])r+=getText(u);return r},val:function(n){var t,i=that.element;if(!arguments.length)return i?(t=i.value,typeof t=="string"?t.replace(/\r/g,""):t==null?"":t):void 0;i.nodeType===1&&(n===null&&(n=""),typeof n=="number"&&(n+=""),i.value=n)},boxModel:function(n,t,i){for(var f=["Top","Right","Bottom","Left"],e=this,r=t===(i?"border":"content")?4:n==="width"?1:0,u=0;r<4;r+=2)t==="margin"&&(u+=e.css(t+f[r],!0)),i?(t==="content"&&(u-=parseFloat(e.css("padding"+f[r]))||0),t!=="margin"&&(u-=parseFloat(e.css("border"+f[r]+"Width"))||0)):(u+=parseFloat(e.css("padding"+f[r]))||0,t!=="padding"&&(u+=parseFloat(e.css(this.element,"border"+f[r]+"Width"))||0));return u},width:function(n){var t=this,i,r,u;return t.element!=null&&t.element==t.element.window?t.element.document.documentElement.clientWidth:t.element.nodeType===9?(i=t.element.documentElement,Math.max(t.element.body.scrollWidth,i.scrollWidth,t.element.body.offsetWidth,i.offsetWidth,i.clientWidth)):(r=this.element.style.boxSizing=="border-box",n&&(isNaN(n)||(n=n+"px"),t.element.style.width=n),u=t.element.offsetWidth,u+t.boxModel("width","content"||(r?"border":"content"),!0))},innerWidth:function(){var n=this,t=parseFloat(n.css("paddingLeft")),i=parseFloat(n.css("paddingRight")),r=parseFloat(n.css("borderLeftWidth")),u=parseFloat(n.css("borderRightWidth"));return isNaN(t)&&(t=0),isNaN(i)&&(i=0),isNaN(r)&&(r=0),isNaN(u)&&(u=0),n.width()+t+i+r+u},innerHeight:function(){var n=this,t=parseFloat(n.css("paddingTop")),i=parseFloat(n.css("paddingBottom")),r=parseFloat(n.css("borderTopWidth")),u=parseFloat(n.css("borderBottomWidth"));return isNaN(t)&&(t=0),isNaN(i)&&(i=0),isNaN(r)&&(r=0),isNaN(u)&&(u=0),n.height()+t+i+r+u},outerWidth:function(){var n=this,t=parseFloat(n.element.style.marginLeft),i=parseFloat(n.element.style.marginRight);return isNaN(t)&&(t=0),isNaN(i)&&(i=0),n.element.offsetWidth+t+i},height:function(n){var t=this,i,r,u;return t.element!=null&&t.element==t.element.window?t.element.document.documentElement.clientHeight:t.element.nodeType===9?(i=t.element.documentElement,Math.max(t.element.body.scrollHeight,i.scrollHeight,t.element.body.offsetHeight,i.offsetHeight,i.clientHeight)):(r=this.element.style.boxSizing=="border-box",n&&(isNaN(n)||(n=n+"px"),t.element.style.height=n),u=t.element.offsetHeight,u+t.boxModel("height","content"||(r?"border":"content"),!0))},outerHeight:function(){var n=this,t=parseFloat(n.element.style.marginTop),i=parseFloat(n.element.style.marginBottom);return isNaN(t)&&(t=0),isNaN(i)&&(i=0),n.element.offsetHeight+t+i},css:function(t){var r=this,i,f=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,u=new RegExp("^("+f+")(?!px)[a-z%]+$","i"),e=/^margin/;return n.getComputedStyle?i=function(t,i){var o,h,c,l,s=n.getComputedStyle(t,null),f=t.style;return s&&(o=s.getPropertyValue(i)||s[i],o!==""||r.contains(t.ownerDocument,t)||(o=f[i]),u.test(o)&&e.test(i)&&(h=f.width,c=f.minWidth,l=f.maxWidth,f.minWidth=f.maxWidth=f.width=o,o=s.width,f.width=h,f.minWidth=c,f.maxWidth=l)),o}:document.documentElement.currentStyle&&(i=function(n,t){var e,f,i=n.currentStyle&&n.currentStyle[t],r=n.style;return i==null&&r&&r[t]&&(i=r[t]),u.test(i)&&!rposition.test(t)&&(e=r.left,f=n.runtimeStyle&&n.runtimeStyle.left,f&&(n.runtimeStyle.left=n.currentStyle.left),r.left=t==="fontSize"?"1em":i,i=r.pixelLeft+"px",r.left=e,f&&(n.runtimeStyle.left=f)),i===""?"auto":i}),i(r.element,t)},offset:function(n){var i=this,t=i.element,e,u,v,f,s,b,k;if(n){e=i.css("position");e==="static"&&(t.style.position="relative");var y=t,h=i.offset(),p=t.style.top,w=t.style.left,nt=(e==="absolute"||e==="fixed")&&(p==="auto"||w==="auto"),o={},c={},l,a;nt?(c=i.position(),l=c.top,a=c.left):(l=parseFloat(p)||0,a=parseFloat(w)||0);i.isFunction(n)&&(n=n.call(t,r,h));n.top!=null&&(o.top=n.top-h.top+l);n.left!=null&&(o.left=n.left-h.left+a);y.style.left=o.left+"px";y.style.top=o.top+"px";return}if(f={top:0,left:0},s=t&&t.ownerDocument,s){if(u=s.documentElement,!i.contains(u,t))return f;typeof t.getBoundingClientRect!="undefined"&&(f=t.getBoundingClientRect());b=function(n){return n!=null&&n==n.window};k=function(n){return b(n)?n:n.nodeType===9?n.defaultView||n.parentWindow:!1};v=k(s);var d=0,g=navigator.userAgent.toLowerCase(),tt=g.indexOf("ipad")!=-1||g.indexOf("iphone")!=-1;return tt&&(d=2),{top:0+f.top+(v.pageYOffset||u.scrollTop)-(u.clientTop||0),left:d+f.left+(v.pageXOffset||u.scrollLeft)-(u.clientLeft||0)}}},position:function(){var r=this,u=/^(?:body|html)$/i,i=r.element,n=t(function(){for(var n=i.offsetParent||document.body;n&&!u.test(n.nodeName)&&t(n).css("position")==="static";)n=n.offsetParent;return n||document.body}());return offset=r.offset(),parentOffset=u.test(n.nodeName)?{top:0,left:0}:n.offset(),offset.top-=parseFloat(t(i).css("marginTop"))||0,offset.left-=parseFloat(t(i).css("marginLeft"))||0,parentOffset.top+=parseFloat(n.css("borderTopWidth"))||0,parentOffset.left+=parseFloat(n.css("borderLeftWidth"))||0,{top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}},contains:function(n,t){var r=n.nodeType===9?n.documentElement:n,i=t&&t.parentNode;return n===i||!!(i&&i.nodeType===1&&r.contains&&r.contains(i))},camelCase:function(n){var t=function(n,t){return t.toUpperCase()};return n.replace(/-([\da-z])/gi,t)},attr:function(n,t){var i=this.element,r=i.nodeType;if(r===3||r===8||r===2||typeof i.getAttribute=="undefined")return undefined;if(t!==undefined){if(t===null){removeAttr(i,n);return}return i.setAttribute(n,t+""),t}return i.getAttribute(n)},removeAttr:function(n){var u=this,i=u.element,t,r,e=0,f=n&&n.match(/\S+/g);if(f&&i.nodeType===1)while(t=f[e++]){r=t;r=="class"&&(r="className");var o=new RegExp("^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$","i");o.test(t)?/^(?:checked|selected)$/i.test(t)?i[u.camelCase("default-"+t)]=i[r]=!1:i[r]=!1:u.attr(t,"");i.removeAttribute(t)}},showHide:function(n){var i=this,r,t,f,u=undefined,o=i.length,e;(t=i.element,t.style)&&(e=function(n,t){return n=t||n,i.css(n,"display")==="none"||!i.contains(n.ownerDocument,n)},u=i.data("olddisplay"),r=t.style.display,n?(u||r!=="none"||(t.style.display=""),t.style.display===""&&e(t)&&(u=i.data("olddisplay",t.style.display))):(f=t.style.display=="none",(r&&r!=="none"||!f)&&i.data("olddisplay",f?r:t.style.display)),n&&t.style.display!=="none"&&t.style.display!==""||(t.style.display=n?u||"":"none"))},show:function(){var n=this;n.showHide(!0)},hide:function(){var n=this;n.showHide(!1)},isEmptyObject:function(n){for(var t in n)return!1;return!0},toArray:function(){return Array.prototype.slice.call(this)},isArraylike:function(n){var i=this,t=n.length,r=i.type(n);return r==="function"||i.isWindow(n)?!1:n.nodeType===1&&t?!0:r==="array"||t===0||typeof t=="number"&&t>0&&t-1 in n},each:function(n,t,i){var o=this;this.isFunction(n)&&(i=t,t=n,n=this);var u,r=0,f=n.length,e=o.isArraylike(n);if(i){if(e){for(;r<f;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;r<f;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},queue:function(n,t,i){function f(n,t){var i=t||[];return n!=null&&(u.isArraylike(Object(n))?function(n,t){for(var r=+t.length,i=0,u=n.length;i<r;)n[u++]=t[i++];if(r!==r)while(t[i]!==undefined)n[u++]=t[i++];return n.length=u,n}(i,typeof n=="string"?[n]:n):[].push.call(i,n)),i}var u=this,r;if(n)return(t=(t||"fx")+"queue",r=u.data(n,t),!i)?r||[]:(!r||u.isArray(i)?r=u.data(n,t,f(i)):r.push(i),r)},dequeue:function(n,t){var i=this;i.each(n.nodeType?[n]:n,function(n,r){t=t||"fx";var f=i.queue(r,t),u=f.shift();u==="inprogress"&&(u=f.shift());u&&(t==="fx"&&f.unshift("inprogress"),u.call(r,function(){i.dequeue(r,t)}))})},initAnimate:function(){function e(n){var t=u.data(n,"jqxAnimations");return t===null?undefined:t}function tt(n){return function(t){return Math.round(t*n)*(1/n)}}function w(t,i,r,u){function a(n,t){return 1-3*t+3*n}function v(n,t){return 3*t-6*n}function y(n){return 3*n}function h(n,t,i){return((a(t,i)*n+v(t,i))*n+y(t))*n}function p(n,t,i){return 3*a(t,i)*n*n+2*v(t,i)*n+y(t)}function tt(n,i){for(var f,e,u=0;u<b;++u){if(f=p(i,t,r),f===0)return i;e=h(i,t,r)-n;i-=e/f}return i}function it(){for(var n=0;n<o;++n)e[n]=h(n*s,t,r)}function rt(n,i,u){var e,f,o=0;do f=i+(u-i)/2,e=h(f,t,r)-n,e>0?u=f:i=f;while(Math.abs(e)>d&&++o<g);return f}function ut(n){for(var u=0,i=1,c=o-1;i!=c&&e[i]<=n;++i)u+=s;--i;var l=(n-e[i])/(e[i+1]-e[i]),f=u+l*s,h=p(f,t,r);return h>=k?tt(n,f):h==0?f:rt(n,u,u+s)}function ft(){l=!0;(t!=i||r!=u)&&it()}var b=4,k=.001,d=1e-7,g=10,o=11,s=1/(o-1),nt="Float32Array"in n,f,e,l,c,w;if(arguments.length!==4)return!1;for(f=0;f<4;++f)if(typeof arguments[f]!="number"||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;return t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0),e=nt?new Float32Array(o):new Array(o),l=!1,c=function(n){return(l||ft(),t===i&&r===u)?n:n===0?0:n===1?1:h(ut(n),i,u)},c.getControlPoints=function(){return[{x:t,y:i},{x:r,y:u}]},w="generateBezier("+[t,i,r,u]+")",c.toString=function(){return w},c}function b(n,t){var r=n;return f.isString(n)?i.Easings[n]||(r=!1):r=f.isArray(n)&&n.length===1?tt.apply(null,n):f.isArray(n)&&n.length===2?it.apply(null,n.concat([t])):f.isArray(n)&&n.length===4?w.apply(null,n):!1,r===!1&&(r=i.Easings[i.defaults.easing]?i.defaults.easing:p),r}function k(n){return f.isWrapped(n)?n=[].slice.call(n):f.isNode(n)&&(n=[n]),n}function a(n){var b,tt,s,p,k,ut,g,l,st,ft,w,o,v,et,nt,ht;if(n)for(b=(new Date).getTime(),tt=i.State.calls.length,s=0;s<tt;s++)if(i.State.calls[s]){var y=i.State.calls[s],it=y[0],t=y[2],h=y[3],ot=!!h,rt=null;for(h||(h=i.State.calls[s][3]=b-16),p=Math.min((b-h)/t.duration,1),k=0,ut=it.length;k<ut;k++)if(g=it[k],l=g.element,e(l)){st=!1;t.display!==undefined&&t.display!==null&&t.display!=="none"&&(t.display==="flex"&&(ft=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"],u.each(ft,function(n,t){r.setPropertyValue(l,"display",t)})),r.setPropertyValue(l,"display",t.display));t.visibility!==undefined&&t.visibility!=="hidden"&&r.setPropertyValue(l,"visibility",t.visibility);for(w in g)if(w!=="element"){if(o=g[w],et=f.isString(o.easing)?i.Easings[o.easing]:o.easing,p===1)v=o.endValue;else if(nt=o.endValue-o.startValue,v=o.startValue+nt*et(p,t,nt),!ot&&v===o.currentValue)continue;o.currentValue=v;w==="tween"?rt=v:ht=r.setPropertyValue(l,w,o.currentValue+(parseFloat(v)===0?"":o.unitType),o.rootPropertyValue,o.scrollData)}}t.display!==undefined&&t.display!=="none"&&(i.State.calls[s][2].display=!1);t.visibility!==undefined&&t.visibility!=="hidden"&&(i.State.calls[s][2].visibility=!1);t.progress&&t.progress.call(y[1],y[1],p,Math.max(0,h+t.duration-b),h,rt);p===1&&d(s)}i.State.isTicking&&c(a)}function d(n,f){var h,a,s,c,w;if(!i.State.calls[n])return!1;var v=i.State.calls[n][0],l=i.State.calls[n][1],o=i.State.calls[n][2],y=i.State.calls[n][4],p=!1;for(h=0,a=v.length;h<a;h++){if(s=v[h].element,f||o.loop||(o.display==="none"&&r.setPropertyValue(s,"display",o.display),o.visibility==="hidden"&&r.setPropertyValue(s,"visibility",o.visibility)),o.loop===!0||u.queue(s)[1]!==undefined&&/\.jqxAnimationsQueueEntryFlag/i.test(u.queue(s)[1])||e(s)&&(e(s).isAnimating=!1,e(s).rootPropertyValueCache={},t(s).removeClass("jqxAnimations-animating")),!f&&o.complete&&h===a-1)try{o.complete.call(l,l)}catch(b){setTimeout(function(){throw b;},1)}y&&o.loop!==!0&&y(l);o.queue!==!1&&u.dequeue(s,o.queue)}for(i.State.calls[n]=!1,c=0,w=i.State.calls.length;c<w;c++)if(i.State.calls[c]!==!1){p=!0;break}p===!1&&(i.State.isTicking=!1,delete i.State.calls,i.State.calls=[])}var u=this,o=u.element,v=function(){var t=0;return n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||function(n){var r=(new Date).getTime(),i;return i=Math.max(0,16-(r-t)),t=r+i,setTimeout(function(){n(r+i)},i)}}(),y=400,p="easeInOutSine",i={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:n.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:document.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:$,Redirects:{},Easings:{},Promise:n.Promise,defaults:{queue:"",duration:y,easing:p,begin:undefined,complete:undefined,progress:undefined,display:undefined,visibility:undefined,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(n){u.data(n,"jqxAnimations",{isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1},it=function(){function t(n){return-n.tension*n.x-n.friction*n.v}function n(n,i,r){var u={x:n.x+r.dx*i,v:n.v+r.dv*i,tension:n.tension,friction:n.friction};return{dx:u.v,dv:t(u)}}function i(i,r){var u={dx:i.v,dv:t(i)},f=n(i,r*.5,u),e=n(i,r*.5,f),o=n(i,r,e),s=1/6*(u.dx+2*(f.dx+e.dx)+o.dx),h=1/6*(u.dv+2*(f.dv+e.dv)+o.dv);return i.x=i.x+s*r,i.v=i.v+h*r,i}return function r(n,t,u){var o={x:-1,v:0,tension:null,friction:null},s=[0],e=0,l=1/1e4,a=16/1e3,h,c,f;for(n=parseFloat(n)||500,t=parseFloat(t)||20,u=u||null,o.tension=n,o.friction=t,h=u!==null,h?(e=r(n,t),c=e/u*a):c=a;;)if(f=i(f||o,c),s.push(1+f.x),e+=16,!(Math.abs(f.x)>l&&Math.abs(f.v)>l))break;return h?function(n){return s[n*(s.length-1)|0]}:e}}(),r,f,l,c,g,s,h,nt;for(i.Easings={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},spring:function(n){return 1-Math.cos(n*4.5*Math.PI)*Math.exp(-n*6)}},u.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(n,t){i.Easings[t[0]]=w.apply(null,t[1])}),r=i.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/ig},Hooks:{getRoot:function(n){return n},cleanRootPropertyValue:function(n,t){return r.RegEx.valueUnwrap.test(t)&&(t=t.match(r.RegEx.valueUnwrap)[1]),r.Values.isCSSNullValue(t)&&(t=r.Hooks.templates[n][1]),t},extractValue:function(n,t){var i=r.Hooks.registered[n],u,f;return i?(u=i[0],f=i[1],t=r.Hooks.cleanRootPropertyValue(u,t),t.toString().match(r.RegEx.valueSplit)[f]):t},injectValue:function(n,t,i){var u=r.Hooks.registered[n],e,o,f;return u?(e=u[0],o=u[1],i=r.Hooks.cleanRootPropertyValue(e,i),f=i.toString().match(r.RegEx.valueSplit),f[o]=t,f.join(" ")):i}},Normalizations:{registered:{clip:function(n,t,i){switch(n){case"name":return"clip";case"extract":var u;return r.RegEx.wrappedValueAlreadyExtracted.test(i)?u=i:(u=i.toString().match(r.RegEx.valueUnwrap),u=u?u[1].replace(/,(\s+)?/g," "):i),u;case"inject":return"rect("+i+")"}},blur:function(n,t,r){var u,f;switch(n){case"name":return i.State.isFirefox?"filter":"-webkit-filter";case"extract":return u=parseFloat(r),u||u===0||(f=r.toString().match(/blur\(([0-9]+[A-z]+)\)/i),u=f?f[1]:0),u;case"inject":return parseFloat(r)?"blur("+r+")":"none"}},opacity:function(n,t,i){switch(n){case"name":return"opacity";case"extract":return i;case"inject":return i}}},register:function(){}},Names:{prefixCheck:function(n){for(var r,u=["","Webkit","Moz","ms","O"],t=0,e=u.length;t<e;t++)if(r=t===0?n:u[t]+n.replace(/^\w/,function(n){return n.toUpperCase()}),f.isString(i.State.prefixElement.style[r]))return i.State.prefixMatches[n]=r,[r,!0];return[n,!1]}},Values:{isCSSNullValue:function(n){return n==0||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(n)},getUnitType:function(n){return/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(n)?"":"px"},getDisplayType:function(n){var t=n&&n.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"}},getPropertyValue:function(t,i,u,f){function s(t,i){function o(){c&&r.setPropertyValue(t,"display","none")}var u=0,c=!1,l,a,v,h;if(/^(width|height)$/.test(i)&&r.getPropertyValue(t,"display")===0&&(c=!0,r.setPropertyValue(t,"display",r.Values.getDisplayType(t))),!f){if(i==="height"&&r.getPropertyValue(t,"boxSizing").toString().toLowerCase()!=="border-box")return l=t.offsetHeight-(parseFloat(r.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(r.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(r.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(r.getPropertyValue(t,"paddingBottom"))||0),o(),l;if(i==="width"&&r.getPropertyValue(t,"boxSizing").toString().toLowerCase()!=="border-box")return a=t.offsetWidth-(parseFloat(r.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(r.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(r.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(r.getPropertyValue(t,"paddingRight"))||0),o(),a}return v=e(t)===undefined?n.getComputedStyle(t,null):e(t).computedStyle?e(t).computedStyle:e(t).computedStyle=n.getComputedStyle(t,null),u=v[i],(u===""||u===null)&&(u=t.style[i]),o(),u==="auto"&&/^(top|right|bottom|left)$/i.test(i)&&(h=s(t,"position"),(h==="fixed"||h==="absolute"&&/top|left/i.test(i))&&(u=$(t).position()[i]+"px")),u}var o,h,c;return r.Normalizations.registered[i]&&(h=r.Normalizations.registered[i]("name",t),c=s(t,r.Names.prefixCheck(h)[0]),o=r.Normalizations.registered[i]("extract",t,c)),/^[\d-]/.test(o)||(o=s(t,r.Names.prefixCheck(i)[0])),r.Values.isCSSNullValue(o)&&(o=0),o},setPropertyValue:function(n,t,i){var u=t;return r.Normalizations.registered[t]&&(i=r.Normalizations.registered[t]("inject",n,i),t=r.Normalizations.registered[t]("name",n)),u=r.Names.prefixCheck(t)[0],n.style[u]=i,[u,i]}},r.Normalizations.register(),i.hook=function(n,t,r){var f=undefined;return n=k(n),u.each(n,function(n,u){if(e(u)===undefined&&i.init(u),r===undefined)f===undefined&&(f=i.CSS.getPropertyValue(u,t));else{var o=i.CSS.setPropertyValue(u,t,r);f=o}}),f},f={isString:function(n){return typeof n=="string"},isArray:Array.isArray||function(n){return Object.prototype.toString.call(n)==="[object Array]"},isFunction:function(n){return Object.prototype.toString.call(n)==="[object Function]"},isNode:function(n){return n&&n.nodeType},isNodeList:function(n){return typeof n=="object"&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(n))&&n.length!==undefined&&(n.length===0||typeof n[0]=="object"&&n[0].nodeType>0)},isWrapped:function(){return!1},isSVG:function(t){return n.SVGElement&&t instanceof n.SVGElement},isEmptyObject:function(n){for(var t in n)return!1;return!0}},l=function(){function p(){return null}function ht(){function p(){var d,u,w,it,k,ut,ft,g;if(s.begin&&v===0)try{s.begin.call(h,h)}catch(et){setTimeout(function(){throw et;},1)}if(rt==="start"){e(c).tweensContainer&&e(c).isAnimating===!0&&(d=e(c).tweensContainer);function h(n,t){var i=undefined,e=undefined,u=undefined;return f.isArray(n)?(i=n[0],!f.isArray(n[1])&&/^[\d-]/.test(n[1])||f.isFunction(n[1])||r.RegEx.isHex.test(n[1])?u=n[1]:(f.isString(n[1])&&!r.RegEx.isHex.test(n[1])||f.isArray(n[1]))&&(e=t?n[1]:b(n[1],s.duration),n[2]!==undefined&&(u=n[2]))):i=n,t||(e=e||s.easing),f.isFunction(i)&&(i=i.call(c,v,l)),f.isFunction(u)&&(u=u.call(c,v,l)),[i||0,e,u]}for(u in o){var tt=h(o[u]),p=tt[0],ot=tt[1],n=tt[2];if(u=t.camelCase(u),w=r.Hooks.getRoot(u),it=!1,!e(c).isSVG&&w!=="tween"&&r.Names.prefixCheck(w)[1]===!1&&r.Normalizations.registered[w]===undefined){i.debug&&console.log("Skipping ["+w+"] due to a lack of browser support.");continue}(s.display!==undefined&&s.display!==null&&s.display!=="none"||s.visibility!==undefined&&s.visibility!=="hidden")&&/opacity|filter/.test(u)&&!n&&p!==0&&(n=0);s._cacheValues&&d&&d[u]?(n===undefined&&(n=d[u].endValue+d[u].unitType),it=e(c).rootPropertyValueCache[w]):n===undefined&&(n=r.getPropertyValue(c,u));g=!1;function f(n,t){var i,u;return u=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(n){return i=n,""}),i||(i=r.Values.getUnitType(n)),[u,i]}k=f(u,n);n=k[0];ft=k[1];k=f(u,p);p=k[0].replace(/^([+-\/*])=/,function(n,t){return g=t,""});ut=k[1];n=parseFloat(n)||0;p=parseFloat(p)||0;/[\/*]/.test(g)&&(ut=ft);switch(g){case"+":p=n+p;break;case"-":p=n-p;break;case"*":p=n*p;break;case"/":p=n/p}y[u]={rootPropertyValue:it,startValue:n,currentValue:n,endValue:p,unitType:ut,easing:ot};i.debug&&console.log("tweensContainer ("+u+"): "+JSON.stringify(y[u]),c)}y.element=c}y.element&&(t(c).addClass("jqxAnimations-animating"),nt.push(y),s.queue===""&&(e(c).tweensContainer=y,e(c).opts=s),e(c).isAnimating=!0,v===l-1?(i.State.calls.push([nt,h,s,null]),i.State.isTicking===!1&&(i.State.isTicking=!0,a())):v++)}var c=this,s=u.extend({},i.defaults,n),y={};e(c)===undefined&&i.init(c);s.duration=parseFloat(s.duration)||1;s.easing=b(s.easing,s.duration);s.begin&&!f.isFunction(s.begin)&&(s.begin=null);s.progress&&!f.isFunction(s.progress)&&(s.progress=null);s.complete&&!f.isFunction(s.complete)&&(s.complete=null);s.display!==undefined&&s.display!==null&&(s.display=s.display.toString().toLowerCase(),s.display==="auto"&&(s.display=i.CSS.Values.getDisplayType(c)));s.visibility!==undefined&&s.visibility!==null&&(s.visibility=s.visibility.toString().toLowerCase());s.mobileHA=s.mobileHA&&i.State.isMobile&&!i.State.isGingerbread;u.queue(c,s.queue,function(n,t){if(t===!0)return!0;i.jqxAnimationsQueueEntryFlag=!0;p(n)});(s.queue===""||s.queue==="fx")&&u.queue(c)[0]!=="inprogress"&&u.dequeue(c)}var tt=arguments[0]&&(arguments[0].p||u.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||f.isString(arguments[0].properties)),et,w,h,o,n,l,v,it,c,rt,g,ft,st,nt,s;if(et=!0,w=1,h=tt?arguments[0].elements||arguments[0].e:arguments[0],h=k(h),h){if(tt?(o=arguments[0].properties||arguments[0].p,n=arguments[0].options||arguments[0].o):(o=arguments[w],n=arguments[w+1]),l=h.length,v=0,!/^(stop|finish|finishAll)$/i.test(o)&&!u.isPlainObject(n))for(it=w+1,n={},c=it;c<arguments.length;c++)!f.isArray(arguments[c])&&(/^(fast|normal|slow)$/i.test(arguments[c])||/^\d/.test(arguments[c]))?n.duration=arguments[c]:f.isString(arguments[c])||f.isArray(arguments[c])?n.easing=arguments[c]:f.isFunction(arguments[c])&&(n.complete=arguments[c]);switch(o){case"finish":case"finishAll":case"stop":return u.each(h,function(t,i){e(i)&&e(i).delayTimer&&(clearTimeout(e(i).delayTimer.setTimeout),e(i).delayTimer.next&&e(i).delayTimer.next(),delete e(i).delayTimer);o==="finishAll"&&(n===!0||f.isString(n))&&(u.each(u.queue(i,f.isString(n)?n:""),function(n,t){f.isFunction(t)&&t()}),u.queue(i,f.isString(n)?n:"",[]))}),g=[],u.each(i.State.calls,function(t,i){i&&u.each(i[1],function(r,s){var c=n===undefined?"":n;if(c!==!0&&i[2].queue!==c&&!(n===undefined&&i[2].queue===!1))return!0;u.each(h,function(r,h){h===s&&((n===!0||f.isString(n))&&(u.each(u.queue(h,f.isString(n)?n:""),function(n,t){f.isFunction(t)&&t(null,!0)}),u.queue(h,f.isString(n)?n:"",[])),o==="stop"?(e(h)&&e(h).tweensContainer&&c!==!1&&u.each(e(h).tweensContainer,function(n,t){t.endValue=t.currentValue}),g.push(t)):(o==="finish"||o==="finishAll")&&(i[2].duration=1))})})}),o==="stop"&&u.each(g,function(n,t){d(t,!0)}),p();default:if(u.isPlainObject(o)&&!f.isEmptyObject(o))rt="start";else{if(f.isString(o)&&i.Redirects[o]){var s=u.extend({},n),ot=s.duration,ut=s.delay||0;return s.backwards===!0&&(h=u.extend(!0,[],h).reverse()),u.each(h,function(n,t){parseFloat(s.stagger)?s.delay=ut+parseFloat(s.stagger)*n:f.isFunction(s.stagger)&&(s.delay=ut+s.stagger.call(t,n,l));s.drag&&(s.duration=parseFloat(ot)||(/^(callout|transition)/.test(o)?1e3:y),s.duration=Math.max(s.duration*(s.backwards?1-n/l:(n+1)/l),s.duration*.75,200));i.Redirects[o].call(t,t,s||{},n,l,h,promiseData.promise?promiseData:undefined)}),p()}return ft="jqxAnimations: First argument ("+o+") was not a property map, a known action, or a registered redirect. Aborting.",console.log(ft),p()}}return st={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},nt=[],u.each(h,function(n,t){f.isNode(t)&&ht.call(t)}),s=u.extend({},i.defaults,n),p()}},i=u.extend(l,i),i.animate=l,c=n.requestAnimationFrame||v,i.State.isMobile||document.hidden===undefined||document.addEventListener("visibilitychange",function(){document.hidden?(c=function(n){return setTimeout(function(){n(!0)},16)},a()):c=n.requestAnimationFrame||v}),u.animate=function(){var n=Array.prototype.slice.call(arguments);return n.splice(0,0,u.element),i.apply(u,n)},s=0;s<2;s++)h="Down",s===1&&(h="Up"),g=function(n){u["slide"+n]=function(t,r,f,e,s){t==="fast"&&(t={duration:"200"});t==="slow"&&(t={duration:"600"});var h=u.extend({},t),a=h.begin,v=h.complete,l={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},c={};h.display===undefined&&(h.display=n==="Down"?i.CSS.Values.getDisplayType(o)==="inline"?"inline-block":"block":"none");h.begin=function(){var t,r;a&&a.call(e,e);for(t in l)c[t]=o.style[t],r=i.CSS.getPropertyValue(o,t),l[t]=n==="Down"?[r,0]:[0,r];c.overflow=o.style.overflow;o.style.overflow="hidden"};h.complete=function(){for(var n in c)o.style[n]=c[n];v&&v.call(e,e);s&&s.resolver(e)};i(o,l,h)}},g(h);for(s=0;s<2;s++)h="In",s===1&&(h="Out"),nt=function(n){u["fade"+n]=function(t,r,f,e,s){t==="fast"&&(t={duration:"200"});t==="slow"&&(t={duration:"600"});var h=u.extend({},t),a=h.begin,v={opacity:""},y={opacity:n==="In"?1:0},l={},c=h.complete;r!==f-1?(h.complete=h.begin=null,h.begin=function(){var t,r;a&&a.call(e,e);for(t in v)l[t]=o.style[t],r=i.CSS.getPropertyValue(o,t),v[t]=n==="In"?[r,1]:[0,r]},h.complete=function(){for(var n in l)o.style[n]=l[n];c&&c.call(e,e);s&&s.resolver(e)}):h.complete=function(){c&&c.call(e,e);s&&s.resolver(e)};h.display===undefined&&(h.display=n==="In"?"auto":"none");i(u.element,y,h)}},nt(h)}}),t.fn=t.prototype,t.extend(t.fn,t),t.prototype.init.prototype=t,n.jqxHelper=t,i={},t.extend(i,{createEvent:function(n,i){if(n.originalEvent)return n;var r=t.extend({},n);return r.originalEvent=n,r.target||(r.target=r.srcElement||document,i&&(r.target=targett)),r.target.nodeType===3&&(r.target=r.target.parentNode),r._isPropagationStopped=!1,r._isDefaultPrevented=!1,r.stopPropagation&&(r.originalStopPropagation=r.stopPropagation,r.stopPropagation=function(){this._isPropagationStopped=!0;r.originalEvent.stopPropagation();r.cancelBubble=!0}),r.preventDefault&&(r.preventDefault=function(){return this._isDefaultPrevented=!0,r.originalEvent.preventDefault()}),r.isDefaultPrevented=function(){return r._isDefaultPrevented},r.isPropagationStopped=function(){return r._isPropagationStopped},r.metaKey=!!r.metaKey,r},add:function(n,r,u,f){var v=t,e,o,h,l,a,s,y,p,b,c,w;if(n.nodeType!==3&&n.nodeType!==8&&r&&u){for(e=t(n).data(n[0]),e||(t(n).data(n,"events",{}),e=t(n).data(n)),h=e.events,h||(e.events=h={}),o=e.handle,o||(e.handle=o=function(n){return i.dispatch.apply(o.elem,[n,v])},o.elem=n),w=/^([^\.]*|)(?:\.(.+)|)$/,r=v.trim(r).split(" "),l=0;l<r.length;l++)a=w.exec(r[l])||[],s=a[1],y=(a[2]||"").split(".").sort(),p=v.extend({type:s,origType:a[1],data:f,handler:u,guid:u.guid,namespace:y.join(".")},b),c=h[s],c||(c=h[s]=[],c.delegateCount=0,n.addEventListener?n.addEventListener(s,o,!1):n.attachEvent&&n.attachEvent("on"+s,o)),c.push(p);n=null}},global:{},remove:function(n,i,r,u){var y=t,s,a,e,p,o,w,h,l,f,c,v=y.data(n);if(v&&(l=v.events))for(i=y.trim(i).split(" "),s=0;s<i.length;s++){if(a=/^([^\.]*|)(?:\.(.+)|)$/.exec(i[s])||[],e=p=a[1],o=a[2],!e){for(e in l)this.remove(n,e+i[s],r,u,!0);continue}for(f=l[e]||[],w=f.length,o=o?new RegExp("(^|\\.)"+o.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=0;h<f.length;h++)c=f[h],p!==c.origType||r&&r.guid!==c.guid||o&&!o.test(c.namespace)||(f.splice(h--,1),c.selector&&f.delegateCount--);f.length===0&&w!==f.length&&(this.removeEvent(n,e,v.handle),delete l[e])}},trigger:function(r,u,f,e){var p=t,y,s,h,c,l,a,w,o,v;if(!f||f.nodeType!==3&&f.nodeType!==8){if(o=r.type||r,v=[],o.indexOf(".")>=0&&(v=o.split("."),o=v.shift(),v.sort()),typeof r=="string"&&(r=document.createEvent("Event"),r.initEvent(o,!0,!0)),r=i.createEvent(r),u=u!=null?p.makeArray(u):[],u.unshift(r),r.type=o,r.isTrigger=!0,r.namespace=v.join("."),r.namespace_re=r.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c=o.indexOf(":")<0?"on"+o:"",r.result=undefined,r.target||(r.target=f),a=[[f,o]],!e&&!p.isWindow(f)){for(w=o,s=f.parentNode,h=f;s;s=s.parentNode)a.push([s,w]),h=s;h===(f.ownerDocument||document)&&a.push([h.defaultView||h.parentWindow||n,w])}for(y=0;y<a.length&&!r.isPropagationStopped();y++)s=a[y][0],r.type=a[y][1],l=(p.data(s,"events")||{})[r.type]&&p.data(s,"handle"),l&&l.apply(s,u),l=c&&s[c],l&&jQuery.acceptData(s)&&l.apply&&l.apply(s,u)===!1&&r.preventDefault();return r.type=o,e||r.isDefaultPrevented()||(c&&f[o]||r.target.offsetWidth!==0)&&(h=f[c],h&&(f[c]=null),f[o]&&f[o](),h&&(f[c]=h)),r.result}},dispatch:function(n,t){var c=t,l=this;n=i.createEvent(n);var f,e,o,u,r,h=(c.data(l,"events")||{})[n.type]||[],a=h.delegateCount,v=Array.prototype.slice.call(arguments),y=!n.namespace,s=[];for(s.push({elem:this,matches:h.slice(a)}),f=0;f<s.length;f++)for(u=s[f],n.currentTarget=u.elem,e=0;e<u.matches.length;e++)(r=u.matches[e],n.isPropagationStopped())||(y||!n.namespace&&!r.namespace||n.namespace_re&&n.namespace_re.test(r.namespace))&&(n.data=r.data,n.handleObj=r,o=r.handler.apply(u.elem,v),o!==undefined&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation())));return n.result},removeEvent:document.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]=="undefined"&&(n[r]=null),n.detachEvent(r,i))}}),function(t,i){function u(){if(!f){f=!0;for(var t=0;t<r.length;t++)r[t].fn.call(n,r[t].ctx);r=[]}}function o(){document.readyState==="complete"&&u()}t=t;i=i||n;var r=[],f=!1,e=!1;i[t]=function(t,i){if(f){setTimeout(function(){t(i)},1);return}r.push({fn:t,ctx:i});document.readyState==="complete"?setTimeout(u,1):e||(document.addEventListener?(document.addEventListener("DOMContentLoaded",u,!1),n.addEventListener("load",u,!1)):(document.attachEvent("onreadystatechange",o),n.attachEvent("onload",u)),e=!0)}}("initializeWidgets",n),t.prototype.ready=n.initializeWidgets,n.jQuery)||n.$||(n.$=n.minQuery=n.jqxHelper)}(window);jqxBaseFramework=window.minQuery||window.jQuery,function(n){n.jqx=n.jqx||{};jqwidgets={createInstance:function(t,i,r){if(i=="jqxDataAdapter"){var u=r[0],f=r[1]||{};return new n.jqx.dataAdapter(u,f)}return n(t)[i](r||{}),n(t)[i]("getInstance")}};n.jqx.define=function(n,t,i){n[t]=function(){this.baseType&&(this.base=new n[this.baseType],this.base.defineInstance());this.defineInstance();this.metaInfo()};n[t].prototype.defineInstance=function(){};n[t].prototype.metaInfo=function(){};n[t].prototype.base=null;n[t].prototype.baseType=undefined;i&&n[i]&&(n[t].prototype.baseType=i)};n.jqx.invoke=function(t,i){var r,f,u;if(i.length!=0){for(r=typeof i==Array||i.length>0?i[0]:i,f=typeof i==Array||i.length>1?Array.prototype.slice.call(i,1):n({}).toArray();t[r]==undefined&&t.base!=null;){if(t[r]!=undefined&&n.isFunction(t[r]))return t[r].apply(t,f);if(typeof r=="string"&&(u=r.toLowerCase(),t[u]!=undefined&&n.isFunction(t[u])))return t[u].apply(t,f);t=t.base}return t[r]!=undefined&&n.isFunction(t[r])?t[r].apply(t,f):typeof r=="string"&&(u=r.toLowerCase(),t[u]!=undefined&&n.isFunction(t[u]))?t[u].apply(t,f):void 0}};n.jqx.hasProperty=function(n,t){var r,i;if(typeof t=="object")for(r in t){for(i=n;i;){if(i.hasOwnProperty(r)||i.hasOwnProperty(r.toLowerCase()))return!0;i=i.base}return!1}else while(n){if(n.hasOwnProperty(t)||n.hasOwnProperty(t.toLowerCase()))return!0;n=n.base}return!1};n.jqx.hasFunction=function(t,i){var r,f,u;if(i.length==0||t==undefined)return!1;for(r=typeof i==Array||i.length>0?i[0]:i,f=typeof i==Array||i.length>1?Array.prototype.slice.call(i,1):{};t[r]==undefined&&t.base!=null;){if(t[r]&&n.isFunction(t[r])||typeof r=="string"&&(u=r.toLowerCase(),t[u]&&n.isFunction(t[u])))return!0;t=t.base}return t[r]&&n.isFunction(t[r])?!0:typeof r=="string"&&(u=r.toLowerCase(),t[u]&&n.isFunction(t[u]))?!0:!1};n.jqx.isPropertySetter=function(t,i){return i.length==1&&typeof i[0]=="object"?!0:i.length==2&&typeof i[0]=="string"&&!n.jqx.hasFunction(t,i)?!0:!1};n.jqx.validatePropertySetter=function(t,i,r){var f,u,e;if(!n.jqx.propertySetterValidation)return!0;if(i.length==1&&typeof i[0]=="object"){for(f in i[0]){for(u=t;!u.hasOwnProperty(f)&&u.base;)u=u.base;if(!u||!u.hasOwnProperty(f)){if(!r){if(e=u.hasOwnProperty(f.toString().toLowerCase()),e)return!0;throw"Invalid property: "+f;}return!1}}return!0}if(i.length!=2){if(!r)throw"Invalid property: "+i.length>=0?i[0]:"";return!1}while(!t.hasOwnProperty(i[0])&&t.base)t=t.base;if(!t||!t.hasOwnProperty(i[0])){if(!r)throw"Invalid property: "+i[0];return!1}return!0};Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,i=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(u){if(typeof u!="object"&&(typeof u!="function"||u===null))throw new TypeError("Object.keys called on non-object");var e=[],o,f;for(o in u)t.call(u,o)&&e.push(o);if(i)for(f=0;f<r;f++)t.call(u,n[f])&&e.push(n[f]);return e}}());n.jqx.set=function(t,i){var r=0,s,u,o,f,e;if(i.length==1&&typeof i[0]=="object"){if(t.isInitialized&&Object.keys&&Object.keys(i[0]).length>1){if(s=t.base?t.base.element:t.element,u=n.data(s,t.widgetName).initArgs,u&&JSON&&JSON.stringify&&i[0]&&u[0])try{if(JSON.stringify(i[0])==JSON.stringify(u[0])&&(o=!0,n.each(i[0],function(n,i){if(t[n]!=i)return o=!1,!1}),o))return}catch(h){}t.batchUpdate=i[0];f={};e={};n.each(i[0],function(n,i){for(var u=t;!u.hasOwnProperty(n)&&u.base!=null;)u=u.base;u.hasOwnProperty(n)?t[n]!=i&&(f[n]=t[n],e[n]=i,r++):u.hasOwnProperty(n.toLowerCase())&&t[n.toLowerCase()]!=i&&(f[n.toLowerCase()]=t[n.toLowerCase()],e[n.toLowerCase()]=i,r++)});r<2&&(t.batchUpdate=null)}n.each(i[0],function(i,r){for(var u=t;!u.hasOwnProperty(i)&&u.base!=null;)u=u.base;if(u.hasOwnProperty(i))n.jqx.setvalueraiseevent(u,i,r);else if(u.hasOwnProperty(i.toLowerCase()))n.jqx.setvalueraiseevent(u,i.toLowerCase(),r);else if(n.jqx.propertySetterValidation)throw"jqxCore: invalid property '"+i+"'";});t.batchUpdate!=null&&(t.batchUpdate=null,t.propertiesChangedHandler&&r>1&&t.propertiesChangedHandler(t,f,e))}else if(i.length==2){while(!t.hasOwnProperty(i[0])&&t.base)t=t.base;if(t.hasOwnProperty(i[0]))n.jqx.setvalueraiseevent(t,i[0],i[1]);else if(t.hasOwnProperty(i[0].toLowerCase()))n.jqx.setvalueraiseevent(t,i[0].toLowerCase(),i[1]);else if(n.jqx.propertySetterValidation)throw"jqxCore: invalid property '"+i[0]+"'";}};n.jqx.setvalueraiseevent=function(n,t,i){var r=n[t];(n[t]=i,n.isInitialized)&&(n.propertyChangedHandler!=undefined&&n.propertyChangedHandler(n,t,r,i),n.propertyChangeMap!=undefined&&n.propertyChangeMap[t]!=undefined&&n.propertyChangeMap[t](n,t,r,i))};n.jqx.get=function(n,t){var r,i;if(t==undefined||t==null)return undefined;if(n.propertyMap&&(r=n.propertyMap(t),r!=null))return r;if(n.hasOwnProperty(t))return n[t];if(n.hasOwnProperty(t.toLowerCase()))return n[t.toLowerCase()];if(i=undefined,typeof t==Array){if(t.length!=1)return undefined;i=t[0]}else typeof t=="string"&&(i=t);while(!n.hasOwnProperty(i)&&n.base)n=n.base;return n?n[i]:undefined};n.jqx.serialize=function(t){var i="",u,r;if(n.isArray(t)){for(i="[",r=0;r<t.length;r++)r>0&&(i+=", "),i+=n.jqx.serialize(t[r]);i+="]"}else if(typeof t=="object"){i="{";u=0;for(r in t)u++>0&&(i+=", "),i+=r+": "+n.jqx.serialize(t[r]);i+="}"}else i=t.toString();return i};n.jqx.propertySetterValidation=!0;n.jqx.jqxWidgetProxy=function(t,i,r){var e=n(i),f=n.data(i,t),u;if(f==undefined)return undefined;if(u=f.instance,n.jqx.hasFunction(u,r))return n.jqx.invoke(u,r);if(n.jqx.isPropertySetter(u,r)){if(n.jqx.validatePropertySetter(u,r))return n.jqx.set(u,r),undefined}else{if(typeof r=="object"&&r.length==0)return;if(typeof r=="object"&&r.length==1&&n.jqx.hasProperty(u,r[0]))return n.jqx.get(u,r[0]);if(typeof r=="string"&&n.jqx.hasProperty(u,r[0]))return n.jqx.get(u,r)}throw"jqxCore: Invalid parameter '"+n.jqx.serialize(r)+"' does not exist.";};n.jqx.applyWidget=function(t,i,r,u){var s=!1,h,e,f,u,o;try{s=window.MSApp!=undefined}catch(c){}for(h=n(t),u?(u.host=h,u.element=t):u=new n.jqx["_"+i],t.id==""&&(t.id=n.jqx.utilities.createId()),e={host:h,element:t,instance:u,initArgs:r},u.widgetName=i,n.data(t,i,e),n.data(t,"jqxWidget",e.instance),f=[],u=e.instance;u;)u.isInitialized=!1,f.push(u),u=u.base;f.reverse();f[0].theme=n.jqx.theme||"";n.jqx.jqxWidgetProxy(i,t,r);for(o in f)u=f[o],o==0&&(u.host=h,u.element=t,u.WinJS=s),u!=undefined&&(u.definedInstance&&u.definedInstance(),u.createInstance!=null&&(s?MSApp.execUnsafeLocalFunction(function(){u.createInstance(r)}):u.createInstance(r)));for(o in f)f[o]!=undefined&&(f[o].isInitialized=!0);s?MSApp.execUnsafeLocalFunction(function(){e.instance.refresh(!0)}):e.instance.refresh(!0)};n.jqx.jqxWidget=function(t,i,r){var s=!1,u,e,f,o;try{jqxArgs=Array.prototype.slice.call(r,0)}catch(h){jqxArgs=""}try{s=window.MSApp!=undefined}catch(h){}u=t;e="";i&&(e="_"+i);n.jqx.define(n.jqx,"_"+u,e);f=[];window[u]||(o=function(t){var r,i;if(t==null)return"";r=n.type(t);switch(r){case"string":case"number":case"date":case"boolean":case"bool":return t===null?"":t.toString()}return i="",n.each(t,function(t,r){var f=r,u,e;if(t>0&&(i+=", "),i+="[",u=0,n.type(f)=="object")for(e in f)u>0&&(i+=", "),i+="{"+e+":"+f[e]+"}",u++;else u>0&&(i+=", "),i+="{"+t+":"+f+"}",u++;i+="]"}),i},jqwidgets[u]=window[u]=function(t,i){var c=[],r,s,e,h;if(i||(i={}),c.push(i),r=t,n.type(r)==="object"&&t[0]?(r=t[0].id,r===""&&(r=t[0].id=n.jqx.utilities.createId())):n.type(t)==="object"&&t&&t.nodeName&&(r=t.id,r===""&&(r=t.id=n.jqx.utilities.createId())),window.jqxWidgets&&window.jqxWidgets[r]){if(i&&n.each(window.jqxWidgets[r],function(){var t=n(this.element).data();t&&t.jqxWidget&&n(this.element)[u](i)}),window.jqxWidgets[r].length==1&&(s=n(window.jqxWidgets[r][0].widgetInstance.element).data(),s&&s.jqxWidget))return window.jqxWidgets[r][0];if(s=n(window.jqxWidgets[r][0].widgetInstance.element).data(),s&&s.jqxWidget)return window.jqxWidgets[r]}return(e=n(t),e.length===0&&(e=n("<div><\/div>"),(u==="jqxInput"||u==="jqxPasswordInput"||u==="jqxMaskedInput")&&(e=n("<input/>")),u==="jqxTextArea"&&(e=n("<textarea><\/textarea>")),(u==="jqxButton"||u==="jqxRepeatButton"||u==="jqxToggleButton")&&(e=n("<button/>")),u==="jqxSplitter"&&(e=n("<div><div>Panel 1<\/div><div>Panel 2<\/div><\/div>")),u==="jqxTabs"&&(e=n("<div><ul><li>Tab 1<\/li><li>Tab 2<\/li><\/ul><div>Content 1<\/div><div>Content 2<\/div><\/div>")),u==="jqxRibbon"&&(e=n("<div><ul><li>Tab 1<\/li><li>Tab 2<\/li><\/ul><div><div>Content 1<\/div><div>Content 2<\/div><\/div><\/div>")),u==="jqxDocking"&&(e=n("<div><div><div><div>Title 1<\/div><div>Content 1<\/div><\/div><\/div><\/div>")),u==="jqxWindow"&&(e=n("<div><div>Title 1<\/div><div>Content 1<\/div><\/div>"))),h=[],n.each(e,function(t){var s=e[t],a,l;if(n.jqx.applyWidget(s,u,c,undefined),!f[u]){var l=n.data(s,"jqxWidget"),i=n.jqx["_"+u].prototype.defineInstance(),v={};n.jqx["_"+u].prototype.metaInfo&&(v=n.jqx["_"+u].prototype.metaInfo());u=="jqxDockingLayout"&&(i=n.extend(i,n.jqx._jqxLayout.prototype.defineInstance()));(u=="jqxToggleButton"||u=="jqxRepeatButton")&&(i=n.extend(i,n.jqx._jqxButton.prototype.defineInstance()));u=="jqxTreeGrid"&&(i=n.extend(i,n.jqx._jqxDataTable.prototype.defineInstance()));a=function(t){var r=n.data(t,"jqxWidget"),i,u;this.widgetInstance=r;i=n.extend(this,r);i.on=function(n,t){i.addHandler(i.host,n,t)};i.off=function(n){i.removeHandler(i.host,n)};for(u in r)n.type(r[u])=="function"&&(i[u]=n.proxy(r[u],r));return i};f[u]=a;n.each(i,function(t,i){Object.defineProperty(a.prototype,t,{get:function(){return this.widgetInstance?this.widgetInstance[t]:i},set:function(i){var f;if(this.widgetInstance&&this.widgetInstance[t]!=i){var r=this.widgetInstance[t],e=i,h=n.type(r),c=n.type(e),s=!1;(h!=c||t==="source")&&(s=!0);(s||o(r)!=o(e))&&(f={},f[t]=i,this.widgetInstance.host[u](f),this.widgetInstance[t]=i,this.widgetInstance.propertyUpdated&&this.widgetInstance.propertyUpdated(t,r,i))}}})})}l=new f[u](s);h.push(l);window.jqxWidgets||(window.jqxWidgets=[]);window.jqxWidgets[r]||(window.jqxWidgets[r]=[]);window.jqxWidgets[r].push(l)}),h.length===1)?h[0]:h});n.fn[u]=function(){var t=Array.prototype.slice.call(arguments,0),i,r;if(t.length==0||t.length==1&&typeof t[0]=="object"){if(this.length==0)if(this.selector)throw new Error("Invalid Selector - "+this.selector+"! Please, check whether the used ID or CSS Class name is correct.");else throw new Error("Invalid Selector! Please, check whether the used ID or CSS Class name is correct.");return this.each(function(){var f=n(this),i=this,r=n.data(i,u);r==null?n.jqx.applyWidget(i,u,t,undefined):n.jqx.jqxWidgetProxy(u,this,t)})}if(this.length==0)if(this.selector)throw new Error("Invalid Selector - "+this.selector+"! Please, check whether the used ID or CSS Class name is correct.");else throw new Error("Invalid Selector! Please, check whether the used ID or CSS Class name is correct.");return i=null,r=0,this.each(function(){var e=n.jqx.jqxWidgetProxy(u,this,t),f;r==0?(i=e,r++):(r==1&&(f=[],f.push(i),i=f),i.push(e))}),i};try{n.extend(n.jqx["_"+u].prototype,Array.prototype.slice.call(r,0)[0])}catch(h){}n.extend(n.jqx["_"+u].prototype,{toThemeProperty:function(t,i){return n.jqx.toThemeProperty(this,t,i)}});n.jqx["_"+u].prototype.refresh=function(){this.base&&this.base.refresh(!0)};n.jqx["_"+u].prototype.createInstance=function(){};n.jqx["_"+u].prototype.addEventHandler=function(n,t){this.host.bind(n,t)};n.jqx["_"+u].prototype.removeEventHandler=function(n){this.host.unbind(n)};n.jqx["_"+u].prototype.applyTo=function(t,i){if(!(i instanceof Array)){var r=[];r.push(i);i=r}n.jqx.applyWidget(t,u,i,this)};n.jqx["_"+u].prototype.getInstance=function(){return this};n.jqx["_"+u].prototype.propertyChangeMap={};n.jqx["_"+u].prototype.addHandler=function(t,i,r,u){n.jqx.addHandler(n(t),i,r,u)};n.jqx["_"+u].prototype.removeHandler=function(t,i,r){n.jqx.removeHandler(n(t),i,r)};n.jqx["_"+u].prototype.setOptions=function(){if(this.host&&this.host.length&&this.host.length==1)return n.jqx.jqxWidgetProxy(u,this.host[0],arguments)}};n.jqx.toThemeProperty=function(n,t,i){var e,u,r,f;if(n.theme=="")return t;for(e=t.split(" "),u="",r=0;r<e.length;r++)r>0&&(u+=" "),f=e[r],u+=i!=null&&i?f+"-"+n.theme:f+" "+f+"-"+n.theme;return u};n.jqx.addHandler=function(t,i,r,u){for(var f,o=i.split(" "),e=0;e<o.length;e++){if(f=o[e],window.addEventListener)switch(f){case"mousewheel":n.jqx.browser.mozilla?t[0].addEventListener("DOMMouseScroll",r,!1):t[0].addEventListener("mousewheel",r,!1);continue;case"mousemove":if(!u){t[0].addEventListener("mousemove",r,!1);continue}}if(u==undefined||u==null)if(t.on)t.on(f,r);else t.bind(f,r);else if(t.on)t.on(f,u,r);else t.bind(f,u,r)}};n.jqx.removeHandler=function(t,i,r){var e,f,u;if(!i){t.off?t.off():t.unbind();return}for(e=i.split(" "),f=0;f<e.length;f++){if(u=e[f],window.removeEventListener)switch(u){case"mousewheel":n.jqx.browser.mozilla?t[0].removeEventListener("DOMMouseScroll",r,!1):t[0].removeEventListener("mousewheel",r,!1);continue;case"mousemove":if(r){t[0].removeEventListener("mousemove",r,!1);continue}}if(u==undefined){t.off?t.off():t.unbind();continue}r==undefined?t.off?t.off(u):t.unbind(u):t.off?t.off(u,r):t.unbind(u,r)}};n.jqx.theme=n.jqx.theme||"";n.jqx.scrollAnimation=n.jqx.scrollAnimation||!1;n.jqx.resizeDelay=n.jqx.resizeDelay||10;n.jqx.ready=function(){n(window).trigger("jqxReady")};n.jqx.init=function(){n.each(arguments[0],function(t,i){t=="theme"&&(n.jqx.theme=i);t=="scrollBarSize"&&(n.jqx.utilities.scrollBarSize=i);t=="touchScrollBarSize"&&(n.jqx.utilities.touchScrollBarSize=i);t=="scrollBarButtonsVisibility"&&(n.jqx.utilities.scrollBarButtonsVisibility=i)})};n.jqx.utilities=n.jqx.utilities||{};n.extend(n.jqx.utilities,{scrollBarSize:15,touchScrollBarSize:0,scrollBarButtonsVisibility:"visible",createId:function(){var n=function(){return((1+Math.random())*65536|0).toString(16).substring(1)};return"jqxWidget"+n()+n()},setTheme:function(t,i,r){var u;if(typeof r!="undefined"){var f=r[0].className.split(" "),o=[],e=[],s=r.children();for(u=0;u<f.length;u+=1)f[u].indexOf(t)>=0&&(t.length>0?(o.push(f[u]),e.push(f[u].replace(t,i))):e.push(f[u].replace("-"+i,"")+"-"+i));for(this._removeOldClasses(o,r),this._addNewClasses(e,r),u=0;u<s.length;u+=1)this.setTheme(t,i,n(s[u]))}},_removeOldClasses:function(n,t){for(var i=0;i<n.length;i+=1)t.removeClass(n[i])},_addNewClasses:function(n,t){for(var i=0;i<n.length;i+=1)t.addClass(n[i])},getOffset:function(t){var i=n.jqx.mobile.getLeftPos(t[0]),r=n.jqx.mobile.getTopPos(t[0]);return{top:r,left:i}},resize:function(t,i,r,u){var h,a,o,e,s,c,l,y,f,w;u===undefined&&(u=!0);var v=-1,f=this,p=function(n){var i,t;if(!f.hiddenWidgets)return-1;for(i=-1,t=0;t<f.hiddenWidgets.length;t++)if(n.id){if(f.hiddenWidgets[t].id==n.id){i=t;break}}else if(f.hiddenWidgets[t].id==n[0].id){i=t;break}return i};if(this.resizeHandlers){for(h=0;h<this.resizeHandlers.length;h++)if(t.id){if(this.resizeHandlers[h].id==t.id){v=h;break}}else if(this.resizeHandlers[h].id==t[0].id){v=h;break}if(r===!0){v!=-1&&this.resizeHandlers.splice(v,1);this.resizeHandlers.length==0&&(e=n(window),e.off?(e.off("resize.jqx"),e.off("orientationchange.jqx"),e.off("orientationchanged.jqx")):(e.unbind("resize.jqx"),e.unbind("orientationchange.jqx"),e.unbind("orientationchanged.jqx")),this.resizeHandlers=null);a=p(t);a!=-1&&this.hiddenWidgets&&this.hiddenWidgets.splice(a,1);return}}else if(r===!0){a=p(t);a!=-1&&this.hiddenWidgets&&this.hiddenWidgets.splice(a,1);return}if(f=this,o=function(t,i){var l,e,o,h,s,c,b;if(f.resizeHandlers){var a=function(n){for(var i=-1,t=n.parentNode;t;)i++,t=t.parentNode;return i},v=function(n,t){var i,r,f;if(!n.widget||!t.widget)return 0;i=a(n.widget[0]);r=a(t.widget[0]);try{if(i<r)return-1;if(i>r)return 1}catch(u){f=u}return 0},y=function(t){if(f.hiddenWidgets.length>0){f.hiddenWidgets.sort(v);var r=function(){for(var t,u=!1,e=[],r=0;r<f.hiddenWidgets.length;r++)t=f.hiddenWidgets[r],n.jqx.isHidden(t.widget)?(u=!0,e.push(t)):t.callback&&t.callback(i);f.hiddenWidgets=e;u||clearInterval(f.__resizeInterval)};if(t==!1){r();f.__resizeInterval&&clearInterval(f.__resizeInterval);return}f.__resizeInterval&&clearInterval(f.__resizeInterval);f.__resizeInterval=setInterval(function(){r()},100)}};for(f.hiddenWidgets&&f.hiddenWidgets.length>0&&y(!1),f.hiddenWidgets=[],f.resizeHandlers.sort(v),l=0;l<f.resizeHandlers.length;l++){var u=f.resizeHandlers[l],w=u.widget,r=u.data;if(r&&r.jqxWidget)if(e=r.jqxWidget.width,o=r.jqxWidget.height,r.jqxWidget.base&&(e==undefined&&(e=r.jqxWidget.base.width),o==undefined&&(o=r.jqxWidget.base.height)),e===undefined&&o===undefined&&(e=r.jqxWidget.element.style.width,o=r.jqxWidget.element.style.height),h=!1,e!=null&&e.toString().indexOf("%")!=-1&&(h=!0),o!=null&&o.toString().indexOf("%")!=-1&&(h=!0),n.jqx.isHidden(w))p(w)===-1&&(h||t===!0)&&u.data.nestedWidget!==!0&&f.hiddenWidgets.push(u);else if(t===undefined||t!==!0){if(h){if(u.callback(i),f.watchedElementData)for(s=0;s<f.watchedElementData.length;s++)if(f.watchedElementData[s].element==r.jqxWidget.element){f.watchedElementData[s].offsetWidth=r.jqxWidget.element.offsetWidth;f.watchedElementData[s].offsetHeight=r.jqxWidget.element.offsetHeight;break}f.hiddenWidgets.indexOf(u)>=0&&f.hiddenWidgets.splice(f.hiddenWidgets.indexOf(u),1)}if(r.jqxWidget.element&&(c=r.jqxWidget.element.className,(c.indexOf("dropdownlist")>=0||c.indexOf("datetimeinput")>=0||c.indexOf("combobox")>=0||c.indexOf("menu")>=0)&&r.jqxWidget.isOpened&&(b=r.jqxWidget.isOpened(),b))){if(i&&i=="resize"&&n.jqx.mobile.isTouchDevice())continue;r.jqxWidget.close()}}}y()}},!this.resizeHandlers)if(this.resizeHandlers=[],e=n(window),e.on){this._resizeTimer=null;this._initResize=null;e.on("resize.jqx",function(){f._resizeTimer!=undefined&&clearTimeout(f._resizeTimer);f._initResize?f._resizeTimer=setTimeout(function(){o(null,"resize")},n.jqx.resizeDelay):(f._initResize=!0,o(null,"resize"))});e.on("orientationchange.jqx",function(){o(null,"orientationchange")});e.on("orientationchanged.jqx",function(){o(null,"orientationchange")})}else e.bind("resize.jqx",function(){o(null,"orientationchange")}),e.bind("orientationchange.jqx",function(){o(null,"orientationchange")}),e.bind("orientationchanged.jqx",function(){o(null,"orientationchange")});s=t.data();u&&v===-1&&this.resizeHandlers.push({id:t[0].id,widget:t,callback:i,data:s});try{c=s.jqxWidget.width;l=s.jqxWidget.height;s.jqxWidget.base&&(c==undefined&&(c=s.jqxWidget.base.width),l==undefined&&(l=s.jqxWidget.base.height));c===undefined&&l===undefined&&(c=s.jqxWidget.element.style.width,l=s.jqxWidget.element.style.height);y=!1;c!=null&&c.toString().indexOf("%")!=-1&&(y=!0);l!=null&&l.toString().indexOf("%")!=-1&&(y=!0);y&&(this.watchedElementData||(this.watchedElementData=[]),f=this,w=function(){f.watchedElementData.forEach&&f.watchedElementData.forEach(function(t){(t.element.offsetWidth!==t.offsetWidth||t.element.offsetHeight!==t.offsetHeight)&&(t.offsetWidth=t.element.offsetWidth,t.offsetHeight=t.element.offsetHeight,t.timer&&clearTimeout(t.timer),t.timer=setTimeout(function(){n.jqx.isHidden(n(t.element))?t.timer=setInterval(function(){n.jqx.isHidden(n(t.element))||(clearInterval(t.timer),t.callback())},100):t.callback()}))})},f.watchedElementData.push({element:t[0],offsetWidth:t[0].offsetWidth,offsetHeight:t[0].offsetHeight,callback:i}),f.observer||(f.observer=new MutationObserver(w),f.observer.observe(document.body,{attributes:!0,childList:!0,characterData:!0})))}catch(b){}n.jqx.isHidden(t)&&u===!0&&o(!0);n.jqx.resize=function(){o(null,"resize")}},parseJSON:function(t){if(!t||typeof t!="string")return null;if(t=n.trim(t),window.JSON&&window.JSON.parse)return window.JSON.parse(t);if(/^[\],:{}\s]*$/.test(t.replace(/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,"@").replace(/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return new Function("return "+t)();throw new Error("Invalid JSON: "+t);},html:function(t,i){if(!n(t).on)return n(t).html(i);try{return n.access(t,function(i){var r=t[0]||{},u=0,f=t.length;if(i===undefined)return r.nodeType===1?r.innerHTML.replace(rinlinejQuery,""):undefined;var e=new RegExp("<(?:abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)[\\s/>]","i");if(typeof i=="string"&&!/<(?:script|style|link)/i.test(i)&&(n.support.htmlSerialize||!e.test(i))&&(n.support.leadingWhitespace||!/^\s+/.test(i))&&!{option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],area:[1,"<map>","<\/map>"],_default:[0,"",""]}[(/<([\w:]+)/.exec(i)||["",""])[1].toLowerCase()]){i=i.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,"<$1><\/$2>");try{for(;u<f;u++)r=this[u]||{},r.nodeType===1&&(n.cleanData(r.getElementsByTagName("*")),r.innerHTML=i);r=0}catch(o){}}r&&t.empty().append(i)},null,i,arguments.length)}catch(r){return n(t).html(i)}},hasTransform:function(t){var i="",r;if(i=t.css("transform"),i==""||i=="none")if(i=t.parents().css("transform"),i==""||i=="none")r=n.jqx.utilities.getBrowser(),r.browser=="msie"?(i=t.css("-ms-transform"),(i==""||i=="none")&&(i=t.parents().css("-ms-transform"))):r.browser=="chrome"?(i=t.css("-webkit-transform"),(i==""||i=="none")&&(i=t.parents().css("-webkit-transform"))):r.browser=="opera"?(i=t.css("-o-transform"),(i==""||i=="none")&&(i=t.parents().css("-o-transform"))):r.browser=="mozilla"&&(i=t.css("-moz-transform"),(i==""||i=="none")&&(i=t.parents().css("-moz-transform")));else return i!=""&&i!="none";return(i==""||i=="none")&&(i=n(document.body).css("transform")),i!=""&&i!="none"&&i!=null},getBrowser:function(){var n=navigator.userAgent.toLowerCase(),t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[],i={browser:t[1]||"",version:t[2]||"0"};return n.indexOf("rv:11.0")>=0&&n.indexOf(".net4.0c")>=0&&(i.browser="msie",i.version="11",t[1]="msie"),n.indexOf("edge")>=0&&(i.browser="msie",i.version="12",t[1]="msie"),i[t[1]]=t[1],i}});n.jqx.browser=n.jqx.utilities.getBrowser();n.jqx.isHidden=function(n){if(!n||!n[0])return!1;var t=n[0].offsetWidth,i=n[0].offsetHeight;return t===0||i===0?!0:!1};n.jqx.ariaEnabled=!0;n.jqx.aria=function(t,i,r){if(n.jqx.ariaEnabled)if(i==undefined)n.each(t.aria,function(i,r){var u=t.base?t.base.host.attr(i):t.host.attr(i),f;if(u==undefined||n.isFunction(u)){u=t[r.name];n.isFunction(u)&&(u=t[r.name]());u==undefined&&(u="");try{t.base?t.base.host.attr(i,u.toString()):t.host.attr(i,u.toString())}catch(e){}}else{f=u;switch(r.type){case"number":f=new Number(u);isNaN(f)&&(f=u);break;case"boolean":f=u=="true"?!0:!1;break;case"date":f=new Date(u);(f=="Invalid Date"||isNaN(f))&&(f=u)}t[r.name]=f}});else try{t.host?t.base?t.base.host?t.base.host.attr(i,r.toString()):t.attr(i,r.toString()):t.host?t.element.setAttribute?t.element.setAttribute(i,r.toString()):t.host.attr(i,r.toString()):t.attr(i,r.toString()):t.setAttribute&&t.setAttribute(i,r.toString())}catch(u){}};Array.prototype.indexOf||(Array.prototype.indexOf=function(n){var i=this.length,t=Number(arguments[1])||0;for(t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=i);t<i;t++)if(t in this&&this[t]===n)return t;return-1});n.jqx.mobile=n.jqx.mobile||{};n.jqx.position=function(t){var r=parseInt(t.pageX),u=parseInt(t.pageY),f,i;return n.jqx.mobile.isTouchDevice()&&(f=n.jqx.mobile.getTouches(t),i=f[0],r=parseInt(i.pageX),u=parseInt(i.pageY)),{left:r,top:u}};n.extend(n.jqx.mobile,{_touchListener:function(n){var r=function(n,t){var i=document.createEvent("MouseEvents");return i.initMouseEvent(n,t.bubbles,t.cancelable,t.view,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),i._pageX=t.pageX,i._pageY=t.pageY,i},i={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"},u=r(i[n.type],n),t;n.target.dispatchEvent(u);t=n.target["on"+i[n.type]];typeof t=="function"&&t(n)},setMobileSimulator:function(t,i){var f,r,u;this.isTouchDevice()||(this.simulatetouches=!0,i==!1&&(this.simulatetouches=!1),f={mousedown:"touchstart",mouseup:"touchend",mousemove:"touchmove"},r=this,window.addEventListener&&(u=function(){for(var n in f)t.addEventListener&&(t.removeEventListener(n,r._touchListener),t.addEventListener(n,r._touchListener,!1))},n.jqx.browser.msie?u():u()))},isTouchDevice:function(){var n,r,t,u;if(this.touchDevice!=undefined)return this.touchDevice;if((n="Browser CodeName: "+navigator.appCodeName+"",n+="Browser Name: "+navigator.appName+"",n+="Browser Version: "+navigator.appVersion+"",n+="Platform: "+navigator.platform+"",n+="User-agent header: "+navigator.userAgent+"",n.indexOf("Android")!=-1)||n.indexOf("IEMobile")!=-1||n.indexOf("Windows Phone")!=-1||n.indexOf("WPDesktop")!=-1||n.indexOf("ZuneWP7")!=-1||n.indexOf("BlackBerry")!=-1&&n.indexOf("Mobile Safari")!=-1||n.indexOf("ipod")!=-1||n.indexOf("nokia")!=-1||n.indexOf("Nokia")!=-1)return!0;if(n.indexOf("Chrome/17")!=-1||n.indexOf("CrOS")!=-1||n.indexOf("Opera")!=-1&&n.indexOf("Mobi")==-1&&n.indexOf("Mini")==-1&&n.indexOf("Platform: Win")!=-1)return!1;if(n.indexOf("Opera")!=-1&&n.indexOf("Mobi")!=-1&&n.indexOf("Opera Mobi")!=-1)return!0;r={ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"};try{if(this.touchDevice!=undefined)return this.touchDevice;this.touchDevice=!1;for(i in r)if(r.hasOwnProperty(i)&&(prefix=r[i],match=n.match(new RegExp("(?:"+prefix+")([^\\s;]+)")),match))return i.toString()=="blackberry"?(this.touchDevice=!1,!1):(this.touchDevice=!0,!0);if(t=navigator.userAgent,navigator.platform.toLowerCase().indexOf("win")!=-1){if(t.indexOf("Windows Phone")>=0||t.indexOf("WPDesktop")>=0||t.indexOf("IEMobile")>=0||t.indexOf("ZuneWP7")>=0)return this.touchDevice=!0,!0;if(t.indexOf("Touch")>=0)return(u="MSPointerDown"in window||"pointerdown"in window,u)?(this.touchDevice=!0,!0):t.indexOf("ARM")>=0?(this.touchDevice=!0,!0):(this.touchDevice=!1,!1)}return navigator.platform.toLowerCase().indexOf("win")!=-1?(this.touchDevice=!1,!1):(("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(this.touchDevice=!0),this.touchDevice)}catch(f){return this.touchDevice=!1,!1}},getLeftPos:function(n){for(var t=n.offsetLeft;(n=n.offsetParent)!=null;)n.tagName!="HTML"&&(t+=n.offsetLeft,document.all&&(t+=n.clientLeft));return t},getTopPos:function(t){for(var r=t.offsetTop,u=n(t).coord(),i,f;(t=t.offsetParent)!=null;)t.tagName!="HTML"&&(r+=t.offsetTop-t.scrollTop,document.all&&(r+=t.clientTop));return(i=navigator.userAgent.toLowerCase(),f=(i.indexOf("windows phone")!=-1||i.indexOf("WPDesktop")!=-1||i.indexOf("ZuneWP7")!=-1||i.indexOf("msie 9")!=-1||i.indexOf("msie 11")!=-1||i.indexOf("msie 10")!=-1)&&i.indexOf("touch")!=-1,f)?u.top:this.isSafariMobileBrowser()?this.isSafari4MobileBrowser()&&this.isIPadSafariMobileBrowser()?r:i.indexOf("version/7")!=-1?u.top:((i.indexOf("version/6")!=-1||i.indexOf("version/5")!=-1)&&(r=r+n(window).scrollTop()),/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent))?r+n(window).scrollTop():/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)?r+n(window).scrollTop():u.top:r},isChromeMobileBrowser:function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("android")!=-1},isOperaMiniMobileBrowser:function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("opera mini")!=-1||n.indexOf("opera mobi")!=-1},isOperaMiniBrowser:function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("opera mini")!=-1},isNewSafariMobileBrowser:function(){var n=navigator.userAgent.toLowerCase(),t=n.indexOf("ipad")!=-1||n.indexOf("iphone")!=-1||n.indexOf("ipod")!=-1;return t&&n.indexOf("version/5")!=-1},isSafari4MobileBrowser:function(){var n=navigator.userAgent.toLowerCase(),t=n.indexOf("ipad")!=-1||n.indexOf("iphone")!=-1||n.indexOf("ipod")!=-1;return t&&n.indexOf("version/4")!=-1},isWindowsPhone:function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("windows phone")!=-1||n.indexOf("WPDesktop")!=-1||n.indexOf("ZuneWP7")!=-1||n.indexOf("msie 9")!=-1||n.indexOf("msie 11")!=-1||n.indexOf("msie 10")!=-1&&n.indexOf("touch")!=-1},isSafariMobileBrowser:function(){var n=navigator.userAgent.toLowerCase();return/(Android.*Chrome\/[.0-9]* (!?Mobile))/.exec(navigator.userAgent)?!0:/(Android.*Chrome\/[.0-9]* Mobile)/.exec(navigator.userAgent)?!0:n.indexOf("ipad")!=-1||n.indexOf("iphone")!=-1||n.indexOf("ipod")!=-1||n.indexOf("mobile safari")!=-1},isIPadSafariMobileBrowser:function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("ipad")!=-1},isMobileBrowser:function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("ipad")!=-1||n.indexOf("iphone")!=-1||n.indexOf("android")!=-1},getTouches:function(n){if(n.originalEvent){if(n.originalEvent.touches&&n.originalEvent.touches.length)return n.originalEvent.touches;if(n.originalEvent.changedTouches&&n.originalEvent.changedTouches.length)return n.originalEvent.changedTouches}return n.touches||(n.touches=[],n.touches[0]=n.originalEvent!=undefined?n.originalEvent:n,n.originalEvent!=undefined&&n.pageX&&(n.touches[0]=n),n.type=="mousemove"&&(n.touches[0]=n)),n.touches},getTouchEventName:function(n){if(this.isWindowsPhone()){var t=navigator.userAgent.toLowerCase();if(t.indexOf("windows phone 7")!=-1){if(n.toLowerCase().indexOf("start")!=-1)return"MSPointerDown";if(n.toLowerCase().indexOf("move")!=-1)return"MSPointerMove";if(n.toLowerCase().indexOf("end")!=-1)return"MSPointerUp"}if(n.toLowerCase().indexOf("start")!=-1)return"pointerdown";if(n.toLowerCase().indexOf("move")!=-1)return"pointermove";if(n.toLowerCase().indexOf("end")!=-1)return"pointerup"}else return n},dispatchMouseEvent:function(n,t,i){if(!this.simulatetouches){var r=document.createEvent("MouseEvent");r.initMouseEvent(n,!0,!0,t.view,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null);i!=null&&i.dispatchEvent(r)}},getRootNode:function(n){while(n.nodeType!==1)n=n.parentNode;return n},setTouchScroll:function(n,t){this.enableScrolling||(this.enableScrolling=[]);this.enableScrolling[t]=n},touchScroll:function(t,i,r,u,f,e){function ni(n){if(n.targetTouches&&n.targetTouches.length>=1)return n.targetTouches[0].clientY;if(n.originalEvent&&n.originalEvent.clientY!==undefined)return n.originalEvent.clientY;var t=o.getTouches(n);return t[0].clientY}function ti(n){if(n.targetTouches&&n.targetTouches.length>=1)return n.targetTouches[0].clientX;if(n.originalEvent&&n.originalEvent.clientX!==undefined)return n.originalEvent.clientX;var t=o.getTouches(n);return t[0].clientX}function ii(){var t,n;c&&(t=Date.now()-v,n=-c*Math.exp(-t/lt),n>.5||n<-.5?(d(st+n,event),requestAnimationFrame(ii)):(d(st),e.fadeOut("fast")))}function ri(){var t,n;c&&(t=Date.now()-v,n=-c*Math.exp(-t/lt),n>.5||n<-.5?(g(ht+n),requestAnimationFrame(ri)):(g(ht),f.fadeOut("fast")))}var d,g,vt,w,si,yt,pt,hi,wt;if(t!=null){var o=this,nt=0,tt=0,ui=0,it=0,rt=0,fi=0;this.scrolling||(this.scrolling=[]);this.scrolling[u]=!1;var ut=!1,s=n(t),ei=["select","input","textarea"],bt=0,oi=0;this.enableScrolling||(this.enableScrolling=[]);this.enableScrolling[u]=!0;var u=u,kt=this.getTouchEventName("touchstart")+".touchScroll",dt=this.getTouchEventName("touchend")+".touchScroll",gt=this.getTouchEventName("touchmove")+".touchScroll",y,l,a,h,ft,b,p,et,v,ot,c,st,ht,ct,lt;a=i;l=0;h=0;xoffset=0;initialOffset=0;initialXOffset=0;y=f.jqxScrollBar("max");lt=325;var at=function(){var n,t,i,r;n=Date.now();t=n-v;v=n;i=h-et;xdelta=xoffset-xframe;et=h;xframe=xoffset;b=!0;r=1e3*i/(1+t);xv=1e3*xdelta/(1+t);p=.8*r+.2*p;xjqxAnimations=.8*xv+.2*xjqxAnimations},k=!1,bt=function(t){function s(n){k=!1;b=!0;ft=ni(n);ct=ti(n);p=c=xjqxAnimations=0;et=h;xframe=xoffset;v=Date.now();clearInterval(ot);ot=setInterval(at,100);initialOffset=h;initialXOffset=xoffset;h>0&&h<a&&e[0].style.visibility!="hidden"}if(!o.enableScrolling[u])return!0;if(n.inArray(t.target.tagName.toLowerCase(),ei)===-1){h=e.jqxScrollBar("value");xoffset=f.jqxScrollBar("value");var r=o.getTouches(t),i=r[0];return r.length==1&&o.dispatchMouseEvent("mousedown",i,o.getRootNode(i.target)),y=f.jqxScrollBar("max"),a=e.jqxScrollBar("max"),s(t),ut=!1,tt=i.pageY,rt=i.pageX,o.simulatetouches&&i._pageY!=undefined&&(tt=i._pageY,rt=i._pageX),o.scrolling[u]=!0,nt=0,it=0,!0}};if(s.on)s.on(kt,bt);else s.bind(kt,bt);if(d=function(n,t){return h=n>a?a:n<l?l:n,r(null,n,0,0,t),n>a?"max":n<l?"min":"value"},g=function(n,t){return xoffset=n>y?y:n<l?l:n,r(n,null,0,0,t),n>y?"max":n<l?"min":"value"},vt=function(n){function p(n){var r,i,u,t;if(b){if(r=ni(n),u=ti(n),i=ft-r,xdelta=ct-u,t="value",i>2||i<-2)return(ft=r,t=d(h+i,n),at(),t=="min"&&initialOffset===0)?!0:t=="max"&&initialOffset===a?!0:c?(n.preventDefault(),n.stopPropagation(),k=!0,!1):!0;if(xdelta>2||xdelta<-2)return(ct=u,t=g(xoffset+xdelta,n),at(),t=="min"&&initialXOffset===0)?!0:t=="max"&&initialXOffset===y?!0:s?(k=!0,n.preventDefault(),n.stopPropagation(),!1):!0;n.preventDefault()}}var t,i,r,l,v,s,c;if(!o.enableScrolling[u]||!o.scrolling[u]||(k&&(n.preventDefault(),n.stopPropagation()),t=o.getTouches(n),t.length>1))return!0;i=t[0].pageY;r=t[0].pageX;o.simulatetouches&&t[0]._pageY!=undefined&&(i=t[0]._pageY,r=t[0]._pageX);l=i-tt;v=r-rt;oi=i;touchHorizontalEnd=r;ui=l-nt;fi=v-it;ut=!0;nt=l;it=v;s=f!=null?f[0].style.visibility!="hidden":!0;c=e!=null?e[0].style.visibility!="hidden":!0;(s||c)&&(s||c)&&p(n)},s.on)s.on(gt,vt);else s.bind(gt,vt);if(w=function(n){var t,i;if(!o.enableScrolling[u]||(t=o.getTouches(n)[0],!o.scrolling[u]))return!0;if(b=!1,clearInterval(ot),p>10||p<-10?(c=.8*p,st=Math.round(h+c),v=Date.now(),requestAnimationFrame(ii),e.fadeIn(100)):xjqxAnimations>10||xjqxAnimations<-10?(c=.8*xjqxAnimations,ht=Math.round(xoffset+c),v=Date.now(),requestAnimationFrame(ri),f.fadeIn(100)):(f.fadeOut(100),e.fadeOut(100)),o.scrolling[u]=!1,ut)o.dispatchMouseEvent("mouseup",t,n.target);else return t=o.getTouches(n)[0],i=o.getRootNode(t.target),o.dispatchMouseEvent("mouseup",t,i),o.dispatchMouseEvent("click",t,i),!0},this.simulatetouches&&(si=n(window).on!=undefined||n(window).bind,yt=function(n){try{w(n)}catch(t){}o.scrolling[u]=!1},n(window).on!=undefined?n(document).on("mouseup.touchScroll",yt):n(document).bind("mouseup.touchScroll",yt),window.frameElement&&window.top!=null&&(pt=function(n){try{w(n)}catch(t){}o.scrolling[u]=!1},window.top.document&&(n(window.top.document).on?n(window.top.document).on("mouseup",pt):n(window.top.document).bind("mouseup",pt))),hi=n(document).on!=undefined||n(document).bind,wt=function(n){if(!o.scrolling[u])return!0;o.scrolling[u]=!1;var t=o.getTouches(n)[0],i=o.getRootNode(t.target);o.dispatchMouseEvent("mouseup",t,i);o.dispatchMouseEvent("click",t,i)},n(document).on!=undefined?n(document).on("touchend",wt):n(document).bind("touchend",wt)),s.on){s.on("dragstart",function(n){n.preventDefault()});s.on("selectstart",function(n){n.preventDefault()})}s.on?s.on(dt+" touchcancel.touchScroll",w):s.bind(dt+" touchcancel.touchScroll",w)}}});n.jqx.cookie=n.jqx.cookie||{};n.extend(n.jqx.cookie,{cookie:function(t,i,r){var f,u,e,o;return arguments.length>1&&String(i)!=="[object Object]"?(r=n.extend({},r),(i===null||i===undefined)&&(r.expires=-1),typeof r.expires=="number"&&(f=r.expires,u=r.expires=new Date,u.setDate(u.getDate()+f)),i=String(i),document.cookie=[encodeURIComponent(t),"=",r.raw?i:encodeURIComponent(i),r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("")):(r=i||{},o=r.raw?function(n){return n}:decodeURIComponent,(e=new RegExp("(?:^|; )"+encodeURIComponent(t)+"=([^;]*)").exec(document.cookie))?o(e[1]):null)}});n.jqx.string=n.jqx.string||{};n.extend(n.jqx.string,{replace:function(n,t,i){if(t===i)return this;for(var r=n,u=r.indexOf(t);u!=-1;)r=r.replace(t,i),u=r.indexOf(t);return r},contains:function(n,t){return n==null||t==null?!1:n.indexOf(t)!=-1},containsIgnoreCase:function(n,t){return n==null||t==null?!1:n.toString().toUpperCase().indexOf(t.toString().toUpperCase())!=-1},equals:function(n,t){return n==null||t==null?!1:(n=this.normalize(n),t.length==n.length)?n.slice(0,t.length)==t:!1},equalsIgnoreCase:function(n,t){return n==null||t==null?!1:(n=this.normalize(n),t.length==n.length)?n.toUpperCase().slice(0,t.length)==t.toUpperCase():!1},startsWith:function(n,t){return n==null||t==null?!1:n.slice(0,t.length)==t},startsWithIgnoreCase:function(n,t){return n==null||t==null?!1:n.toUpperCase().slice(0,t.length)==t.toUpperCase()},normalize:function(n){return n.charCodeAt(n.length-1)==65279&&(n=n.substring(0,n.length-1)),n},endsWith:function(n,t){return n==null||t==null?!1:(n=this.normalize(n),n.slice(-t.length)==t)},endsWithIgnoreCase:function(n,t){return n==null||t==null?!1:(n=this.normalize(n),n.toUpperCase().slice(-t.length)==t.toUpperCase())}});n.extend(n.easing,{easeOutBack:function(n,t,i,r,u,f){return f==undefined&&(f=1.70158),r*((t=t/u-1)*t*((f+1)*t+f)+1)+i},easeInQuad:function(n,t,i,r,u){return r*(t/=u)*t+i},easeInOutCirc:function(n,t,i,r,u){return(t/=u/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+i:r/2*(Math.sqrt(1-(t-=2)*t)+1)+i},easeInOutSine:function(n,t,i,r,u){return-r/2*(Math.cos(Math.PI*t/u)-1)+i},easeInCubic:function(n,t,i,r,u){return r*(t/=u)*t*t+i},easeOutCubic:function(n,t,i,r,u){return r*((t=t/u-1)*t*t+1)+i},easeInOutCubic:function(n,t,i,r,u){return(t/=u/2)<1?r/2*t*t*t+i:r/2*((t-=2)*t*t+2)+i},easeInSine:function(n,t,i,r,u){return-r*Math.cos(t/u*(Math.PI/2))+r+i},easeOutSine:function(n,t,i,r,u){return r*Math.sin(t/u*(Math.PI/2))+i},easeInOutSine:function(n,t,i,r,u){return-r/2*(Math.cos(Math.PI*t/u)-1)+i}})}(jqxBaseFramework),function(n){n.event&&n.event.special&&n.extend(n.event.special,{close:{noBubble:!0},open:{noBubble:!0},cellclick:{noBubble:!0},rowclick:{noBubble:!0},tabclick:{noBubble:!0},selected:{noBubble:!0},expanded:{noBubble:!0},collapsed:{noBubble:!0},valuechanged:{noBubble:!0},expandedItem:{noBubble:!0},collapsedItem:{noBubble:!0},expandingItem:{noBubble:!0},collapsingItem:{noBubble:!0}});n.fn.extend&&n.fn.extend({ischildof:function(t){var r,i,u;if(!n(this).parents)return t.element.contains(this.element);for(r=n(this).parents().get(),i=0;i<r.length;i++)if(typeof t!="string"){if(u=r[i],t!==undefined&&u==t[0])return!0}else if(t!==undefined&&n(r[i]).is(t))return!0;return!1}});n.fn.jqxProxy=function(){var t=n(this).data().jqxWidget,r=Array.prototype.slice.call(arguments,0),i=t.element;return i||(i=t.base.element),n.jqx.jqxWidgetProxy(t.widgetName,i,r)};var t=this.originalVal=n.fn.val;n.fn.val=function(i){var r;return typeof i=="undefined"?n(this).hasClass("jqx-widget")&&(r=n(this).data().jqxWidget,r&&r.val)?r.val():t.call(this):n(this).hasClass("jqx-widget")&&(r=n(this).data().jqxWidget,r&&r.val)?arguments.length!=2?r.val(i):r.val(i,arguments[1]):t.call(this,i)};n.fn.modal&&n.fn.modal.Constructor&&(n.fn.modal.Constructor.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(t){if(this.$element[0]!==t.target&&!this.$element.has(t.target).length){if(n(t.target).parents().hasClass("jqx-popup"))return!0;this.$element.trigger("focus")}},this))});n.fn.coord=function(t){var i,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument,h,s;if(e){if(i=e.documentElement,!n.contains(i,r))return u;typeof r.getBoundingClientRect!==undefined&&(u=r.getBoundingClientRect());h=function(t){return n.isWindow(t)?t:t.nodeType===9?t.defaultView||t.parentWindow:!1};f=h(e);var o=0,c=0,l=navigator.userAgent.toLowerCase(),a=l.indexOf("ipad")!=-1||l.indexOf("iphone")!=-1;return a&&(o=2),!0==t&&document.body.style.position!="static"&&document.body.style.position!=""&&(s=n(document.body).coord(),o=-s.left,c=-s.top),{top:c+u.top+(f.pageYOffset||i.scrollTop)-(i.clientTop||0),left:o+u.left+(f.pageXOffset||i.scrollLeft)-(i.clientLeft||0)}}}}(jqxBaseFramework),function(n){n.jqx.jqxWidget("jqxMenu","",{});n.extend(n.jqx._jqxMenu.prototype,{defineInstance:function(){var t={items:[],mode:"horizontal",width:null,height:null,minimizeWidth:"auto",easing:"easeInOutSine",animationShowDuration:200,animationHideDuration:200,autoCloseInterval:0,animationHideDelay:100,animationShowDelay:100,menuElements:[],autoSizeMainItems:!1,autoCloseOnClick:!0,autoCloseOnMouseLeave:!0,enableRoundedCorners:!0,disabled:!1,autoOpenPopup:!0,enableHover:!0,autoOpen:!0,autoGenerate:!0,clickToOpen:!1,showTopLevelArrows:!1,touchMode:"auto",source:null,popupZIndex:17e3,rtl:!1,keyboardNavigation:!1,lockFocus:!1,title:"",events:["shown","closed","itemclick","initialized","open","close"]};return n.extend(!0,this,t),t},createInstance:function(){var i=this,r,t;this.host.attr("role","menubar");n.jqx.utilities.resize(this.host,function(){i.refresh()},!1,this.mode!="popup");this.minimizeWidth!="auto"&&this.minimizeWidth!=null&&this.width&&this.width.toString().indexOf("%")==-1&&n(window).resize(function(){i.refresh()});this.host.css("outline","none");this.source&&this.source!=null&&(r=this.loadItems(this.source),this.element.innerHTML=r);this._tmpHTML=this.element.innerHTML;this.element.innerHTML.indexOf("UL")&&(t=this.host.find("ul:first"),t.length>0&&this._createMenu(t[0]));this.host.data("autoclose",{});this._render();this._setSize();n.jqx.browser.msie&&n.jqx.browser.version<8&&this.host.attr("hideFocus",!0)},focus:function(){var r,t,i;try{this.mode==="popup"&&this.keyboardNavigation&&(r=this.host.closest("div.jqx-menu-wrapper"),r.focus());this.keyboardNavigation&&(this.host.focus(),t=this,i=function(){if(n.jqx.isHidden(n(t.items[0].element))){var i=t._nextVisibleItem(t.items[0],0);i&&(n(i.element).addClass(t.toThemeProperty("jqx-fill-state-focus")),t.activeItem=i)}else n(t.items[0].element).addClass(t.toThemeProperty("jqx-fill-state-focus")),t.activeItem=t.items[0]},this.activeItem?n.jqx.isHidden(n(this.activeItem.element))?(n(this.activeItem.element).removeClass(this.toThemeProperty("jqx-fill-state-focus")),i()):n(this.activeItem.element).addClass(this.toThemeProperty("jqx-fill-state-focus")):i())}catch(u){}},loadItems:function(t,i){var u,r;if(t!=null)return t.length==0?"":(u=this,this.items=[],r='<ul class="jqx-menu-ul">',i&&(r='<ul class="jqx-menu-ul" style="width:'+i+';">'),n.map(t,function(n){if(n==undefined)return null;r+=u._parseItem(n)}),r+="<\/ul>")},_parseItem:function(n){var t="",i,u,r;return n==undefined?null:(i=n.label,!n.label&&n.html&&(i=n.html),i||(i="Item"),typeof n=="string"&&(i=n),u=!1,n.selected!=undefined&&n.selected&&(u=!0),r=!1,n.disabled!=undefined&&n.disabled&&(r=!0),t+="<li",r&&(t+=' item-disabled="true" '),n.label&&!n.html&&(t+=' item-label="'+i+'" '),n.value!=null&&(t+=' item-value="'+n.value+'" '),n.id!=undefined&&(t+=' id="'+n.id+'" '),t+=">"+i,n.items&&(t+=n.subMenuWidth?this.loadItems(n.items,n.subMenuWidth):this.loadItems(n.items)),t+"<\/li>")},_setSize:function(){var e,t,i,f,r,u;if(this.width!=null&&this.width.toString().indexOf("%")!=-1?this.host.width(this.width):this.width!=null&&this.width.toString().indexOf("px")!=-1?this.host.width(this.width):this.width==undefined||isNaN(this.width)||this.host.width(this.width),this.height!=null&&this.height.toString().indexOf("%")!=-1?this.host.height(this.height):this.height!=null&&this.height.toString().indexOf("px")!=-1?this.host.height(this.height):this.height==undefined||isNaN(this.height)||this.host.height(this.height),this.height===null&&this.host.height("auto"),e=this,this.minimizeWidth!=null&&this.mode!="popup"){if(t=n(window).width(),!n.jqx.response&&(i=!1,navigator.userAgent.match(/Windows|Linux|MacOS/)&&(f=navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0,f||(i=!0)),r=this.minimizeWidth,i&&this.minimizeWidth=="auto"))return;this.minimizeWidth=="auto"&&n.jqx.response?(u=new n.jqx.response,(u.device.type=="Phone"||u.device.type=="Tablet")&&(this.minimized||this.minimize())):t<r&&!this.minimized?this.minimize():this.minimized&&t>=r&&this.restore()}},minimize:function(){var i,e,u,r,t,o,f;this.minimized||(i=this,this.host.addClass(this.toThemeProperty("jqx-menu-minimized")),this.minimized=!0,this._tmpMode=this.mode,this.mode="simple",t=this.host.closest("div.jqx-menu-wrapper"),t.remove(),n("#menuWrapper"+this.element.id).remove(),n.each(this.items,function(){var t=this,u=n(t.element),i=n(t.subMenuElement),r=i.closest("div.jqx-menu-popup");r.remove()}),this.source&&(e=this.loadItems(this.source),this.element.innerHTML=e,this._tmpHTML=this.element.innerHTML),this.element.innerHTML=this._tmpHTML,this.element.innerHTML.indexOf("UL")&&(u=this.host.find("ul:first"),u.length>0&&this._createMenu(u[0])),this._render(),r=this.host.find("ul:first"),r.wrap('<div class="jqx-menu-wrapper" style="z-index:'+this.popupZIndex+'; padding: 0px; display: none; margin: 0px; height: auto; width: auto; position: absolute; top: 0; left: 0; display: block; visibility: visible;"><\/div>'),t=r.closest("div.jqx-menu-wrapper"),t[0].id="menuWrapper"+this.element.id,t.detach(),t.appendTo(n(document.body)),t.addClass(this.toThemeProperty("jqx-widget")),t.addClass(this.toThemeProperty("jqx-menu")),t.addClass(this.toThemeProperty("jqx-menu-minimized")),t.addClass(this.toThemeProperty("jqx-widget-header")),r.children().hide(),t.hide(),t.find("ul").addClass(this.toThemeProperty("jqx-menu-ul-minimized")),this.minimizedItem=n("<div><\/div>"),this.minimizedItem.addClass(this.toThemeProperty("jqx-item")),this.minimizedItem.addClass(this.toThemeProperty("jqx-menu-item-top")),this.addHandler(t,"keydown",function(n){return i.handleKeyDown(n)}),this.minimizedItem.addClass(this.toThemeProperty("jqx-menu-minimized-button")),this.minimizedItem.prependTo(this.host),this.titleElement=n("<div>"+this.title+"<\/div>"),this.titleElement.addClass(this.toThemeProperty("jqx-item")),this.titleElement.addClass(this.toThemeProperty("jqx-menu-title")),this.titleElement.prependTo(this.host),n("<div style='clear:both;'><\/div>").insertAfter(this.minimizedItem),i.minimizedHidden=!0,o=function(){i.minimizedHidden=!0;i.minimizedItem.show();var n=!1;i.minimizedItem.css("float")=="right"&&(n=!0);t.animate({left:n?i.host.coord().left+i.host.width()+t.width():-t.outerWidth(),opacity:0},i.animationHideDuration,function(){t.find("ul:first").children().hide();t.hide()})},f=function(n){if(i.minimizedHidden){t.find("ul:first").children().show();i.minimizedHidden=!1;t.show();t.css("opacity",0);t.css("left",-t.outerWidth());var r=!1,u=t.width();i.minimizedItem.css("float")=="right"&&(t.css("left",i.host.coord().left+i.host.width()+u),r=!0);t.css("top",i.host.coord().top+i.host.height());t.animate({left:r?i.host.coord().left+i.host.width()-u:i.host.coord().left,opacity:1},i.animationShowDuration,function(){});setTimeout(function(){$body.bind("click.jqx touchbegin.jqx swipe.jqx",function(n){this.host&&f(n)})},0)}else o(n),$body.unbind(".jqx");i._raiseEvent("2",{type:"mouse",item:i.minimizedItem[0],event:n});i._setSize()},this.addHandler(n(window),"orientationchange.jqxmenu"+this.element.id,function(){setTimeout(function(){if(!i.minimizedHidden){var r=t.width(),n=!1,r=t.width();i.minimizedItem.css("float")=="right"&&(n=!0);t.css("top",i.host.coord().top+i.host.height());t.css({left:n?i.host.coord().left+i.host.width()-r:i.host.coord().left})}},25)}),this.addHandler(this.minimizedItem,"click",function(n){f(n)}))},restore:function(){var r,t,i;this.minimized&&(this.host.find("ul").removeClass(this.toThemeProperty("jqx-menu-ul-minimized")),this.host.removeClass(this.toThemeProperty("jqx-menu-minimized")),this.minimized=!1,this.mode=this._tmpMode,this.minimizedItem&&this.minimizedItem.remove(),r=n("#menuWrapper"+this.element.id),r.remove(),this.source&&(t=this.loadItems(this.source),this.element.innerHTML=t,this._tmpHTML=t),this.element.innerHTML=this._tmpHTML,this.element.innerHTML.indexOf("UL")&&(i=this.host.find("ul:first"),i.length>0&&this._createMenu(i[0])),this._setSize(),this._render())},isTouchDevice:function(){if(this._isTouchDevice!=undefined)return this._isTouchDevice;var t=n.jqx.mobile.isTouchDevice();return this.touchMode==!0?t=!0:this.touchMode==!1&&(t=!1),t&&(this.host.addClass(this.toThemeProperty("jqx-touch")),n(".jqx-menu-item").addClass(this.toThemeProperty("jqx-touch"))),this._isTouchDevice=t,t},refresh:function(n){n||this._setSize()},resize:function(n,t){this.width=n;this.height=t;this.refresh()},_closeAll:function(t){var i=t!=null?t.data:this,u=i.items,r;n.each(u,function(){var n=this;n.hasItems==!0&&n.isOpen&&i._closeItem(i,n)});i.mode=="popup"&&t!=null&&(r=i._isRightClick(t),r||i.close())},closeItem:function(t){if(t==null)return!1;var r=t,u=document.getElementById(r),i=this;return n.each(i.items,function(){var n=this;n.isOpen==!0&&n.element==u&&(i._closeItem(i,n),n.parentId&&i.closeItem(n.parentId))}),!0},openItem:function(t){if(t==null)return!1;var r=t,u=document.getElementById(r),i=this;return n.each(i.items,function(){var n=this;n.isOpen==!1&&n.element==u&&(i._openItem(i,n),n.parentId&&i.openItem(n.parentId))}),!0},_getClosedSubMenuOffset:function(t){var i=n(t.subMenuElement),u=-i.outerHeight(),r=-i.outerWidth(),f=t.level==0&&this.mode=="horizontal";f?r=0:u=0;switch(t.openVerticalDirection){case"up":case"center":u=i.outerHeight()}switch(t.openHorizontalDirection){case this._getDir("left"):r=f?0:i.outerWidth();break;case"center":r=f?0:i.outerWidth()}return{left:r,top:u}},_closeItem:function(t,i,r,u){var o,s,a;if(t==null||i==null)return!1;var f=n(i.subMenuElement),v=i.level==0&&this.mode=="horizontal",h=this._getClosedSubMenuOffset(i),c=h.top,l=h.left,y=n(i.element),e=f.closest("div.jqx-menu-popup");e!=null&&(o=t.animationHideDelay,u==!0&&(o=0),f.data("timer")&&f.data("timer").show!=null&&(clearTimeout(f.data("timer").show),f.data("timer").show=null),s=function(){i.isOpen=!1;v?f.stop().animate({top:c},t.animationHideDuration,function(){n(i.element).removeClass(t.toThemeProperty("jqx-fill-state-pressed"));n(i.element).removeClass(t.toThemeProperty("jqx-menu-item-top-selected"));n(i.element).removeClass(t.toThemeProperty("jqx-rc-b-expanded"));e.removeClass(t.toThemeProperty("jqx-rc-t-expanded"));var r=n(i.arrow);r.length>0&&t.showTopLevelArrows&&(r.removeClass(),i.openVerticalDirection=="down"?(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-down")),r.addClass(t.toThemeProperty("jqx-icon-arrow-down"))):(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-up")),r.addClass(t.toThemeProperty("jqx-icon-arrow-up"))));n.jqx.aria(n(i.element),"aria-expanded",!1);e.css({display:"none"});t.animationHideDuration==0&&f.css({top:c});t._raiseEvent("1",i)}):(!n.jqx.browser.msie,f.stop().animate({left:l},t.animationHideDuration,function(){var r;t.animationHideDuration==0&&f.css({left:l});i.level>0?(n(i.element).removeClass(t.toThemeProperty("jqx-fill-state-pressed")),n(i.element).removeClass(t.toThemeProperty("jqx-menu-item-selected")),r=n(i.arrow),r.length>0&&(r.removeClass(),i.openHorizontalDirection!="left"?(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-"+t._getDir("right"))),r.addClass(t.toThemeProperty("jqx-icon-arrow-"+t._getDir("right")))):(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-"+t._getDir("left"))),r.addClass(t.toThemeProperty("jqx-icon-arrow-"+t._getDir("left")))))):(n(i.element).removeClass(t.toThemeProperty("jqx-fill-state-pressed")),n(i.element).removeClass(t.toThemeProperty("jqx-menu-item-top-selected")),r=n(i.arrow),r.length>0&&(r.removeClass(),i.openHorizontalDirection!="left"?(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-top-"+t._getDir("right"))),r.addClass(t.toThemeProperty("jqx-icon-arrow-"+t._getDir("right")))):(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-top-"+t._getDir("left"))),r.addClass(t.toThemeProperty("jqx-icon-arrow-"+t._getDir("left"))))));n.jqx.aria(n(i.element),"aria-expanded",!1);e.css({display:"none"});t._raiseEvent("1",i)}))},o>0?f.data("timer")&&(f.data("timer").hide=setTimeout(function(){s()},o)):s(),r!=undefined&&r&&(a=f.children(),n.each(a,function(){if(t.menuElements[this.id]&&t.menuElements[this.id].isOpen){var i=n(t.menuElements[this.id].subMenuElement);t._closeItem(t,t.menuElements[this.id],!0,!0)}})))},getSubItems:function(t,i){var u,r;if(t==null)return!1;u=this;r=[];i!=null&&n.extend(r,i);var f=t,e=this.menuElements[f],o=n(e.subMenuElement),s=o.find(".jqx-menu-item");return n.each(s,function(){r[this.id]=u.menuElements[this.id];var t=u.getSubItems(this.id,r);n.extend(r,t)}),r},disable:function(t,i){var e,u,f,r;t!=null&&(e=t,u=this,this.menuElements[e]&&(f=this.menuElements[e],f.disabled=i,r=n(f.element),f.element.disabled=i,n.each(r.children(),function(){this.disabled=i}),i?(r.addClass(u.toThemeProperty("jqx-menu-item-disabled")),r.addClass(u.toThemeProperty("jqx-fill-state-disabled"))):(r.removeClass(u.toThemeProperty("jqx-menu-item-disabled")),r.removeClass(u.toThemeProperty("jqx-fill-state-disabled")))))},getItem:function(n){return this.menuElements[n]?this.menuElements[n]:null},disableItem:function(n){this.disable(n,!0)},hideItem:function(t){if(this.menuElements[t]){var i=this.menuElements[t];n(i.element).hide()}},showItem:function(t){if(this.menuElements[t]){var i=this.menuElements[t];n(i.element).show()}},enableItem:function(n){this.disable(n,!1)},_setItemProperty:function(n,t,i){var r,f,u;n!=null&&(r=n,f=this,this.menuElements[r]&&(u=this.menuElements[r],u[t]&&(u[t]=i)))},setItemOpenDirection:function(t,i,r){var f,u,o;if(t!=null){var h=t,e=this,s=n.jqx.browser.msie&&n.jqx.browser.version<8;if(this.menuElements[h]&&(f=this.menuElements[h],i!=null&&(f.openHorizontalDirection=i,f.hasItems&&f.level>0&&(o=n(f.element),o!=undefined&&(u=n(f.arrow),f.arrow==null&&(u=n('<span id="arrow'+o[0].id+'"><\/span>'),s?u.appendTo(o):u.prependTo(o),f.arrow=u[0]),u.removeClass(),f.openHorizontalDirection=="left"?(u.addClass(e.toThemeProperty("jqx-menu-item-arrow-"+e._getDir("left"))),u.addClass(e.toThemeProperty("jqx-icon-arrow-"+e._getDir("left")))):(u.addClass(e.toThemeProperty("jqx-menu-item-arrow-"+e._getDir("right"))),u.addClass(e.toThemeProperty("jqx-icon-arrow-"+e._getDir("right")))),u.css("visibility","inherit"),s?(u.css("display","inline-block"),u.css("float","none")):(u.css("display","block"),u.css("float","right"))))),r!=null)){if(f.openVerticalDirection=r,u=n(f.arrow),o=n(f.element),!e.showTopLevelArrows)return;o!=undefined&&(f.arrow==null&&(u=n('<span id="arrow'+o[0].id+'"><\/span>'),s?u.appendTo(o):u.prependTo(o),f.arrow=u[0]),u.removeClass(),f.openVerticalDirection=="down"?(u.addClass(e.toThemeProperty("jqx-menu-item-arrow-down")),u.addClass(e.toThemeProperty("jqx-icon-arrow-down"))):(u.addClass(e.toThemeProperty("jqx-menu-item-arrow-up")),u.addClass(e.toThemeProperty("jqx-icon-arrow-up"))),u.css("visibility","inherit"),s?(u.css("display","inline-block"),u.css("float","none")):(u.css("display","block"),u.css("float","right")))}}},_getSiblings:function(n){for(var i=[],r=0,t=0;t<this.items.length;t++)this.items[t]!=n&&this.items[t].parentId==n.parentId&&this.items[t].hasItems&&(i[r++]=this.items[t]);return i},_openItem:function(t,i,r){var c,p,s,u,w,h,b,k,y,l,a,v,d;if(t==null||i==null||i.isOpen||i.disabled||t.disabled)return!1;c=t.popupZIndex;r!=undefined&&(c=r);p=t.animationHideDuration;t.animationHideDuration=0;t._closeItem(t,i,!0,!0);t.animationHideDuration=p;n(i.element).focus();s=[5,5];u=n(i.subMenuElement);u!=null&&u.stop();u.data("timer")&&u.data("timer").hide!=null&&clearTimeout(u.data("timer").hide);var f=u.closest("div.jqx-menu-popup"),e=n(i.element),o=i.level==0?this._getOffset(i.element):e.position();i.level>0&&this.hasTransform&&(w=parseInt(e.coord().top)-parseInt(this._getOffset(i.element).top),o.top+=w);i.level==0&&this.mode=="popup"&&(o=e.coord());h=i.level==0&&this.mode=="horizontal";b=h?o.left:this.menuElements[i.parentId]!=null&&this.menuElements[i.parentId].subMenuElement!=null?parseInt(n(n(this.menuElements[i.parentId].subMenuElement).closest("div.jqx-menu-popup")).outerWidth())-s[0]:parseInt(u.outerWidth());f.css({visibility:"visible",display:"block",left:b,top:h?o.top+e.outerHeight():o.top,zIndex:c});u.css("display","block");this.mode!="horizontal"&&i.level==0?(k=this._getOffset(this.element),f.css("left",-1+k.left+this.host.outerWidth()),u.css("left",-u.outerWidth())):(y=this._getClosedSubMenuOffset(i),u.css("left",y.left),u.css("top",y.top));f.css({height:parseInt(u.outerHeight())+parseInt(s[1])+"px"});l=0;a=0;switch(i.openVerticalDirection){case"up":h?(u.css("top",u.outerHeight()),l=s[1],v=parseInt(u.parent().css("padding-bottom")),isNaN(v)&&(v=0),v>0&&f.addClass(this.toThemeProperty("jqx-menu-popup-clear")),u.css("top",u.outerHeight()-v),f.css({display:"block",top:o.top-f.outerHeight(),zIndex:c})):(l=s[1],u.css("top",u.outerHeight()),f.css({display:"block",top:o.top-f.outerHeight()+s[1]+e.outerHeight(),zIndex:c}));break;case"center":h?(u.css("top",0),f.css({display:"block",top:o.top-f.outerHeight()/2+s[1],zIndex:c})):(u.css("top",0),f.css({display:"block",top:o.top+e.outerHeight()/2-f.outerHeight()/2+s[1],zIndex:c}))}switch(i.openHorizontalDirection){case this._getDir("left"):h?f.css({left:o.left-(f.outerWidth()-e.outerWidth()-s[0])}):(a=0,u.css("left",f.outerWidth()),f.css({left:o.left-f.outerWidth()+2*i.level}));break;case"center":h?f.css({left:o.left-(f.outerWidth()/2-e.outerWidth()/2-s[0]/2)}):(f.css({left:o.left-(f.outerWidth()/2-e.outerWidth()/2-s[0]/2)}),u.css("left",f.outerWidth()))}if(h){if(parseInt(u.css("top"))==l){i.isOpen=!0;return}}else if(parseInt(u.css("left"))==a){i.isOpen==!0;return}n.each(t._getSiblings(i),function(){t._closeItem(t,this,!0,!0)});d=n.data(t.element,"animationHideDelay");t.animationHideDelay=d;this.autoCloseInterval>0&&(this.host.data("autoclose")!=null&&this.host.data("autoclose").close!=null&&clearTimeout(this.host.data("autoclose").close),this.host.data("autoclose")!=null&&(this.host.data("autoclose").close=setTimeout(function(){t._closeAll()},this.autoCloseInterval)));u.data("timer")&&(u.data("timer").show=setTimeout(function(){var r;f!=null&&(h?(u.stop(),u.css("left",a),!n.jqx.browser.msie,e.addClass(t.toThemeProperty("jqx-fill-state-pressed")),e.addClass(t.toThemeProperty("jqx-menu-item-top-selected")),i.openVerticalDirection=="down"?(n(i.element).addClass(t.toThemeProperty("jqx-rc-b-expanded")),f.addClass(t.toThemeProperty("jqx-rc-t-expanded"))):(n(i.element).addClass(t.toThemeProperty("jqx-rc-t-expanded")),f.addClass(t.toThemeProperty("jqx-rc-b-expanded"))),r=n(i.arrow),r.length>0&&t.showTopLevelArrows&&(r.removeClass(),i.openVerticalDirection=="down"?(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-down-selected")),r.addClass(t.toThemeProperty("jqx-icon-arrow-down"))):(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-up-selected")),r.addClass(t.toThemeProperty("jqx-icon-arrow-up")))),t.animationShowDuration==0?(u.css({top:l}),i.isOpen=!0,t._raiseEvent("0",i),n.jqx.aria(n(i.element),"aria-expanded",!0)):u.animate({top:l},t.animationShowDuration,t.easing,function(){i.isOpen=!0;n.jqx.aria(n(i.element),"aria-expanded",!0);t._raiseEvent("0",i)})):(u.stop(),u.css("top",l),!n.jqx.browser.msie,i.level>0?(e.addClass(t.toThemeProperty("jqx-fill-state-pressed")),e.addClass(t.toThemeProperty("jqx-menu-item-selected")),r=n(i.arrow),r.length>0&&(r.removeClass(),i.openHorizontalDirection!="left"?(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-"+t._getDir("right")+"-selected")),r.addClass(t.toThemeProperty("jqx-icon-arrow-"+t._getDir("right")))):(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-"+t._getDir("left")+"-selected")),r.addClass(t.toThemeProperty("jqx-icon-arrow-"+t._getDir("left")))))):(e.addClass(t.toThemeProperty("jqx-fill-state-pressed")),e.addClass(t.toThemeProperty("jqx-menu-item-top-selected")),r=n(i.arrow),r.length>0&&(r.removeClass(),i.openHorizontalDirection!="left"?(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-"+t._getDir("right")+"-selected")),r.addClass(t.toThemeProperty("jqx-icon-arrow-"+t._getDir("right")))):(r.addClass(t.toThemeProperty("jqx-menu-item-arrow-"+t._getDir("left")+"-selected")),r.addClass(t.toThemeProperty("jqx-icon-arrow-"+t._getDir("left")))))),!n.jqx.browser.msie,t.animationShowDuration==0?(u.css({left:a}),t._raiseEvent("0",i),i.isOpen=!0,n.jqx.aria(n(i.element),"aria-expanded",!0)):u.animate({left:a},t.animationShowDuration,t.easing,function(){t._raiseEvent("0",i);i.isOpen=!0;n.jqx.aria(n(i.element),"aria-expanded",!0)})))},this.animationShowDelay))},_getDir:function(n){switch(n){case"left":return this.rtl?"right":"left";case"right":return this.rtl?"left":"right"}return"left"},_applyOrientation:function(t,i){var r=this,e=0,f,u,o,s;r.host.removeClass(r.toThemeProperty("jqx-menu-horizontal"));r.host.removeClass(r.toThemeProperty("jqx-menu-vertical"));r.host.removeClass(r.toThemeProperty("jqx-menu"));r.host.removeClass(r.toThemeProperty("jqx-widget"));r.host.addClass(r.toThemeProperty("jqx-widget"));r.host.addClass(r.toThemeProperty("jqx-menu"));t!=undefined&&i!=undefined&&i=="popup"?r.host.parent().length>0&&r.host.parent().parent().length>0&&r.host.parent().parent()[0]==document.body&&(f=n.data(document.body,"jqxMenuOldHost"+r.element.id),f!=null&&(u=r.host.closest("div.jqx-menu-wrapper"),u.remove(),u.appendTo(f),r.host.css("display","block"),r.host.css("visibility","visible"),u.css("display","block"),u.css("visibility","visible"))):t==undefined&&i==undefined&&n.data(document.body,"jqxMenuOldHost"+r.element.id,r.host.parent()[0]);r.autoOpenPopup?r.mode=="popup"?(r.addHandler(n(document),"contextmenu."+r.element.id,function(){return!1}),r.addHandler(n(document),"mousedown.menu"+r.element.id,function(n){r._openContextMenu(n)})):(r.removeHandler(n(document),"contextmenu."+r.element.id),r.removeHandler(n(document),"mousedown.menu"+r.element.id)):(r.removeHandler(n(document),"contextmenu."+r.element.id),r.removeHandler(n(document),"mousedown.menu"+r.element.id),r.addHandler(n(document),"contextmenu."+r.element.id,function(n){if(n.target&&n.target.className.indexOf&&n.target.className.indexOf("jqx-menu")>=0)return!1}));r.rtl&&r.host.addClass(r.toThemeProperty("jqx-rtl"));switch(r.mode){case"horizontal":r.host.addClass(r.toThemeProperty("jqx-widget-header"));r.host.addClass(r.toThemeProperty("jqx-menu-horizontal"));n.each(r.items,function(){var i=this,u,t;$element=n(i.element);t=n(i.arrow);t.removeClass();i.hasItems&&i.level>0&&(t=n('<span style="border: none; background-color: transparent;" id="arrow'+$element[0].id+'"><\/span>'),t.prependTo($element),t.css("float",r._getDir("right")),t.addClass(r.toThemeProperty("jqx-menu-item-arrow-"+r._getDir("right"))),t.addClass(r.toThemeProperty("jqx-icon-arrow-"+r._getDir("right"))),i.arrow=t[0]);i.level==0&&(n(i.element).css("float",r._getDir("left")),!i.ignoretheme&&i.hasItems&&r.showTopLevelArrows?(t=n('<span style="border: none; background-color: transparent;" id="arrow'+$element[0].id+'"><\/span>'),u=n.jqx.browser.msie&&n.jqx.browser.version<8,i.arrow==null?u?t.appendTo($element):t.prependTo($element):t=n(i.arrow),i.openVerticalDirection=="down"?(t.addClass(r.toThemeProperty("jqx-menu-item-arrow-down")),t.addClass(r.toThemeProperty("jqx-icon-arrow-down"))):(t.addClass(r.toThemeProperty("jqx-menu-item-arrow-up")),t.addClass(r.toThemeProperty("jqx-icon-arrow-up"))),t.css("visibility","inherit"),u?t.css("display","inline-block"):(t.css("display","block"),t.css("float","right")),i.arrow=t[0]):i.ignoretheme||!i.hasItems||r.showTopLevelArrows||i.arrow!=null&&(t=n(i.arrow),t.remove(),i.arrow=null),e=Math.max(e,$element.height()))});break;case"vertical":case"popup":case"simple":r.host.addClass(r.toThemeProperty("jqx-menu-vertical"));n.each(r.items,function(){var i=this,t;if($element=n(i.element),i.hasItems&&!i.ignoretheme){if(i.arrow&&n(i.arrow).remove(),r.mode=="simple")return!0;t=n('<span style="border: none; background-color: transparent;" id="arrow'+$element[0].id+'"><\/span>');t.prependTo($element);t.css("float","right");i.level==0?(t.addClass(r.toThemeProperty("jqx-menu-item-arrow-top-"+r._getDir("right"))),t.addClass(r.toThemeProperty("jqx-icon-arrow-"+r._getDir("right")))):(t.addClass(r.toThemeProperty("jqx-menu-item-arrow-"+r._getDir("right"))),t.addClass(r.toThemeProperty("jqx-icon-arrow-"+r._getDir("right"))));i.arrow=t[0]}$element.css("float","none")});r.mode=="popup"?(r.host.addClass(r.toThemeProperty("jqx-widget-content")),r.host.wrap('<div tabindex=0 class="jqx-menu-wrapper" style="z-index:'+r.popupZIndex+'; border: none; background-color: transparent; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: visible;"><\/div>'),u=r.host.closest("div.jqx-menu-wrapper"),r.host.addClass(r.toThemeProperty("jqx-popup")),u[0].id="menuWrapper"+r.element.id,u.appendTo(n(document.body)),r.addHandler(u,"keydown",function(n){return r.handleKeyDown(n)})):r.host.addClass(r.toThemeProperty("jqx-widget-header"));r.mode=="popup"&&(o=r.host.height(),r.host.css("position","absolute"),r.host.css("top","0"),r.host.css("left","0"),r.mode!="simple"&&(r.host.height(o),r.host.css("display","none")))}s=r.isTouchDevice();r.autoCloseOnClick&&(r.removeHandler(n(document),"mousedown.menu"+r.element.id,r._closeAfterClick),r.addHandler(n(document),"mousedown.menu"+r.element.id,r._closeAfterClick,r),s&&(r.removeHandler(n(document),n.jqx.mobile.getTouchEventName("touchstart")+".menu"+r.element.id,r._closeAfterClick,r),r.addHandler(n(document),n.jqx.mobile.getTouchEventName("touchstart")+".menu"+r.element.id,r._closeAfterClick,r)))},_getBodyOffset:function(){var t=0,i=0;return n("body").css("border-top-width")!="0px"&&(t=parseInt(n("body").css("border-top-width")),isNaN(t)&&(t=0)),n("body").css("border-left-width")!="0px"&&(i=parseInt(n("body").css("border-left-width")),isNaN(i)&&(i=0)),{left:i,top:t}},_getOffset:function(t){var u=n.jqx.mobile.isSafariMobileBrowser(),f=n(t).coord(!0),i=f.top,r=f.left,e,o;return n("body").css("border-top-width")!="0px"&&(i=parseInt(i)+this._getBodyOffset().top),n("body").css("border-left-width")!="0px"&&(r=parseInt(r)+this._getBodyOffset().left),e=n.jqx.mobile.isWindowsPhone(),o=n.jqx.mobile.isTouchDevice(),this.hasTransform||u!=null&&u||e||o?{left:n.jqx.mobile.getLeftPos(t),top:n.jqx.mobile.getTopPos(t)}:{left:r,top:i}},_isRightClick:function(n){var t,n;return n||(n=window.event),n.which?t=n.which==3:n.button&&(t=n.button==2),t},_openContextMenu:function(n){var t=this,i=t._isRightClick(n);i&&t.open(parseInt(n.clientX)+5,parseInt(n.clientY)+5)},close:function(){var t=this,i=n.data(this.element,"contextMenuOpened"+this.element.id),r;i&&(r=this.host,n.each(t.items,function(){var n=this;n.hasItems&&t._closeItem(t,n)}),n.each(t.items,function(){var t=this,i;t.isOpen==!0&&($submenu=n(t.subMenuElement),i=$submenu.closest("div.jqx-menu-popup"),i.hide(this.animationHideDuration))}),this.host.hide(this.animationHideDuration),n.data(t.element,"contextMenuOpened"+this.element.id,!1),t._raiseEvent("1",t),t._raiseEvent("5"));t.minimized&&!t.minimizedHidden&&($("#menuWrapper"+this.element.id).hide(),t.minimizedHidden=!0,$body.unbind(".jqx"))},open:function(t,i){var u,r;this.mode=="popup"&&(u=0,this.host.css("display")=="block"&&(this.close(),u=this.animationHideDuration),r=this,(t==undefined||t==null)&&(t=0),(i==undefined||i==null)&&(i=0),setTimeout(function(){r.host.show(r.animationShowDuration);r.host.css("visibility","visible");n.data(r.element,"contextMenuOpened"+r.element.id,!0);r._raiseEvent("0",r);r._raiseEvent("4",{left:t,top:i});r.host.css("z-index",9999);t!=undefined&&i!=undefined&&r.host.css({left:t,top:i});r.focus()},u))},_renderHover:function(n,t){var i=this;t.ignoretheme||(this.addHandler(n,"mouseenter",function(){i.hoveredItem=t;t.disabled||t.separator||!i.enableHover||i.disabled||(t.level>0?(n.addClass(i.toThemeProperty("jqx-fill-state-hover")),n.addClass(i.toThemeProperty("jqx-menu-item-hover"))):(n.addClass(i.toThemeProperty("jqx-fill-state-hover")),n.addClass(i.toThemeProperty("jqx-menu-item-top-hover"))))}),this.addHandler(n,"mouseleave",function(){t.disabled||t.separator||!i.enableHover||i.disabled||(t.level>0?(n.removeClass(i.toThemeProperty("jqx-fill-state-hover")),n.removeClass(i.toThemeProperty("jqx-menu-item-hover"))):(n.removeClass(i.toThemeProperty("jqx-fill-state-hover")),n.removeClass(i.toThemeProperty("jqx-menu-item-top-hover"))))}))},_closeAfterClick:function(t){var i=t!=null?t.data:this,r=!1;i.autoCloseOnClick&&(n.each(n(t.target).parents(),function(){if(this.className.indexOf&&this.className.indexOf("jqx-menu")!=-1)return r=!0,!1}),r||(t.data=i,i._closeAll(t)))},_autoSizeHorizontalMenuItems:function(){var i=this,t;i.autoSizeMainItems&&this.mode=="horizontal"&&(t=this.maxHeight,parseInt(t)>parseInt(this.host.height())&&(t=parseInt(this.host.height())),t=parseInt(this.host.height()),n.each(this.items,function(){var f=this,u;if($element=n(f.element),f.level==0&&t>0){var h=$element.children().length>0?parseInt($element.children().height()):$element.height(),e=i.host.find("ul:first"),c=parseInt(e.css("padding-top")),l=parseInt(e.css("margin-top")),o=t-2*(l+c),s=parseInt(o)/2-h/2,r=parseInt(s),a=parseInt(s);$element.css("padding-top",r);$element.css("padding-bottom",a);parseInt($element.outerHeight())>o&&(u=1,$element.css("padding-top",r-u),r=r-u)}}));n.each(this.items,function(){var t=this,r,i;$element=n(t.element);t.hasItems&&t.level>0&&t.arrow&&(r=n(t.arrow),i=n(t.element).height(),i>15&&r.css("margin-top",(i-15)/2))})},_nextVisibleItem:function(n,t){if(n==null||n==undefined)return null;for(var i=n;i!=null;)if(i=i.nextItem,this._isVisible(i)&&!i.disabled&&i.type!=="separator"){if(this.minimized)return i;if(t!=undefined&&i&&i.level!=t)continue;return i}return null},_prevVisibleItem:function(n,t){if(n==null||n==undefined)return null;for(var i=n;i!=null;)if(i=i.prevItem,this._isVisible(i)&&!i.disabled&&i.type!=="separator"){if(this.minimized)return i;if(t!=undefined&&i&&i.level!=t)continue;return i}return null},_parentItem:function(t){var i,r;return t==null||t==undefined?null:(i=t.parentElement,!i)?null:(r=null,n.each(this.items,function(){if(this.element==i)return r=this,!1}),r)},_isElementVisible:function(t){return t==null?!1:n(t).css("display")!="none"&&n(t).css("visibility")!="hidden"?!0:!1},_isVisible:function(n){if(n==null||n==undefined||!this._isElementVisible(n.element))return!1;var t=this._parentItem(n);if(t==null||this.minimized)return!0;if(t!=null){if(!this._isElementVisible(t.element))return!1;if(t.isOpen||this.minimized){while(t!=null)if((t=this._parentItem(t),t!=null&&!this._isElementVisible(t.element))||t!=null&&!t.isOpen)return!1}else return!1}return!0},_render:function(t,i){var s;this.disabled&&(this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled")),this.host.addClass(this.toThemeProperty("jqx-menu-disabled")));this.host.attr("tabindex")==undefined&&this.host.attr("tabindex",0);var e=this.popupZIndex,o=[5,5],r=this;n.data(r.element,"animationHideDelay",r.animationHideDelay);var u=this.isTouchDevice(),f=u&&(n.jqx.mobile.isWindowsPhone()||navigator.userAgent.indexOf("Touch")>=0),h=!1;navigator.platform.toLowerCase().indexOf("win")!=-1&&(navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0?this.touchDevice=!0:navigator.userAgent.indexOf("Touch")>=0&&(s="MSPointerDown"in window,(s||n.jqx.mobile.isWindowsPhone()||navigator.userAgent.indexOf("ARM")>=0)&&(h=!0,f=!0,r.clickToOpen=!0,r.autoCloseOnClick=!1,r.enableHover=!1)));n.data(document.body,"menuel",this);this.hasTransform=n.jqx.utilities.hasTransform(this.host);this._applyOrientation(t,i);this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus");this.addHandler(this.host,"blur",function(){if(r.keyboardNavigation&&r.activeItem){if(r.mode==="popup"&&document.activeElement&&document.activeElement.className.indexOf("jqx-menu-wrapper")>=0)return;n(r.activeItem.element).removeClass(r.toThemeProperty("jqx-fill-state-focus"));r.activeItem=null}});this.addHandler(this.host,"focus",function(){if(r.keyboardNavigation&&!r.activeItem)if(r.hoveredItem)n(r.hoveredItem.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=r.hoveredItem;else{var t=function(){if(n.jqx.isHidden(n(r.items[0].element))){var t=r._nextVisibleItem(r.items[0],0);t&&(n(t.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=t)}else n(r.items[0].element).addClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=r.items[0]};r.activeItem?n.jqx.isHidden(n(r.activeItem.element))?(n(r.activeItem.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),t()):n(r.activeItem.element).addClass(r.toThemeProperty("jqx-fill-state-focus")):t()}});this.removeHandler(this.host,"keydown");r.handleKeyDown=function(t){var i,a,p,o,l,v,w,y,f,s,u,e,b,c;if(r.keyboardNavigation){if(t.target.nodeName.toLowerCase()==="input")return!0;if(i=null,a=null,n.each(r.items,function(){var n=this;return this.disabled?!0:(this.element.className.indexOf("pressed")>=0&&(a=this),this.element.className.indexOf("focus")>=0?(i=this,!1):void 0)}),!i&&a&&(i=a),i||(n(r.items[0].element).addClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=r.items[0],i=r.activeItem),p=!1,t.keyCode==27){if(t.data=r,r._closeAll(t),i)for(o=i;o!=null;)o.parentItem?o=o.parentItem:(n(r.activeItem.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=o,n(r.activeItem.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),o=o.parentItem);p=!0}t.keyCode==13&&i&&(p=!0,r._raiseEvent("2",{item:i.element,event:t,type:"keyboard"}),l=i.anchor!=null?n(i.anchor):null,l!=null&&l.length>0&&(v=l.attr("href"),w=l.attr("target"),v!=null&&(w!=null?window.open(v,w):window.location=v)),t.preventDefault(),t.stopPropagation(),n(i.element).focus());y=function(n){var i,u,t;if(n==null)return[];for(i=[],u=0,t=0;t<r.items.length;t++)r.items[t].parentId==n.parentId&&(i[u++]=r.items[t]);return i};f="";switch(t.keyCode){case 40:f="down";break;case 38:f="up";break;case 39:f="right";break;case 37:f="left"}if(i&&i.openHorizontalDirection==="left"&&f==="left"&&(f="right"),i&&i.openHorizontalDirection==="left"&&f==="right"&&(f="left"),i&&i.openVerticalDirection==="top"&&f==="top"&&(f="bottom"),i&&i.openVerticalDirection==="top"&&f==="bottom"&&(f="top"),r.rtl&&(f==="right"?f="left":f==="left"&&(f="right")),f==="right"&&!r.minimized){if(t.altKey&&(i.level!=0&&i.hasItems||r.mode!="horizontal"))r._openItem(r,i);else{var u=r._nextVisibleItem(i,0),h=r._nextVisibleItem(i),e=y(h);u||(u=h);u&&(u.parentId===i.parentId&&u.level==0&&r.mode=="horizontal"||h.id==e[0].id&&h.level!=0)&&(h.id==e[0].id&&(i.level!=0||i.level==0&&r.mode!="horizontal")&&(u=h),n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u)}t.preventDefault();t.stopPropagation()}if(f!=="left"||r.minimized||(t.altKey&&(i.level!=0&&r.mode!=="horizontal"||i.level>1&&r.mode==="horizontal"||i.level==1&&i.hasItems&&r.mode==="horizontal")?i.hasItems?r._closeItem(r,i):i.parentItem&&(r._closeItem(r,i.parentItem),n(i.parentItem.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=i.parentItem):(u=r._prevVisibleItem(i,0),s=i.parentItem,u&&u.parentId===i.parentId&&u.level==0&&r.mode=="horizontal"?(n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u):s&&s.level==0&&r.mode=="horizontal"||!s||s.level!=i.level-1||(n(s.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=s)),t.preventDefault(),t.stopPropagation()),f==="down"?(t.altKey?(i.level==0&&i.hasItems&&r._openItem(r,i),r.minimized&&r.minimizedHidden&&r.minimizedItem.trigger("click")):(u=r._nextVisibleItem(i,i.level),e=y(u),r.minimized&&u?(n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u):(u&&(u.parentId===i.parentId||u.id==e[0].id&&r.mode=="horizontal")&&(u.level==0&&r.mode=="horizontal"||(n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u)),r.mode==="horizontal"&&i.level===0&&i.isOpen&&i.hasItems&&(u=r._nextVisibleItem(i),n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u))),t.preventDefault(),t.stopPropagation()):f==="up"&&(t.altKey?(i.parentItem&&i.parentItem.level==0?(r._closeItem(r,i.parentItem),n(i.parentItem.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=i.parentItem):i.parentItem===null&&i.level===0&&r.mode==="horizontal"&&r._closeItem(r,i),r.minimized&&(r.minimizedHidden||r.minimizedItem.trigger("click"))):(u=r._prevVisibleItem(i,i.level),e=y(i),r.minimized&&u?(n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u):u&&(u.parentId===i.parentId||u.id==i.parentId&&u.level==0&&r.mode=="horizontal")?u.level==0&&r.mode==="horizontal"&&i.level===0||(n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u):i&&i.id==e[0].id&&i.parentItem&&i.parentItem.level===0&&r.mode==="horizontal"&&(u=i.parentItem,n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u)),t.preventDefault(),t.stopPropagation()),t.keyCode==9)if(u=t.shiftKey?r._prevVisibleItem(i):r._nextVisibleItem(i),u)n(u.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=u,t.preventDefault(),t.stopPropagation();else if(r.lockFocus){for(e=[],b=0,c=0;c<r.items.length;c++)r.items[c]!=i&&r.items[c].parentId==i.parentId&&(e[b++]=r.items[c]);e.length>0&&(t.shiftKey?(n(e[e.length-1].element).addClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=e[e.length-1]):(n(e[0].element).addClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=e[0]),n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")));t.preventDefault();t.stopPropagation()}else i&&(n(i.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=null)}else return!0};this.addHandler(this.host,"keydown",function(n){r.handleKeyDown(n)});r.enableRoundedCorners&&this.host.addClass(r.toThemeProperty("jqx-rc-all"));n.each(this.items,function(){var t=this,s=n(t.element),i,h,c;if(s.attr("role","menuitem"),r.enableRoundedCorners&&s.addClass(r.toThemeProperty("jqx-rc-all")),r.removeHandler(s,"click"),r.addHandler(s,"click",function(i){var f,e,o;t.disabled||r.disabled||(r.keyboardNavigation&&(r.activeItem&&n(r.activeItem.element).removeClass(r.toThemeProperty("jqx-fill-state-focus")),r.activeItem=t,n(t.element).addClass(r.toThemeProperty("jqx-fill-state-focus")),r.minimized&&i.stopPropagation()),r._raiseEvent("2",{type:"mouse",item:t.element,event:i}),r.autoOpen?!r.autoCloseOnClick||u||r.clickToOpen||t.closeOnClick&&(i.data=r,r._closeAll(i)):t.level>0&&(!r.autoCloseOnClick||u||r.clickToOpen||(i.data=r,r._closeAll(i))),u&&r.autoCloseOnClick&&(i.data=r,t.hasItems||r._closeAll(i)),i.target.tagName!="A"&&i.target.tagName!="a"&&(f=t.anchor!=null?n(t.anchor):null,f!=null&&f.length>0&&(e=f.attr("href"),o=f.attr("target"),e!=null&&(o!=null?window.open(e,o):window.location=e))))}),r.removeHandler(s,"mouseenter"),r.removeHandler(s,"mouseleave"),f||r.mode=="simple"||r._renderHover(s,t,u),t.subMenuElement!=null){if(i=n(t.subMenuElement),r.mode=="simple")return i.show(),!0;if(i.wrap('<div class="jqx-menu-popup '+r.toThemeProperty("jqx-menu-popup")+'" style="border: none; background-color: transparent; z-index:'+e+'; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: hidden;"><div style="background-color: transparent; border: none; position:absolute; overflow:hidden; left: 0; top: 0; right: 0; width: 100%; height: 100%;"><\/div><\/div>'),i.css({overflow:"hidden",position:"absolute",left:0,display:"inherit",top:-i.outerHeight()}),i.data("timer",{}),t.level>0?i.css("left",-i.outerWidth()):r.mode=="horizontal"&&i.css("left",0),e++,h=n(t.subMenuElement).closest("div.jqx-menu-popup").css({width:parseInt(n(t.subMenuElement).outerWidth())+parseInt(o[0])+"px",height:parseInt(n(t.subMenuElement).outerHeight())+parseInt(o[1])+"px"}),c=s.closest("div.jqx-menu-popup"),c.length>0){var l=i.css("margin-left"),a=i.css("margin-right"),v=i.css("padding-left"),y=i.css("padding-right");h.appendTo(c);i.css("margin-left",l);i.css("margin-right",a);i.css("padding-left",v);i.css("padding-right",y)}else{var l=i.css("margin-left"),a=i.css("margin-right"),v=i.css("padding-left"),y=i.css("padding-right");h.appendTo(n(document.body));i.css("margin-left",l);i.css("margin-right",a);i.css("padding-left",v);i.css("padding-right",y)}r.clickToOpen?(r.removeHandler(s,"mousedown"),r.addHandler(s,"mousedown",function(n){clearTimeout(i.data("timer").hide);i!=null&&i.stop();t.level!=0||t.isOpen||(n.data=r,r._closeAll(n));t.isOpen?r._closeItem(r,t,!0):r._openItem(r,t)})):((u||f)&&(r.removeHandler(s,n.jqx.mobile.getTouchEventName("touchstart")),r.addHandler(s,n.jqx.mobile.getTouchEventName("touchstart"),function(n){return clearTimeout(i.data("timer").hide),i!=null&&i.stop(),t.level!=0||t.isOpen||r.mode=="popup"||(n.data=r,r._closeAll(n)),t.isOpen?r._closeItem(r,t,!0):r._openItem(r,t),!1})),f||(r.addHandler(s,"mouseenter",function(){if((r.autoOpen||t.level>0&&!r.autoOpen)&&clearTimeout(i.data("timer").hide),t.parentId&&t.parentId!=0&&r.menuElements[t.parentId]){var n=r.menuElements[t.parentId].isOpen;if(!n)return}return(r.autoOpen||t.level>0&&!r.autoOpen)&&r._openItem(r,t),!1}),r.addHandler(s,"mousedown",function(){r.autoOpen||t.level!=0||(clearTimeout(i.data("timer").hide),i!=null&&i.stop(),t.isOpen?r._closeItem(r,t,!0):r._openItem(r,t))}),r.addHandler(s,"mouseleave",function(u){if(r.autoCloseOnMouseLeave){clearTimeout(i.data("timer").hide);var e=n(t.subMenuElement),o={left:parseInt(u.pageX),top:parseInt(u.pageY)},f={left:parseInt(e.coord().left),top:parseInt(e.coord().top),width:parseInt(e.outerWidth()),height:parseInt(e.outerHeight())},s=!0;f.left-5<=o.left&&o.left<=f.left+f.width+5&&f.top<=o.top&&o.top<=f.top+f.height&&(s=!1);s&&r._closeItem(r,t,!0)}}),r.removeHandler(h,"mouseenter"),r.addHandler(h,"mouseenter",function(){clearTimeout(i.data("timer").hide)}),r.removeHandler(h,"mouseleave"),r.addHandler(h,"mouseleave",function(){r.autoCloseOnMouseLeave&&(clearTimeout(i.data("timer").hide),clearTimeout(i.data("timer").show),i!=null&&i.stop(),r._closeItem(r,t,!0))})))}});this.mode=="simple"&&this._renderSimpleMode();this._autoSizeHorizontalMenuItems();this._raiseEvent("3",this)},_renderSimpleMode:function(){this.host.show()},createID:function(){var n=Math.random()+"";for(n=n.replace(".",""),n="99"+n,n=n/1;this.items[n];)n=Math.random()+"",n=n.replace(".",""),n=n/1;return"menuItem"+n},_createMenu:function(t,i){var c,s,f,v,d,w,b,a,h,k,r;if(t!=null){i==undefined&&(i=!0);i==null&&(i=!0);var nt=this,e=n(t).find("li"),o=0;for(this.itemMapping=[],c=0;c<e.length;c++)if(s=e[c],f=n(s),s.className.indexOf("jqx-menu")!=-1||this.autoGenerate!=!1){v=s.id;v||(v=this.createID());i&&(s.id=v,this.items[o]=new n.jqx._jqxMenu.jqxMenuItem,this.menuElements[v]=this.items[o]);o+=1;var p=0,u=this,g=f.children();g.each(function(){return(i||(this.className="",u.autoGenerate&&(n(u.items[o-1].subMenuElement)[0].className="",u.minimized||n(u.items[o-1].subMenuElement).addClass(u.toThemeProperty("jqx-widget-content")),n(u.items[o-1].subMenuElement).addClass(u.toThemeProperty("jqx-menu-dropdown")),n(u.items[o-1].subMenuElement).addClass(u.toThemeProperty("jqx-popup")))),this.className.indexOf("jqx-menu-dropdown")!=-1)?(i&&(u.items[o-1].subMenuElement=this),!1):u.autoGenerate&&(this.tagName=="ul"||this.tagName=="UL")?(i&&(u.items[o-1].subMenuElement=this),this.className="",u.minimized||n(this).addClass(u.toThemeProperty("jqx-widget-content")),n(this).addClass(u.toThemeProperty("jqx-menu-dropdown")),n(this).addClass(u.toThemeProperty("jqx-popup")),n(this).attr("role","menu"),u.rtl?n(this).addClass(u.toThemeProperty("jqx-rc-l")):n(this).addClass(u.toThemeProperty("jqx-rc-r")),n(this).addClass(u.toThemeProperty("jqx-rc-b")),!1):void 0});d=f.parents();d.each(function(){return this.className.indexOf("jqx-menu-item")!=-1?(p=this.id,!1):u.autoGenerate&&(this.tagName=="li"||this.tagName=="LI")?(p=this.id,!1):void 0});var w=!1,y=s.getAttribute("type"),l=s.getAttribute("ignoretheme")||s.getAttribute("data-ignoretheme");l?(l=="true"||l==!0)&&(l=!0):l=!1;y?y=="separator"&&(w=!0):y=s.type;w||(y=p?"sub":"top");r=this.items[o-1];i&&(r.id=v,r.parentId=p,r.type=y,r.separator=w,r.element=e[c],b=f.children("a"),r.disabled=s.getAttribute("item-disabled")=="true"?!0:!1,r.level=f.parents("li").length,r.anchor=b.length>0?b:null,r.anchor&&n(r.anchor).attr("tabindex",-1));r.ignoretheme=l;a=this.menuElements[p];a!=null&&(a.ignoretheme&&(r.ignoretheme=a.ignoretheme,l=a.ignoretheme),r.parentItem=a,r.parentElement=a.element);this.autoGenerate&&(y=="separator"?(f.removeClass(),f.addClass(this.toThemeProperty("jqx-menu-item-separator")),f.attr("role","separator")):l||(f[0].className=f[0].className.indexOf("jqx-grid-menu-item-touch")>=0?this.toThemeProperty("jqx-grid-menu-item-touch"):"",this.rtl&&f.addClass(this.toThemeProperty("jqx-rtl")),r.level>0&&!u.minimized?(f.addClass(this.toThemeProperty("jqx-item")),f.addClass(this.toThemeProperty("jqx-menu-item"))):(f.addClass(this.toThemeProperty("jqx-item")),f.addClass(this.toThemeProperty("jqx-menu-item-top")))));r.disabled&&(f.addClass(u.toThemeProperty("jqx-menu-item-disabled")),f.addClass(u.toThemeProperty("jqx-fill-state-disabled")));this.itemMapping[c]={element:e[c],item:r};this.itemMapping["id"+e[c].id]=this.itemMapping[c];i&&!l&&(r.hasItems=f.find("li").length>0,r.hasItems&&r.element&&(n.jqx.aria(n(r.element),"aria-haspopup",!0),r.subMenuElement.id||(r.subMenuElement.id=n.jqx.utilities.createId()),n.jqx.aria(n(r.element),"aria-owns",r.subMenuElement.id)))}for(h=0;h<e.length;h++)if(k=e[h],this.itemMapping["id"+k.id]){if(r=this.itemMapping["id"+k.id].item,!r)continue;r.prevItem=null;r.nextItem=null;h>0&&this.itemMapping["id"+e[h-1].id]&&(r.prevItem=this.itemMapping["id"+e[h-1].id].item);h<e.length-1&&this.itemMapping["id"+e[h+1].id]&&(r.nextItem=this.itemMapping["id"+e[h+1].id].item)}}},destroy:function(){var t=this,i,r;n.jqx.utilities.resize(t.host,null,!0);i=t.host.closest("div.jqx-menu-wrapper");t.removeHandler(i,"keydown");i.remove();t.removeHandler(n("#menuWrapper"+t.element.id),"keydown");n("#menuWrapper"+t.element.id).remove();t.removeHandler(t.host,"keydown");t.removeHandler(t.host,"focus");t.removeHandler(t.host,"blur");t.removeHandler(n(document),"mousedown.menu"+t.element.id,t._closeAfterClick);t.removeHandler(n(document),"mouseup.menu"+t.element.id,t._closeAfterClick);t.removeHandler(n(document),"contextmenu."+t.element.id);t.removeHandler(t.host,"contextmenu."+t.element.id);n.data(document.body,"jqxMenuOldHost"+t.element.id,null);t.isTouchDevice()&&t.removeHandler(n(document),n.jqx.mobile.getTouchEventName("touchstart")+".menu"+t.element.id,t._closeAfterClick,this);n(window).off&&n(window).off("resize.menu"+t.element.id);n.each(t.items,function(){var r=this,i=n(r.element),u,f;t.removeHandler(i,"click");t.removeHandler(i,"selectstart");t.removeHandler(i,"mouseenter");t.removeHandler(i,"mouseleave");t.removeHandler(i,"mousedown");t.removeHandler(i,"mouseleave");u=n(r.subMenuElement);f=u.closest("div.jqx-menu-popup");f.remove();delete this.subMenuElement;delete this.element});n.data(document.body,"menuel",null);delete t.menuElements;t.items=[];delete t.items;r=n.data(t.element,"jqxMenu");r&&delete r.instance;t.host.removeClass();t.host.remove();delete t.host;delete t.element},_raiseEvent:function(t,i){var u,r;return i==undefined&&(i={owner:null}),u=this.events[t],args=i,args.owner=this,r=new n.Event(u),t=="2"&&(args=i.item,args.owner=this,args.clickType=i.type,n.extend(r,i.event),r.type="itemclick"),r.owner=this,r.args=args,this.host&&this.host.trigger(r)},propertiesChangedHandler:function(t,i,r){var u,f;r.width&&r.height&&Object.keys(r).length==2&&(t._setSize(),t.mode==="popup"&&(u=this.host.closest("div.jqx-menu-wrapper"),u[i](r),f=this.host[0].id,n("#"+f)[i](r)))},propertyChangedHandler:function(t,i,r,u){var e,o,s,f;if(this.isInitialized!=undefined&&this.isInitialized!=!1&&(!t.batchUpdate||!t.batchUpdate.width||!t.batchUpdate.height||Object.keys(t.batchUpdate).length!=2)&&(i=="disabled"&&(t.disabled?(t.host.addClass(t.toThemeProperty("jqx-fill-state-disabled")),t.host.addClass(t.toThemeProperty("jqx-menu-disabled"))):(t.host.removeClass(t.toThemeProperty("jqx-fill-state-disabled")),t.host.removeClass(t.toThemeProperty("jqx-menu-disabled")))),u!=r)){if(i=="touchMode"&&(this._isTouchDevice=null,t._render(u,r)),i==="width"||i==="height"){t._setSize();t.mode==="popup"&&(e=this.host.closest("div.jqx-menu-wrapper"),e[i](u),o=this.host[0].id,n("#"+o)[i](u));return}i=="source"&&t.source!=null&&(s=t.loadItems(t.source),t.element.innerHTML=s,f=t.host.find("ul:first"),f.length>0&&(t.refresh(),t._createMenu(f[0]),t._render()));i=="autoCloseOnClick"?u==!1?t.removeHandler(n(document),"mousedown.menu"+this.element.id,t._closeAll):t.addHandler(n(document),"mousedown.menu"+this.element.id,t,t._closeAll):i=="mode"||i=="width"||i=="height"||i=="showTopLevelArrows"?(t.refresh(),i=="mode"?t._render(u,r):t._applyOrientation()):i=="theme"&&n.jqx.utilities.setTheme(r,u,t.host)}}})}(jqxBaseFramework),function(n){n.jqx._jqxMenu.jqxMenuItem=function(n,t,i){return{id:n,parentId:t,parentItem:null,anchor:null,type:i,disabled:!1,level:0,isOpen:!1,hasItems:!1,element:null,subMenuElement:null,arrow:null,openHorizontalDirection:"right",openVerticalDirection:"down",closeOnClick:!0}}}(jqxBaseFramework);