forked from HanSolo/SteelSeries-Canvas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
steelseries-min.js
24 lines (24 loc) · 254 KB
/
steelseries-min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
* Name : steelseries.js
* Authors : Gerrit Grunwald, Mark Crossley
* Last modified : 25.01.2016
* Revision : 0.14.17
*
* Copyright (c) 2011, Gerrit Grunwald, Mark Crossley
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* # Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* # Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var steelseries=(function(){var T=Math.PI*0.5,H=Math.PI*2,ao=Math.PI,l=Math.PI/180,b=180/Math.PI,B=document,aE="LCDMono2Ultra,Arial,Verdana,sans-serif",W="Arial,Verdana,sans-serif";var X=function(c5,bB){bB=bB||{};var bY=(undefined===bB.gaugeType?steelseries.GaugeType.TYPE4:bB.gaugeType),bQ=(undefined===bB.size?0:bB.size),cs=(undefined===bB.minValue?0:bB.minValue),co=(undefined===bB.maxValue?(cs+100):bB.maxValue),b9=(undefined===bB.niceScale?true:bB.niceScale),cK=(undefined===bB.threshold?(co-cs)/2+cs:bB.threshold),b3=(undefined===bB.thresholdRising?true:bB.thresholdRising),cD=(undefined===bB.section?null:bB.section),aZ=(undefined===bB.area?null:bB.area),b1=(undefined===bB.titleString?"":bB.titleString),a3=(undefined===bB.unitString?"":bB.unitString),cZ=(undefined===bB.frameDesign?steelseries.FrameDesign.METAL:bB.frameDesign),cT=(undefined===bB.frameVisible?true:bB.frameVisible),bz=(undefined===bB.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bB.backgroundColor),c3=(undefined===bB.backgroundVisible?true:bB.backgroundVisible),cu=(undefined===bB.pointerType?steelseries.PointerType.TYPE1:bB.pointerType),cN=(undefined===bB.pointerColor?steelseries.ColorDef.RED:bB.pointerColor),cX=(undefined===bB.knobType?steelseries.KnobType.STANDARD_KNOB:bB.knobType),b5=(undefined===bB.knobStyle?steelseries.KnobStyle.SILVER:bB.knobStyle),cq=(undefined===bB.lcdColor?steelseries.LcdColor.STANDARD:bB.lcdColor),bm=(undefined===bB.lcdVisible?true:bB.lcdVisible),c0=(undefined===bB.lcdDecimals?2:bB.lcdDecimals),bx=(undefined===bB.digitalFont?false:bB.digitalFont),cH=(undefined===bB.fractionalScaleDecimals?1:bB.fractionalScaleDecimals),bD=(undefined===bB.ledColor?steelseries.LedColor.RED_LED:bB.ledColor),a2=(undefined===bB.ledVisible?true:bB.ledVisible),b8=(undefined===bB.userLedColor?steelseries.LedColor.GREEN_LED:bB.userLedColor),bi=(undefined===bB.userLedVisible?false:bB.userLedVisible),c4=(undefined===bB.thresholdVisible?true:bB.thresholdVisible),bP=(undefined===bB.minMeasuredValueVisible?false:bB.minMeasuredValueVisible),bJ=(undefined===bB.maxMeasuredValueVisible?false:bB.maxMeasuredValueVisible),cS=(undefined===bB.foregroundType?steelseries.ForegroundType.TYPE1:bB.foregroundType),cx=(undefined===bB.foregroundVisible?true:bB.foregroundVisible),bC=(undefined===bB.labelNumberFormat?steelseries.LabelNumberFormat.STANDARD:bB.labelNumberFormat),cW=(undefined===bB.playAlarm?false:bB.playAlarm),a1=(undefined===bB.alarmSound?false:bB.alarmSound),cd=(undefined===bB.customLayer?null:bB.customLayer),b7=(undefined===bB.tickLabelOrientation?(bY===steelseries.GaugeType.TYPE1?steelseries.TickLabelOrientation.TANGENT:steelseries.TickLabelOrientation.NORMAL):bB.tickLabelOrientation),bV=(undefined===bB.trendVisible?false:bB.trendVisible),cm=(undefined===bB.trendColors?[steelseries.LedColor.RED_LED,steelseries.LedColor.GREEN_LED,steelseries.LedColor.CYAN_LED]:bB.trendColors),bc=(undefined===bB.useOdometer?false:bB.useOdometer),cE=(undefined===bB.odometerParams?{}:bB.odometerParams),be=(undefined===bB.odometerUseValue?false:bB.odometerUseValue),cQ=(undefined===bB.fullScaleDeflectionTime?2.5:bB.fullScaleDeflectionTime);var bh=r(c5);if(bQ===0){bQ=Math.min(bh.canvas.width,bh.canvas.height)}bh.canvas.width=bQ;bh.canvas.height=bQ;var aS;if(cW&&a1!==false){aS=B.createElement("audio");aS.setAttribute("src",a1);aS.setAttribute("preload","auto")}var bR=cs;var cy=cs;var cF=this;var bq=co;var bO=cs;var bv=false;var aW=false;var cn=0;var cG=0;var a9;var cj=false;var cL=steelseries.TrendState.OFF;var bN=bQ*0.06;var bF=bQ*0.29;var bE=bQ*0.36;var cM;var cp;var bw;var cA;var cJ;var bG=cp+(bR-cs)*cJ;var a5=bQ;var cY=bQ;var bs=a5/2;var bp=cY/2;var bb=bQ*0.093457;var a0=0.6*a5;var aY=0.4*cY;var bZ=bY===steelseries.GaugeType.TYPE3?0.6*a5:bs-bb/2;var bX=bY===steelseries.GaugeType.TYPE3?0.72*cY:0.75*cY;var cI=Math.floor(a5/10);var cb=cI+"px "+W;var bA=cI+"px "+aE;var bt=cY*0.13;var bo=a5*0.4;var cV=(a5-bo)/2;var cU=cY*0.57;var bK,bI=cY*0.61;var b0=a5*0.006;var aV=false;var bg=cs;var by=co;var a4=co-cs;var bM=by-bg;var b4=0;var ba=0;var bU=10;var cR=10;var bk=function bk(){if(b9){a4=g(co-cs,false);ba=g(a4/(cR-1),true);bg=Math.floor(cs/ba)*ba;by=Math.ceil(co/ba)*ba;b4=g(ba/(bU-1),true);cs=bg;co=by;bM=co-cs}else{a4=(co-cs);bg=cs;by=co;bM=a4;ba=g(a4/(cR-1),true);b4=g(ba/(bU-1),true)}bR=bR<cs?cs:bR>co?co:bR;bq=bq<cs?cs:bq>co?co:bq;bO=bO<cs?cs:bO>co?co:bO;cK=cK<cs?cs:cK>co?co:cK;switch(bY.type){case"type1":cM=0;cp=ao;bw=T;cA=T;cJ=cA/bM;break;case"type2":cM=0;cp=ao;bw=T;cA=ao;cJ=cA/bM;break;case"type3":cM=0;cp=T;bw=0;cA=1.5*ao;cJ=cA/bM;break;case"type4":default:cM=60*l;cp=T+(cM/2);bw=0;cA=H-cM;cJ=cA/bM;break}bG=cp+(bR-cs)*cJ};var ch=J(bQ,bQ);var bH=ch.getContext("2d");var bS=J(bQ,bQ);var bW=bS.getContext("2d");var cv;var bj=J(bb,bb);var bL=bj.getContext("2d");var bu=J(bb,bb);var aU=bu.getContext("2d");var cg=bu;var c6=J(bb,bb);var bf=c6.getContext("2d");var a7=J(bb,bb);var cz=a7.getContext("2d");var cr=a7;var bn=J(Math.ceil(bQ*0.028037),Math.ceil(bQ*0.028037));var cO=bn.getContext("2d");var bT=J(Math.ceil(bQ*0.028037),Math.ceil(bQ*0.028037));var aX=bT.getContext("2d");var b2=J(bQ,bQ);var c2=b2.getContext("2d");var cB=J(bQ,bQ);var a6=cB.getContext("2d");var cc,ct,bl,br;var ca,cf,cP;if(bc&&bm){cf=J(10,10);cP=cf.getContext("2d")}var cC=function(c7,c8){c7.restore();c7.save();c7.textAlign="right";c7.strokeStyle=cq.textColor;c7.fillStyle=cq.textColor;if(cq===steelseries.LcdColor.STANDARD||cq===steelseries.LcdColor.STANDARD_GREEN){c7.shadowColor="gray";c7.shadowOffsetX=a5*0.007;c7.shadowOffsetY=a5*0.007;c7.shadowBlur=a5*0.007}if(bx){c7.font=bA}else{c7.font=cb}c7.fillText(c8.toFixed(c0),cV+bo-bo*0.05,cU+bt*0.5+cI*0.38,bo*0.9);c7.restore()};var ci=function(c7){c7.save();if("type1"===bY.type){c7.drawImage(F(Math.ceil(cY*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),a5*0.523364,cY*0.130841)}if("type1"===bY.type||"type2"===bY.type){c7.drawImage(F(Math.ceil(cY*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),a5*0.130841,cY*0.514018)}if("type2"===bY.type||"type3"===bY.type){c7.drawImage(F(Math.ceil(cY*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),a5*0.831775,cY*0.514018)}if("type3"===bY.type){c7.drawImage(F(Math.ceil(cY*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),a5*0.523364,cY*0.831775)}if("type4"===bY.type){c7.drawImage(F(Math.ceil(cY*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),a5*0.336448,cY*0.803738);c7.drawImage(F(Math.ceil(cY*0.037383),steelseries.KnobType.STANDARD_KNOB,b5),a5*0.626168,cY*0.803738)}c7.restore()};var c1=function(){var c9=B.createElement("canvas");c9.width=Math.ceil(bQ*0.046728);c9.height=Math.ceil(c9.width*0.9);var c8=c9.getContext("2d");c8.save();var c7=c8.createLinearGradient(0,0.1,0,c9.height*0.9);c7.addColorStop(0,"#520000");c7.addColorStop(0.3,"#fc1d00");c7.addColorStop(0.59,"#fc1d00");c7.addColorStop(1,"#520000");c8.fillStyle=c7;c8.beginPath();c8.moveTo(c9.width*0.5,0.1);c8.lineTo(c9.width*0.9,c9.height*0.9);c8.lineTo(c9.width*0.1,c9.height*0.9);c8.lineTo(c9.width*0.5,0.1);c8.closePath();c8.fill();c8.strokeStyle="#FFFFFF";c8.stroke();c8.restore();return c9};var aT=function(c7,dd,da,c8,db){if(dd<cs){dd=cs}else{if(dd>co){dd=co}}if(da<cs){da=cs}else{if(da>co){da=co}}if(dd>=da){return}c7.save();c7.strokeStyle=c8;c7.fillStyle=c8;c7.lineWidth=a5*0.035;var c9=(cA/bM*dd-cA/bM*cs);var dc=c9+(da-dd)/(bM/cA);c7.translate(bs,bp);c7.rotate(cp);c7.beginPath();if(db){c7.moveTo(0,0);c7.arc(0,0,a5*0.365-c7.lineWidth/2,c9,dc,false)}else{c7.arc(0,0,a5*0.365,c9,dc,false)}if(db){c7.moveTo(0,0);c7.fill()}else{c7.stroke()}c7.translate(-bs,-bp);c7.restore()};var ce=function(dm,df){var dn=Math.ceil(a5*0.04),dc=cp,dg=cJ*b4,di,de=cs,dl=bU-1,db=a5*0.38,c9=a5*0.35,dh=a5*0.355,c8=a5*0.36,dj=a5*0.3,c7=a5*0.1,da=bU/2,dk=parseFloat(co.toFixed(2)),dd;bz.labelColor.setAlpha(1);dm.save();dm.textAlign="center";dm.textBaseline="middle";dm.font=dn+"px "+W;dm.strokeStyle=bz.labelColor.getRgbaColor();dm.fillStyle=bz.labelColor.getRgbaColor();dm.translate(bs,bp);dm.rotate(cp);if(bY.type==="type1"||bY.type==="type2"){c7=a5*0.04}for(dd=cs;parseFloat(dd.toFixed(2))<=dk;dd+=b4){di=dg+T;dl++;if(dl===bU){dm.lineWidth=1.5;dm.beginPath();dm.moveTo(db,0);dm.lineTo(c9,0);dm.closePath();dm.stroke();dm.save();dm.translate(dj,0);switch(b7.type){case"horizontal":di=-dc;break;case"tangent":di=(dc<=T+ao?ao:0);break;case"normal":default:di=T;break}dm.rotate(di);switch(df.format){case"fractional":dm.fillText((de.toFixed(cH)),0,0,c7);break;case"scientific":dm.fillText((de.toPrecision(2)),0,0,c7);break;case"standard":default:dm.fillText((de.toFixed(0)),0,0,c7);break}dm.translate(-dj,0);dm.restore();de+=ba;dl=0;dm.rotate(dg);dc+=dg;continue}if(0===bU%2&&dl===(da)){dm.lineWidth=1;dm.beginPath();dm.moveTo(db,0);dm.lineTo(dh,0);dm.closePath();dm.stroke()}else{dm.lineWidth=0.5;dm.beginPath();dm.moveTo(db,0);dm.lineTo(c8,0);dm.closePath();dm.stroke()}dm.rotate(dg);dc+=dg}dm.translate(-bs,-bp);dm.restore()};var cl=function(dh){dh=dh||{};var di=(undefined===dh.frame?false:dh.frame);var da=(undefined===dh.background?false:dh.background);var de=(undefined===dh.led?false:dh.led);var c8=(undefined===dh.userLed?false:dh.userLed);var c7=(undefined===dh.pointer?false:dh.pointer);var dg=(undefined===dh.foreground?false:dh.foreground);var dc=(undefined===dh.trend?false:dh.trend);var c9=(undefined===dh.odo?false:dh.odo);aV=true;bk();if(di&&cT){d(bH,cZ,bs,bp,a5,cY)}if(da&&c3){aQ(bW,bz,bs,bp,a5,cY);Q(bW,cd,bs,bp,a5,cY)}if(de){bL.drawImage(af(Math.ceil(bQ*0.093457),1,bD),0,0);aU.drawImage(af(Math.ceil(bQ*0.093457),0,bD),0,0)}if(c8){bf.drawImage(af(Math.ceil(bQ*0.093457),1,b8),0,0);cz.drawImage(af(Math.ceil(bQ*0.093457),0,b8),0,0)}if(bP){cO.drawImage(w(Math.ceil(bQ*0.028037),steelseries.ColorDef.BLUE.dark.getRgbaColor(),true,true),0,0)}if(bJ){aX.drawImage(w(Math.ceil(bQ*0.028037),steelseries.ColorDef.RED.medium.getRgbaColor(),true),0,0)}if(da&&c3){ci(bW);if(null!==cD&&0<cD.length){var df=cD.length;do{df--;aT(bW,cD[df].start,cD[df].stop,cD[df].color,false)}while(0<df)}if(null!==aZ&&0<aZ.length){var db=aZ.length;do{db--;aT(bW,aZ[db].start,aZ[db].stop,aZ[db].color,true)}while(0<db)}ce(bW,bC);ap(bW,a5,cY,b1,a3,bz,true,true)}if(da&&c4){bW.save();bW.translate(bs,bp);bW.rotate(cp+(cK-cs)*cJ+T);bW.translate(-bs,-bp);bW.drawImage(c1(),a5*0.475,cY*0.13);bW.translate(bs,bp);bW.restore()}if(da&&bm){if(bc&&c9){ca=new steelseries.Odometer("",{_context:cP,height:bQ*0.075,decimals:cE.decimals,digits:(cE.digits===undefined?5:cE.digits),valueForeColor:cE.valueForeColor,valueBackColor:cE.valueBackColor,decimalForeColor:cE.decimalForeColor,decimalBackColor:cE.decimalBackColor,font:cE.font,value:bR});bK=(a5-cf.width)/2}else{if(!bc){cv=V(bo,bt,cq);bW.drawImage(cv,cV,cU)}}}if(c7){E(c2,a5,cu,cN,bz.labelColor)}if(dg&&cx){var dd=(cu.type==="type15"||cu.type==="type16"?false:true);A(a6,cS,a5,cY,dd,cX,b5,bY)}if(dc&&bV){cc=ah(bN,steelseries.TrendState.UP,cm);ct=ah(bN,steelseries.TrendState.STEADY,cm);bl=ah(bN,steelseries.TrendState.DOWN,cm);br=ah(bN,steelseries.TrendState.OFF,cm)}};var a8=function(c8){c8=c8||{};var da=(undefined===c8.frame?false:c8.frame);var db=(undefined===c8.background?false:c8.background);var dd=(undefined===c8.led?false:c8.led);var dc=(undefined===c8.userLed?false:c8.userLed);var c9=(undefined===c8.pointer?false:c8.pointer);var c7=(undefined===c8.foreground?false:c8.foreground);if(da){ch.width=bQ;ch.height=bQ;bH=ch.getContext("2d")}if(db){bS.width=bQ;bS.height=bQ;bW=bS.getContext("2d")}if(dd){bj.width=Math.ceil(bQ*0.093457);bj.height=Math.ceil(bQ*0.093457);bL=bj.getContext("2d");bu.width=Math.ceil(bQ*0.093457);bu.height=Math.ceil(bQ*0.093457);aU=bu.getContext("2d");cg=bu}if(dc){c6.width=Math.ceil(bQ*0.093457);c6.height=Math.ceil(bQ*0.093457);bf=c6.getContext("2d");a7.width=Math.ceil(bQ*0.093457);a7.height=Math.ceil(bQ*0.093457);cz=a7.getContext("2d");cr=a7}if(c9){b2.width=bQ;b2.height=bQ;c2=b2.getContext("2d")}if(c7){cB.width=bQ;cB.height=bQ;a6=cB.getContext("2d")}};var cw=function(){if(a2){if(cg===bj){cg=bu}else{cg=bj}if(!cj){cj=true;ad(cF.repaint)}}};var b6=function(){if(bi){if(cr===c6){cr=a7}else{cr=c6}if(!cj){cj=true;ad(cF.repaint)}}};var ck=function(c7){if(c7){cn=setInterval(cw,1000)}else{clearInterval(cn);cg=bu}};var bd=function(c7){if(c7){cG=setInterval(b6,1000)}else{clearInterval(cG);cr=a7}};this.setValue=function(c8){c8=parseFloat(c8);var c7=c8<cs?cs:(c8>co?co:c8);if(bR!==c7){bR=c7;if(bR>bO){bO=bR}if(bR<bq){bq=bR}if((bR>=cK&&!bv&&b3)||(bR<=cK&&!bv&&!b3)){bv=true;ck(bv);if(cW){aS.play()}}else{if((bR<cK&&bv&&b3)||(bR>cK&&bv&&!b3)){bv=false;ck(bv);if(cW){aS.pause()}}}this.repaint()}return this};this.getValue=function(){return bR};this.setOdoValue=function(c8){c8=parseFloat(c8);var c7=(c8<0?0:c8);if(cy!==c7){cy=c7;this.repaint()}return this};this.getOdoValue=function(){return cy};this.setValueAnimated=function(da,db){da=parseFloat(da);var c7=(da<cs?cs:(da>co?co:da)),c8=this,c9;if(bR!==c7){if(undefined!==a9&&a9.isPlaying){a9.stop()}c9=cQ*Math.abs(c7-bR)/(co-cs);c9=Math.max(c9,cQ/5);a9=new Tween({},"",Tween.regularEaseInOut,bR,c7,c9);a9.onMotionChanged=function(dc){bR=dc.target._pos;if((bR>=cK&&!bv&&b3)||(bR<=cK&&!bv&&!b3)){bv=true;ck(bv);if(cW){aS.play()}}else{if((bR<cK&&bv&&b3)||(bR>cK&&bv&&!b3)){bv=false;ck(bv);if(cW){aS.pause()}}}if(bR>bO){bO=bR}if(bR<bq){bq=bR}if(!cj){cj=true;ad(c8.repaint)}};if(db&&typeof(db)==="function"){a9.onMotionFinished=db}a9.start()}return this};this.resetMinMeasuredValue=function(){bq=bR;this.repaint()};this.resetMaxMeasuredValue=function(){bO=bR;this.repaint();return this};this.setMinMeasuredValueVisible=function(c7){bP=!!c7;this.repaint();return this};this.setMaxMeasuredValueVisible=function(c7){bJ=!!c7;this.repaint();return this};this.setMaxMeasuredValue=function(c8){c8=parseFloat(c8);var c7=c8<cs?cs:(c8>co?co:c8);bO=c7;this.repaint();return this};this.setMinMeasuredValue=function(c8){c8=parseFloat(c8);var c7=c8<cs?cs:(c8>co?co:c8);bq=c7;this.repaint();return this};this.setTitleString=function(c7){b1=c7;a8({background:true});cl({background:true});this.repaint();return this};this.setUnitString=function(c7){a3=c7;a8({background:true});cl({background:true});this.repaint();return this};this.setMinValue=function(c7){cs=parseFloat(c7);a8({background:true});cl({background:true});this.repaint();return this};this.getMinValue=function(){return cs};this.setMaxValue=function(c7){co=parseFloat(c7);a8({background:true});cl({background:true});this.repaint();return this};this.getMaxValue=function(){return co};this.setThreshold=function(c8){c8=parseFloat(c8);var c7=c8<cs?cs:(c8>co?co:c8);cK=c7;a8({background:true});cl({background:true});this.repaint();return this};this.setArea=function(c7){aZ=c7;a8({background:true});cl({background:true});this.repaint();return this};this.setSection=function(c7){cD=c7;a8({background:true});cl({background:true});this.repaint();return this};this.setThresholdVisible=function(c7){c4=!!c7;this.repaint();return this};this.setThresholdRising=function(c7){b3=!!c7;bv=!bv;ck(bv);this.repaint();return this};this.setLcdDecimals=function(c7){c0=parseInt(c7,10);this.repaint();return this};this.setFrameDesign=function(c7){a8({frame:true});cZ=c7;cl({frame:true});this.repaint();return this};this.setBackgroundColor=function(c7){a8({background:true,pointer:(cu.type==="type2"||cu.type==="type13"?true:false)});bz=c7;cl({background:true,pointer:(cu.type==="type2"||cu.type==="type13"?true:false)});this.repaint();return this};this.setForegroundType=function(c7){a8({foreground:true});cS=c7;cl({foreground:true});this.repaint();return this};this.setPointerType=function(c7){a8({pointer:true,foreground:true});cu=c7;cl({pointer:true,foreground:true});this.repaint();return this};this.setPointerColor=function(c7){a8({pointer:true});cN=c7;cl({pointer:true});this.repaint();return this};this.setLedColor=function(c7){a8({led:true});bD=c7;cl({led:true});this.repaint();return this};this.setUserLedColor=function(c7){a8({userLed:true});b8=c7;cl({userLed:true});this.repaint();return this};this.toggleUserLed=function(){if(cr===c6){cr=a7}else{cr=c6}this.repaint();return this};this.setUserLedOnOff=function(c7){if(true===c7){cr=c6}else{cr=a7}this.repaint();return this};this.blinkUserLed=function(c7){if(c7){if(!aW){bd(true);aW=true}}else{if(aW){clearInterval(cG);aW=false}}return this};this.setLedVisible=function(c7){a2=!!c7;this.repaint();return this};this.setUserLedVisible=function(c7){bi=!!c7;this.repaint();return this};this.setLcdColor=function(c7){cq=c7;a8({background:true});cl({background:true});this.repaint();return this};this.setTrend=function(c7){cL=c7;this.repaint();return this};this.setTrendVisible=function(c7){bV=!!c7;this.repaint();return this};this.setFractionalScaleDecimals=function(c7){cH=parseInt(c7,10);a8({background:true});cl({background:true});this.repaint();return this};this.setLabelNumberFormat=function(c7){bC=c7;a8({background:true});cl({background:true});this.repaint();return this};this.repaint=function(){if(!aV){cl({frame:true,background:true,led:true,userLed:true,pointer:true,trend:true,foreground:true,odo:true})}bh.clearRect(0,0,bQ,bQ);if(cT){bh.drawImage(ch,0,0)}bh.drawImage(bS,0,0);if(bm){if(bc){ca.setValue(be?bR:cy);bh.drawImage(cf,bK,bI)}else{cC(bh,bR)}}if(a2){bh.drawImage(cg,a0,aY)}if(bi){bh.drawImage(cr,bZ,bX)}if(bV){switch(cL.state){case"up":bh.drawImage(cc,bF,bE);break;case"steady":bh.drawImage(ct,bF,bE);break;case"down":bh.drawImage(bl,bF,bE);break;case"off":bh.drawImage(br,bF,bE);break}}if(bP){bh.save();bh.translate(bs,bp);bh.rotate(cp+T+(bq-cs)*cJ);bh.translate(-bs,-bp);bh.drawImage(bn,bh.canvas.width*0.4865,bh.canvas.height*0.105);bh.restore()}if(bJ){bh.save();bh.translate(bs,bp);bh.rotate(cp+T+(bO-cs)*cJ);bh.translate(-bs,-bp);bh.drawImage(bT,bh.canvas.width*0.4865,bh.canvas.height*0.105);bh.restore()}bG=cp+T+(bR-cs)*cJ;bh.save();bh.translate(bs,bp);bh.rotate(bG);bh.translate(-bs,-bp);bh.shadowColor="rgba(0, 0, 0, 0.8)";bh.shadowOffsetX=bh.shadowOffsetY=b0;bh.shadowBlur=b0*2;bh.drawImage(b2,0,0);bh.restore();if(cx){bh.drawImage(cB,0,0)}cj=false};this.repaint();return this};var y=function(cS,bB){bB=bB||{};var bT=(undefined===bB.gaugeType?steelseries.GaugeType.TYPE4:bB.gaugeType),bN=(undefined===bB.size?0:bB.size),cl=(undefined===bB.minValue?0:bB.minValue),ch=(undefined===bB.maxValue?(cl+100):bB.maxValue),b4=(undefined===bB.niceScale?true:bB.niceScale),cE=(undefined===bB.threshold?(ch-cl)/2+cl:bB.threshold),bV=(undefined===bB.thresholdRising?true:bB.thresholdRising),cy=(undefined===bB.section?null:bB.section),b0=(undefined===bB.useSectionColors?false:bB.useSectionColors),bU=(undefined===bB.titleString?"":bB.titleString),a4=(undefined===bB.unitString?"":bB.unitString),cP=(undefined===bB.frameDesign?steelseries.FrameDesign.METAL:bB.frameDesign),cK=(undefined===bB.frameVisible?true:bB.frameVisible),bx=(undefined===bB.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bB.backgroundColor),cR=(undefined===bB.backgroundVisible?true:bB.backgroundVisible),bZ=(undefined===bB.valueColor?steelseries.ColorDef.RED:bB.valueColor),cj=(undefined===bB.lcdColor?steelseries.LcdColor.STANDARD:bB.lcdColor),bm=(undefined===bB.lcdVisible?true:bB.lcdVisible),cQ=(undefined===bB.lcdDecimals?2:bB.lcdDecimals),bv=(undefined===bB.digitalFont?false:bB.digitalFont),cB=(undefined===bB.fractionalScaleDecimals?1:bB.fractionalScaleDecimals),b8=(undefined===bB.customLayer?null:bB.customLayer),bD=(undefined===bB.ledColor?steelseries.LedColor.RED_LED:bB.ledColor),a3=(undefined===bB.ledVisible?true:bB.ledVisible),b3=(undefined===bB.userLedColor?steelseries.LedColor.GREEN_LED:bB.userLedColor),bi=(undefined===bB.userLedVisible?false:bB.userLedVisible),bC=(undefined===bB.labelNumberFormat?steelseries.LabelNumberFormat.STANDARD:bB.labelNumberFormat),cJ=(undefined===bB.foregroundType?steelseries.ForegroundType.TYPE1:bB.foregroundType),cr=(undefined===bB.foregroundVisible?true:bB.foregroundVisible),cN=(undefined===bB.playAlarm?false:bB.playAlarm),a2=(undefined===bB.alarmSound?false:bB.alarmSound),a5=(undefined===bB.valueGradient?null:bB.valueGradient),be=(undefined===bB.useValueGradient?false:bB.useValueGradient),b2=(undefined===bB.tickLabelOrientation?(bT===steelseries.GaugeType.TYPE1?steelseries.TickLabelOrientation.TANGENT:steelseries.TickLabelOrientation.NORMAL):bB.tickLabelOrientation),bR=(undefined===bB.trendVisible?false:bB.trendVisible),cf=(undefined===bB.trendColors?[steelseries.LedColor.RED_LED,steelseries.LedColor.GREEN_LED,steelseries.LedColor.CYAN_LED]:bB.trendColors),cH=(undefined===bB.fullScaleDeflectionTime?2.5:bB.fullScaleDeflectionTime);var bh=r(cS);if(bN===0){bN=Math.min(bh.canvas.width,bh.canvas.height)}bh.canvas.width=bN;bh.canvas.height=bN;if(cN&&a2!==false){var aV=B.createElement("audio");aV.setAttribute("src",a2);aV.setAttribute("preload","auto")}var bO=cl;var bL=ch-cl;var bt=false;var cg=0;var aZ=false;var cA=0;var bb;var cz=this;var cc=false;var cG;var ci;var bH;var bu;var cu;var aY;var cD;var bG;var bK=[];var aU=false;var a0=false;var a7=bN;var cO=bN;var bq=a7/2;var bn=cO/2;var cC=Math.floor(a7/10);var b5=cC+"px "+W;var bz=cC+"px "+aE;var br=cO*0.13;var bo=a7*0.4;var cM=(a7-bo)/2;var cL=cO/2-br/2;var cq=a7*0.116822;var co=a7*0.485981;var cs=Math.ceil(bN*0.093457);var aT=a7*0.53;var aS=cO*0.61;var bY=bT===steelseries.GaugeType.TYPE3?0.7*a7:bq-cs/2;var bX=bT===steelseries.GaugeType.TYPE3?0.61*cO:0.75*cO;var cF=steelseries.TrendState.OFF;var bM=bN*0.06;var bF=bN*0.38;var bE=bN*0.57;switch(bT.type){case"type1":cG=0;ci=ao;bH=0;bu=T;cu=T;aY=cu*b;cD=cu/bL;break;case"type2":cG=0;ci=ao;bH=0;bu=T;cu=ao;aY=cu*b;cD=cu/bL;break;case"type3":cG=0;ci=T;bH=-T;bu=0;cu=1.5*ao;aY=cu*b;cD=cu/bL;break;case"type4":default:cG=60*l;ci=T+(cG/2);bH=-H/6;bu=0;cu=H-cG;aY=cu*b;cD=cu/bL;break}var cb=J(bN,bN);var bI=cb.getContext("2d");var bP=J(bN,bN);var bS=bP.getContext("2d");var cn;var cx=J(Math.ceil(bN*0.060747),Math.ceil(bN*0.023364));var a1=cx.getContext("2d");var bk=J(cs,cs);var bJ=bk.getContext("2d");var bs=J(cs,cs);var aX=bs.getContext("2d");var ca=bs;var cT=J(cs,cs);var bg=cT.getContext("2d");var a9=J(cs,cs);var ct=a9.getContext("2d");var ck=a9;var bA;var cv=J(bN,bN);var a8=cv.getContext("2d");var b7,cm,bl,bp;var aW=false;var bf=cl;var bw=ch;var a6=ch-cl;bL=bw-bf;var bW=0;var bc=0;var bQ=10;var cI=10;var bj=function bj(){if(b4){a6=g(ch-cl,false);bc=g(a6/(cI-1),true);bf=Math.floor(cl/bc)*bc;bw=Math.ceil(ch/bc)*bc;bW=g(bc/(bQ-1),true);cl=bf;ch=bw;bL=ch-cl}else{a6=(ch-cl);bf=cl;bw=ch;bL=a6;bc=g(a6/(cI-1),true);bW=g(bc/(bQ-1),true)}bO=bO<cl?cl:bO>ch?ch:bO;minMeasuredValue=minMeasuredValue<cl?cl:minMeasuredValue>ch?ch:minMeasuredValue;maxMeasuredValue=maxMeasuredValue<cl?cl:maxMeasuredValue>ch?ch:maxMeasuredValue;cE=cE<cl?cl:cE>ch?ch:cE;switch(bT.type){case"type1":cG=0;ci=ao;bu=T;cu=T;cD=cu/bL;break;case"type2":cG=0;ci=ao;bu=T;cu=ao;cD=cu/bL;break;case"type3":cG=0;ci=T;bu=0;cu=1.5*ao;cD=cu/bL;break;case"type4":default:cG=60*l;ci=T+(cG/2);bu=0;cu=H-cG;cD=cu/bL;break}bG=ci+(bO-cl)*cD};var ce=function(c1){c1=c1||{};var c2=(undefined===c1.frame?false:c1.frame);var cV=(undefined===c1.background?false:c1.background);var cY=(undefined===c1.led?false:c1.led);var cU=(undefined===c1.userLed?false:c1.userLed);var cX=(undefined===c1.value?false:c1.value);var c0=(undefined===c1.foreground?false:c1.foreground);var cW=(undefined===c1.trend?false:c1.trend);aW=true;bj();if(c2&&cK){d(bI,cP,bq,bn,a7,cO)}if(cV&&cR){aQ(bS,bx,bq,bn,a7,cO);Q(bS,b8,bq,bn,a7,cO)}if(cY){bJ.drawImage(af(cs,1,bD),0,0);aX.drawImage(af(cs,0,bD),0,0);bA=bS.getImageData(aT,aS,cs,cs)}if(cU){bg.drawImage(af(Math.ceil(cs),1,b3),0,0);ct.drawImage(af(Math.ceil(cs),0,b3),0,0)}if(cV){b6(bS)}if(cV&&cR){b9(bS,bC);ap(bS,a7,cO,bU,a4,bx,true,true)}if(cV&&bm){cn=V(bo,br,cj);bS.drawImage(cn,cM,cL)}aU=false;if(b0&&null!==cy&&0<cy.length){aU=true;var cZ=cy.length;bK=[];do{cZ--;bK.push({start:(((cy[cZ].start+Math.abs(cl))/(ch-cl))*aY),stop:(((cy[cZ].stop+Math.abs(cl))/(ch-cl))*aY),color:s(cy[cZ].color)})}while(0<cZ)}a0=false;if(be&&a5!==null){aU=false;a0=true}if(cX){by(a1,bZ)}if(c0&&cr){A(a8,cJ,a7,cO,false)}if(cW&&bR){b7=ah(bM,steelseries.TrendState.UP,cf);cm=ah(bM,steelseries.TrendState.STEADY,cf);bl=ah(bM,steelseries.TrendState.DOWN,cf);bp=ah(bM,steelseries.TrendState.OFF,cf)}};var ba=function(cW){cW=cW||{};var cX=(undefined===cW.frame?false:cW.frame);var cY=(undefined===cW.background?false:cW.background);var c0=(undefined===cW.led?false:cW.led);var cZ=(undefined===cW.userLed?false:cW.userLed);var cV=(undefined===cW.value?false:cW.value);var cU=(undefined===cW.foreground?false:cW.foreground);if(cX){cb.width=bN;cb.height=bN;bI=cb.getContext("2d")}if(cY){bP.width=bN;bP.height=bN;bS=bP.getContext("2d")}if(cV){cx.width=Math.ceil(bN*0.060747);cx.height=Math.ceil(bN*0.023364);a1=cx.getContext("2d")}if(c0){bk.width=Math.ceil(cs);bk.height=Math.ceil(cs);bJ=bk.getContext("2d");bs.width=Math.ceil(cs);bs.height=Math.ceil(cs);aX=bs.getContext("2d");ca=bs}if(cZ){cT.width=Math.ceil(cs);cT.height=Math.ceil(cs);bg=cT.getContext("2d");a9.width=Math.ceil(cs);a9.height=Math.ceil(cs);ct=a9.getContext("2d");ck=a9}if(cU){cv.width=bN;cv.height=bN;a8=cv.getContext("2d")}};var b6=function(cV){cV.save();cV.save();cV.lineWidth=bN*0.085;cV.beginPath();cV.translate(bq,bn);cV.rotate(ci-4*l);cV.translate(-bq,-bn);cV.arc(bq,bn,a7*0.35514,0,cu+8*l,false);cV.rotate(-ci);var cU=cV.createLinearGradient(0,0.107476*cO,0,0.897195*cO);cU.addColorStop(0,"#000000");cU.addColorStop(0.22,"#333333");cU.addColorStop(0.76,"#333333");cU.addColorStop(1,"#cccccc");cV.strokeStyle=cU;cV.stroke();cV.restore();cV.save();cV.lineWidth=bN*0.075;cV.beginPath();cV.translate(bq,bn);cV.rotate(ci-4*l);cV.translate(-bq,-bn);cV.arc(bq,bn,a7*0.35514,0,cu+8*l,false);cV.rotate(-ci);var cX=cV.createLinearGradient(0,0.112149*cO,0,0.892523*cO);cX.addColorStop(0,"#111111");cX.addColorStop(1,"#333333");cV.strokeStyle=cX;cV.stroke();cV.restore();var c0=(a7*0.116822+a7*0.060747)/2;var cY=(a7*0.485981+a7*0.023364)/2;var cW=cV.createRadialGradient(c0,cY,0,c0,cY,0.030373*a7);cW.addColorStop(0,"#3c3c3c");cW.addColorStop(1,"#323232");var cZ=0;for(cZ=0;cZ<=aY;cZ+=5){cV.save();cV.translate(bq,bn);cV.rotate((cZ*l)+bH);cV.translate(-bq,-bn);cV.beginPath();cV.rect(a7*0.116822,a7*0.485981,a7*0.060747,a7*0.023364);cV.closePath();cV.fillStyle=cW;cV.fill();cV.restore()}cV.restore()};var by=function(cU,cV){cU.save();cU.beginPath();cU.rect(0,0,cU.canvas.width,cU.canvas.height);cU.closePath();var cY=(cU.canvas.width/2);var cX=(cU.canvas.height/2);var cW=bh.createRadialGradient(cY,cX,0,cY,cX,cU.canvas.width/2);cW.addColorStop(0,cV.light.getRgbaColor());cW.addColorStop(1,cV.dark.getRgbaColor());cU.fillStyle=cW;cU.fill();cU.restore()};var cw=function(cU,cV){cU.save();cU.textAlign="right";cU.strokeStyle=cj.textColor;cU.fillStyle=cj.textColor;if(cj===steelseries.LcdColor.STANDARD||cj===steelseries.LcdColor.STANDARD_GREEN){cU.shadowColor="gray";cU.shadowOffsetX=a7*0.007;cU.shadowOffsetY=a7*0.007;cU.shadowBlur=a7*0.007}if(bv){cU.font=bz}else{cU.font=b5}cU.fillText(cV.toFixed(cQ),cM+bo-bo*0.05,cL+br*0.5+cC*0.38,bo*0.9);cU.restore()};var b9=function(c4,cY){var cV=ci,cZ=cD*bW,c0,c5=Math.ceil(a7*0.04),cX=cl,c3=bQ-1,c1=a7*0.28,cU=a7*0.1,c2=parseFloat(ch.toFixed(2)),cW;bx.labelColor.setAlpha(1);c4.save();c4.textAlign="center";c4.textBaseline="middle";c4.font=c5+"px "+W;c4.strokeStyle=bx.labelColor.getRgbaColor();c4.fillStyle=bx.labelColor.getRgbaColor();c4.translate(bq,bn);c4.rotate(ci);if(bT.type==="type1"||bT.type==="type2"){cU=a7*0.0375}for(cW=cl;parseFloat(cW.toFixed(2))<=c2;cW+=bW){c0=+cZ+T;c3++;if(c3===bQ){c4.save();c4.translate(c1,0);switch(b2.type){case"horizontal":c0=-cV;break;case"tangent":c0=(cV<=T+ao?ao:0);break;case"normal":default:c0=T;break}c4.rotate(c0);switch(cY.format){case"fractional":c4.fillText((cX.toFixed(cB)),0,0,cU);break;case"scientific":c4.fillText((cX.toPrecision(2)),0,0,cU);break;case"standard":default:c4.fillText((cX.toFixed(0)),0,0,cU);break}c4.translate(-c1,0);c4.restore();cX+=bc;c3=0;c4.rotate(cZ);cV+=cZ;continue}c4.rotate(cZ);cV+=cZ}c4.translate(-bq,-bn);c4.restore()};var cd=function(cU){if(cU){cg=setInterval(cp,1000)}else{clearInterval(cg);ca=bs}};var bd=function(cU){if(cU){cA=setInterval(b1,1000)}else{clearInterval(cA);ck=a9}};var cp=function(){if(a3){if(ca===bk){ca=bs}else{ca=bk}if(!cc){cc=true;ad(cz.repaint)}}};var b1=function(){if(bi){if(ck===cT){ck=a9}else{ck=cT}if(!cc){cc=true;ad(cz.repaint)}}};this.setValue=function(cV){cV=parseFloat(cV);var cU=(cV<cl?cl:(cV>ch?ch:cV));if(bO!==cU){bO=cU;if((bO>=cE&&!bt&&bV)||(bO<=cE&&!bt&&!bV)){bt=true;cd(bt);if(cN){aV.play()}}else{if((bO<cE&&bt&&bV)||(bO>cE&&bt&&!bV)){bt=false;cd(bt);if(cN){aV.pause()}}}this.repaint()}return this};this.getValue=function(){return bO};this.setValueAnimated=function(cX,cY){cX=parseFloat(cX);var cU=(cX<cl?cl:(cX>ch?ch:cX)),cV=this,cW;if(bO!==cU){if(undefined!==bb&&bb.isPlaying){bb.stop()}cW=cH*Math.abs(cU-bO)/(ch-cl);cW=Math.max(cW,cH/5);bb=new Tween({},"",Tween.regularEaseInOut,bO,cU,cW);bb.onMotionChanged=function(cZ){bO=cZ.target._pos;if((bO>=cE&&!bt&&bV)||(bO<=cE&&!bt&&!bV)){bt=true;cd(bt);if(cN){aV.play()}}else{if((bO<cE&&bt&&bV)||(bO>cE&&bt&&!bV)){bt=false;cd(bt);if(cN){aV.pause()}}}if(!cc){cc=true;ad(cV.repaint)}};if(cY&&typeof(cY)==="function"){bb.onMotionFinished=cY}bb.start()}return this};this.setFrameDesign=function(cU){ba({frame:true});cP=cU;ce({frame:true});this.repaint();return this};this.setBackgroundColor=function(cU){ba({background:true,led:true});bx=cU;ce({background:true,led:true});this.repaint();return this};this.setForegroundType=function(cU){ba({foreground:true});cJ=cU;ce({foreground:true});this.repaint();return this};this.setValueColor=function(cU){ba({value:true});bZ=cU;ce({value:true});this.repaint();return this};this.setLedColor=function(cU){ba({led:true});bD=cU;ce({led:true});this.repaint();return this};this.setUserLedColor=function(cU){ba({userLed:true});b3=cU;ce({userLed:true});this.repaint();return this};this.toggleUserLed=function(){if(ck===cT){ck=a9}else{ck=cT}this.repaint();return this};this.setUserLedOnOff=function(cU){if(true===cU){ck=cT}else{ck=a9}this.repaint();return this};this.blinkUserLed=function(cU){if(cU){if(!aZ){bd(true);aZ=true}}else{if(aZ){clearInterval(cA);aZ=false}}return this};this.setLedVisible=function(cU){a3=!!cU;this.repaint();return this};this.setUserLedVisible=function(cU){bi=!!cU;this.repaint();return this};this.setLcdColor=function(cU){cj=cU;ba({background:true});ce({background:true});this.repaint();return this};this.setLcdDecimals=function(cU){cQ=parseInt(cU,10);this.repaint();return this};this.setSection=function(cU){cy=cU;ce();this.repaint();return this};this.setSectionActive=function(cU){b0=cU;ce();this.repaint();return this};this.setGradient=function(cU){a5=cU;ce();this.repaint();return this};this.setGradientActive=function(cU){be=cU;ce();this.repaint();return this};this.setMinValue=function(cU){cl=cU;ba({background:true});ce({background:true});this.repaint();return this};this.getMinValue=function(){return cl};this.setMaxValue=function(cU){ch=cU;ba({background:true});ce({background:true});this.repaint();return this};this.getMaxValue=function(){return ch};this.setThreshold=function(cV){cV=parseFloat(cV);var cU=cV<cl?cl:(cV>ch?ch:cV);cE=cU;ba({background:true});ce({background:true});this.repaint();return this};this.setThresholdRising=function(cU){bV=!!cU;bt=!bt;cd(bt);this.repaint();return this};this.setTitleString=function(cU){bU=cU;ba({background:true});ce({background:true});this.repaint();return this};this.setUnitString=function(cU){a4=cU;ba({background:true});ce({background:true});this.repaint();return this};this.setTrend=function(cU){cF=cU;this.repaint();return this};this.setTrendVisible=function(cU){bR=!!cU;this.repaint();return this};this.setFractionalScaleDecimals=function(cU){cB=parseInt(cU,10);ba({background:true});ce({background:true});this.repaint()};this.setLabelNumberFormat=function(cU){bC=cU;ba({background:true});ce({background:true});this.repaint();return this};this.repaint=function(){var c1=((bO-cl)/(ch-cl))*aY,cU,cZ=bZ,c0,cV,cY,cX,cW;if(!aW){ce({frame:true,background:true,led:true,userLed:true,value:true,trend:true,foreground:true})}bh.clearRect(0,0,bN,bN);if(cK){bh.drawImage(cb,0,0)}bh.drawImage(bP,0,0);for(c0=0;c0<=c1;c0+=5){cU=bZ;if(a0){cY=cl+(c0/aY)*(ch-cl);cX=a5.getEnd()-a5.getStart();cW=(cY-cl)/cX;cW=Math.max(Math.min(cW,1),0);cU=s(a5.getColorAt(cW).getRgbaColor())}else{if(aU){for(cV=0;cV<bK.length;cV++){if(c0>=bK[cV].start&&c0<bK[cV].stop){cU=bK[cV].color;break}}}}if(cZ.medium.getHexColor()!==cU.medium.getHexColor()){by(a1,cU);cZ=cU}bh.save();bh.translate(bq,bn);bh.rotate((c0*l)+bH);bh.translate(-bq,-bn);bh.drawImage(cx,cq,co);bh.restore()}if(bm){cw(bh,bO)}if(a3){bh.drawImage(ca,aT,aS)}if(bi){bh.drawImage(ck,bY,bX)}if(bR){switch(cF.state){case"up":bh.drawImage(b7,bF,bE);break;case"steady":bh.drawImage(cm,bF,bE);break;case"down":bh.drawImage(bl,bF,bE);break;case"off":bh.drawImage(bp,bF,bE);break}}if(cr){bh.drawImage(cv,0,0)}cc=false};this.repaint();return this};var ae=function(cm,bm){bm=bm||{};var b1=(undefined===bm.orientation?steelseries.Orientation.NORTH:bm.orientation),bw=(undefined===bm.size?0:bm.size),bV=(undefined===bm.minValue?0:bm.minValue),bT=(undefined===bm.maxValue?(bV+100):bm.maxValue),bJ=(undefined===bm.niceScale?true:bm.niceScale),b5=(undefined===bm.threshold?(bT-bV)/2+bV:bm.threshold),b2=(undefined===bm.section?null:bm.section),aX=(undefined===bm.area?null:bm.area),bD=(undefined===bm.titleString?"":bm.titleString),a2=(undefined===bm.unitString?"":bm.unitString),ch=(undefined===bm.frameDesign?steelseries.FrameDesign.METAL:bm.frameDesign),cb=(undefined===bm.frameVisible?true:bm.frameVisible),bl=(undefined===bm.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bm.backgroundColor),ck=(undefined===bm.backgroundVisible?true:bm.backgroundVisible),bW=(undefined===bm.pointerType?steelseries.PointerType.TYPE1:bm.pointerType),b7=(undefined===bm.pointerColor?steelseries.ColorDef.RED:bm.pointerColor),ce=(undefined===bm.knobType?steelseries.KnobType.STANDARD_KNOB:bm.knobType),bI=(undefined===bm.knobStyle?steelseries.KnobStyle.SILVER:bm.knobStyle),bo=(undefined===bm.ledColor?steelseries.LedColor.RED_LED:bm.ledColor),a1=(undefined===bm.ledVisible?true:bm.ledVisible),cl=(undefined===bm.thresholdVisible?true:bm.thresholdVisible),bG=(undefined===bm.thresholdRising?true:bm.thresholdRising),bv=(undefined===bm.minMeasuredValueVisible?false:bm.minMeasuredValueVisible),br=(undefined===bm.maxMeasuredValueVisible?false:bm.maxMeasuredValueVisible),ca=(undefined===bm.foregroundType?steelseries.ForegroundType.TYPE1:bm.foregroundType),bY=(undefined===bm.foregroundVisible?true:bm.foregroundVisible),bn=(undefined===bm.labelNumberFormat?steelseries.LabelNumberFormat.STANDARD:bm.labelNumberFormat),cd=(undefined===bm.playAlarm?false:bm.playAlarm),aZ=(undefined===bm.alarmSound?false:bm.alarmSound),b9=(undefined===bm.fullScaleDeflectionTime?2.5:bm.fullScaleDeflectionTime);var ba=r(cm);if(bw===0){bw=Math.min(ba.canvas.width,ba.canvas.height)}ba.canvas.width=bw;ba.canvas.height=bw;if(cd&&aZ!==false){var aS=B.createElement("audio");aS.setAttribute("src",aZ);aS.setAttribute("preload","auto")}var bC=steelseries.GaugeType.TYPE5;var b3=this;var bx=bV;var be=bT;var bu=bV;var a3=bw;var cg=bw;var bi=false;var bR=0;var a7;var bO=false;var a9=bV;var bk=bT;var a4=bT-bV;var bt=bk-a9;var bH=0;var a8=0;var bA=10;var cc=10;var b6=0;var bU=1.25*ao;var bj=1.25*ao;var bZ=T;var b4=bZ/bt;var bE=a3*0.006;var cf=a3*1.17/2;var aV=false;var bp=bU+(bx-bV)*b4;var bg=a3/2;var bf=cg*0.733644;var a0=0.455*a3;var aY=0.51*cg;var bc=function bc(){if(bJ){a4=g(bT-bV,false);a8=g(a4/(cc-1),true);a9=Math.floor(bV/a8)*a8;bk=Math.ceil(bT/a8)*a8;bH=g(a8/(bA-1),true);bV=a9;bT=bk;bt=bT-bV}else{a4=(bT-bV);a9=bV;bk=bT;bt=a4;bH=1;a8=10}bx=bx<bV?bV:bx>bT?bT:bx;be=be<bV?bV:be>bT?bT:be;bu=bu<bV?bV:bu>bT?bT:bu;b5=b5<bV?bV:b5>bT?bT:b5;b6=0;bU=1.25*ao;bj=1.25*ao;bZ=T;b4=bZ/bt;bp=bU+(bx-bV)*b4};var bM=J(bw,bw);var bq=bM.getContext("2d");var by=J(bw,bw);var bB=by.getContext("2d");var bb=J(bw*0.093457,bw*0.093457);var bs=bb.getContext("2d");var bh=J(bw*0.093457,bw*0.093457);var aU=bh.getContext("2d");var bL=bh;var bd=J(Math.ceil(bw*0.028037),Math.ceil(bw*0.028037));var b8=bd.getContext("2d");var bz=J(Math.ceil(bw*0.028037),Math.ceil(bw*0.028037));var aW=bz.getContext("2d");var bF=J(bw,bw);var cj=bF.getContext("2d");var b0=J(bw,bw);var a5=b0.getContext("2d");var bN=function(cn){if("type5"===bC.type){cn.save();if(b1.type==="west"){cn.drawImage(F(Math.ceil(cg*0.037383),steelseries.KnobType.STANDARD_KNOB,bI),a3*0.44,cg*0.8);cn.drawImage(F(Math.ceil(cg*0.037383),steelseries.KnobType.STANDARD_KNOB,bI),a3*0.44,cg*0.16)}else{if(b1.type==="east"){cn.drawImage(F(Math.ceil(cg*0.037383),steelseries.KnobType.STANDARD_KNOB,bI),a3*0.52,cg*0.8);cn.drawImage(F(Math.ceil(cg*0.037383),steelseries.KnobType.STANDARD_KNOB,bI),a3*0.52,cg*0.16)}else{cn.drawImage(F(Math.ceil(cg*0.037383),steelseries.KnobType.STANDARD_KNOB,bI),a3*0.2-cg*0.037383,cg*0.446666);cn.drawImage(F(Math.ceil(cg*0.037383),steelseries.KnobType.STANDARD_KNOB,bI),a3*0.8,cg*0.446666)}}cn.restore()}};var ci=function(){var cp=B.createElement("canvas");cp.width=Math.ceil(bw*0.046728);cp.height=Math.ceil(cp.width*0.9);var co=cp.getContext("2d");co.save();var cn=co.createLinearGradient(0,0.1,0,cp.height*0.9);cn.addColorStop(0,"#520000");cn.addColorStop(0.3,"#fc1d00");cn.addColorStop(0.59,"#fc1d00");cn.addColorStop(1,"#520000");co.fillStyle=cn;co.beginPath();co.moveTo(cp.width*0.5,0.1);co.lineTo(cp.width*0.9,cp.height*0.9);co.lineTo(cp.width*0.1,cp.height*0.9);co.lineTo(cp.width*0.5,0.1);co.closePath();co.fill();co.strokeStyle="#FFFFFF";co.stroke();co.restore();return cp};var aT=function(cn,ct,cq,co,cr){cn.save();cn.strokeStyle=co;cn.fillStyle=co;cn.lineWidth=a3*0.035;var cp=(bZ/bt*ct-bZ/bt*bV);var cs=cp+(cq-ct)/(bt/bZ);cn.translate(bg,bf);cn.rotate(bU);cn.beginPath();if(cr){cn.moveTo(0,0);cn.arc(0,0,a3*0.365-cn.lineWidth/2,cp,cs,false)}else{cn.arc(0,0,a3*0.365,cp,cs,false)}if(cr){cn.moveTo(0,0);cn.fill()}else{cn.stroke()}cn.translate(-bg,-bf);cn.restore()};var bS=function(cn){var cp,co;cn.save();cn.textAlign="left";cn.textBaseline="middle";cn.strokeStyle=bl.labelColor.getRgbaColor();cn.fillStyle=bl.labelColor.getRgbaColor();cn.font=0.046728*a3+"px "+W;cp=cn.measureText(bD).width;cn.fillText(bD,(a3-cp)/2,cg*0.4,a3*0.3);co=cn.measureText(a2).width;cn.fillText(a2,(a3-co)/2,cg*0.47,a3*0.2);cn.restore()};var bK=function(cB,cu){bl.labelColor.setAlpha(1);cB.save();if(steelseries.Orientation.WEST===b1){cB.translate(bg,bg);cB.rotate(-T);cB.translate(-bg,-bg)}if(steelseries.Orientation.EAST===b1){cB.translate(bg,bg);cB.rotate(T);cB.translate(-bg,-bg)}cB.textAlign="center";cB.textBaseline="middle";var cC=Math.ceil(a3*0.04);cB.font=cC+"px "+W;cB.strokeStyle=bl.labelColor.getRgbaColor();cB.fillStyle=bl.labelColor.getRgbaColor();cB.translate(bg,bf);cB.rotate(bU);var cv=b4*bH;var cx;var ct=bV;var cA=bA-1;var cr=a3*0.44;var cp=a3*0.41;var cw=a3*0.415;var co=a3*0.42;var cy=a3*0.48;var cn=a3*0.04;var cq=bA/2;var cz=parseFloat(bT.toFixed(2));var cs;for(cs=bV;parseFloat(cs.toFixed(2))<=cz;cs+=bH){cx=+cv+T;cA++;if(cA===bA){cB.lineWidth=1.5;cB.beginPath();cB.moveTo(cr,0);cB.lineTo(cp,0);cB.closePath();cB.stroke();cB.save();cB.translate(cy,0);cB.rotate(cx);switch(cu.format){case"fractional":cB.fillText((ct.toFixed(2)),0,0,cn);break;case"scientific":cB.fillText((ct.toPrecision(2)),0,0,cn);break;case"standard":default:cB.fillText((ct.toFixed(0)),0,0,cn);break}cB.translate(-cy,0);cB.restore();ct+=a8;cA=0;cB.rotate(cv);continue}if(0===bA%2&&cA===(cq)){cB.lineWidth=1;cB.beginPath();cB.moveTo(cr,0);cB.lineTo(cw,0);cB.closePath();cB.stroke()}else{cB.lineWidth=0.5;cB.beginPath();cB.moveTo(cr,0);cB.lineTo(co,0);cB.closePath();cB.stroke()}cB.rotate(cv)}cB.translate(-bg,-bf);cB.restore()};var bQ=function(cu){cu=cu||{};var cv=(undefined===cu.frame?false:cu.frame);var co=(undefined===cu.background?false:cu.background);var cr=(undefined===cu.led?false:cu.led);var cn=(undefined===cu.pointer?false:cu.pointer);var ct=(undefined===cu.foreground?false:cu.foreground);aV=true;bc();if(cv&&cb){d(bq,ch,bg,bw/2,a3,cg)}if(co&&ck){aQ(bB,bl,bg,bw/2,a3,cg)}if(cr){bs.drawImage(af(Math.ceil(bw*0.093457),1,bo),0,0);aU.drawImage(af(Math.ceil(bw*0.093457),0,bo),0,0)}if(bv){b8.drawImage(w(Math.ceil(bw*0.028037),steelseries.ColorDef.BLUE.dark.getRgbaColor(),true,true),0,0);b8.restore()}if(br){aW.drawImage(w(Math.ceil(bw*0.028037),steelseries.ColorDef.RED.medium.getRgbaColor(),true),0,0);aW.restore()}if(co&&ck){bN(bB);if(null!==b2&&0<b2.length){bB.save();if(steelseries.Orientation.WEST===b1){bB.translate(bg,bg);bB.rotate(-T);bB.translate(-bg,-bg)}else{if(steelseries.Orientation.EAST===b1){bB.translate(bg,bg);bB.rotate(T);bB.translate(-bg,-bg)}}var cs=b2.length;do{cs--;aT(bB,b2[cs].start,b2[cs].stop,b2[cs].color,false)}while(0<cs);bB.restore()}if(null!==aX&&0<aX.length){if(steelseries.Orientation.WEST===b1){bB.translate(bg,bg);bB.rotate(-T);bB.translate(-bg,-bg)}if(steelseries.Orientation.EAST===b1){bB.translate(bg,bg);bB.rotate(T);bB.translate(-bg,-bg)}var cp=aX.length;do{cp--;aT(bB,aX[cp].start,aX[cp].stop,aX[cp].color,true)}while(0<cp);bB.restore()}bK(bB,bn);bS(bB)}if(cl){bB.save();if(steelseries.Orientation.WEST===b1){bB.translate(bg,bg);bB.rotate(-T);bB.translate(-bg,-bg)}if(steelseries.Orientation.EAST===b1){bB.translate(bg,bg);bB.rotate(T);bB.translate(-bg,-bg)}bB.translate(bg,bf);bB.rotate(bU+(b5-bV)*b4+T);bB.translate(-bg,-bf);bB.drawImage(ci(),a3*0.475,cg*0.32);bB.restore()}if(cn){E(cj,a3*1.17,bW,b7,bl.labelColor)}if(ct&&bY){var cq=(bW.type==="type15"||bW.type==="type16"?false:true);A(a5,ca,a3,cg,cq,ce,bI,bC,b1)}};var a6=function(co){co=co||{};var cq=(undefined===co.frame?false:co.frame);var cr=(undefined===co.background?false:co.background);var cs=(undefined===co.led?false:co.led);var cp=(undefined===co.pointer?false:co.pointer);var cn=(undefined===co.foreground?false:co.foreground);if(cq){bM.width=bw;bM.height=bw;bq=bM.getContext("2d")}if(cr){by.width=bw;by.height=bw;bB=by.getContext("2d")}if(cs){bb.width=Math.ceil(bw*0.093457);bb.height=Math.ceil(bw*0.093457);bs=bb.getContext("2d");bh.width=Math.ceil(bw*0.093457);bh.height=Math.ceil(bw*0.093457);aU=bh.getContext("2d");bL=bh}if(cp){bF.width=bw;bF.height=bw;cj=bF.getContext("2d")}if(cn){b0.width=bw;b0.height=bw;a5=b0.getContext("2d")}};var bP=function(cn){if(cn){bR=setInterval(bX,1000)}else{clearInterval(bR);bL=bh}};var bX=function(){if(a1){if(bL===bb){bL=bh}else{bL=bb}if(!bO){bO=true;ad(b3.repaint)}}};this.setValue=function(co){co=parseFloat(co);var cn=(co<bV?bV:(co>bT?bT:co));if(bx!==cn){bx=cn;if(bx>bu){bu=bx}if(bx<be){be=bx}if((bx>=b5&&!bi&&bG)||(bx<=b5&&!bi&&!bG)){bi=true;bP(bi);if(cd){aS.play()}}else{if((bx<b5&&bi&&bG)||(bx>b5&&bi&&!bG)){bi=false;bP(bi);if(cd){aS.pause()}}}this.repaint()}return this};this.getValue=function(){return bx};this.setValueAnimated=function(cq,cr){cq=parseFloat(cq);var cn=(cq<bV?bV:(cq>bT?bT:cq)),co=this,cp;if(bx!==cn){if(undefined!==a7&&a7.isPlaying){a7.stop()}cp=b9*Math.abs(cn-bx)/(bT-bV);cp=Math.max(cp,b9/5);a7=new Tween({},"",Tween.regularEaseInOut,bx,cn,cp);a7.onMotionChanged=function(cs){bx=cs.target._pos;if((bx>=b5&&!bi&&bG)||(bx<=b5&&!bi&&!bG)){bi=true;bP(bi);if(cd){aS.play()}}else{if((bx<b5&&bi&&bG)||(bx>b5&&bi&&!bG)){bi=false;bP(bi);if(cd){aS.pause()}}}if(bx>bu){bu=bx}if(bx<be){be=bx}if(!bO){bO=true;ad(co.repaint)}};if(cr&&typeof(cr)==="function"){a7.onMotionFinished=cr}a7.start()}return this};this.setMinValue=function(cn){bV=parseFloat(cn);a6({background:true});bQ({background:true});this.repaint();return this};this.getMinValue=function(){return bV};this.setMaxValue=function(cn){bT=parseFloat(cn);a6({background:true});bQ({background:true});this.repaint();return this};this.getMaxValue=function(){return bT};this.setMaxMeasuredValue=function(co){co=parseFloat(co);var cn=co<bV?bV:(co>bT?bT:co);bu=cn;this.repaint();return this};this.setMinMeasuredValue=function(co){co=parseFloat(co);var cn=co<bV?bV:(co>bT?bT:co);be=cn;this.repaint();return this};this.resetMinMeasuredValue=function(){be=bx;this.repaint();return this};this.resetMaxMeasuredValue=function(){bu=bx;this.repaint();return this};this.setMinMeasuredValueVisible=function(cn){bv=!!cn;this.repaint();return this};this.setMaxMeasuredValueVisible=function(cn){br=!!cn;this.repaint();return this};this.setThresholdVisible=function(cn){cl=!!cn;this.repaint();return this};this.setThresholdRising=function(cn){bG=!!cn;bi=!bi;bP(bi);this.repaint();return this};this.setFrameDesign=function(cn){a6({frame:true});ch=cn;bQ({frame:true});this.repaint();return this};this.setBackgroundColor=function(cn){a6({background:true,pointer:(bW.type==="type2"||bW.type==="type13"?true:false)});bl=cn;bQ({background:true,pointer:(bW.type==="type2"||bW.type==="type13"?true:false)});this.repaint();return this};this.setForegroundType=function(cn){a6({foreground:true});ca=cn;bQ({foreground:true});this.repaint();return this};this.setPointerType=function(cn){a6({pointer:true,foreground:true});bW=cn;bQ({pointer:true,foreground:true});this.repaint();return this};this.setPointerColor=function(cn){a6({pointer:true});b7=cn;bQ({pointer:true});this.repaint();return this};this.setLedColor=function(cn){a6({led:true});bo=cn;bQ({led:true});this.repaint();return this};this.setLedVisible=function(cn){a1=!!cn;this.repaint();return this};this.repaint=function(){if(!aV){bQ({frame:true,background:true,led:true,pointer:true,foreground:true})}ba.clearRect(0,0,bw,bw);ba.save();if(cb){ba.drawImage(bM,0,0)}ba.drawImage(by,0,0);if(a1){ba.drawImage(bL,a0,aY)}if(steelseries.Orientation.WEST===b1){ba.translate(bg,bg);ba.rotate(-T);ba.translate(-bg,-bg)}if(steelseries.Orientation.EAST===b1){ba.translate(bg,bg);ba.rotate(T);ba.translate(-bg,-bg)}if(bv){ba.save();ba.translate(bg,bf);ba.rotate(bU+T+(be-bV)*b4);ba.translate(-bg,-bf);ba.drawImage(bd,ba.canvas.width*0.4865,ba.canvas.height*0.27);ba.restore()}if(br){ba.save();ba.translate(bg,bf);ba.rotate(bU+T+(bu-bV)*b4);ba.translate(-bg,-bf);ba.drawImage(bz,ba.canvas.width*0.4865,ba.canvas.height*0.27);ba.restore()}bp=bU+T+(bx-bV)*b4;ba.save();ba.translate(bg,bf);ba.rotate(bp);ba.shadowColor="rgba(0, 0, 0, 0.8)";ba.shadowOffsetX=ba.shadowOffsetY=bE;ba.shadowBlur=bE*2;ba.translate(-cf,-cf);ba.drawImage(bF,0,0);ba.restore();if(bY){if(steelseries.Orientation.WEST===b1){ba.translate(bg,bg);ba.rotate(T);ba.translate(-bg,-bg)}else{if(steelseries.Orientation.EAST===b1){ba.translate(bg,bg);ba.rotate(-T);ba.translate(-bg,-bg)}}ba.drawImage(b0,0,0)}ba.restore();bO=false};this.repaint();return this};var M=function(cg,bo){bo=bo||{};var bC=(undefined===bo.gaugeType?steelseries.GaugeType.TYPE1:bo.gaugeType),b3=(undefined===bo.width?0:bo.width),be=(undefined===bo.height?0:bo.height),bV=(undefined===bo.minValue?0:bo.minValue),bR=(undefined===bo.maxValue?(bV+100):bo.maxValue),bI=(undefined===bo.niceScale?true:bo.niceScale),b2=(undefined===bo.threshold?(bR-bV)/2+bV:bo.threshold),bD=(undefined===bo.titleString?"":bo.titleString),a0=(undefined===bo.unitString?"":bo.unitString),ca=(undefined===bo.frameDesign?steelseries.FrameDesign.METAL:bo.frameDesign),b6=(undefined===bo.frameVisible?true:bo.frameVisible),bm=(undefined===bo.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bo.backgroundColor),cd=(undefined===bo.backgroundVisible?true:bo.backgroundVisible),bH=(undefined===bo.valueColor?steelseries.ColorDef.RED:bo.valueColor),bS=(undefined===bo.lcdColor?steelseries.LcdColor.STANDARD:bo.lcdColor),bd=(undefined===bo.lcdVisible?true:bo.lcdVisible),cb=(undefined===bo.lcdDecimals?2:bo.lcdDecimals),bk=(undefined===bo.digitalFont?false:bo.digitalFont),bq=(undefined===bo.ledColor?steelseries.LedColor.RED_LED:bo.ledColor),aZ=(undefined===bo.ledVisible?true:bo.ledVisible),cf=(undefined===bo.thresholdVisible?true:bo.thresholdVisible),bF=(undefined===bo.thresholdRising?true:bo.thresholdRising),bw=(undefined===bo.minMeasuredValueVisible?false:bo.minMeasuredValueVisible),bs=(undefined===bo.maxMeasuredValueVisible?false:bo.maxMeasuredValueVisible),bp=(undefined===bo.labelNumberFormat?steelseries.LabelNumberFormat.STANDARD:bo.labelNumberFormat),bY=(undefined===bo.foregroundVisible?true:bo.foregroundVisible),b8=(undefined===bo.playAlarm?false:bo.playAlarm),aX=(undefined===bo.alarmSound?false:bo.alarmSound),b5=(undefined===bo.fullScaleDeflectionTime?2.5:bo.fullScaleDeflectionTime);var ba=r(cg);if(b3===0){b3=ba.canvas.width}if(be===0){be=ba.canvas.height}ba.canvas.width=b3;ba.canvas.height=be;var a1=b3;var b9=be;if(b8&&aX!==false){var aS=B.createElement("audio");aS.setAttribute("src",aX);aS.setAttribute("preload","auto")}var b1=this;var bx=bV;var bg=bR;var bv=bV;if(bC.type!=="type1"&&bC.type!=="type2"){bC=steelseries.GaugeType.TYPE1}var a6;var bj=false;var bN=false;var bQ=0;var bh=b3<=be;var aY;var aW;var a8=Math.round((bh?be:b3)*0.05);var bT=Math.round((bh?b3:be)*0.05);var bJ;var bn;if(bh){aY=a1/2-a8/2;aW=(bC.type==="type1"?0.053:0.038)*b9;bJ=Math.floor(b9/22)+"px "+W;bn=Math.floor(b9/22)+"px "+aE}else{aY=0.89*a1;aW=b9/2-a8/2;bJ=Math.floor(b9/10)+"px "+W;bn=Math.floor(b9/10)+"px "+aE}var aU=false;var a9=bV;var bl=bR;var a2=bR-bV;var bu=bl-a9;var bG=0;var a7=0;var bA=10;var b7=10;var bb=function bb(){if(bI){a2=g(bR-bV,false);a7=g(a2/(b7-1),true);a9=Math.floor(bV/a7)*a7;bl=Math.ceil(bR/a7)*a7;bG=g(a7/(bA-1),true);bV=a9;bR=bl;bu=bR-bV}else{a2=(bR-bV);a9=bV;bl=bR;bu=a2;bG=1;a7=10}bx=bx<bV?bV:bx>bR?bR:bx;bg=bg<bV?bV:bg>bR?bR:bg;bv=bv<bV?bV:bv>bR?bR:bv;b2=b2<bV?bV:b2>bR?bR:b2};var bM=J(b3,be);var br=bM.getContext("2d");var by=J(b3,be);var bB=by.getContext("2d");var bW;var bc=J(a8,a8);var bt=bc.getContext("2d");var bi=J(a8,a8);var aT=bi.getContext("2d");var bL=bi;var bf=J(bT,bT);var b4=bf.getContext("2d");var bz=J(bT,bT);var aV=bz.getContext("2d");var bZ=J(b3,be);var a3=bZ.getContext("2d");var b0=function(ch,cm,ci){ch.save();ch.textAlign="right";ch.textBaseline="middle";ch.strokeStyle=bS.textColor;ch.fillStyle=bS.textColor;if(bS===steelseries.LcdColor.STANDARD||bS===steelseries.LcdColor.STANDARD_GREEN){ch.shadowColor="gray";if(ci){ch.shadowOffsetX=b9*0.003;ch.shadowOffsetY=b9*0.003;ch.shadowBlur=b9*0.004}else{ch.shadowOffsetX=b9*0.007;ch.shadowOffsetY=b9*0.007;ch.shadowBlur=b9*0.009}}var ck;var cj;var cl;if(bk){ch.font=bn}else{ch.font=bJ}if(ci){ck=(a1-(a1*0.571428))/2+a1*0.571428-2;cj=b9*0.88+1+(b9*0.055-2)/2;cl=a1*0.7-2}else{ck=(a1*0.695)+a1*0.18-2;cj=(b9*0.22)+1+(b9*0.15-2)/2;cl=b9*0.22-2}ch.fillText(cm.toFixed(cb),ck,cj,cl);ch.restore()};var cc=function(ch){var ck=B.createElement("canvas");var cj=ck.getContext("2d");ck.height=ck.width=bT;cj.save();var ci=cj.createLinearGradient(0,0.1,0,ck.height*0.9);ci.addColorStop(0,"#520000");ci.addColorStop(0.3,"#fc1d00");ci.addColorStop(0.59,"#fc1d00");ci.addColorStop(1,"#520000");cj.fillStyle=ci;if(ch){cj.beginPath();cj.moveTo(0.1,ck.height*0.5);cj.lineTo(ck.width*0.9,0.1);cj.lineTo(ck.width*0.9,ck.height*0.9);cj.closePath()}else{cj.beginPath();cj.moveTo(0.1,0.1);cj.lineTo(ck.width*0.9,0.1);cj.lineTo(ck.width*0.5,ck.height*0.9);cj.closePath()}cj.fill();cj.strokeStyle="#FFFFFF";cj.stroke();cj.restore();return ck};var bK=function(ct,cl,ci){bm.labelColor.setAlpha(1);ct.save();ct.textBaseline="middle";var cq=a1*0.1;ct.strokeStyle=bm.labelColor.getRgbaColor();ct.fillStyle=bm.labelColor.getRgbaColor();var cn=bV;var cm=bA-1;var cs;var cz;var cw;var cv;var cx;var ck;var cy=1;var cj;var cA;var cp;var ch;var cr;var co;if(ci){cj=(0.34*a1);cA=(0.36*a1);cp=(0.33*a1);ch=(0.36*a1);cr=(0.32*a1);co=(0.36*a1);ct.textAlign="right";cw=0;cv=b9*0.12864;cx=0;if(bC.type==="type1"){ck=(b9*0.856796-b9*0.12864)}else{ck=(b9*0.7475-b9*0.12864)}cy=ck/(bR-bV)}else{cj=(0.65*b9);cA=(0.63*b9);cp=(0.66*b9);ch=(0.63*b9);cr=(0.67*b9);co=(0.63*b9);ct.textAlign="center";cv=0;if(bC.type==="type1"){cw=a1*0.142857;cx=(a1*0.871012-cw)}else{cw=a1*0.19857;cx=(a1*0.82-cw)}ck=0;cy=cx/(bR-bV)}var cu;for(cu=bV,cs=0;cu<=bR;cu+=bG,cs+=bG){if(ci){cz=cv+ck-cs*cy}else{cz=cw+cs*cy}cm++;if(cm===bA){ct.lineWidth=1.5;ce(ct,cr,co,cz,ci);if(ci){switch(cl.format){case"fractional":ct.fillText((cn.toFixed(2)),a1*0.28,cz,cq);break;case"scientific":ct.fillText((cn.toPrecision(2)),a1*0.28,cz,cq);break;case"standard":default:ct.fillText((cn.toFixed(0)),a1*0.28,cz,cq);break}}else{switch(cl.format){case"fractional":ct.fillText((cn.toFixed(2)),cz,(b9*0.73),cq);break;case"scientific":ct.fillText((cn.toPrecision(2)),cz,(b9*0.73),cq);break;case"standard":default:ct.fillText((cn.toFixed(0)),cz,(b9*0.73),cq);break}}cn+=a7;cm=0;continue}if(0===bA%2&&cm===(bA/2)){ct.lineWidth=1;ce(ct,cp,ch,cz,ci)}else{ct.lineWidth=0.5;ce(ct,cj,cA,cz,ci)}}ct.restore()};var ce=function(ch,ck,cl,cj,ci){if(ci){ch.beginPath();ch.moveTo(ck,cj);ch.lineTo(cl,cj);ch.closePath();ch.stroke()}else{ch.beginPath();ch.moveTo(cj,ck);ch.lineTo(cj,cl);ch.closePath();ch.stroke()}};var bP=function(ck){ck=ck||{};var cl=(undefined===ck.frame?false:ck.frame);var cm=(undefined===ck.background?false:ck.background);var cj=(undefined===ck.led?false:ck.led);var ch=(undefined===ck.foreground?false:ck.foreground);var cn;var co;var ci;aU=true;bb();if(cl&&b6){k(br,ca,a1,b9,bh)}if(cm&&cd){Y(bB,bm,a1,b9,bh)}if(cm&&bC.type==="type2"){a4(bB)}if(cj){if(bh){bt.drawImage(af(a8,1,bq),0,0);aT.drawImage(af(a8,0,bq),0,0)}else{bt.drawImage(af(a8,1,bq),0,0);aT.drawImage(af(a8,0,bq),0,0)}}if(bw){if(bh){b4.drawImage(w(bT,steelseries.ColorDef.BLUE.dark.getRgbaColor(),false,bh),0,0)}else{b4.drawImage(w(bT,steelseries.ColorDef.BLUE.dark.getRgbaColor(),false,bh),0,0)}}if(bs){if(bh){aV.drawImage(w(bT,steelseries.ColorDef.RED.medium.getRgbaColor(),false,bh),0,0)}else{aV.drawImage(w(bT,steelseries.ColorDef.RED.medium.getRgbaColor(),false,bh),0,0)}}if(cm&&cd){bK(bB,bp,bh);if(bh){ap(bB,a1,b9,bD,a0,bm,bh,null,bd,bC)}else{ap(bB,a1,b9,bD,a0,bm,bh,null,bd,bC)}}if(cm&&cf){bB.save();if(bh){cn=(bC.type==="type1"?0.856796:0.7475);co=cn-0.12864;ci=b9*cn-(b9*co)*(b2-bV)/(bR-bV);bB.translate(a1*0.365,ci-bT/2)}else{cn=(bC.type==="type1"?0.871012:0.82);co=cn-(bC.type==="type1"?0.142857:0.19857);ci=a1*co*(b2-bV)/(bR-bV);bB.translate(a1*(bC.type==="type1"?0.142857:0.19857)-bT/2+ci,b9*0.58)}bB.drawImage(cc(bh),0,0);bB.restore()}if(cm&&bd){if(bh){bW=V(a1*0.571428,b9*0.055,bS);bB.drawImage(bW,((a1-(a1*0.571428))/2),b9*0.88)}else{bW=V(a1*0.18,b9*0.15,bS);bB.drawImage(bW,a1*0.695,b9*0.22)}}if(ch&&bC.type==="type2"){bE(a3)}if(ch&&bY){aK(a3,a1,b9,bh,false)}};var a5=function(ci){ci=ci||{};var cj=(undefined===ci.frame?false:ci.frame);var ck=(undefined===ci.background?false:ci.background);var cl=(undefined===ci.led?false:ci.led);var ch=(undefined===ci.foreground?false:ci.foreground);if(cj){bM.width=b3;bM.height=be;br=bM.getContext("2d")}if(ck){by.width=b3;by.height=be;bB=by.getContext("2d")}if(cl){bc.width=Math.ceil(b3*0.093457);bc.height=Math.ceil(be*0.093457);bt=bc.getContext("2d");bi.width=Math.ceil(b3*0.093457);bi.height=Math.ceil(be*0.093457);aT=bi.getContext("2d");bL=bi}if(ch){bZ.width=b3;bZ.height=be;a3=bZ.getContext("2d")}};var bO=function(ch){if(ch){bQ=setInterval(bX,1000)}else{clearInterval(bQ);bL=bi}};var bX=function(){if(aZ){if(bL===bc){bL=bi}else{bL=bc}if(!bN){bN=true;ad(b1.repaint)}}};var bU=function(cD,cu,cI){var cB;var ct;var cJ=bm.labelColor;var cC;var cm,cL;var cs,cr,cG,cE;var cp,cn,cj,ci;var cq,co,cA,cy;var cH,cF,cz,cx;if(bh){cB=cI*0.12864;if(bC.type==="type1"){ct=cI*0.856796}else{ct=cI*0.7475}cC=ct-cB;cm=cC*(bx-bV)/(bR-bV);cL=ct-cm;cp=0;cn=cB;cj=0;ci=ct}else{if(bC.type==="type1"){cB=cu*0.871012;ct=cu*0.142857}else{cB=cu*0.82;ct=cu*0.19857}cC=cB-ct;cm=cC*(bx-bV)/(bR-bV);cL=ct;cp=cB;cn=0;cj=ct;ci=0}if(bC.type==="type1"){var cl=(bm===steelseries.BackgroundColor.CARBON||bm===steelseries.BackgroundColor.PUNCHED_SHEET||bm===steelseries.BackgroundColor.STAINLESS||bm===steelseries.BackgroundColor.BRUSHED_STAINLESS||bm===steelseries.BackgroundColor.TURNED)?0.3:0;var cK=cD.createLinearGradient(cp,cn,cj,ci);cJ.setAlpha(0.05+cl);cK.addColorStop(0,cJ.getRgbaColor());cJ.setAlpha(0.15+cl);cK.addColorStop(0.48,cJ.getRgbaColor());cJ.setAlpha(0.15+cl);cK.addColorStop(0.49,cJ.getRgbaColor());cJ.setAlpha(0.05+cl);cK.addColorStop(1,cJ.getRgbaColor());cD.fillStyle=cK;if(bh){cD.fillRect(cu*0.435714,cB,cu*0.142857,cC)}else{cD.fillRect(cu*0.142857,cI*0.435714,cC,cI*0.142857)}if(bh){cq=0;co=cB;cA=0;cy=cB+cC}else{cq=cu*0.142857+cC;co=0;cA=cu*0.142857;cy=0}var ch=cD.createLinearGradient(cq,co,cA,cy);cJ.setAlpha(0.3+cl);ch.addColorStop(0,cJ.getRgbaColor());cJ.setAlpha(0.69);ch.addColorStop(0.48,cJ.getRgbaColor());cJ.setAlpha(0.7);ch.addColorStop(0.49,cJ.getRgbaColor());cJ.setAlpha(0.4);ch.addColorStop(1,cJ.getRgbaColor());cD.fillStyle=ch;if(bh){cD.fillRect(cu*0.435714,cB,cu*0.007142,cC);cD.fillRect(cu*0.571428,cB,cu*0.007142,cC)}else{cD.fillRect(cu*0.142857,cI*0.435714,cC,cI*0.007142);cD.fillRect(cu*0.142857,cI*0.571428,cC,cI*0.007142)}}if(bh){if(bC.type==="type1"){cs=cu*0.45;cr=0;cG=cu*0.45+cu*0.114285;cE=0}else{cs=cu/2-cI*0.0486/2;cr=0;cG=cs+cI*0.053;cE=0}}else{if(bC.type==="type1"){cs=0;cr=cI*0.45;cG=0;cE=cI*0.45+cI*0.114285}else{cs=0;cr=cI/2-cu*0.025;cG=0;cE=cr+cu*0.053}}var cw=cD.createLinearGradient(cs,cr,cG,cE);cw.addColorStop(0,bH.medium.getRgbaColor());cw.addColorStop(1,bH.light.getRgbaColor());cD.fillStyle=cw;var cv=(bC.type==="type1"?0:(bh?cI*0.05:cu*0.05));if(bh){cD.fillRect(cs,cL,cG-cs,cm+cv)}else{cD.fillRect(cL-cv,cr,cm+cv,cE-cr)}if(bC.type==="type1"){if(bh){cH=cu*0.45;cF=0;cz=cH+cu*0.05;cx=0}else{cH=0;cF=cI*0.45;cz=0;cx=cF+cI*0.05}var ck=cD.createLinearGradient(cH,cF,cz,cx);ck.addColorStop(0,"rgba(255, 255, 255, 0.7)");ck.addColorStop(0.98,"rgba(255, 255, 255, 0.0)");cD.fillStyle=ck;if(bh){cD.fillRect(cH,cL,cz,cm)}else{cD.fillRect(cL,cF,cm,cx-cF)}}};var bE=function(ci){var ch=(bh?b9:a1);ci.save();if(bh){ci.translate(a1/2,0)}else{ci.translate(a1/2,b9/2);ci.rotate(T);ci.translate(0,-a1/2+a1*0.05)}ci.beginPath();ci.moveTo(-0.049*ch,0.825*ch);ci.bezierCurveTo(-0.049*ch,0.7975*ch,-0.0264*ch,0.775*ch,0.0013*ch,0.775*ch);ci.bezierCurveTo(0.0264*ch,0.775*ch,0.049*ch,0.7975*ch,0.049*ch,0.825*ch);ci.bezierCurveTo(0.049*ch,0.85*ch,0.0264*ch,0.8725*ch,0.0013*ch,0.8725*ch);ci.bezierCurveTo(-0.0264*ch,0.8725*ch,-0.049*ch,0.85*ch,-0.049*ch,0.825*ch);ci.closePath();var cj=ci.createRadialGradient(0*ch,0.825*ch,0,0*ch,0.825*ch,0.049*ch);cj.addColorStop(0,bH.medium.getRgbaColor());cj.addColorStop(0.3,bH.medium.getRgbaColor());cj.addColorStop(1,bH.light.getRgbaColor());ci.fillStyle=cj;ci.fill();ci.beginPath();if(bh){ci.moveTo(-0.0365*ch,0.8075*ch);ci.bezierCurveTo(-0.0365*ch,0.7925*ch,-0.0214*ch,0.7875*ch,-0.0214*ch,0.7825*ch);ci.bezierCurveTo(0.0189*ch,0.785*ch,0.0365*ch,0.7925*ch,0.0365*ch,0.8075*ch);ci.bezierCurveTo(0.0365*ch,0.8175*ch,0.0214*ch,0.815*ch,0.0013*ch,0.8125*ch);ci.bezierCurveTo(-0.0189*ch,0.8125*ch,-0.0365*ch,0.8175*ch,-0.0365*ch,0.8075*ch);cj=ci.createRadialGradient(0,0.8*ch,0,0,0.8*ch,0.0377*ch)}else{ci.beginPath();ci.moveTo(-0.0214*ch,0.86*ch);ci.bezierCurveTo(-0.0365*ch,0.86*ch,-0.0415*ch,0.845*ch,-0.0465*ch,0.825*ch);ci.bezierCurveTo(-0.0465*ch,0.805*ch,-0.0365*ch,0.7875*ch,-0.0214*ch,0.7875*ch);ci.bezierCurveTo(-0.0113*ch,0.7875*ch,-0.0163*ch,0.8025*ch,-0.0163*ch,0.8225*ch);ci.bezierCurveTo(-0.0163*ch,0.8425*ch,-0.0113*ch,0.86*ch,-0.0214*ch,0.86*ch);cj=ci.createRadialGradient(-0.03*ch,0.8225*ch,0,-0.03*ch,0.8225*ch,0.0377*ch)}cj.addColorStop(0,"rgba(255, 255, 255, 0.55)");cj.addColorStop(1,"rgba(255, 255, 255, 0.05)");ci.fillStyle=cj;ci.closePath();ci.fill();ci.beginPath();ci.moveTo(-0.0214*ch,0.115*ch);ci.bezierCurveTo(-0.0214*ch,0.1075*ch,-0.0163*ch,0.1025*ch,-0.0113*ch,0.1025*ch);ci.bezierCurveTo(-0.0113*ch,0.1025*ch,-0.0113*ch,0.1025*ch,-0.0113*ch,0.1025*ch);ci.bezierCurveTo(-0.0038*ch,0.1025*ch,0.0013*ch,0.1075*ch,0.0013*ch,0.115*ch);ci.bezierCurveTo(0.0013*ch,0.115*ch,0.0013*ch,0.76*ch,0.0013*ch,0.76*ch);ci.bezierCurveTo(0.0013*ch,0.7675*ch,-0.0038*ch,0.7725*ch,-0.0113*ch,0.7725*ch);ci.bezierCurveTo(-0.0113*ch,0.7725*ch,-0.0113*ch,0.7725*ch,-0.0113*ch,0.7725*ch);ci.bezierCurveTo(-0.0163*ch,0.7725*ch,-0.0214*ch,0.7675*ch,-0.0214*ch,0.76*ch);ci.bezierCurveTo(-0.0214*ch,0.76*ch,-0.0214*ch,0.115*ch,-0.0214*ch,0.115*ch);ci.closePath();cj=ci.createLinearGradient(-0.0189*ch,0,0.0013*ch,0);cj.addColorStop(0,"rgba(255, 255, 255, 0.1)");cj.addColorStop(0.34,"rgba(255, 255, 255, 0.5)");cj.addColorStop(1,"rgba(255, 255, 255, 0.1)");ci.fillStyle=cj;ci.fill();ci.restore()};var a4=function(ci){var ch=(bh?b9:a1);ci.save();if(bh){ci.translate(a1/2,0)}else{ci.translate(a1/2,b9/2);ci.rotate(T);ci.translate(0,-a1/2+a1*0.05)}ci.beginPath();ci.moveTo(-0.0516*ch,0.825*ch);ci.bezierCurveTo(-0.0516*ch,0.8525*ch,-0.0289*ch,0.875*ch,0.0013*ch,0.875*ch);ci.bezierCurveTo(0.0289*ch,0.875*ch,0.0516*ch,0.8525*ch,0.0516*ch,0.825*ch);ci.bezierCurveTo(0.0516*ch,0.8075*ch,0.044*ch,0.7925*ch,0.0314*ch,0.7825*ch);ci.bezierCurveTo(0.0314*ch,0.7825*ch,0.0314*ch,0.12*ch,0.0314*ch,0.12*ch);ci.bezierCurveTo(0.0314*ch,0.1025*ch,0.0189*ch,0.0875*ch,0.0013*ch,0.0875*ch);ci.bezierCurveTo(-0.0163*ch,0.0875*ch,-0.0289*ch,0.1025*ch,-0.0289*ch,0.12*ch);ci.bezierCurveTo(-0.0289*ch,0.12*ch,-0.0289*ch,0.7825*ch,-0.0289*ch,0.7825*ch);ci.bezierCurveTo(-0.0415*ch,0.79*ch,-0.0516*ch,0.805*ch,-0.0516*ch,0.825*ch);ci.closePath();var cj=ci.createLinearGradient(-0.0163*ch,0,0.0289*ch,0);cj.addColorStop(0,"rgba(226, 226, 226, 0.5)");cj.addColorStop(0.5,"rgba(226, 226, 226, 0.2)");cj.addColorStop(1,"rgba(226, 226, 226, 0.5)");ci.fillStyle=cj;ci.fill();ci.lineWidth=1;ci.strokeStyle="rgba(153, 153, 153, 0.5)";ci.stroke();ci.restore()};this.setValue=function(ci){ci=parseFloat(ci);var ch=(ci<bV?bV:(ci>bR?bR:ci));if(bx!==ch){bx=ch;if(bx>bv){bv=bx}if(bx<bg){bg=bx}if((bx>=b2&&!bj&&bF)||(bx<=b2&&!bj&&!bF)){bj=true;bO(bj);if(b8){aS.play()}}else{if((bx<b2&&bj&&bF)||(bx>b2&&bj&&!bF)){bj=false;bO(bj);if(b8){aS.pause()}}}this.repaint()}return this};this.getValue=function(){return bx};this.setValueAnimated=function(ck,cl){var ch,ci=this,cj;ck=parseFloat(ck);ch=(ck<bV?bV:(ck>bR?bR:ck));if(bx!==ch){if(undefined!==a6&&a6.isPlaying){a6.stop()}cj=b5*Math.abs(ch-bx)/(bR-bV);cj=Math.max(cj,b5/5);a6=new Tween({},"",Tween.regularEaseInOut,bx,ch,cj);a6.onMotionChanged=function(cm){bx=cm.target._pos;if(bx>bv){bv=bx}if(bx<bg){bg=bx}if((bx>=b2&&!bj&&bF)||(bx<=b2&&!bj&&!bF)){bj=true;bO(bj);if(b8){aS.play()}}else{if((bx<b2&&bj&&bF)||(bx>b2&&bj&&!bF)){bj=false;bO(bj);if(b8){aS.pause()}}}if(!bN){bN=true;ad(ci.repaint)}};if(cl&&typeof(cl)==="function"){a6.onMotionFinished=cl}a6.start()}return this};this.resetMinMeasuredValue=function(){bg=bx;this.repaint();return this};this.resetMaxMeasuredValue=function(){bv=bx;this.repaint();return this};this.setMinMeasuredValueVisible=function(ch){bw=!!ch;this.repaint();return this};this.setMaxMeasuredValueVisible=function(ch){bs=!!ch;this.repaint();return this};this.setThreshold=function(ch){ch=parseFloat(ch);var ci=(ch<bV?bV:(ch>bR?bR:ch));b2=ci;a5({background:true});bP({background:true});this.repaint();return this};this.setThresholdVisible=function(ch){cf=!!ch;this.repaint();return this};this.setThresholdRising=function(ch){bF=!!ch;bj=!bj;bO(bj);this.repaint();return this};this.setLcdDecimals=function(ch){cb=parseInt(ch,10);this.repaint();return this};this.setFrameDesign=function(ch){a5({frame:true});ca=ch;bP({frame:true});this.repaint();return this};this.setBackgroundColor=function(ch){a5({background:true});bm=ch;bP({background:true});this.repaint();return this};this.setValueColor=function(ch){a5({foreground:true});bH=ch;bP({foreground:true});this.repaint();return this};this.setLedColor=function(ch){a5({led:true});bq=ch;bP({led:true});this.repaint();return this};this.setLedVisible=function(ch){aZ=!!ch;this.repaint();return this};this.setLcdColor=function(ch){a5({background:true});bS=ch;bP({background:true});this.repaint();return this};this.setMaxMeasuredValue=function(ch){ch=parseFloat(ch);var ci=(ch<bV?bV:(ch>bR?bR:ch));bv=ci;this.repaint();return this};this.setMinMeasuredValue=function(ch){ch=parseFloat(ch);var ci=(ch<bV?bV:(ch>bR?bR:ch));bg=ci;this.repaint();return this};this.setTitleString=function(ch){bD=ch;a5({background:true});bP({background:true});this.repaint();return this};this.setUnitString=function(ch){a0=ch;a5({background:true});bP({background:true});this.repaint();return this};this.setMinValue=function(ch){a5({background:true});bV=parseFloat(ch);bP({background:true});this.repaint();return this};this.getMinValue=function(){return bV};this.setMaxValue=function(ch){a5({background:true});bR=parseFloat(ch);bP({background:true});this.repaint();return this};this.getMaxValue=function(){return bR};this.repaint=function(){if(!aU){bP({frame:true,background:true,led:true,foreground:true})}ba.clearRect(0,0,ba.canvas.width,ba.canvas.height);if(b6){ba.drawImage(bM,0,0)}ba.drawImage(by,0,0);if(bd){b0(ba,bx,bh)}if(aZ){ba.drawImage(bL,aY,aW)}var cj;var ck;var cl;var ci,ch;if(bw){if(bh){ck=(bC.type==="type1"?0.856796:0.7475);cl=(ck-0.12864);cj=b9*ck-(b9*cl)*(bg-bV)/(bR-bV);ci=a1*0.34-bf.width;ch=cj-bf.height/2}else{ck=(bC.type==="type1"?0.871012:0.82);cl=ck-(bC.type==="type1"?0.142857:0.19857);cj=(a1*cl)*(bg-bV)/(bR-bV);ci=a1*(bC.type==="type1"?0.142857:0.19857)-bf.height/2+cj;ch=b9*0.65}ba.drawImage(bf,ci,ch)}if(bs){if(bh){cj=b9*ck-(b9*cl)*(bv-bV)/(bR-bV);ci=a1*0.34-bz.width;ch=cj-bz.height/2}else{ck=(bC.type==="type1"?0.871012:0.8);cl=ck-(bC.type==="type1"?0.14857:0.19857);cj=(a1*cl)*(bv-bV)/(bR-bV);ci=a1*(bC.type==="type1"?0.142857:0.19857)-bz.height/2+cj;ch=b9*0.65}ba.drawImage(bz,ci,ch)}ba.save();bU(ba,a1,b9);ba.restore();if(bY||bC.type==="type2"){ba.drawImage(bZ,0,0)}bN=false};this.repaint();return this};var z=function(cq,bv){bv=bv||{};var cc=(undefined===bv.width?0:bv.width),bj=(undefined===bv.height?0:bv.height),b2=(undefined===bv.minValue?0:bv.minValue),bY=(undefined===bv.maxValue?(b2+100):bv.maxValue),b9=(undefined===bv.section?null:bv.section),bN=(undefined===bv.useSectionColors?false:bv.useSectionColors),bO=(undefined===bv.niceScale?true:bv.niceScale),cb=(undefined===bv.threshold?(bY-b2)/2+b2:bv.threshold),bJ=(undefined===bv.titleString?"":bv.titleString),a4=(undefined===bv.unitString?"":bv.unitString),ck=(undefined===bv.frameDesign?steelseries.FrameDesign.METAL:bv.frameDesign),cf=(undefined===bv.frameVisible?true:bv.frameVisible),bs=(undefined===bv.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bv.backgroundColor),cn=(undefined===bv.backgroundVisible?true:bv.backgroundVisible),bM=(undefined===bv.valueColor?steelseries.ColorDef.RED:bv.valueColor),bZ=(undefined===bv.lcdColor?steelseries.LcdColor.STANDARD:bv.lcdColor),bi=(undefined===bv.lcdVisible?true:bv.lcdVisible),cl=(undefined===bv.lcdDecimals?2:bv.lcdDecimals),bp=(undefined===bv.digitalFont?false:bv.digitalFont),bx=(undefined===bv.ledColor?steelseries.LedColor.RED_LED:bv.ledColor),a3=(undefined===bv.ledVisible?true:bv.ledVisible),cp=(undefined===bv.thresholdVisible?true:bv.thresholdVisible),bK=(undefined===bv.thresholdRising?true:bv.thresholdRising),bD=(undefined===bv.minMeasuredValueVisible?false:bv.minMeasuredValueVisible),bz=(undefined===bv.maxMeasuredValueVisible?false:bv.maxMeasuredValueVisible),bw=(undefined===bv.labelNumberFormat?steelseries.LabelNumberFormat.STANDARD:bv.labelNumberFormat),b5=(undefined===bv.foregroundVisible?true:bv.foregroundVisible),ch=(undefined===bv.playAlarm?false:bv.playAlarm),a1=(undefined===bv.alarmSound?false:bv.alarmSound),a5=(undefined===bv.valueGradient?null:bv.valueGradient),bd=(undefined===bv.useValueGradient?false:bv.useValueGradient),ce=(undefined===bv.fullScaleDeflectionTime?2.5:bv.fullScaleDeflectionTime);var bf=r(cq);if(cc===0){cc=bf.canvas.width}if(bj===0){bj=bf.canvas.height}bf.canvas.width=cc;bf.canvas.height=bj;var a6=cc;var cj=bj;if(ch&&a1!==false){var aT=B.createElement("audio");aT.setAttribute("src",a1);aT.setAttribute("preload","auto")}var ca=this;var bE=b2;var bl=bY;var bC=b2;var ba;var bo=false;var bT=false;var aS=false;var aY=false;var aX=[];var bX=0;var bm=cc<=bj;var a2;var a0;var bc=Math.round((bm?bj:cc)*0.05);var b0=Math.round((bm?cc:bj)*0.05);var bP;var bu;if(bm){a2=a6/2-bc/2;a0=0.053*cj;bP=Math.floor(cj/22)+"px "+W;bu=Math.floor(cj/22)+"px "+aE}else{a2=0.89*a6;a0=cj/1.95-bc/2;bP=Math.floor(cj/10)+"px "+W;bu=Math.floor(cj/10)+"px "+aE}var aV=false;var be=b2;var br=bY;var a7=bY-b2;var bB=br-be;var bL=0;var bb=0;var bH=10;var cg=10;var bh=function bh(){if(bO){a7=g(bY-b2,false);bb=g(a7/(cg-1),true);be=Math.floor(b2/bb)*bb;br=Math.ceil(bY/bb)*bb;bL=g(bb/(bH-1),true);b2=be;bY=br;bB=bY-b2}else{a7=(bY-b2);be=b2;br=bY;bB=a7;bL=1;bb=10}bE=bE<b2?b2:bE>bY?bY:bE;bl=bl<b2?b2:bl>bY?bY:bl;bC=bC<b2?b2:bC>bY?bY:bC;cb=cb<b2?b2:cb>bY?bY:cb};var bS=J(cc,bj);var by=bS.getContext("2d");var bF=J(cc,bj);var bI=bF.getContext("2d");var b3;var b8=B.createElement("canvas");if(bm){b8.width=a6*0.121428;b8.height=cj*0.012135}else{b8.width=a6*0.012135;b8.height=cj*0.121428}var aZ=b8.getContext("2d");var bW=B.createElement("canvas");if(bm){bW.width=a6*0.121428;bW.height=cj*0.012135}else{bW.width=a6*0.012135;bW.height=cj*0.121428}var bq=bW.getContext("2d");var bg=J(bc,bc);var bA=bg.getContext("2d");var bn=J(bc,bc);var aU=bn.getContext("2d");var bR=bn;var bk=J(b0,b0);var cd=bk.getContext("2d");var bG=J(b0,b0);var aW=bG.getContext("2d");var b6=J(cc,bj);var a8=b6.getContext("2d");var b7=function(cr,cw,cs){cr.save();cr.textAlign="right";cr.textBaseline="middle";cr.strokeStyle=bZ.textColor;cr.fillStyle=bZ.textColor;if(bZ===steelseries.LcdColor.STANDARD||bZ===steelseries.LcdColor.STANDARD_GREEN){cr.shadowColor="gray";if(cs){cr.shadowOffsetX=a6*0.007;cr.shadowOffsetY=a6*0.007;cr.shadowBlur=a6*0.009}else{cr.shadowOffsetX=cj*0.007;cr.shadowOffsetY=cj*0.007;cr.shadowBlur=cj*0.009}}var cu;var ct;var cv;if(bp){cr.font=bu}else{cr.font=bP}if(cs){cu=(a6-(a6*0.571428))/2+1+a6*0.571428-2;ct=cj*0.88+1+(cj*0.055-2)/2;cv=a6*0.7-2}else{cu=(a6*0.695)+a6*0.18-2;ct=(cj*0.22)+1+(cj*0.15-2)/2;cv=cj*0.22-2}cr.fillText(cw.toFixed(cl),cu,ct,cv);cr.restore()};var cm=function(cr){var cu=B.createElement("canvas");cu.height=cu.width=b0;var ct=cu.getContext("2d");ct.save();var cs=ct.createLinearGradient(0,0.1,0,cu.height*0.9);cs.addColorStop(0,"#520000");cs.addColorStop(0.3,"#fc1d00");cs.addColorStop(0.59,"#fc1d00");cs.addColorStop(1,"#520000");ct.fillStyle=cs;if(cr){ct.beginPath();ct.moveTo(0.1,cu.height*0.5);ct.lineTo(cu.width*0.9,0.1);ct.lineTo(cu.width*0.9,cu.height*0.9);ct.closePath()}else{ct.beginPath();ct.moveTo(0.1,0.1);ct.lineTo(cu.width*0.9,0.1);ct.lineTo(cu.width*0.5,cu.height*0.9);ct.closePath()}ct.fill();ct.strokeStyle="#FFFFFF";ct.stroke();ct.restore();return cu};var bQ=function(cD,cv,cs){bs.labelColor.setAlpha(1);cD.save();cD.textBaseline="middle";var cA=a6*0.1;cD.strokeStyle=bs.labelColor.getRgbaColor();cD.fillStyle=bs.labelColor.getRgbaColor();var cx=b2;var cw=bH-1;var cC;var cJ;var cG;var cF;var cH;var cu;var cI=1;var ct;var cK;var cz;var cr;var cB;var cy;if(cs){ct=(0.34*a6);cK=(0.36*a6);cz=(0.33*a6);cr=(0.36*a6);cB=(0.32*a6);cy=(0.36*a6);cD.textAlign="right";cG=0;cF=cj*0.12864;cH=0;cu=(cj*0.856796-cj*0.12864);cI=cu/(bY-b2)}else{ct=(0.65*cj);cK=(0.63*cj);cz=(0.66*cj);cr=(0.63*cj);cB=(0.67*cj);cy=(0.63*cj);cD.textAlign="center";cG=a6*0.142857;cF=0;cH=(a6*0.871012-a6*0.142857);cu=0;cI=cH/(bY-b2)}var cE;for(cE=b2,cC=0;cE<=bY;cE+=bL,cC+=bL){if(cs){cJ=cF+cu-cC*cI}else{cJ=cG+cC*cI}cw++;if(cw===bH){cD.lineWidth=1.5;co(cD,cB,cy,cJ,cs);if(cs){switch(cv.format){case"fractional":cD.fillText((cx.toFixed(2)),a6*0.28,cJ,cA);break;case"scientific":cD.fillText((cx.toPrecision(2)),a6*0.28,cJ,cA);break;case"standard":default:cD.fillText((cx.toFixed(0)),a6*0.28,cJ,cA);break}}else{switch(cv.format){case"fractional":cD.fillText((cx.toFixed(2)),cJ,(cj*0.73),cA);break;case"scientific":cD.fillText((cx.toPrecision(2)),cJ,(cj*0.73),cA);break;case"standard":default:cD.fillText((cx.toFixed(0)),cJ,(cj*0.73),cA);break}}cx+=bb;cw=0;continue}if(0===bH%2&&cw===(bH/2)){cD.lineWidth=1;co(cD,cz,cr,cJ,cs)}else{cD.lineWidth=0.5;co(cD,ct,cK,cJ,cs)}}cD.restore()};var co=function(cr,cu,cv,ct,cs){if(cs){cr.beginPath();cr.moveTo(cu,ct);cr.lineTo(cv,ct);cr.closePath();cr.stroke()}else{cr.beginPath();cr.moveTo(ct,cu);cr.lineTo(ct,cv);cr.closePath();cr.stroke()}};var bV=function(cB){cB=cB||{};var cC=(undefined===cB.frame?false:cB.frame);var cu=(undefined===cB.background?false:cB.background);var cw=(undefined===cB.led?false:cB.led);var cz=(undefined===cB.foreground?false:cB.foreground);var cv=(undefined===cB.bargraphled?false:cB.bargraphled);aV=true;bh();if(cC&&cf){k(by,ck,a6,cj,bm)}if(cu&&cn){Y(bI,bs,a6,cj,bm)}if(cw){if(bm){bA.drawImage(af(bc,1,bx),0,0);aU.drawImage(af(bc,0,bx),0,0)}else{bA.drawImage(af(bc,1,bx),0,0);aU.drawImage(af(bc,0,bx),0,0)}}if(bD){if(bm){cd.drawImage(w(b0,steelseries.ColorDef.BLUE.dark.getRgbaColor(),false,bm),0,0)}else{cd.drawImage(w(b0,steelseries.ColorDef.BLUE.dark.getRgbaColor(),false,bm),0,0)}}if(bz){if(bm){aW.drawImage(w(b0,steelseries.ColorDef.RED.medium.getRgbaColor(),false,bm),0,0)}else{aW.drawImage(w(b0,steelseries.ColorDef.RED.medium.getRgbaColor(),false,bm),0,0)}}if(cu&&cn){var cA;bQ(bI,bw,bm);if(cp){bI.save();if(bm){cA=cj*0.856796-(cj*0.728155)*(cb-b2)/(bY-b2);bI.translate(a6*0.365,cA-b0/2)}else{cA=(a6*0.856796-a6*0.12864)*(cb-b2)/(bY-b2);bI.translate(a6*0.142857-b0/2+cA,cj*0.58)}bI.drawImage(cm(bm),0,0);bI.restore()}if(bm){ap(bI,a6,cj,bJ,a4,bs,bm,null,bi)}else{ap(bI,a6,cj,bJ,a4,bs,bm,null,bi)}}if(cu&&bi){if(bm){b3=V(a6*0.571428,cj*0.055,bZ);bI.drawImage(b3,((a6-(a6*0.571428))/2),cj*0.88)}else{b3=V(a6*0.18,cj*0.15,bZ);bI.drawImage(b3,a6*0.695,cj*0.22)}}if(cv){ci(bq);bt(aZ,bM)}aS=false;if(null!==b9&&0<b9.length){aS=true;var cy=b9.length;var cx,cr,ct,cs;if(bm){cx=cj*0.12864;cr=cj*0.856796;ct=cr-cx;cs=0}else{cx=a6*0.856796;cr=a6*0.12864;ct=cx-cr;cs=a6*0.012135/2}aX=[];do{cy--;aX.push({start:(((b9[cy].start+Math.abs(b2))/(bY-b2))*ct-cs),stop:(((b9[cy].stop+Math.abs(b2))/(bY-b2))*ct-cs),color:s(b9[cy].color)})}while(0<cy)}aY=false;if(bd&&a5!==null){aS=false;aY=true}if(cz&&b5){aK(a8,a6,cj,bm,false)}};var a9=function(cs){cs=cs||{};var ct=(undefined===cs.frame?false:cs.frame);var cv=(undefined===cs.background?false:cs.background);var cw=(undefined===cs.led?false:cs.led);var cu=(undefined===cs.bargraphled?false:cs.bargraphled);var cr=(undefined===cs.foreground?false:cs.foreground);if(ct){bS.width=cc;bS.height=bj;by=bS.getContext("2d")}if(cv){bF.width=cc;bF.height=bj;bI=bF.getContext("2d")}if(cu){if(bm){b8.width=cc*0.121428;b8.height=bj*0.012135}else{b8.width=cc*0.012135;b8.height=bj*0.121428}aZ=b8.getContext("2d");if(bm){bW.width=cc*0.121428;bW.height=bj*0.012135}else{bW.width=cc*0.012135;bW.height=bj*0.121428}bq=bW.getContext("2d")}if(cw){bg.width=Math.ceil(cc*0.093457);bg.height=Math.ceil(bj*0.093457);bA=bg.getContext("2d");bn.width=Math.ceil(cc*0.093457);bn.height=Math.ceil(bj*0.093457);aU=bn.getContext("2d");bR=bn}if(cr){b6.width=cc;b6.height=bj;a8=b6.getContext("2d")}};var bU=function(cr){if(cr){bX=setInterval(b4,1000)}else{clearInterval(bX);bR=bn}};var b4=function(){if(a3){if(bR===bg){bR=bn}else{bR=bg}if(!bT){bT=true;ad(ca.repaint)}}};var b1=function(cL,c0,cQ){var cy;var cr;var cR=bs.labelColor;var cM;var cZ;var cN;var cF;var cD;var cz;var cx;var cX;var cW;var cV;var cU;var cC;var cP;var cI;if(bm){cy=cQ*0.12864;cr=cQ*0.856796;cM=cr-cy;cZ=cM*(bE-b2)/(bY-b2);cN=cy+cM-cZ;cF=0;cD=cy;cz=0;cx=cy+cM*1.014}else{cy=c0*0.856796;cr=c0*0.12864;cM=cy-cr;cZ=cM*(bE-b2)/(bY-b2);cN=cr;cF=c0*0.13;cD=cQ*0.435714;cz=cF+cM*1.035;cx=cD}var cH=(bs===steelseries.BackgroundColor.CARBON||bs===steelseries.BackgroundColor.PUNCHED_SHEET||bs===steelseries.BackgroundColor.STAINLESS||bs===steelseries.BackgroundColor.BRUSHED_STAINLESS||bs===steelseries.BackgroundColor.TURNED)?0.3:0;var cK=cL.createLinearGradient(cF,cD,cz,cx);cR.setAlpha(0.047058+cH);cK.addColorStop(0,cR.getRgbaColor());cR.setAlpha(0.145098+cH);cK.addColorStop(0.48,cR.getRgbaColor());cR.setAlpha(0.149019+cH);cK.addColorStop(0.49,cR.getRgbaColor());cR.setAlpha(0.047058+cH);cK.addColorStop(1,cR.getRgbaColor());cL.fillStyle=cK;if(bm){cL.fillRect(c0*0.435714,cy,c0*0.15,cM*1.014)}else{cL.fillRect(cF,cD,cM*1.035,cQ*0.152857)}if(bm){cX=0;cW=cy;cV=0;cU=cy+cM*1.014}else{cX=cF;cW=0;cV=cz;cU=0}var cJ=cL.createLinearGradient(cX,cW,cV,cU);cR.setAlpha(0.298039+cH);cJ.addColorStop(0,cR.getRgbaColor());cR.setAlpha(0.686274+cH);cJ.addColorStop(0.48,cR.getRgbaColor());cR.setAlpha(0.698039+cH);cJ.addColorStop(0.49,cR.getRgbaColor());cR.setAlpha(0.4+cH);cJ.addColorStop(1,cR.getRgbaColor());cL.fillStyle=cJ;if(bm){cL.fillRect(c0*0.435714,cy,c0*0.007142,cM*1.014);cL.fillRect(c0*0.571428,cy,c0*0.007142,cM*1.014)}else{cL.fillRect(c0*0.13,cQ*0.435714,cM*1.035,cQ*0.007142);cL.fillRect(c0*0.13,cQ*0.571428,cM*1.035,cQ*0.007142)}var cu;var ct;var cv;var cB;var cG;var cE;var cO;var cA;if(bm){cu=c0*0.45;ct=cQ*0.851941;cv=c0*0.121428;cB=cQ*0.012135;cG=(cu+cv)/2;cE=(ct+cB)/2}else{cu=c0*0.142857;ct=cQ*0.45;cv=c0*0.012135;cB=cQ*0.121428;cG=(cu+cv)/2;cE=(ct+cB)/2}var cT,cS;var cw;var cs=bM;var cY;if(bm){cA=cM;for(cS=0;cS<=cA;cS+=cB+1){cL.translate(0,-cS);cL.drawImage(bW,cu,ct);cL.translate(0,cS)}cO=((bE-b2)/(bY-b2))*cM;for(cS=0;cS<=cO;cS+=cB+1){cw=bM;if(aY){cC=b2+(cS/cM)*(bY-b2);cP=a5.getEnd()-a5.getStart();cI=(cC-b2)/cP;cI=Math.max(Math.min(cI,1),0);cw=s(a5.getColorAt(cI).getRgbaColor())}else{if(aS){for(cY=0;cY<aX.length;cY++){if(cS>=aX[cY].start&&cS<aX[cY].stop){cw=aX[cY].color;break}}}}if(cs.medium.getHexColor()!==cw.medium.getHexColor()){bt(aZ,cw);cs=cw}cL.translate(0,-cS);cL.drawImage(b8,cu,ct);cL.translate(0,cS)}}else{cA=cM;for(cT=-(cv/2);cT<=cA;cT+=cv+1){cL.translate(cT,0);cL.drawImage(bW,cu,ct);cL.translate(-cT,0)}cO=((bE-b2)/(bY-b2))*cM;for(cT=-(cv/2);cT<=cO;cT+=cv+1){cw=bM;if(aY){cC=b2+(cT/cM)*(bY-b2);cP=a5.getEnd()-a5.getStart();cI=(cC-b2)/cP;cI=Math.max(Math.min(cI,1),0);cw=s(a5.getColorAt(cI).getRgbaColor())}else{if(aS){for(cY=0;cY<aX.length;cY++){if(cT>=aX[cY].start&&cT<aX[cY].stop){cw=aX[cY].color;break}}}}if(cs.medium.getHexColor()!==cw.medium.getHexColor()){bt(aZ,cw);cs=cw}cL.translate(cT,0);cL.drawImage(b8,cu,ct);cL.translate(-cT,0)}}};var ci=function(cr){cr.save();cr.beginPath();cr.rect(0,0,cr.canvas.width,cr.canvas.height);cr.closePath();var cu=(cr.canvas.width/2);var ct=(cr.canvas.height/2);var cs=bf.createRadialGradient(cu,ct,0,cu,ct,cr.canvas.width/2);cs.addColorStop(0,"#3c3c3c");cs.addColorStop(1,"#323232");cr.fillStyle=cs;cr.fill();cr.restore()};var bt=function(cr,cs){cr.save();cr.beginPath();cr.rect(0,0,cr.canvas.width,cr.canvas.height);cr.closePath();var cw=(cr.canvas.width/2);var cv=(cr.canvas.height/2);var ct;if(bm){ct=cr.canvas.width/2}else{ct=cr.canvas.height/2}var cu=bf.createRadialGradient(cw,cv,0,cw,cv,ct);cu.addColorStop(0,cs.light.getRgbaColor());cu.addColorStop(1,cs.dark.getRgbaColor());cr.fillStyle=cu;cr.fill();cr.restore()};this.setValue=function(cs){cs=parseFloat(cs);var cr=(cs<b2?b2:(cs>bY?bY:cs));if(bE!==cr){bE=cr;if(bE>bC){bC=bE}if(bE<bl){bl=bE}if((bE>=cb&&!bo&&bK)||(bE<=cb&&!bo&&!bK)){bo=true;bU(bo);if(ch){aT.play()}}else{if((bE<cb&&bo&&bK)||(bE>cb&&bo&&!bK)){bo=false;bU(bo);if(ch){aT.pause()}}}this.repaint()}return this};this.getValue=function(){return bE};this.setValueAnimated=function(cu,cv){var cr,cs=this,ct;cu=parseFloat(cu);cr=(cu<b2?b2:(cu>bY?bY:cu));if(bE!==cr){if(undefined!==ba&&ba.isPlaying){ba.stop()}ct=ce*Math.abs(cr-bE)/(bY-b2);ct=Math.max(ct,ce/5);ba=new Tween({},"",Tween.regularEaseInOut,bE,cr,ct);ba.onMotionChanged=function(cw){bE=cw.target._pos;if((bE>=cb&&!bo&&bK)||(bE<=cb&&!bo&&!bK)){bo=true;bU(bo);if(ch){aT.play()}}else{if((bE<cb&&bo&&bK)||(bE>cb&&bo&&!bK)){bo=false;bU(bo);if(ch){aT.pause()}}}if(bE>bC){bC=bE}if(bE<bl){bl=bE}if(!bT){bT=true;ad(cs.repaint)}};if(cv&&typeof(cv)==="function"){ba.onMotionFinished=cv}ba.start()}return this};this.resetMinMeasuredValue=function(){bl=bE;this.repaint();return this};this.resetMaxMeasuredValue=function(){bC=bE;this.repaint();return this};this.setMinMeasuredValueVisible=function(cr){bD=!!cr;this.repaint();return this};this.setMaxMeasuredValueVisible=function(cr){bz=!!cr;this.repaint();return this};this.setThresholdVisible=function(cr){cp=!!cr;this.repaint();return this};this.setThresholdRising=function(cr){bK=!!cr;bo=!bo;bU(bo);this.repaint();return this};this.setLcdDecimals=function(cr){cl=parseInt(cr,10);this.repaint();return this};this.setFrameDesign=function(cr){a9({frame:true});ck=cr;bV({frame:true});this.repaint();return this};this.setBackgroundColor=function(cr){a9({background:true});bs=cr;bV({background:true});this.repaint();return this};this.setValueColor=function(cr){a9({bargraphled:true});bM=cr;bV({bargraphled:true});this.repaint();return this};this.setLedColor=function(cr){a9({led:true});bx=cr;bV({led:true});this.repaint();return this};this.setLedVisible=function(cr){a3=!!cr;this.repaint();return this};this.setLcdColor=function(cr){bZ=cr;a9({background:true});bV({background:true});this.repaint();return this};this.setSection=function(cr){b9=cr;bV();this.repaint();return this};this.setSectionActive=function(cr){bN=cr;bV();this.repaint();return this};this.setGradient=function(cr){a5=cr;bV();this.repaint();return this};this.setGradientActive=function(cr){bd=cr;bV();this.repaint();return this};this.setMaxMeasuredValue=function(cs){cs=parseFloat(cs);var cr=(cs<b2?b2:(cs>bY?bY:cs));if(bC!==cr){bC=cr;this.repaint()}return this};this.setMinMeasuredValue=function(cs){cs=parseFloat(cs);var cr=(cs<b2?b2:(cs>bY?bY:cs));if(bl!==cr){bl=cr;this.repaint()}return this};this.setTitleString=function(cr){bJ=cr;a9({background:true});bV({background:true});this.repaint();return this};this.setUnitString=function(cr){a4=cr;a9({background:true});bV({background:true});this.repaint();return this};this.setMinValue=function(cr){b2=parseFloat(cr);a9({background:true});bV({background:true});this.repaint();return this};this.getMinValue=function(){return b2};this.setMaxValue=function(cr){bY=parseFloat(cr);a9({background:true});bV({background:true});this.repaint();return this};this.getMaxValue=function(){return bY};this.setThreshold=function(cs){cs=parseFloat(cs);var cr=(cs<b2?b2:(cs>bY?bY:cs));if(cb!==cr){cb=cr;a9({background:true});bV({background:true});this.repaint()}return this};this.setThresholdVisible=function(cr){cp=!!cr;this.repaint();return this};this.repaint=function(){if(!aV){bV({frame:true,background:true,led:true,pointer:true,foreground:true,bargraphled:true})}bf.clearRect(0,0,bf.canvas.width,bf.canvas.height);if(cf){bf.drawImage(bS,0,0)}if(cn){bf.drawImage(bF,0,0)}if(bi){b7(bf,bE,bm)}if(a3){bf.drawImage(bR,a2,a0)}var ct;var cs,cr;if(bD){if(bm){ct=cj*0.856796-(cj*0.728155)*(bl-b2)/(bY-b2);cs=a6*0.34-bk.width;cr=ct-bk.height/2}else{ct=((a6*0.856796)-(a6*0.12864))*(bl-b2)/(bY-b2);cs=a6*0.142857-bk.height/2+ct;cr=cj*0.65}bf.drawImage(bk,cs,cr)}if(bz){if(bm){ct=cj*0.856796-(cj*0.728155)*(bC-b2)/(bY-b2);cs=a6*0.34-bG.width;cr=ct-bG.height/2}else{ct=((a6*0.856796)-(a6*0.12864))*(bC-b2)/(bY-b2);cs=a6*0.142857-bG.height/2+ct;cr=cj*0.65}bf.drawImage(bG,cs,cr)}bf.save();b1(bf,a6,cj);bf.restore();if(b5){bf.drawImage(b6,0,0)}bT=false};this.repaint();return this};var j=function(aX,bn){bn=bn||{};var aS=(undefined===bn.width?0:bn.width),aT=(undefined===bn.height?0:bn.height),bc=(undefined===bn.lcdColor?steelseries.LcdColor.STANDARD:bn.lcdColor),a4=(undefined===bn.lcdDecimals?2:bn.lcdDecimals),a8=(undefined===bn.unitString?"":bn.unitString),a5=(undefined===bn.unitStringVisible?false:bn.unitStringVisible),bj=(undefined===bn.headerString?"":bn.headerString),a3=(undefined===bn.headerStringVisible?false:bn.headerStringVisible),aV=(undefined===bn.digitalFont?false:bn.digitalFont),aW=(undefined===bn.valuesNumeric?true:bn.valuesNumeric),bh=(undefined===bn.value?0:bn.value),a9=(undefined===bn.alwaysScroll?false:bn.alwaysScroll),bd=(undefined===bn.autoScroll?false:bn.autoScroll),a7=(undefined===bn.section?null:bn.section);var bq=false;var aU=0;var a6;var a0=false;var aY=this;var bm=r(aX);if(aS===0){aS=bm.canvas.width}if(aT===0){aT=bm.canvas.height}bm.canvas.width=aS;bm.canvas.height=aT;var br=aS;var be=aT;var a1=0;var bo=Math.floor(be/1.5);var bb=bo+"px "+W;var bg=bo+"px "+aE;var aZ=false;var bp;var bs=[];var ba=[];var a2=function(bw,bt){bm.save();bm.textAlign="right";bm.strokeStyle=bt;bm.fillStyle=bt;bm.beginPath();bm.rect(2,0,br-4,be);bm.closePath();bm.clip();if((bc===steelseries.LcdColor.STANDARD||bc===steelseries.LcdColor.STANDARD_GREEN)&&a7===null){bm.shadowColor="gray";bm.shadowOffsetX=be*0.035;bm.shadowOffsetY=be*0.035;bm.shadowBlur=be*0.055}bm.font=aV?bg:bb;if(aW){var bv=0;a1=0;if(a5){bm.font=Math.floor(be/2.5)+"px "+W;bv=bm.measureText(a8).width}bm.font=aV?bg:bb;var bx=bw.toFixed(a4);a1=bm.measureText(bx).width;var bu=0.38;if(a3){bu=0.52}bm.fillText(bx,br-bv-4-aU,be*0.5+bo*bu);if(a5){bm.font=Math.floor(be/2.5)+"px "+W;bm.fillText(a8,br-2-aU,be*0.5+bo*bu)}if(a3){bm.textAlign="center";bm.font=Math.floor(be/3.5)+"px "+W;bm.fillText(bj,br/2,be*0.3)}}else{a1=bm.measureText(bw).width;if(a9||(bd&&a1>br-4)){if(!bq){if(a1>br*0.8){aU=br-a1-br*0.2}else{aU=0}bq=true;clearTimeout(a6);a6=setTimeout(bk,200)}}else{if(bd&&a1<=br-4){aU=0;bq=false}}bm.fillText(bw,br-2-aU,be*0.5+bo*0.38)}bm.restore()};var bi=function(bM,bJ,bP,bR){var bx=J(bM,bJ);var by=bx.getContext("2d");by.save();var bI=0;var bS=0;var bv=bM;var b1=bJ;var bF=Math.min(bM,bJ)*0.095;var bO=by.createLinearGradient(0,bS,0,bS+b1);bO.addColorStop(0,"#4c4c4c");bO.addColorStop(0.08,"#666666");bO.addColorStop(0.92,"#666666");bO.addColorStop(1,"#e6e6e6");by.fillStyle=bO;P(by,bI,bS,bv,b1,bF);by.fill();by.restore();by.save();var bu=aB(bP);var bK=ay(bu[0],bu[1],bu[2]);var bz=aB(bR.gradientStartColor);var bZ=ay(bz[0],bz[1],bz[2]);var bH=aB(bR.gradientFraction1Color);var bY=ay(bH[0],bH[1],bH[2]);var bE=aB(bR.gradientFraction2Color);var bW=ay(bE[0],bE[1],bE[2]);var bD=aB(bR.gradientFraction3Color);var bV=ay(bD[0],bD[1],bD[2]);var bw=aB(bR.gradientStopColor);var bB=ay(bw[0],bw[1],bw[2]);var bL=ac(bK[0],bK[1],bZ[2]-0.31);var bQ=ac(bK[0],bK[1],bY[2]-0.31);var bU=ac(bK[0],bK[1],bW[2]-0.31);var b0=ac(bK[0],bK[1],bV[2]-0.31);var bT=ac(bK[0],bK[1],bB[2]-0.31);var bC=1;var bN=1;var bt=bM-2;var bX=bJ-2;var bA=bF-1;var bG=by.createLinearGradient(0,bN,0,bN+bX);bG.addColorStop(0,"rgb("+bL[0]+", "+bL[1]+", "+bL[2]+")");bG.addColorStop(0.03,"rgb("+bQ[0]+","+bQ[1]+","+bQ[2]+")");bG.addColorStop(0.49,"rgb("+bU[0]+","+bU[1]+","+bU[2]+")");bG.addColorStop(0.5,"rgb("+b0[0]+","+b0[1]+","+b0[2]+")");bG.addColorStop(1,"rgb("+bT[0]+","+bT[1]+","+bT[2]+")");by.fillStyle=bG;P(by,bC,bN,bt,bX,bA);by.fill();by.restore();return bx};var bf=function(bv){var bu=aB(bv);var bw=ay(bu[0],bu[1],bu[2]);var bt=ac(bw[0],0.57,0.83);return"rgb("+bt[0]+", "+bt[1]+", "+bt[2]+")"};var bk=function(){if(bq){if(aU>br){aU=-a1}aU+=2;a6=setTimeout(bk,50)}else{aU=0}if(!a0){a0=true;ad(aY.repaint)}};var bl=function(){var bt;aZ=true;bp=V(aS,aT,bc);if(null!==a7&&0<a7.length){for(bt=0;bt<a7.length;bt++){bs[bt]=bi(aS,aT,a7[bt].color,bc);ba[bt]=bf(a7[bt].color)}}};this.setValue=function(bt){if(bh!==bt){bh=bt;this.repaint()}return this};this.setLcdColor=function(bt){bc=bt;bl();this.repaint();return this};this.setSection=function(bt){a7=bt;bl({background:true,foreground:true});this.repaint();return this};this.setScrolling=function(bt){if(bt){if(bq){return}else{bq=bt;bk()}}else{bq=bt}return this};this.repaint=function(){if(!aZ){bl()}bm.clearRect(0,0,bm.canvas.width,bm.canvas.height);var bu=bp;var bt=bc.textColor;var bv;if(null!==a7&&0<a7.length){for(bv=0;bv<a7.length;bv++){if(bh>=a7[bv].start&&bh<=a7[bv].stop){bu=bs[bv];bt=ba[bv];break}}}bm.drawImage(bu,0,0);a2(bh,bt);a0=false};this.repaint();return this};var R=function(aV,a1){a1=a1||{};var bb=(undefined===a1.width?0:a1.width),a7=(undefined===a1.height?0:a1.height),bg=(undefined===a1.lcdColor?steelseries.LcdColor.STANDARD:a1.lcdColor),a2=(undefined===a1.lcdDecimals?2:a1.lcdDecimals),aW=(undefined===a1.headerString?"":a1.headerString),bi=(undefined===a1.headerStringVisible?false:a1.headerStringVisible),be=(undefined===a1.detailString?"":a1.detailString),a6=(undefined===a1.detailStringVisible?false:a1.detailStringVisible),bh=(undefined===a1.linkAltValue?true:a1.linkAltValue),aU=(undefined===a1.unitString?"":a1.unitString),aZ=(undefined===a1.unitStringVisible?false:a1.unitStringVisible),a5=(undefined===a1.digitalFont?false:a1.digitalFont),a8=(undefined===a1.valuesNumeric?true:a1.valuesNumeric),bc=(undefined===a1.value?0:a1.value),bd=(undefined===a1.altValue?0:a1.altValue);var a4=r(aV);if(bb===0){bb=a4.canvas.width}if(a7===0){a7=a4.canvas.height}a4.canvas.width=bb;a4.canvas.height=a7;var a3=bb;var bj=a7;var a0=Math.floor(bj/1.875)+"px "+W;var ba=Math.floor(bj/1.875)+"px "+aE;var aX=Math.floor(bj/3.5)+"px "+W;var aT=Math.floor(bj/3.5)+"px "+aE;var aY=false;var aS;var a9=function(bm){a4.save();a4.textAlign="right";a4.textBaseline="middle";a4.strokeStyle=bg.textColor;a4.fillStyle=bg.textColor;if(bg===steelseries.LcdColor.STANDARD||bg===steelseries.LcdColor.STANDARD_GREEN){a4.shadowColor="gray";a4.shadowOffsetX=bj*0.025;a4.shadowOffsetY=bj*0.025;a4.shadowBlur=bj*0.05}if(a8){if(bi){a4.font=Math.floor(bj/3)+"px "+W}else{a4.font=Math.floor(bj/2.5)+"px "+W}var bl=0;if(aZ){if(bi){a4.font=Math.floor(bj/3)+"px "+W;bl=a4.measureText(aU).width}else{a4.font=Math.floor(bj/2.5)+"px "+W;bl=a4.measureText(aU).width}}a4.font=a5?ba:a0;var bk=bm.toFixed(a2);if(bi){a4.fillText(bk,a3-bl-4,bj*0.5)}else{a4.fillText(bk,a3-bl-4,bj*0.38)}if(aZ){a4.font=Math.floor(bj/3)+"px "+W;a4.fillText(aU,a3-2,bj*0.55)}var bn=bd.toFixed(a2);if(a6){bn=be+bn}if(a5){a4.font=aT}else{if(bi){a4.font=Math.floor(bj/5)+"px "+W}else{a4.font=aX}}a4.textAlign="center";if(bi){a4.fillText(bn,a3/2,bj*0.83);a4.fillText(aW,a3/2,bj*0.16)}else{a4.fillText(bn,a3/2,bj*0.8)}}else{if(bi){a4.font=Math.floor(bj/3.5)+"px "+W;a4.fillText(bm,a3-2,bj*0.48);a4.font=Math.floor(bj/5)+"px "+W;a4.textAlign="center";a4.fillText(bd,a3/2,bj*0.83);a4.fillText(aW,a3/2,bj*0.17)}else{a4.font=Math.floor(bj/2.5)+"px "+W;a4.fillText(bm,a3-2,bj*0.38);a4.font=aX;a4.textAlign="center";a4.fillText(bd,a3/2,bj*0.8)}}a4.restore()};var bf=function(){aY=true;aS=V(bb,a7,bg)};this.setValue=function(bk){if(bc!==bk){if(bh){bd=bc}bc=bk;this.repaint()}return this};this.setAltValue=function(bk){if(bd!==bk){bd=bk;this.repaint()}return this};this.setLcdColor=function(bk){bg=bk;bf();this.repaint();return this};this.repaint=function(){if(!aY){bf()}a4.clearRect(0,0,a4.canvas.width,a4.canvas.height);a4.drawImage(aS,0,0);a9(bc)};this.repaint();return this};var an=function(a3,bp){bp=bp||{};var a2=(undefined===bp.size?0:bp.size),bt=(undefined===bp.decimalsVisible?false:bp.decimalsVisible),a1=(undefined===bp.textOrientationFixed?false:bp.textOrientationFixed),aV=(undefined===bp.frameDesign?steelseries.FrameDesign.METAL:bp.frameDesign),bd=(undefined===bp.frameVisible?true:bp.frameVisible),aT=(undefined===bp.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bp.backgroundColor),bb=(undefined===bp.backgroundVisible?true:bp.backgroundVisible),bv=(undefined===bp.pointerColor?steelseries.ColorDef.RED:bp.pointerColor),bs=(undefined===bp.foregroundType?steelseries.ForegroundType.TYPE1:bp.foregroundType),br=(undefined===bp.foregroundVisible?true:bp.foregroundVisible),bf=(undefined===bp.rotateFace?false:bp.rotateFace);var bo=r(a3);if(a2===0){a2=Math.min(bo.canvas.width,bo.canvas.height)}bo.canvas.width=a2;bo.canvas.height=a2;var a7;var a6=false;var bk=0;var bh=0;var be=0;var bl=H/360;var a8=this.value;var ba=bt?1:0;var bw=a2;var bg=a2;var aY=bw/2;var aX=bg/2;var a4=false;var bi=J(a2,a2);var aS=bi.getContext("2d");var bc=J(a2,a2);var aU=bc.getContext("2d");var bj=J(a2,a2);var aW=bj.getContext("2d");var bm=J(a2,a2);var a9=bm.getContext("2d");var bu=function(bx){var bA,bz,by;bx.textAlign="center";bx.textBaseline="middle";bx.save();bx.strokeStyle=aT.labelColor.getRgbaColor();bx.fillStyle=aT.labelColor.getRgbaColor();bx.translate(aY,aX);for(by=0;360>by;by++){bx.strokeStyle=aT.labelColor.getRgbaColor();bx.lineWidth=0.5;bx.beginPath();bx.moveTo(bw*0.38,0);bx.lineTo(bw*0.37,0);bx.closePath();bx.stroke();if(0===by%5){bx.strokeStyle=aT.labelColor.getRgbaColor();bx.lineWidth=1;bx.beginPath();bx.moveTo(bw*0.38,0);bx.lineTo(bw*0.36,0);bx.closePath();bx.stroke()}if(0===by%45){bx.strokeStyle=aT.labelColor.getRgbaColor();bx.lineWidth=1;bx.beginPath();bx.moveTo(bw*0.38,0);bx.lineTo(bw*0.34,0);bx.closePath();bx.stroke()}if(300<bw){bA="14px "+bA;bz="12px "+bA}if(300>=bw){bA="12px "+bA;bz="10px "+bA}if(200>=bw){bA="10px "+bA;bz="8px "+bA}if(100>=bw){bA="8px "+bA;bz="6px "+bA}bx.save();switch(by){case 0:bx.translate(bw*0.31,0);bx.rotate((by*l)+T);bx.font=bA;bx.fillText("0\u00B0",0,0,bw);bx.rotate(-(by*l)+T);bx.translate(-bw*0.31,0);bx.translate(bw*0.41,0);bx.rotate((by*l)-T);bx.font=bz;bx.fillText("0%",0,0,bw);break;case 45:bx.translate(bw*0.31,0);bx.rotate((by*l)+0.25*ao);bx.font=bA;bx.fillText("45\u00B0",0,0,bw);bx.rotate(-(by*l)+0.25*ao);bx.translate(-bw*0.31,0);bx.translate(bw*0.31,bw*0.085);bx.rotate((by*l)-0.25*ao);bx.font=bz;bx.fillText("100%",0,0,bw);break;case 90:bx.translate(bw*0.31,0);bx.rotate((by*l));bx.font=bA;bx.fillText("90\u00B0",0,0,bw);bx.rotate(-(by*l));bx.translate(-bw*0.31,0);bx.translate(bw*0.21,0);bx.rotate((by*l));bx.font=bz;bx.fillText("\u221E",0,0,bw);break;case 135:bx.translate(bw*0.31,0);bx.rotate((by*l)-0.25*ao);bx.font=bA;bx.fillText("45\u00B0",0,0,bw);bx.rotate(-(by*l)-0.25*ao);bx.translate(-bw*0.31,0);bx.translate(bw*0.31,-bw*0.085);bx.rotate((by*l)+0.25*ao);bx.font=bz;bx.fillText("100%",0,0,bw);break;case 180:bx.translate(bw*0.31,0);bx.rotate((by*l)-T);bx.font=bA;bx.fillText("0\u00B0",0,0,bw);bx.rotate(-(by*l)-T);bx.translate(-bw*0.31,0);bx.translate(bw*0.41,0);bx.rotate((by*l)+T);bx.font=bz;bx.fillText("0%",0,0,bw);bx.translate(-bw*0.41,0);break;case 225:bx.translate(bw*0.31,0);bx.rotate((by*l)-0.75*ao);bx.font=bA;bx.fillText("45\u00B0",0,0,bw);bx.rotate(-(by*l)-0.75*ao);bx.translate(-bw*0.31,0);bx.translate(bw*0.31,bw*0.085);bx.rotate((by*l)+0.75*ao);bx.font=bz;bx.fillText("100%",0,0,bw);break;case 270:bx.translate(bw*0.31,0);bx.rotate((by*l)-ao);bx.font=bA;bx.fillText("90\u00B0",0,0,bw);bx.rotate(-(by*l)-ao);bx.translate(-bw*0.31,0);bx.translate(bw*0.21,0);bx.rotate((by*l)-ao);bx.font=bz;bx.fillText("\u221E",0,0,bw);break;case 315:bx.translate(bw*0.31,0);bx.rotate((by*l)-1.25*ao);bx.font=bA;bx.fillText("45\u00B0",0,0,bw);bx.rotate(-(by*l)-1.25*ao);bx.translate(-bw*0.31,0);bx.translate(bw*0.31,-bw*0.085);bx.rotate((by*l)+1.25*ao);bx.font=bz;bx.fillText("100%",0,0,bw);break}bx.restore();bx.rotate(bl)}bx.translate(-aY,-aX);bx.restore()};var a0=function(bx){bx.save();bx.strokeStyle=aT.labelColor.getRgbaColor();bx.fillStyle=aT.labelColor.getRgbaColor();bx.save();bx.beginPath();bx.moveTo(bw*0.200934,bg*0.434579);bx.lineTo(bw*0.163551,bg*0.434579);bx.lineTo(bw*0.163551,bg*0.560747);bx.lineTo(bw*0.200934,bg*0.560747);bx.lineWidth=1;bx.lineCap="square";bx.lineJoin="miter";bx.stroke();bx.save();bx.beginPath();bx.moveTo(bw*0.163551,bg*0.471962);bx.lineTo(bw*0.205607,bg*0.5);bx.lineTo(bw*0.163551,bg*0.523364);bx.lineTo(bw*0.163551,bg*0.471962);bx.closePath();bx.fill();bx.save();bx.beginPath();bx.moveTo(bw*0.799065,bg*0.434579);bx.lineTo(bw*0.836448,bg*0.434579);bx.lineTo(bw*0.836448,bg*0.560747);bx.lineTo(bw*0.799065,bg*0.560747);bx.lineWidth=1;bx.lineCap="square";bx.lineJoin="miter";bx.stroke();bx.save();bx.beginPath();bx.moveTo(bw*0.836448,bg*0.471962);bx.lineTo(bw*0.794392,bg*0.5);bx.lineTo(bw*0.836448,bg*0.523364);bx.lineTo(bw*0.836448,bg*0.471962);bx.closePath();bx.fill();bx.restore()};var a5=function(by){by.save();by.save();by.beginPath();by.moveTo(bw*0.523364,bg*0.350467);by.lineTo(bw*0.5,bg*0.130841);by.lineTo(bw*0.476635,bg*0.350467);by.bezierCurveTo(bw*0.476635,bg*0.350467,bw*0.490654,bg*0.345794,bw*0.5,bg*0.345794);by.bezierCurveTo(bw*0.509345,bg*0.345794,bw*0.523364,bg*0.350467,bw*0.523364,bg*0.350467);by.closePath();var bx=by.createLinearGradient(0,0.154205*bg,0,0.350466*bg);var bA=bv.dark;var bz=bv.light;bA.setAlpha(0.70588);bz.setAlpha(0.70588);bx.addColorStop(0,bA.getRgbaColor());bx.addColorStop(0.3,bz.getRgbaColor());bx.addColorStop(0.59,bz.getRgbaColor());bx.addColorStop(1,bA.getRgbaColor());by.fillStyle=bx;var bB=bv.light.getRgbaColor();by.lineWidth=1;by.lineCap="square";by.lineJoin="miter";by.strokeStyle=bB;by.fill();by.stroke();bA.setAlpha(1);bz.setAlpha(1);by.restore()};var aZ=function(bx){bx.save();var bC=bv.dark;var by=bv.light;bC.setAlpha(0.70588);by.setAlpha(0.70588);bx.save();bx.beginPath();bx.moveTo(bw*0.285046,bg*0.514018);bx.lineTo(bw*0.21028,bg*0.5);bx.lineTo(bw*0.285046,bg*0.481308);bx.bezierCurveTo(bw*0.285046,bg*0.481308,bw*0.280373,bg*0.490654,bw*0.280373,bg*0.495327);bx.bezierCurveTo(bw*0.280373,bg*0.504672,bw*0.285046,bg*0.514018,bw*0.285046,bg*0.514018);bx.closePath();var bz=bx.createLinearGradient(0.224299*bw,0,0.289719*bw,0);bz.addColorStop(0,bC.getRgbaColor());bz.addColorStop(0.3,by.getRgbaColor());bz.addColorStop(0.59,by.getRgbaColor());bz.addColorStop(1,bC.getRgbaColor());bx.fillStyle=bz;var bD=bv.light.getRgbaColor();bx.lineWidth=1;bx.lineCap="square";bx.lineJoin="miter";bx.strokeStyle=bD;bx.fill();bx.stroke();bx.save();bx.beginPath();bx.moveTo(bw*0.714953,bg*0.514018);bx.lineTo(bw*0.789719,bg*0.5);bx.lineTo(bw*0.714953,bg*0.481308);bx.bezierCurveTo(bw*0.714953,bg*0.481308,bw*0.719626,bg*0.490654,bw*0.719626,bg*0.495327);bx.bezierCurveTo(bw*0.719626,bg*0.504672,bw*0.714953,bg*0.514018,bw*0.714953,bg*0.514018);bx.closePath();var bA=bx.createLinearGradient(0.7757*bw,0,0.71028*bw,0);bA.addColorStop(0,bC.getRgbaColor());bA.addColorStop(0.3,by.getRgbaColor());bA.addColorStop(0.59,by.getRgbaColor());bA.addColorStop(1,bC.getRgbaColor());bx.fillStyle=bA;var bB=bv.light.getRgbaColor();bx.lineWidth=1;bx.lineCap="square";bx.lineJoin="miter";bx.strokeStyle=bB;bx.fill();bx.stroke();bC.setAlpha(1);by.setAlpha(1);bx.restore()};var bn=function(){a4=true;if(bd){d(aS,aV,aY,aX,bw,bg)}if(bb){aQ(aS,aT,aY,aX,bw,bg);bu(aS)}a0(aU);a5(aU);aZ(aW);if(br){A(a9,bs,bw,bg,false)}};var bq=function(){bi.width=a2;bi.height=a2;aS=bi.getContext("2d");bc.width=a2;bc.height=a2;aU=bc.getContext("2d");bj.width=a2;bj.height=a2;aW=bj.getContext("2d");bm.width=a2;bm.height=a2;a9=bm.getContext("2d")};this.setValue=function(by){var bx;by=parseFloat(by);bx=0>by?(360+by):by;bx=359.9<by?(by-360):by;if(bk!==bx){bk=bx;bh=2*((Math.abs(bk)*10)%10);if(10<bh){bh-=20}if(0===bk){be=90}if(0<bk&&90>=bk){be=(90-bk)}if(90<bk&&180>=bk){be=(bk-90)}if(180<bk&&270>=bk){be=(270-bk)}if(270<bk&&360>=bk){be=(bk-270)}if(0>bk&&bk>=-90){be=(90-Math.abs(bk))}if(bk<-90&&bk>=-180){be=Math.abs(bk)-90}if(bk<-180&&bk>=-270){be=270-Math.abs(bk)}if(bk<-270&&bk>=-360){be=Math.abs(bk)-270}this.repaint()}return this};this.getValue=function(){return bk};this.setValueAnimated=function(by,bz){by=parseFloat(by);if(360-by+bk<by-bk){by=360-by}if(bk!==by){if(undefined!==a7&&a7.isPlaying){a7.stop()}a7=new Tween({},"",Tween.regularEaseInOut,bk,by,1);var bx=this;a7.onMotionChanged=function(bA){bk=bA.target._pos;bh=2*((Math.abs(bk)*10)%10);if(10<bh){bh-=20}if(0===bk){be=90}if(0<bk&&90>=bk){be=(90-bk)}if(90<bk&&180>=bk){be=(bk-90)}if(180<bk&&270>=bk){be=(270-bk)}if(270<bk&&360>=bk){be=(bk-270)}if(0>bk&&bk>=-90){be=(90-Math.abs(bk))}if(bk<-90&&bk>=-180){be=Math.abs(bk)-90}if(bk<-180&&bk>=-270){be=270-Math.abs(bk)}if(bk<-270&&bk>=-360){be=Math.abs(bk)-270}if(!a6){a6=true;ad(bx.repaint)}};if(bz&&typeof(bz)==="function"){a7.onMotionFinished=bz}a7.start()}return this};this.setFrameDesign=function(bx){bq();aV=bx;bn();this.repaint();return this};this.setBackgroundColor=function(bx){bq();aT=bx;bn();this.repaint();return this};this.setForegroundType=function(bx){bq();bs=bx;bn();this.repaint();return this};this.setPointerColor=function(bx){bq();bv=bx;bn();this.repaint();return this};this.repaint=function(){if(!a4){bn()}bo.save();bo.clearRect(0,0,bo.canvas.width,bo.canvas.height);a8=T+bk*bl-T;if(bf){bo.translate(aY,aX);bo.rotate(-a8);bo.translate(-aY,-aX)}if(bd||bb){bo.drawImage(bi,0,0)}bo.save();bo.translate(aY,aX);bo.rotate(a8);bo.translate(-aY,-aX);bo.drawImage(bc,0,0);bo.fillStyle=aT.labelColor.getRgbaColor();bo.textAlign="center";bo.textBaseline="middle";if(a1){bo.restore();if(bt){bo.font=bw*0.1+"px "+W}else{bo.font=bw*0.15+"px "+W}bo.fillText(be.toFixed(ba)+"\u00B0",aY,aX,bw*0.35)}else{if(bt){bo.font=bw*0.15+"px "+W}else{bo.font=bw*0.2+"px "+W}bo.fillText(be.toFixed(ba)+"\u00B0",aY,aX,bw*0.35);bo.restore()}bo.translate(aY,aX);bo.rotate(a8+bh*l);bo.translate(-aY,-aX);bo.drawImage(bj,0,0);bo.restore();if(br){bo.drawImage(bm,0,0)}bo.restore();a6=false};this.repaint();return this};var av=function(a1,bp){bp=bp||{};var a0=(undefined===bp.size?0:bp.size),aV=(undefined===bp.frameDesign?steelseries.FrameDesign.METAL:bp.frameDesign),bf=(undefined===bp.frameVisible?true:bp.frameVisible),aT=(undefined===bp.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bp.backgroundColor),bc=(undefined===bp.backgroundVisible?true:bp.backgroundVisible),ba=(undefined===bp.pointerType?steelseries.PointerType.TYPE2:bp.pointerType),bu=(undefined===bp.pointerColor?steelseries.ColorDef.RED:bp.pointerColor),bv=(undefined===bp.knobType?steelseries.KnobType.STANDARD_KNOB:bp.knobType),bh=(undefined===bp.knobStyle?steelseries.KnobStyle.SILVER:bp.knobStyle),bs=(undefined===bp.foregroundType?steelseries.ForegroundType.TYPE1:bp.foregroundType),br=(undefined===bp.foregroundVisible?true:bp.foregroundVisible),a7=(undefined===bp.pointSymbols?["N","NE","E","SE","S","SW","W","NW"]:bp.pointSymbols),bw=(undefined===bp.pointSymbolsVisible?true:bp.pointSymbolsVisible),by=(undefined===bp.customLayer?null:bp.customLayer),a2=(undefined===bp.degreeScale?false:bp.degreeScale),aY=(undefined===bp.roseVisible?true:bp.roseVisible),bg=(undefined===bp.rotateFace?false:bp.rotateFace);var a6;var a5=false;var bk=0;var bl=l;var a9=this.value;var bo=r(a1);if(a0===0){a0=Math.min(bo.canvas.width,bo.canvas.height)}bo.canvas.width=a0;bo.canvas.height=a0;var bx=a0;var bi=a0;var aX=bx/2;var aW=bi/2;var a8=bx*0.006;var a3=false;var bj=J(a0,a0);var aS=bj.getContext("2d");var aZ=J(a0,a0);var be=aZ.getContext("2d");var bd=J(a0,a0);var aU=bd.getContext("2d");var bm=J(a0,a0);var bb=bm.getContext("2d");var bt=function(bz){var bD;bz.textAlign="center";bz.textBaseline="middle";var bC,bB,bA;bz.save();bz.strokeStyle=aT.labelColor.getRgbaColor();bz.fillStyle=aT.labelColor.getRgbaColor();bz.translate(aX,aW);if(!a2){bC=0.12*bx+"px serif";bB=0.06*bx+"px serif";for(bA=0;360>bA;bA+=2.5){if(0===bA%5){bz.lineWidth=1;bz.beginPath();bz.moveTo(bx*0.38,0);bz.lineTo(bx*0.36,0);bz.closePath();bz.stroke()}bz.save();switch(bA){case 0:bz.translate(bx*0.35,0);bz.rotate(T);bz.font=bC;bz.fillText(a7[2],0,0,bx);bz.translate(-bx*0.35,0);break;case 45:bz.translate(bx*0.29,0);bz.rotate(T);bz.font=bB;bz.fillText(a7[3],0,0,bx);bz.translate(-bx*0.29,0);break;case 90:bz.translate(bx*0.35,0);bz.rotate(T);bz.font=bC;bz.fillText(a7[4],0,0,bx);bz.translate(-bx*0.35,0);break;case 135:bz.translate(bx*0.29,0);bz.rotate(T);bz.font=bB;bz.fillText(a7[5],0,0,bx);bz.translate(-bx*0.29,0);break;case 180:bz.translate(bx*0.35,0);bz.rotate(T);bz.font=bC;bz.fillText(a7[6],0,0,bx);bz.translate(-bx*0.35,0);break;case 225:bz.translate(bx*0.29,0);bz.rotate(T);bz.font=bB;bz.fillText(a7[7],0,0,bx);bz.translate(-bx*0.29,0);break;case 270:bz.translate(bx*0.35,0);bz.rotate(T);bz.font=bC;bz.fillText(a7[0],0,0,bx);bz.translate(-bx*0.35,0);break;case 315:bz.translate(bx*0.29,0);bz.rotate(T);bz.font=bB;bz.fillText(a7[1],0,0,bx);bz.translate(-bx*0.29,0);break}bz.restore();if(aY&&(0===bA||22.5===bA||45===bA||67.5===bA||90===bA||112.5===bA||135===bA||157.5===bA||180===bA||202.5===bA||225===bA||247.5===bA||270===bA||292.5===bA||315===bA||337.5===bA||360===bA)){bz.save();bz.beginPath();if(bA%45){bz.moveTo(bx*0.29,0)}else{bz.moveTo(bx*0.38,0)}bz.lineTo(bx*0.1,0);bz.closePath();bz.restore();bz.lineWidth=1;bz.strokeStyle=aT.symbolColor.getRgbaColor();bz.stroke()}bz.rotate(bl*2.5)}}else{bC=0.08*bx+"px serif";bB=bx*0.033+"px serif";bz.rotate(bl*10);for(bA=10;360>=bA;bA+=10){bz.save();if(bw){switch(bA){case 360:bz.translate(bx*0.35,0);bz.rotate(T);bz.font=bC;bz.fillText(a7[2],0,0,bx);bz.translate(-bx*0.35,0);break;case 90:bz.translate(bx*0.35,0);bz.rotate(T);bz.font=bC;bz.fillText(a7[4],0,0,bx);bz.translate(-bx*0.35,0);break;case 180:bz.translate(bx*0.35,0);bz.rotate(T);bz.font=bC;bz.fillText(a7[6],0,0,bx);bz.translate(-bx*0.35,0);break;case 270:bz.translate(bx*0.35,0);bz.rotate(T);bz.font=bC;bz.fillText(a7[0],0,0,bx);bz.translate(-bx*0.35,0);break;default:bD=(bA+90)%360;bz.translate(bx*0.37,0);bz.rotate(T);bz.font=bB;bz.fillText(("0".substring(bD>=100)+bD),0,0,bx);bz.translate(-bx*0.37,0)}}else{bD=(bA+90)%360;bz.translate(bx*0.37,0);bz.rotate(T);bz.font=bB;bz.fillText(("0".substring(bD>=100)+bD),0,0,bx);bz.translate(-bx*0.37,0)}bz.restore();bz.rotate(bl*10)}}bz.translate(-aX,-aW);bz.restore()};var a4=function(bA){bA.save();switch(ba.type){case"type2":bA.beginPath();bA.moveTo(bx*0.53271,bi*0.453271);bA.bezierCurveTo(bx*0.53271,bi*0.453271,bx*0.5,bi*0.149532,bx*0.5,bi*0.149532);bA.bezierCurveTo(bx*0.5,bi*0.149532,bx*0.467289,bi*0.453271,bx*0.467289,bi*0.453271);bA.bezierCurveTo(bx*0.453271,bi*0.462616,bx*0.443925,bi*0.481308,bx*0.443925,bi*0.5);bA.bezierCurveTo(bx*0.443925,bi*0.5,bx*0.556074,bi*0.5,bx*0.556074,bi*0.5);bA.bezierCurveTo(bx*0.556074,bi*0.481308,bx*0.546728,bi*0.462616,bx*0.53271,bi*0.453271);bA.closePath();var bE=bA.createLinearGradient(0.471962*bx,0,0.528036*bx,0);bE.addColorStop(0,bu.light.getRgbaColor());bE.addColorStop(0.46,bu.light.getRgbaColor());bE.addColorStop(0.47,bu.medium.getRgbaColor());bE.addColorStop(1,bu.medium.getRgbaColor());bA.fillStyle=bE;bA.strokeStyle=bu.dark.getRgbaColor();bA.lineWidth=1;bA.lineCap="square";bA.lineJoin="miter";bA.fill();bA.stroke();bA.beginPath();bA.moveTo(bx*0.467289,bi*0.546728);bA.bezierCurveTo(bx*0.467289,bi*0.546728,bx*0.5,bi*0.850467,bx*0.5,bi*0.850467);bA.bezierCurveTo(bx*0.5,bi*0.850467,bx*0.53271,bi*0.546728,bx*0.53271,bi*0.546728);bA.bezierCurveTo(bx*0.546728,bi*0.537383,bx*0.556074,bi*0.518691,bx*0.556074,bi*0.5);bA.bezierCurveTo(bx*0.556074,bi*0.5,bx*0.443925,bi*0.5,bx*0.443925,bi*0.5);bA.bezierCurveTo(bx*0.443925,bi*0.518691,bx*0.453271,bi*0.537383,bx*0.467289,bi*0.546728);bA.closePath();var bG=bA.createLinearGradient(0.471962*bx,0,0.528036*bx,0);bG.addColorStop(0,"#e3e5e8");bG.addColorStop(0.48,"#e3e5e8");bG.addColorStop(0.48,"#abb1b8");bG.addColorStop(1,"#abb1b8");bA.fillStyle=bG;var bB="#abb1b8";bA.strokeStyle=bB;bA.lineWidth=1;bA.lineCap="square";bA.lineJoin="miter";bA.fill();bA.stroke();break;case"type3":bA.beginPath();bA.moveTo(bx*0.5,bi*0.149532);bA.bezierCurveTo(bx*0.5,bi*0.149532,bx*0.443925,bi*0.490654,bx*0.443925,bi*0.5);bA.bezierCurveTo(bx*0.443925,bi*0.53271,bx*0.467289,bi*0.556074,bx*0.5,bi*0.556074);bA.bezierCurveTo(bx*0.53271,bi*0.556074,bx*0.556074,bi*0.53271,bx*0.556074,bi*0.5);bA.bezierCurveTo(bx*0.556074,bi*0.490654,bx*0.5,bi*0.149532,bx*0.5,bi*0.149532);bA.closePath();var bF=bA.createLinearGradient(0.471962*bx,0,0.528036*bx,0);bF.addColorStop(0,bu.light.getRgbaColor());bF.addColorStop(0.46,bu.light.getRgbaColor());bF.addColorStop(0.47,bu.medium.getRgbaColor());bF.addColorStop(1,bu.medium.getRgbaColor());bA.fillStyle=bF;bA.strokeStyle=bu.dark.getRgbaColor();bA.lineWidth=1;bA.lineCap="square";bA.lineJoin="miter";bA.fill();bA.stroke();break;case"type1:":default:bA.beginPath();bA.moveTo(bx*0.5,bi*0.495327);bA.lineTo(bx*0.528037,bi*0.495327);bA.lineTo(bx*0.5,bi*0.149532);bA.lineTo(bx*0.471962,bi*0.495327);bA.lineTo(bx*0.5,bi*0.495327);bA.closePath();var bC=bA.createLinearGradient(0.471962*bx,0,0.528036*bx,0);bC.addColorStop(0,bu.light.getRgbaColor());bC.addColorStop(0.46,bu.light.getRgbaColor());bC.addColorStop(0.47,bu.medium.getRgbaColor());bC.addColorStop(1,bu.medium.getRgbaColor());bA.fillStyle=bC;bA.strokeStyle=bu.dark.getRgbaColor();bA.lineWidth=1;bA.lineCap="square";bA.lineJoin="miter";bA.fill();bA.stroke();bA.beginPath();bA.moveTo(bx*0.5,bi*0.504672);bA.lineTo(bx*0.471962,bi*0.504672);bA.lineTo(bx*0.5,bi*0.850467);bA.lineTo(bx*0.528037,bi*0.504672);bA.lineTo(bx*0.5,bi*0.504672);bA.closePath();var bD=bA.createLinearGradient(0.471962*bx,0,0.528036*bx,0);bD.addColorStop(0,"#e3e5e8");bD.addColorStop(0.48,"#e3e5e8");bD.addColorStop(0.480099,"#abb1b8");bD.addColorStop(1,"#abb1b8");bA.fillStyle=bD;var bz="#abb1b8";bA.strokeStyle=bz;bA.lineWidth=1;bA.lineCap="square";bA.lineJoin="miter";bA.fill();bA.stroke();break}bA.restore()};var bn=function(){a3=true;if(bf){d(aS,aV,aX,aW,bx,bi)}if(bc){aQ(aS,aT,aX,aW,bx,bi);Q(aS,by,aX,aW,bx,bi);if(aY){e(be,aX,aW,bx,bi,aT)}bt(be)}a4(aU,false);if(br){A(bb,bs,bx,bi,true,bv,bh)}};var bq=function(){bj.width=a0;bj.height=a0;aS=bj.getContext("2d");aZ.width=a0;aZ.height=a0;be=aZ.getContext("2d");bd.width=a0;bd.height=a0;aU=bd.getContext("2d");bm.width=a0;bm.height=a0;bb=bm.getContext("2d")};this.setValue=function(bz){bz=parseFloat(bz)%360;if(bk!==bz){bk=bz;this.repaint()}return this};this.getValue=function(){return bk};this.setValueAnimated=function(bC,bD){var bz=bC%360;var bA=this;var bB;if(bk!==bz){if(undefined!==a6&&a6.isPlaying){a6.stop()}bB=ak(bk,bz);if(bg){a6=new Tween({},"",Tween.regularEaseInOut,bk,bk+bB,2)}else{a6=new Tween({},"",Tween.elasticEaseOut,bk,bk+bB,2)}a6.onMotionChanged=function(bE){bk=bE.target._pos%360;if(!a5){a5=true;ad(bA.repaint)}};if(bD&&typeof(bD)==="function"){a6.onMotionFinished=bD}a6.start()}return this};this.setFrameDesign=function(bz){bq();aV=bz;bn();this.repaint();return this};this.setBackgroundColor=function(bz){bq();aT=bz;bn();this.repaint();return this};this.setForegroundType=function(bz){bq();bs=bz;bn();this.repaint();return this};this.setPointerColor=function(bz){bq();bu=bz;bn();this.repaint();return this};this.setPointerType=function(bz){bq();ba=bz;bn();this.repaint();return this};this.setPointSymbols=function(bz){bq();a7=bz;bn();this.repaint();return this};this.repaint=function(){if(!a3){bn()}bo.save();bo.clearRect(0,0,bo.canvas.width,bo.canvas.height);a9=T+bk*bl-T;if(bc||bf){bo.drawImage(bj,0,0)}if(bg){bo.save();bo.translate(aX,aW);bo.rotate(-a9);bo.translate(-aX,-aW);if(bc){bo.drawImage(aZ,0,0)}bo.restore()}else{if(bc){bo.drawImage(aZ,0,0)}bo.translate(aX,aW);bo.rotate(a9);bo.translate(-aX,-aW)}bo.shadowColor="rgba(0, 0, 0, 0.8)";bo.shadowOffsetX=bo.shadowOffsetY=a8;bo.shadowBlur=a8*2;bo.drawImage(bd,0,0);bo.restore();if(br){bo.drawImage(bm,0,0)}a5=false};this.repaint();return this};var I=function(a4,bJ){bJ=bJ||{};var a3=(undefined===bJ.size?0:bJ.size),aU=(undefined===bJ.frameDesign?steelseries.FrameDesign.METAL:bJ.frameDesign),bt=(undefined===bJ.frameVisible?true:bJ.frameVisible),aT=(undefined===bJ.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bJ.backgroundColor),bm=(undefined===bJ.backgroundVisible?true:bJ.backgroundVisible),bE=(undefined===bJ.pointerTypeLatest?steelseries.PointerType.TYPE1:bJ.pointerTypeLatest),a9=(undefined===bJ.pointerTypeAverage?steelseries.PointerType.TYPE8:bJ.pointerTypeAverage),bT=(undefined===bJ.pointerColor?steelseries.ColorDef.RED:bJ.pointerColor),bB=(undefined===bJ.pointerColorAverage?steelseries.ColorDef.BLUE:bJ.pointerColorAverage),bU=(undefined===bJ.knobType?steelseries.KnobType.STANDARD_KNOB:bJ.knobType),bw=(undefined===bJ.knobStyle?steelseries.KnobStyle.SILVER:bJ.knobStyle),bO=(undefined===bJ.foregroundType?steelseries.ForegroundType.TYPE1:bJ.foregroundType),bN=(undefined===bJ.foregroundVisible?true:bJ.foregroundVisible),bb=(undefined===bJ.pointSymbols?["N","NE","E","SE","S","SW","W","NW"]:bJ.pointSymbols),bZ=(undefined===bJ.pointSymbolsVisible?true:bJ.pointSymbolsVisible),b0=(undefined===bJ.customLayer?null:bJ.customLayer),a6=(undefined===bJ.degreeScale?true:bJ.degreeScale),bY=(undefined===bJ.degreeScaleHalf?false:bJ.degreeScaleHalf),a0=(undefined===bJ.roseVisible?false:bJ.roseVisible),bs=(undefined===bJ.lcdColor?steelseries.LcdColor.STANDARD:bJ.lcdColor),bD=(undefined===bJ.lcdVisible?true:bJ.lcdVisible),a1=(undefined===bJ.digitalFont?false:bJ.digitalFont),bf=(undefined===bJ.section?null:bJ.section),bv=(undefined===bJ.area?null:bJ.area),bM=(undefined===bJ.lcdTitleStrings?["Latest","Average"]:bJ.lcdTitleStrings),bc=(undefined===bJ.titleString?"":bJ.titleString),bg=(undefined===bJ.useColorLabels?false:bJ.useColorLabels),bV=(undefined===bJ.fullScaleDeflectionTime?2.5:bJ.fullScaleDeflectionTime),br=(undefined===bJ.windspeed?false:bJ.windspeed);var bh;var be;var bS=0;var bj=0;var bC=l;var bu=this.valueLatest;var bL=this.valueAverage;var bG=-T;var bi=H;var a5=360;var a8=false;var bI=r(a4);if(a3===0){a3=Math.min(bI.canvas.width,bI.canvas.height)}bI.canvas.width=a3;bI.canvas.height=a3;var bX=a3;var bx=a3;var aX=bX/2;var aW=bx/2;var bR=Math.floor(bX/10);var bp=bR+"px "+W;var bA=bR+"px "+aE;var aV=bX*0.3;var bo=bx*0.12;var bl=(bX-aV)/2;var aZ=bx*0.32;var aY=bx*0.565;var a7=false;var by=J(a3,a3);var aS=by.getContext("2d");var bQ;var bq=J(a3,a3);var a2=bq.getContext("2d");var bW=J(a3,a3);var bd=bW.getContext("2d");var bF=J(a3,a3);var bk=bF.getContext("2d");var ba=function(b2,b1){bI.save();bI.textAlign="center";bI.strokeStyle=bs.textColor;bI.fillStyle=bs.textColor;var b3=b2;while(b2<-180){b2+=360}if(!bY&&b2<0){b2+=360}if(bY&&b2>180){b2=-(360-b2)}if(b2>=0){b2="00"+Math.round(b2);b2=b2.substring(b2.length,b2.length-3)}else{b2="00"+Math.abs(Math.round(b2));if(br){b2=b2.substring(b2.length,b2.length-3)}else{b2="-"+b2.substring(b2.length,b2.length-3)}}if((br)&&(!b1)){b2=b3.toFixed(1)}if(bs===steelseries.LcdColor.STANDARD||bs===steelseries.LcdColor.STANDARD_GREEN){bI.shadowColor="gray";bI.shadowOffsetX=bX*0.007;bI.shadowOffsetY=bX*0.007;bI.shadowBlur=bX*0.007}bI.font=(a1?bA:bp);var b4="\u00B0";if(br){b4=""}bI.fillText(b2+b4,bX/2+aV*0.05,(b1?aZ:aY)+bo*0.5+bR*0.38,aV*0.9);bI.restore()};var bz=function(b1,b7,b4,b2,b5){b1.save();b1.strokeStyle=b2;b1.fillStyle=b2;b1.lineWidth=bX*0.035;var b3=(bi/a5*b7);var b6=b3+(b4-b7)/(a5/bi);b1.translate(aX,aW);b1.rotate(bG);b1.beginPath();if(b5){b1.moveTo(0,0);b1.arc(0,0,bX*0.365-b1.lineWidth/2,b3,b6,false)}else{b1.arc(0,0,bX*0.365,b3,b6,false)}if(b5){b1.moveTo(0,0);b1.fill()}else{b1.stroke()}b1.translate(-aX,-aW);b1.restore()};var bP=function(cc){var b7=bX*0.38,b2=bX*0.35,b4=bX*0.36,b3=bX*0.1,ca=bX*0.31,b1=bX*0.36,cb,b5,b8,b6,b9;cc.textAlign="center";cc.textBaseline="middle";cc.save();cc.strokeStyle=aT.labelColor.getRgbaColor();cc.fillStyle=aT.labelColor.getRgbaColor();cc.translate(aX,aW);if(!a6){cb=0.12*bX+"px serif";b5=0.06*bX+"px serif";cc.lineWidth=1;cc.strokeStyle=aT.symbolColor.getRgbaColor();for(b8=0;360>b8;b8+=2.5){if(0===b8%5){cc.beginPath();cc.moveTo(bX*0.38,0);cc.lineTo(bX*0.36,0);cc.closePath();cc.stroke()}cc.save();switch(b8){case 0:cc.translate(bX*0.35,0);cc.rotate(T);cc.font=cb;cc.fillText(bb[2],0,0);cc.translate(-bX*0.35,0);break;case 45:cc.translate(bX*0.29,0);cc.rotate(T);cc.font=b5;cc.fillText(bb[3],0,0);cc.translate(-bX*0.29,0);break;case 90:cc.translate(bX*0.35,0);cc.rotate(T);cc.font=cb;cc.fillText(bb[4],0,0);cc.translate(-bX*0.35,0);break;case 135:cc.translate(bX*0.29,0);cc.rotate(T);cc.font=b5;cc.fillText(bb[5],0,0);cc.translate(-bX*0.29,0);break;case 180:cc.translate(bX*0.35,0);cc.rotate(T);cc.font=cb;cc.fillText(bb[6],0,0);cc.translate(-bX*0.35,0);break;case 225:cc.translate(bX*0.29,0);cc.rotate(T);cc.font=b5;cc.fillText(bb[7],0,0);cc.translate(-bX*0.29,0);break;case 270:cc.translate(bX*0.35,0);cc.rotate(T);cc.font=cb;cc.fillText(bb[0],0,0);cc.translate(-bX*0.35,0);break;case 315:cc.translate(bX*0.29,0);cc.rotate(T);cc.font=b5;cc.fillText(bb[1],0,0);cc.translate(-bX*0.29,0);break}cc.restore();if(a0&&(0===b8||22.5===b8||45===b8||67.5===b8||90===b8||112.5===b8||135===b8||157.5===b8||180===b8||202.5===b8||225===b8||247.5===b8||270===b8||292.5===b8||315===b8||337.5===b8||360===b8)){cc.save();cc.beginPath();if(b8%45){cc.moveTo(bX*0.29,0)}else{cc.moveTo(bX*0.38,0)}cc.lineTo(bX*0.1,0);cc.closePath();cc.restore();cc.stroke()}cc.rotate(bC*2.5)}}else{cb=Math.floor(0.1*bX)+"px serif bold";b5=Math.floor(bX*0.04)+"px "+W;cc.rotate(bC*5);for(b8=5;360>=b8;b8+=5){cc.save();if(bZ){switch(b8){case 360:cc.translate(b1,0);cc.rotate(T);cc.font=cb;cc.fillText(bb[2],0,0,b3);cc.translate(-b1,0);break;case 90:cc.translate(b1,0);cc.rotate(T);cc.font=cb;cc.fillText(bb[4],0,0,b3);cc.translate(-b1,0);break;case 180:cc.translate(b1,0);cc.rotate(T);cc.font=cb;cc.fillText(bb[6],0,0,b3);cc.translate(-b1,0);break;case 270:cc.translate(b1,0);cc.rotate(T);cc.font=cb;cc.fillText(bb[0],0,0,b3);cc.translate(-b1,0);break;case 5:case 85:case 95:case 175:case 185:case 265:case 275:case 355:break;default:if((b8+90)%20){cc.lineWidth=((b8+90)%5)?1.5:1;cc.beginPath();cc.moveTo(b7,0);b9=(b8+90)%10?b4:b2;cc.lineTo(b9,0);cc.closePath();cc.stroke()}else{cc.lineWidth=1.5;cc.beginPath();cc.moveTo(b7,0);cc.lineTo(b2,0);cc.closePath();cc.stroke();b6=(b8+90)%360;cc.translate(ca,0);cc.rotate(T);cc.font=b5;cc.fillText(("0".substring(b6>=100)+b6),0,0,b3);cc.translate(-ca,0)}}}else{if((b8+90)%20){cc.lineWidth=((b8+90)%5)?1.5:1;cc.beginPath();cc.moveTo(b7,0);b9=(b8+90)%10?b4:b2;cc.lineTo(b9,0);cc.closePath();cc.stroke()}else{cc.lineWidth=1.5;cc.beginPath();cc.moveTo(b7,0);cc.lineTo(b2,0);cc.closePath();cc.stroke();b6=(b8+90)%360;if(bY){if(b6>180){b6=-(360-b6)}}cc.translate(ca,0);cc.rotate(T);cc.font=b5;cc.fillText(b6,0,0,b3);cc.translate(-ca,0)}}cc.restore();cc.rotate(bC*5)}}cc.translate(-aX,-aW);cc.restore()};var bn=function(b1){if(bM.length>0){b1.save();b1.textAlign="center";b1.textBaseline="middle";b1.fillStyle=(bg?bT.medium.getRgbaColor():aT.labelColor.getRgbaColor());b1.font=0.04*bX+"px "+W;b1.fillText(bM[0],bX/2,bx*0.29,bX*0.3);b1.fillStyle=(bg?bB.medium.getRgbaColor():aT.labelColor.getRgbaColor());b1.fillText(bM[1],bX/2,bx*0.71,bX*0.3);if(bc.length>0){b1.fillStyle=aT.labelColor.getRgbaColor();b1.font=0.0467*bX+"px "+W;b1.fillText(bc,bX/2,bx*0.5,bX*0.3)}}};var bH=function(b4){b4=b4||{};var b6=(undefined===b4.background?false:b4.background);var b3=(undefined===b4.pointer?false:b4.pointer);var b1=(undefined===b4.foreground?false:b4.foreground);a7=true;if(b6&&bt){d(aS,aU,aX,aW,bX,bx)}if(b6&&bm){aQ(aS,aT,aX,aW,bX,bx);Q(aS,b0,aX,aW,bX,bx);if(null!==bf&&0<bf.length){var b5=bf.length;do{b5--;bz(aS,bf[b5].start,bf[b5].stop,bf[b5].color,false)}while(0<b5)}if(null!==bv&&0<bv.length){var b2=bv.length;do{b2--;bz(aS,bv[b2].start,bv[b2].stop,bv[b2].color,true)}while(0<b2)}bP(aS)}if(b6&&a0){e(aS,aX,aW,bX,bx,aT)}if(b6&&bD){bQ=V(aV,bo,bs);aS.drawImage(bQ,bl,aZ);aS.drawImage(bQ,bl,aY);bn(aS)}if(b3){E(bd,bX,a9,bB,aT.labelColor);E(a2,bX,bE,bT,aT.labelColor)}if(b1&&bN){var b7=(bE.type==="type15"||bE.type==="type16"?false:true);A(bk,bO,bX,bx,b7,bU,bw)}};var bK=function(b2){b2=b2||{};var b4=(undefined===b2.background?false:b2.background);var b3=(undefined===b2.pointer?false:b2.pointer);var b1=(undefined===b2.foreground?false:b2.foreground);if(b4){by.width=a3;by.height=a3;aS=by.getContext("2d")}if(b3){bq.width=a3;bq.height=a3;a2=bq.getContext("2d");bW.width=a3;bW.height=a3;bd=bW.getContext("2d")}if(b1){bF.width=a3;bF.height=a3;bk=bF.getContext("2d")}};this.setValueLatest=function(b1){b1=parseFloat(b1);b1=b1===360?360:b1%360;if(bS!==b1){bS=b1;this.repaint()}return this};this.getValueLatest=function(){return bS};this.setValueAverage=function(b1){b1=parseFloat(b1);b1=b1===360?360:b1%360;if(bj!==b1){bj=b1;this.repaint()}return this};this.getValueAverage=function(){return bj};this.setValueAnimatedLatest=function(b5,b6){var b1,b2=this,b4,b3;b5=parseFloat(b5);b1=(b5===360?360:b5%360);if(bS!==b1){if(undefined!==bh&&bh.isPlaying){bh.stop()}b4=ak(bS,b1);if(b4!==0){b3=bV*Math.abs(b4)/180;b3=Math.max(b3,bV/5);bh=new Tween({},"",Tween.regularEaseInOut,bS,bS+b4,b3);bh.onMotionChanged=function(b7){bS=b7.target._pos===360?360:b7.target._pos%360;if(!a8){a8=true;ad(b2.repaint)}};bh.onMotionFinished=function(){bS=b1;if(!a8){a8=true;ad(b2.repaint)}if(b6&&typeof(b6)==="function"){b6()}};bh.start()}else{bS=b1;if(!a8){a8=true;ad(b2.repaint)}}}return this};this.setValueAnimatedAverage=function(b5,b6){var b1,b2=this,b4,b3;b5=parseFloat(b5);b1=(b5===360?360:b5%360);if(bj!==b5){if(undefined!==be&&be.isPlaying){be.stop()}b4=ak(bj,b1);if(b4!==0){b3=bV*Math.abs(b4)/180;b3=Math.max(b3,bV/5);be=new Tween({},"",Tween.regularEaseInOut,bj,bj+b4,b3);be.onMotionChanged=function(b7){bj=b7.target._pos===360?360:b7.target._pos%360;if(!a8){a8=true;ad(b2.repaint)}};be.onMotionFinished=function(){bj=b1;if(!a8){a8=true;ad(b2.repaint)}if(b6&&typeof(b6)==="function"){b6()}};be.start()}else{bj=b1;if(!a8){a8=true;ad(b2.repaint)}}}return this};this.setArea=function(b1){bv=b1;bK({background:true});bH({background:true});this.repaint();return this};this.setSection=function(b1){bf=b1;bK({background:true});bH({background:true});this.repaint();return this};this.setFrameDesign=function(b1){aU=b1;bK({background:true});bH({background:true});this.repaint();return this};this.setBackgroundColor=function(b1){aT=b1;bK({background:true});bH({background:true});this.repaint();return this};this.setForegroundType=function(b1){bK({foreground:true});bO=b1;bH({foreground:true});this.repaint();return this};this.setPointerColor=function(b1){bK({pointer:true});bT=b1;bH({pointer:true});this.repaint();return this};this.setPointerColorAverage=function(b1){bK({pointer:true});bB=b1;bH({pointer:true});this.repaint();return this};this.setPointerType=function(b1){bE=b1;bK({pointer:true,foreground:true});bH({pointer:true,foreground:true});this.repaint();return this};this.setPointerTypeAverage=function(b1){a9=b1;bK({pointer:true,foreground:true});bH({pointer:true,foreground:true});this.repaint();return this};this.setPointSymbols=function(b1){bb=b1;bK({background:true});bH({background:true});this.repaint();return this};this.setLcdColor=function(b1){bs=b1;bK({background:true});bH({background:true});this.repaint();return this};this.setLcdTitleStrings=function(b1){bM=b1;bK({background:true});bH({background:true});this.repaint();return this};this.repaint=function(){if(!a7){bH({frame:true,background:true,led:true,pointer:true,foreground:true})}bI.clearRect(0,0,bI.canvas.width,bI.canvas.height);if(bt||bm){bI.drawImage(by,0,0)}if(bD){ba(bS,true);ba(bj,false)}bL=bj*bC;var b1=bX*0.006;bI.save();bI.translate(aX,aW);bI.rotate(bL);bI.translate(-aX,-aW);bI.shadowColor="rgba(0, 0, 0, 0.8)";bI.shadowOffsetX=bI.shadowOffsetY=b1;bI.shadowBlur=b1*2;bI.drawImage(bW,0,0);bu=bS*bC-bL;bI.translate(aX,aW);bI.rotate(bu);bI.translate(-aX,-aW);bI.drawImage(bq,0,0);bI.restore();if(bN){bI.drawImage(bF,0,0)}a8=false};this.repaint();return this};var aj=function(aY,a4){a4=a4||{};var be=(undefined===a4.size?0:a4.size),a3=(undefined===a4.frameDesign?steelseries.FrameDesign.METAL:a4.frameDesign),aV=(undefined===a4.frameVisible?true:a4.frameVisible),bm=(undefined===a4.foregroundType?steelseries.ForegroundType.TYPE1:a4.foregroundType),bi=(undefined===a4.foregroundVisible?true:a4.foregroundVisible),bh=(undefined===a4.pointerColor?steelseries.ColorDef.WHITE:a4.pointerColor);var bp;var a1;var a2=false;var bk=0;var a8=0;var bd=(ao*be)/360;var bf=0;var bl=false;var bb=r(aY);if(be===0){be=Math.min(bb.canvas.width,bb.canvas.height)}bb.canvas.width=be;bb.canvas.height=be;var ba=be;var bo=be;var a7=ba/2;var a6=bo/2;var aZ=false;var aW=J(be,be);var bq=aW.getContext("2d");var a0=J(be,be*ao);var aT=a0.getContext("2d");var a9=J(be*0.037383,be*0.056074);var aU=a9.getContext("2d");var bg=J(be,be);var aX=bg.getContext("2d");var bn=function(by){by.save();var bv=be;var bw=be*ao;var bu;by.beginPath();by.rect(0,0,bv,bw);by.closePath();var bt=by.createLinearGradient(0,0,0,bw);bt.addColorStop(0,"#7fd5f0");bt.addColorStop(0.5,"#7fd5f0");bt.addColorStop(0.5,"#3c4439");bt.addColorStop(1,"#3c4439");by.fillStyle=bt;by.fill();by.lineWidth=1;var bx=bw/360*5;var bs=false;var br=10;by.textAlign="center";by.textBaseline="middle";var bz=bv*0.04;by.font=bz+"px "+W;by.fillStyle="#37596e";for(bu=bw/2-bx;bu>0;bu-=bx){if(br<=90){if(bs){by.fillText(br,(bv-(bv*0.2))/2-8,bu,bv*0.375);by.fillText(br,bv-(bv-(bv*0.2))/2+8,bu,bv*0.375);by.beginPath();by.moveTo((bv-(bv*0.2))/2,bu);by.lineTo(bv-(bv-(bv*0.2))/2,bu);by.closePath();br+=10}else{by.beginPath();by.moveTo((bv-(bv*0.1))/2,bu);by.lineTo(bv-(bv-(bv*0.1))/2,bu);by.closePath()}by.stroke()}bs^=true}bs=false;br=10;by.strokeStyle="#FFFFFF";by.lineWidth=1.5;by.beginPath();by.moveTo(0,bw/2);by.lineTo(bv,bw/2);by.closePath();by.stroke();by.fillStyle="#FFFFFF";by.lineWidth=1;for(bu=bw/2+bx;bu<=bw;bu+=bx){if(br<=90){if(bs){by.fillText(-br,(bv-(bv*0.2))/2-8,bu,bv*0.375);by.fillText(-br,bv-(bv-(bv*0.2))/2+8,bu,bv*0.375);by.beginPath();by.moveTo((bv-(bv*0.2))/2,bu);by.lineTo(bv-(bv-(bv*0.2))/2,bu);by.closePath();br+=10}else{by.beginPath();by.moveTo((bv-(bv*0.1))/2,bu);by.lineTo(bv-(bv-(bv*0.1))/2,bu);by.closePath()}by.stroke()}bs^=true}by.restore()};var a5=function(br){br.save();br.fillStyle=bh.light.getRgbaColor();br.beginPath();br.moveTo(ba*0.476635,bo*0.5);br.bezierCurveTo(ba*0.476635,bo*0.514018,ba*0.485981,bo*0.523364,ba*0.5,bo*0.523364);br.bezierCurveTo(ba*0.514018,bo*0.523364,ba*0.523364,bo*0.514018,ba*0.523364,bo*0.5);br.bezierCurveTo(ba*0.523364,bo*0.485981,ba*0.514018,bo*0.476635,ba*0.5,bo*0.476635);br.bezierCurveTo(ba*0.485981,bo*0.476635,ba*0.476635,bo*0.485981,ba*0.476635,bo*0.5);br.closePath();br.moveTo(ba*0.415887,bo*0.504672);br.lineTo(ba*0.415887,bo*0.495327);br.bezierCurveTo(ba*0.415887,bo*0.495327,ba*0.467289,bo*0.495327,ba*0.467289,bo*0.495327);br.bezierCurveTo(ba*0.471962,bo*0.481308,ba*0.481308,bo*0.471962,ba*0.495327,bo*0.467289);br.bezierCurveTo(ba*0.495327,bo*0.467289,ba*0.495327,bo*0.415887,ba*0.495327,bo*0.415887);br.lineTo(ba*0.504672,bo*0.415887);br.bezierCurveTo(ba*0.504672,bo*0.415887,ba*0.504672,bo*0.467289,ba*0.504672,bo*0.467289);br.bezierCurveTo(ba*0.518691,bo*0.471962,ba*0.528037,bo*0.481308,ba*0.53271,bo*0.495327);br.bezierCurveTo(ba*0.53271,bo*0.495327,ba*0.584112,bo*0.495327,ba*0.584112,bo*0.495327);br.lineTo(ba*0.584112,bo*0.504672);br.bezierCurveTo(ba*0.584112,bo*0.504672,ba*0.53271,bo*0.504672,ba*0.53271,bo*0.504672);br.bezierCurveTo(ba*0.528037,bo*0.518691,ba*0.518691,bo*0.53271,ba*0.5,bo*0.53271);br.bezierCurveTo(ba*0.481308,bo*0.53271,ba*0.471962,bo*0.518691,ba*0.467289,bo*0.504672);br.bezierCurveTo(ba*0.467289,bo*0.504672,ba*0.415887,bo*0.504672,ba*0.415887,bo*0.504672);br.closePath();br.fill();var bt=5;var bs=5*l;br.translate(a7,a6);br.rotate(-T);br.translate(-a7,-a6);var bu;for(bu=-90;bu<=90;bu+=bt){if(bu%45===0||bu===0){br.strokeStyle=bh.medium.getRgbaColor();br.lineWidth=2;br.beginPath();br.moveTo(ba*0.5,bo*0.088785);br.lineTo(ba*0.5,bo*0.113);br.closePath();br.stroke()}else{if(bu%15===0){br.strokeStyle="#FFFFFF";br.lineWidth=1;br.beginPath();br.moveTo(ba*0.5,bo*0.088785);br.lineTo(ba*0.5,bo*0.103785);br.closePath();br.stroke()}else{br.strokeStyle="#FFFFFF";br.lineWidth=0.5;br.beginPath();br.moveTo(ba*0.5,bo*0.088785);br.lineTo(ba*0.5,bo*0.093785);br.closePath();br.stroke()}}br.translate(a7,a6);br.rotate(bs,a7,a6);br.translate(-a7,-a6)}br.restore()};var aS=function(bs){bs.save();var bt=ba*0.037383;var br=bo*0.056074;bs.beginPath();bs.moveTo(bt*0.5,0);bs.lineTo(0,br);bs.lineTo(bt,br);bs.closePath();bs.fillStyle=bh.light.getRgbaColor();bs.fill();bs.strokeStyle=bh.medium.getRgbaColor();bs.stroke();bs.restore()};var bj=function(){aZ=true;if(aV){d(bq,a3,a7,a6,ba,bo)}bn(aT);aS(aU);a5(aX);if(bi){A(aX,bm,ba,bo,true,aL,U,L)}};var bc=function(){aW.width=be;aW.height=be;bq=aW.getContext("2d");a0.width=be;a0.height=be*ao;aT=a0.getContext("2d");a9.width=be*0.037383;a9.height=be*0.056074;aU=a9.getContext("2d");bg.width=be;bg.height=be;aX=bg.getContext("2d")};this.setRoll=function(br){br=parseFloat(br)%360;if(bk!==br){bk=br;this.repaint()}return this};this.getRoll=function(){return bk};this.setRollAnimated=function(br,bt){var bs=this;br=parseFloat(br)%360;if(bk!==br){if(undefined!==bp&&bp.isPlaying){bp.stop()}bp=new Tween({},"",Tween.regularEaseInOut,bk,br,1);bp.onMotionChanged=function(bu){bk=bu.target._pos;if(!a2){a2=true;ad(bs.repaint)}};if(bt&&typeof(bt)==="function"){bp.onMotionFinished=bt}bp.start()}return this};this.setPitch=function(br){br=((parseFloat(br)+180-bf)%360)-180;if(a8!==br){a8=br;if(a8>90){a8=90-(a8-90);if(!bl){this.setRoll(bk-180)}bl=true}else{if(a8<-90){a8=-90+(-90-a8);if(!bl){this.setRoll(bk+180)}bl=true}else{bl=false}}this.repaint()}return this};this.getPitch=function(){return a8};this.setPitchAnimated=function(bs,bt){var br=this;bs=parseFloat(bs);if(a8!==bs){if(undefined!==a1&&a1.isPlaying){a1.stop()}a1=new Tween({},"",Tween.regularEaseInOut,a8,bs,1);a1.onMotionChanged=function(bu){a8=bu.target._pos;if(a8>90){a8=90-(a8-90);if(!bl){this.setRoll(bk-180)}bl=true}else{if(a8<-90){a8=-90+(-90-a8);if(!bl){this.setRoll(bk+180)}bl=true}else{bl=false}}if(!a2){a2=true;ad(br.repaint)}br.setPitch(bu.target._pos)};if(bt&&typeof(bt)==="function"){a1.onMotionFinished=bt}a1.start()}return this};this.setPitchOffset=function(br){bf=parseFloat(br);this.repaint();return this};this.setFrameDesign=function(br){bc();a3=br;bj();this.repaint();return this};this.setForegroundType=function(br){bc();bm=br;bj();this.repaint();return this};this.repaint=function(){if(!aZ){bj()}bb.save();bb.clearRect(0,0,bb.canvas.width,bb.canvas.height);bb.drawImage(aW,0,0);bb.save();bb.beginPath();bb.arc(a7,a6,ba*0.831775/2,0,H,true);bb.closePath();bb.clip();bb.translate(a7,a6);bb.rotate(-(bk*l));bb.translate(-a7,0);bb.translate(0,(a8*bd));bb.drawImage(a0,0,-a0.height/2);bb.translate(0,-(a8*bd)-a6);bb.drawImage(a9,(ba*0.5-a9.width/2),(ba*0.107476));bb.restore();bb.drawImage(bg,0,0);bb.restore()};this.repaint();return this};var at=function(aW,a3){a3=a3||{};var a6=(undefined===a3.size?0:a3.size),aV=(undefined===a3.ledColor?steelseries.LedColor.RED_LED:a3.ledColor);var a5=false;var aU=0;var aT=r(aW);if(a6===0){a6=Math.min(aT.canvas.width,aT.canvas.height)}aT.canvas.width=a6;aT.canvas.height=a6;var aY=false;var a2=B.createElement("canvas");a2.width=a6;a2.height=a6;var a1=a2.getContext("2d");var aS=B.createElement("canvas");aS.width=a6;aS.height=a6;var aX=aS.getContext("2d");var a0=aS;var a4=function(){aY=true;a1.clearRect(0,0,a1.canvas.width,a1.canvas.height);a1.drawImage(af(a6,1,aV),0,0);aX.clearRect(0,0,aX.canvas.width,aX.canvas.height);aX.drawImage(af(a6,0,aV),0,0)};this.toggleLed=function(){if(a0===a2){a0=aS}else{a0=a2}aZ();return this};this.setLedColor=function(a7){aV=a7;aY=false;aZ();return this};this.setLedOnOff=function(a7){if(!!a7){a0=a2}else{a0=aS}aZ();return this};this.blink=function(a7){if(!!a7){if(!a5){aU=setInterval(this.toggleLed,1000);a5=true}}else{if(a5){clearInterval(aU);a5=false;a0=aS}}return this};var aZ=function(){if(!aY){a4()}aT.save();aT.clearRect(0,0,aT.canvas.width,aT.canvas.height);aT.drawImage(a0,0,0);aT.restore()};aZ();return this};var c=function(a3,bA){bA=bA||{};var a2=(undefined===bA.size?0:bA.size),aV=(undefined===bA.frameDesign?steelseries.FrameDesign.METAL:bA.frameDesign),bp=(undefined===bA.frameVisible?true:bA.frameVisible),bb=(undefined===bA.pointerType?steelseries.PointerType.TYPE1:bA.pointerType),bH=(undefined===bA.pointerColor?(bb===steelseries.PointerType.TYPE1?steelseries.ColorDef.GRAY:steelseries.ColorDef.BLACK):bA.pointerColor),aU=(undefined===bA.backgroundColor?(bb===steelseries.PointerType.TYPE1?steelseries.BackgroundColor.ANTHRACITE:steelseries.BackgroundColor.LIGHT_GRAY):bA.backgroundColor),bi=(undefined===bA.backgroundVisible?true:bA.backgroundVisible),bF=(undefined===bA.foregroundType?steelseries.ForegroundType.TYPE1:bA.foregroundType),bE=(undefined===bA.foregroundVisible?true:bA.foregroundVisible),bL=(undefined===bA.customLayer?null:bA.customLayer),be=(undefined===bA.isAutomatic?true:bA.isAutomatic),bh=(undefined===bA.hour?11:bA.hour),a5=(undefined===bA.minute?5:bA.minute),bl=(undefined===bA.second?0:bA.second),bJ=(undefined===bA.secondMovesContinuous?false:bA.secondMovesContinuous),bw=(undefined===bA.timeZoneOffsetHour?0:bA.timeZoneOffsetHour),bn=(undefined===bA.timeZoneOffsetMinute?0:bA.timeZoneOffsetMinute),bd=(undefined===bA.secondPointerVisible?true:bA.secondPointerVisible);var bo=new Date();var bv;var bq;var bB;var bf;var aW=(bJ?100:1000);aW=(bd?aW:100);var a4=this;var aZ=6;var bz=r(a3);if(a2===0){a2=Math.min(bz.canvas.width,bz.canvas.height)}bz.canvas.width=a2;bz.canvas.height=a2;var bI=a2;var bs=a2;var aY=bI/2;var aX=bs/2;var a6=false;var a7=J(a2,a2);var a0=a7.getContext("2d");var bt=J(a2,a2);var aT=bt.getContext("2d");var a8=J(a2,a2);var a1=a8.getContext("2d");var bj=J(a2,a2);var bk=bj.getContext("2d");var bu=J(a2,a2);var bD=bu.getContext("2d");var bx=J(a2,a2);var bg=bx.getContext("2d");var bG=function(bM,bS){var bQ;var bP;var bR;var bN,bO;bN=bI*0.405;bM.save();bM.translate(aY,aX);switch(bS.type){case"type1":bP=bI*0.074766;bO=bN-bP;bM.strokeStyle=aU.labelColor.getRgbaColor();bM.lineWidth=bI*0.014018;for(bQ=0;bQ<360;bQ+=30){bM.beginPath();bM.moveTo(bN,0);bM.lineTo(bO,0);bM.closePath();bM.stroke();bM.rotate(30*l)}bR=bI*0.126168;bO=bN-bR;bM.lineWidth=bI*0.03271;for(bQ=0;bQ<360;bQ+=90){bM.beginPath();bM.moveTo(bN,0);bM.lineTo(bO,0);bM.closePath();bM.stroke();bM.rotate(90*l)}break;case"type2":default:bP=bI*0.037383;bO=bN-bP;bM.strokeStyle=aU.labelColor.getRgbaColor();bM.lineWidth=bI*0.009345;for(bQ=0;bQ<360;bQ+=6){bM.beginPath();bM.moveTo(bN,0);bM.lineTo(bO,0);bM.closePath();bM.stroke();bM.rotate(6*l)}bR=bI*0.084112;bO=bN-bR;bM.lineWidth=bI*0.028037;for(bQ=0;bQ<360;bQ+=30){bM.beginPath();bM.moveTo(bN,0);bM.lineTo(bO,0);bM.closePath();bM.stroke();bM.rotate(30*l)}break}bM.translate(-aY,-aX);bM.restore()};var bK=function(bM,bN){bM.save();var bO;switch(bN.type){case"type2":bM.beginPath();bM.lineWidth=bI*0.046728;bM.moveTo(aY,bI*0.289719);bM.lineTo(aY,bI*0.289719+bI*0.224299);bM.strokeStyle=bH.medium.getRgbaColor();bM.closePath();bM.stroke();break;case"type1":default:bM.beginPath();bM.moveTo(bI*0.471962,bs*0.560747);bM.lineTo(bI*0.471962,bs*0.214953);bM.lineTo(bI*0.5,bs*0.182242);bM.lineTo(bI*0.528037,bs*0.214953);bM.lineTo(bI*0.528037,bs*0.560747);bM.lineTo(bI*0.471962,bs*0.560747);bM.closePath();bO=bM.createLinearGradient(bI*0.471962,bs*0.560747,bI*0.528037,bs*0.214953);bO.addColorStop(1,bH.veryLight.getRgbaColor());bO.addColorStop(0,bH.light.getRgbaColor());bM.fillStyle=bO;bM.strokeStyle=bH.light.getRgbaColor();bM.fill();bM.stroke();break}bM.restore()};var aS=function(bM,bN){bM.save();var bO;switch(bN.type){case"type2":bM.beginPath();bM.lineWidth=bI*0.03271;bM.moveTo(aY,bI*0.116822);bM.lineTo(aY,bI*0.116822+bI*0.38785);bM.strokeStyle=bH.medium.getRgbaColor();bM.closePath();bM.stroke();break;case"type1":default:bM.beginPath();bM.moveTo(bI*0.518691,bs*0.574766);bM.lineTo(bI*0.523364,bs*0.135514);bM.lineTo(bI*0.5,bs*0.107476);bM.lineTo(bI*0.476635,bs*0.140186);bM.lineTo(bI*0.476635,bs*0.574766);bM.lineTo(bI*0.518691,bs*0.574766);bM.closePath();bO=bM.createLinearGradient(bI*0.518691,bs*0.574766,bI*0.476635,bs*0.140186);bO.addColorStop(1,bH.veryLight.getRgbaColor());bO.addColorStop(0,bH.light.getRgbaColor());bM.fillStyle=bO;bM.strokeStyle=bH.light.getRgbaColor();bM.fill();bM.stroke();break}bM.restore()};var ba=function(bM,bN){bM.save();var bO;switch(bN.type){case"type2":bM.lineWidth=bI*0.009345;bM.beginPath();bM.moveTo(aY,bI*0.09813);bM.lineTo(aY,bI*0.09813+bI*0.126168);bM.closePath();bM.stroke();bM.lineWidth=bI*0.018691;bM.beginPath();bM.moveTo(aY,bI*0.308411);bM.lineTo(aY,bI*0.308411+bI*0.191588);bM.closePath();bM.stroke();bM.lineWidth=bI*0.016;bM.beginPath();bM.arc(aY,bI*0.26,bI*0.085/2,0,H);bM.closePath();bM.stroke();break;case"type1":default:bM.beginPath();bM.moveTo(bI*0.509345,bs*0.116822);bM.lineTo(bI*0.509345,bs*0.574766);bM.lineTo(bI*0.490654,bs*0.574766);bM.lineTo(bI*0.490654,bs*0.116822);bM.lineTo(bI*0.509345,bs*0.116822);bM.closePath();bO=bM.createLinearGradient(bI*0.509345,bs*0.116822,bI*0.490654,bs*0.574766);bO.addColorStop(0,steelseries.ColorDef.RED.light.getRgbaColor());bO.addColorStop(0.47,steelseries.ColorDef.RED.medium.getRgbaColor());bO.addColorStop(1,steelseries.ColorDef.RED.dark.getRgbaColor());bM.fillStyle=bO;bM.strokeStyle=steelseries.ColorDef.RED.dark.getRgbaColor();bM.fill();bM.stroke();break}bM.restore()};var bc=function(bM){var bN;bM.beginPath();bM.arc(aY,aX,bI*0.045,0,H);bM.closePath();bN=bM.createLinearGradient(aY-bI*0.045/2,aX-bI*0.045/2,aY+bI*0.045/2,aX+bI*0.045/2);bN.addColorStop(0,"#eef0f2");bN.addColorStop(1,"#65696d");bM.fillStyle=bN;bM.fill()};var br=function(bM,bN){var bO;bM.save();switch(bN.type){case"type2":bM.fillStyle="#000000";bM.beginPath();bM.arc(aY,aX,bI*0.088785/2,0,H);bM.closePath();bM.fill();break;case"type1":default:bO=bM.createLinearGradient(aY-bI*0.027/2,aX-bI*0.027/2,aY+bI*0.027/2,aX+bI*0.027/2);bO.addColorStop(0,"#f3f4f7");bO.addColorStop(0.11,"#f3f5f7");bO.addColorStop(0.12,"#f1f3f5");bO.addColorStop(0.2,"#c0c5cb");bO.addColorStop(0.2,"#bec3c9");bO.addColorStop(1,"#bec3c9");bM.fillStyle=bO;bM.beginPath();bM.arc(aY,aX,bI*0.027,0,H);bM.closePath();bM.fill();break}bM.restore()};var bm=function(bM,bO,bN){bB=bN*aZ*l;bv=bO*aZ*l;bq=(bM+bO/60)*aZ*5*l};var a9=function(){if(be){bo=new Date()}else{bo.setHours(bh);bo.setMinutes(a5);bo.setSeconds(bl)}bl=bo.getSeconds()+(bJ?bo.getMilliseconds()/1000:0);if(bw!==0){bh=bo.getUTCHours()+bw}else{bh=bo.getHours()}bh=bh%12;if(bn!==0){a5=bo.getUTCMinutes()+bn}else{a5=bo.getMinutes()}if(a5>60){a5-=60;bh++}if(a5<0){a5+=60;bh--}bh=bh%12;bm(bh,a5,bl);if(be){bf=setTimeout(a9,aW)}a4.repaint()};var by=function(bN){bN=bN||{};var bO=(undefined===bN.frame?false:bN.frame);var bP=(undefined===bN.background?false:bN.background);var bQ=(undefined===bN.pointers?false:bN.pointers);var bM=(undefined===bN.foreground?false:bN.foreground);a6=true;if(bO&&bp){d(a0,aV,aY,aX,bI,bs)}if(bP&&bi){aQ(aT,aU,aY,aX,bI,bs);Q(aT,bL,aY,aX,bI,bs);bG(aT,bb)}if(bQ){bK(a1,bb);aS(bk,bb);ba(bD,bb)}if(bM&&bE){br(bg,bb);A(bg,bF,bI,bs,false)}};var bC=function(bN){bN=bN||{};var bO=(undefined===bN.frame?false:bN.frame);var bP=(undefined===bN.background?false:bN.background);var bQ=(undefined===bN.pointers?false:bN.pointers);var bM=(undefined===bN.foreground?false:bN.foreground);if(bO){a7.width=a2;a7.height=a2;a0=a7.getContext("2d")}if(bP){bt.width=a2;bt.height=a2;aT=bt.getContext("2d")}if(bQ){a8.width=a2;a8.height=a2;a1=a8.getContext("2d");bj.width=a2;bj.height=a2;bk=bj.getContext("2d");bu.width=a2;bu.height=a2;bD=bu.getContext("2d")}if(bM){bx.width=a2;bx.height=a2;bg=bx.getContext("2d")}};this.getAutomatic=function(){return be};this.setAutomatic=function(bM){bM=!!bM;if(be&&!bM){clearTimeout(bf);be=bM}else{if(!be&&bM){be=bM;a9()}}return this};this.getHour=function(){return bh};this.setHour=function(bM){bM=parseInt(bM,10)%12;if(bh!==bM){bh=bM;bm(bh,a5,bl);this.repaint()}return this};this.getMinute=function(){return a5};this.setMinute=function(bM){bM=parseInt(bM,10)%60;if(a5!==bM){a5=bM;bm(bh,a5,bl);this.repaint()}return this};this.getSecond=function(){return bl};this.setSecond=function(bM){bM=parseInt(bM,10)%60;if(bl!==bM){bl=bM;bm(bh,a5,bl);this.repaint()}return this};this.getTimeZoneOffsetHour=function(){return bw};this.setTimeZoneOffsetHour=function(bM){bw=parseInt(bM,10);this.repaint();return this};this.getTimeZoneOffsetMinute=function(){return bn};this.setTimeZoneOffsetMinute=function(bM){bn=parseInt(bM,10);this.repaint();return this};this.getSecondPointerVisible=function(){return bd};this.setSecondPointerVisible=function(bM){bd=!!bM;this.repaint();return this};this.getSecondMovesContinuous=function(){return bJ};this.setSecondMovesContinuous=function(bM){bJ=!!bM;aW=(bJ?100:1000);aW=(bd?aW:100);return this};this.setFrameDesign=function(bM){bC({frame:true});aV=bM;by({frame:true});this.repaint();return this};this.setBackgroundColor=function(bM){bC({frame:true,background:true});aU=bM;by({frame:true,background:true});this.repaint();return this};this.setForegroundType=function(bM){bC({foreground:true});bF=bM;by({foreground:true});this.repaint();return this};this.setPointerType=function(bM){bC({background:true,foreground:true,pointers:true});bb=bM;if(bb.type==="type1"){bH=steelseries.ColorDef.GRAY;aU=steelseries.BackgroundColor.ANTHRACITE}else{bH=steelseries.ColorDef.BLACK;aU=steelseries.BackgroundColor.LIGHT_GRAY}by({background:true,foreground:true,pointers:true});this.repaint();return this};this.setPointerColor=function(bM){bC({pointers:true});bH=bM;by({pointers:true});this.repaint();return this};this.repaint=function(){if(!a6){by({frame:true,background:true,pointers:true,foreground:true})}bz.clearRect(0,0,bz.canvas.width,bz.canvas.height);if(bp){bz.drawImage(a7,0,0)}if(bi){bz.drawImage(bt,0,0)}var bM=bI*0.006;bz.save();bz.translate(aY,aX);bz.rotate(bq);bz.translate(-aY,-aX);bz.shadowColor="rgba(0, 0, 0, 0.8)";bz.shadowOffsetX=bz.shadowOffsetY=bM;bz.shadowBlur=bM*2;bz.drawImage(a8,0,0);bz.translate(aY,aX);bz.rotate(bv-bq);bz.translate(-aY,-aX);bz.drawImage(bj,0,0);bz.restore();if(bb.type==="type1"){bc(bz)}if(bd){bz.save();bz.translate(aY,aX);bz.rotate(bB);bz.translate(-aY,-aX);bz.shadowColor="rgba(0, 0, 0, 0.8)";bz.shadowOffsetX=bz.shadowOffsetY=bM;bz.shadowBlur=bM*2;bz.drawImage(bu,0,0);bz.restore()}if(bE){bz.drawImage(bx,0,0)}};a9();return this};var ab=function(aV,aY){aY=aY||{};var aX=(undefined===aY.size?0:aY.size),aZ=(undefined===aY.value?50:aY.value);var aW=r(aV);if(aX===0){aX=aW.canvas.width}var aU=aX;var aT=Math.ceil(aX*0.45);aW.canvas.width=aU;aW.canvas.height=aT;var aS=function(bd,a9,a7,bb){var ba;bd.beginPath();bd.moveTo(a9*0.025,a7*0.055555);bd.lineTo(a9*0.9,a7*0.055555);bd.lineTo(a9*0.9,a7*0.944444);bd.lineTo(a9*0.025,a7*0.944444);bd.lineTo(a9*0.025,a7*0.055555);bd.closePath();bd.beginPath();bd.moveTo(a9*0.925,0);bd.lineTo(0,0);bd.lineTo(0,a7);bd.lineTo(a9*0.925,a7);bd.lineTo(a9*0.925,a7*0.722222);bd.bezierCurveTo(a9*0.925,a7*0.722222,a9*0.975,a7*0.722222,a9*0.975,a7*0.722222);bd.bezierCurveTo(a9,a7*0.722222,a9,a7*0.666666,a9,a7*0.666666);bd.bezierCurveTo(a9,a7*0.666666,a9,a7*0.333333,a9,a7*0.333333);bd.bezierCurveTo(a9,a7*0.333333,a9,a7*0.277777,a9*0.975,a7*0.277777);bd.bezierCurveTo(a9*0.975,a7*0.277777,a9*0.925,a7*0.277777,a9*0.925,a7*0.277777);bd.lineTo(a9*0.925,0);bd.closePath();ba=bd.createLinearGradient(0,0,0,a7);ba.addColorStop(0,"#ffffff");ba.addColorStop(1,"#7e7e7e");bd.fillStyle=ba;bd.fill();bd.beginPath();var a4=Math.max(a9*0.875*(bb/100),Math.ceil(a9*0.01));bd.rect(a9*0.025,a9*0.025,a4,a7*0.888888);bd.closePath();var a0=[0,0.4,1];var a1=[new K(177,25,2,1),new K(219,167,21,1),new K(121,162,75,1)];var a3=new h(0,100,a0,a1);bd.fillStyle=a3.getColorAt(bb/100).getRgbColor();bd.fill();bd.beginPath();a4=Math.max(a4-a9*0.05,0);bd.rect(a9*0.05,a9*0.05,a4,a7*0.777777);bd.closePath();var a5=[new K(198,39,5,1),new K(228,189,32,1),new K(163,216,102,1)];var a2=[new K(246,121,48,1),new K(246,244,157,1),new K(223,233,86,1)];var bc=[0,0.4,1];var a8=new h(0,100,bc,a5);var a6=new h(0,100,bc,a2);ba=bd.createLinearGradient(a9*0.05,0,a9*0.875,0);ba.addColorStop(0,a8.getColorAt(bb/100).getRgbColor());ba.addColorStop(0.5,a6.getColorAt(bb/100).getRgbColor());ba.addColorStop(1,a8.getColorAt(bb/100).getRgbColor());bd.fillStyle=ba;bd.fill();bd.beginPath();bd.rect(a9*0.025,a9*0.025,a9*0.875,a7*0.444444);bd.closePath();ba=bd.createLinearGradient(a9*0.025,a9*0.025,a9*0.875,a7*0.444444);ba.addColorStop(0,"rgba(255, 255, 255, 0)");ba.addColorStop(1,"rgba(255, 255, 255, 0.8)");bd.fillStyle=ba;bd.fill()};this.setValue=function(a0){a0=(a0<0?0:(a0>100?100:a0));if(aZ!==a0){aZ=a0;this.repaint()}return this};this.getValue=function(){return aZ};this.repaint=function(){aW.clearRect(0,0,aW.canvas.width,aW.canvas.height);aS(aW,aU,aT,aZ)};this.repaint();return this};var ag=function(a4,bv){bv=bv||{};var a3=(undefined===bv.size?0:bv.size),aV=(undefined===bv.frameDesign?steelseries.FrameDesign.METAL:bv.frameDesign),bl=(undefined===bv.frameVisible?true:bv.frameVisible),bC=(undefined===bv.pointerColor?steelseries.ColorDef.BLACK:bv.pointerColor),aT=(undefined===bv.backgroundColor?steelseries.BackgroundColor.LIGHT_GRAY:bv.backgroundColor),bi=(undefined===bv.backgroundVisible?true:bv.backgroundVisible),bA=(undefined===bv.foregroundType?steelseries.ForegroundType.TYPE1:bv.foregroundType),bz=(undefined===bv.foregroundVisible?true:bv.foregroundVisible),bE=(undefined===bv.customLayer?null:bv.customLayer),bp=0,bw=0,bd,aY=6,a5=this,bh=0,ba=0,bq=0,a9=0,bg=0,bk=false,bn=false,bu=r(a4),bD,bm,aX,aW,bc,bs,by,a7=false,a8,a1,bo,aS,bf,aZ,a0,a2,br,be,bB=function(b4,b1,bX,bU,bY,bW,bZ){var b9=bU*b1,bK=b9+"px "+W,bQ=b1*0.15,bI=0.5,bV=1,bS=1.5,bP=bY*b1,b0=Math.round(0.025*b1),bM=Math.round(0.035*b1),b7=Math.round(0.045*b1),bT=aT.labelColor.getRgbaColor(),cb=aT.labelColor.getRgbaColor(),ca=b1/2,b3=b1*0.4,b6,bG,bL,bR=0,bH=0,b2=0,bO,bF=0,b8=0,bN,bJ=-ao,b5=H/(bX);b4.width=b4.height=b1;b4.save();b4.textAlign="center";b4.textBaseline="middle";b4.font=bK;for(bN=bJ,bO=0;bO<=bX+1;bN-=b5*0.1,bO+=0.1){b4.lineWidth=bI;bF=Math.sin(bN);b8=Math.cos(bN);if(bR%2===0){b6=[ca+(b3-b0)*bF+bW,ca+(b3-b0)*b8+bZ];bG=[ca+b3*bF+bW,ca+b3*b8+bZ];b4.strokeStyle=cb;b4.beginPath();b4.moveTo(b6[0],b6[1]);b4.lineTo(bG[0],bG[1]);b4.closePath();b4.stroke()}if(bR===10||bR===0){b4.fillStyle=bT;b4.lineWidth=bV;bG=[ca+b3*bF+bW,ca+b3*b8+bZ];bL=[ca+(b3-bP)*bF+bW,ca+(b3-bP)*b8+bZ];if(bH===5){if(bO!==bX){if(Math.round(bO)!==60){b4.fillText(Math.round(bO),bL[0],bL[1],bQ)}}b4.lineWidth=bS;b6=[ca+(b3-b7)*bF+bW,ca+(b3-b7)*b8+bZ];bH=0}else{b4.lineWidth=bV;b6=[ca+(b3-bM)*bF+bW,ca+(b3-bM)*b8+bZ]}b4.strokeStyle=cb;b4.beginPath();b4.moveTo(b6[0],b6[1]);b4.lineTo(bG[0],bG[1]);b4.closePath();b4.stroke();bR=0;b2++;bH++}bR++}b4.restore()},aU=function(bG){var bH,bF;bG.save();bG.beginPath();bG.moveTo(bD*0.509345,bD*0.457943);bG.lineTo(bD*0.5,bD*0.102803);bG.lineTo(bD*0.490654,bD*0.457943);bG.bezierCurveTo(bD*0.490654,bD*0.457943,bD*0.490654,bD*0.457943,bD*0.490654,bD*0.457943);bG.bezierCurveTo(bD*0.471962,bD*0.462616,bD*0.457943,bD*0.481308,bD*0.457943,bD*0.5);bG.bezierCurveTo(bD*0.457943,bD*0.518691,bD*0.471962,bD*0.537383,bD*0.490654,bD*0.542056);bG.bezierCurveTo(bD*0.490654,bD*0.542056,bD*0.490654,bD*0.542056,bD*0.490654,bD*0.542056);bG.lineTo(bD*0.490654,bD*0.621495);bG.lineTo(bD*0.509345,bD*0.621495);bG.lineTo(bD*0.509345,bD*0.542056);bG.bezierCurveTo(bD*0.509345,bD*0.542056,bD*0.509345,bD*0.542056,bD*0.509345,bD*0.542056);bG.bezierCurveTo(bD*0.528037,bD*0.537383,bD*0.542056,bD*0.518691,bD*0.542056,bD*0.5);bG.bezierCurveTo(bD*0.542056,bD*0.481308,bD*0.528037,bD*0.462616,bD*0.509345,bD*0.457943);bG.bezierCurveTo(bD*0.509345,bD*0.457943,bD*0.509345,bD*0.457943,bD*0.509345,bD*0.457943);bG.closePath();bH=bG.createLinearGradient(0,0,0,bD*0.621495);bH.addColorStop(0,bC.medium.getRgbaColor());bH.addColorStop(0.388888,bC.medium.getRgbaColor());bH.addColorStop(0.5,bC.light.getRgbaColor());bH.addColorStop(0.611111,bC.medium.getRgbaColor());bH.addColorStop(1,bC.medium.getRgbaColor());bG.fillStyle=bH;bG.strokeStyle=bC.dark.getRgbaColor();bG.fill();bG.stroke();bG.beginPath();bF=bD*0.06542/2;bG.arc(aX,aW,bF,0,H);bH=bG.createLinearGradient(aX-bF,aX+bF,0,aX+bF);bH.addColorStop(0,"#e6b35c");bH.addColorStop(0.01,"#e6b35c");bH.addColorStop(0.99,"#c48200");bH.addColorStop(1,"#c48200");bG.fillStyle=bH;bG.closePath();bG.fill();bG.beginPath();bF=bD*0.046728/2;bG.arc(aX,aW,bF,0,H);bH=bG.createRadialGradient(aX,aX,0,aX,aX,bF);bH.addColorStop(0,"#c5c5c5");bH.addColorStop(0.19,"#c5c5c5");bH.addColorStop(0.22,"#000000");bH.addColorStop(0.8,"#000000");bH.addColorStop(0.99,"#707070");bH.addColorStop(1,"#707070");bG.fillStyle=bH;bG.closePath();bG.fill();bG.restore()},a6=function(bG){var bH,bF;bG.save();bG.beginPath();bG.moveTo(bD*0.476635,bD*0.313084);bG.bezierCurveTo(bD*0.476635,bD*0.322429,bD*0.485981,bD*0.331775,bD*0.495327,bD*0.336448);bG.bezierCurveTo(bD*0.495327,bD*0.336448,bD*0.495327,bD*0.350467,bD*0.495327,bD*0.350467);bG.lineTo(bD*0.504672,bD*0.350467);bG.bezierCurveTo(bD*0.504672,bD*0.350467,bD*0.504672,bD*0.336448,bD*0.504672,bD*0.336448);bG.bezierCurveTo(bD*0.514018,bD*0.331775,bD*0.523364,bD*0.322429,bD*0.523364,bD*0.313084);bG.bezierCurveTo(bD*0.523364,bD*0.303738,bD*0.514018,bD*0.294392,bD*0.504672,bD*0.289719);bG.bezierCurveTo(bD*0.504672,bD*0.289719,bD*0.5,bD*0.200934,bD*0.5,bD*0.200934);bG.bezierCurveTo(bD*0.5,bD*0.200934,bD*0.495327,bD*0.289719,bD*0.495327,bD*0.289719);bG.bezierCurveTo(bD*0.485981,bD*0.294392,bD*0.476635,bD*0.303738,bD*0.476635,bD*0.313084);bG.closePath();bH=bG.createLinearGradient(0,0,bD,0);bH.addColorStop(0,bC.medium.getRgbaColor());bH.addColorStop(0.388888,bC.medium.getRgbaColor());bH.addColorStop(0.5,bC.light.getRgbaColor());bH.addColorStop(0.611111,bC.medium.getRgbaColor());bH.addColorStop(1,bC.medium.getRgbaColor());bG.fillStyle=bH;bG.strokeStyle=bC.dark.getRgbaColor();bG.fill();bG.stroke();bG.beginPath();bF=bD*0.037383/2;bG.arc(aX,by+bc/2,bF,0,H);bG.fillStyle="#C48200";bG.closePath();bG.fill();bG.beginPath();bF=bD*0.028037/2;bG.arc(aX,by+bc/2,bF,0,H);bG.fillStyle="#999999";bG.closePath();bG.fill();bG.beginPath();bF=bD*0.018691/2;bG.arc(aX,by+bc/2,bF,0,H);bG.fillStyle="#000000";bG.closePath();bG.fill();bG.restore()},bj=function(){ba=new Date().getTime()-bh;bw=(ba*aY/1000);bp=(bw%10800)/30;bq=(ba/60000)%30;a9=(ba/1000)%60;bg=(ba)%1000},bt=function(bG){bG=bG||{};var bH=(undefined===bG.frame?false:bG.frame),bI=(undefined===bG.background?false:bG.background),bJ=(undefined===bG.pointers?false:bG.pointers),bF=(undefined===bG.foreground?false:bG.foreground);a7=true;if(bH&&bl){d(a1,aV,aX,aW,bD,bm)}if(bI&&bi){aQ(aS,aT,aX,aW,bD,bm);Q(aS,bE,aX,aW,bD,bm);bB(aS,bD,60,0.075,0.1,0,0);bB(aS,bc,30,0.095,0.13,bs,by)}if(bJ){aU(a2);a6(aZ)}if(bF&&bz){A(be,bA,bD,bm,false)}},bx=function(bG){bG=bG||{};var bH=(undefined===bG.frame?false:bG.frame),bI=(undefined===bG.background?false:bG.background),bJ=(undefined===bG.pointers?false:bG.pointers),bF=(undefined===bG.foreground?false:bG.foreground);if(bH){a8.width=a3;a8.height=a3;a1=a8.getContext("2d")}if(bI){bo.width=a3;bo.height=a3;aS=bo.getContext("2d")}if(bJ){bf.width=a3;bf.height=a3;aZ=bf.getContext("2d");a0.width=a3;a0.height=a3;a2=a0.getContext("2d")}if(bF){br.width=a3;br.height=a3;be=br.getContext("2d")}},bb=function(){if(!bn){bj();a5.repaint()}if(bk){bd=setTimeout(bb,200)}};this.isRunning=function(){return bk};this.start=function(){if(!bk){bk=true;bh=new Date().getTime()-ba;bb()}return this};this.stop=function(){if(bk){bk=false;clearTimeout(bd)}if(bn){bn=false;bj();this.repaint()}return this};this.reset=function(){if(bk){bk=false;bn=false;clearTimeout(bd)}bh=new Date().getTime();bj();this.repaint();return this};this.lap=function(){if(bk&&!bn){bn=true}else{if(bn){bn=false}}return this};this.getMeasuredTime=function(){return(bq+":"+a9+":"+bg)};this.setFrameDesign=function(bF){bx({frame:true});aV=bF;bt({frame:true});this.repaint();return this};this.setBackgroundColor=function(bF){bx({background:true});aT=bF;bt({background:true});this.repaint();return this};this.setForegroundType=function(bF){bx({foreground:true});bA=bF;bt({foreground:true});this.repaint();return this};this.setPointerColor=function(bF){bx({pointers:true});bC=bF;bt({pointers:true});this.repaint();return this};this.repaint=function(){if(!a7){bt({frame:true,background:true,pointers:true,foreground:true})}bu.clearRect(0,0,bD,bm);if(bl){bu.drawImage(a8,0,0)}if(bi){bu.drawImage(bo,0,0)}var bF=bD*0.006;var bH=(bp+(2*Math.sin(bp*l)))*l;var bG=(bw+(2*Math.sin(bw*l)))*l;bu.save();bu.translate(aX,by+bc/2);bu.rotate(bH);bu.translate(-aX,-(by+bc/2));bu.shadowColor="rgba(0, 0, 0, 0.8)";bu.shadowOffsetX=bu.shadowOffsetY=bF/2;bu.shadowBlur=bF;bu.drawImage(bf,0,0);bu.restore();bu.save();bu.translate(aX,aW);bu.rotate(bG);bu.translate(-aX,-aW);bu.shadowColor="rgba(0, 0, 0, 0.8)";bu.shadowOffsetX=bu.shadowOffsetY=bF/2;bu.shadowBlur=bF;bu.drawImage(a0,0,0);bu.restore();if(bz){bu.drawImage(br,0,0)}};a3=(a3===0?Math.min(bu.canvas.width,bu.canvas.height):a3);bu.canvas.width=a3;bu.canvas.height=a3;bD=a3;bm=a3;aX=bD/2;aW=bm/2;bc=0.285*bD;bs=aX-bc/2;by=0.17*bD;a8=J(a3,a3);a1=a8.getContext("2d");bo=J(a3,a3);aS=bo.getContext("2d");bf=J(a3,a3);aZ=bf.getContext("2d");a0=J(a3,a3);a2=a0.getContext("2d");br=J(a3,a3);be=br.getContext("2d");bh=new Date().getTime();bb();return this};var aR=function(a5,bI){bI=bI||{};var a4=(undefined===bI.size?0:bI.size),aW=(undefined===bI.frameDesign?steelseries.FrameDesign.METAL:bI.frameDesign),bu=(undefined===bI.frameVisible?true:bI.frameVisible),aT=(undefined===bI.backgroundColor?steelseries.BackgroundColor.DARK_GRAY:bI.backgroundColor),bo=(undefined===bI.backgroundVisible?true:bI.backgroundVisible),bi=(undefined===bI.titleString?"":bI.titleString),bk=(undefined===bI.unitString?"":bI.unitString),br=(undefined===bI.unitAltPos?false:true),bO=(undefined===bI.knobType?steelseries.KnobType.METAL_KNOB:bI.knobType),bv=(undefined===bI.knobStyle?steelseries.KnobStyle.BLACK:bI.knobStyle),bs=(undefined===bI.lcdColor?steelseries.LcdColor.BLACK:bI.lcdColor),bC=(undefined===bI.lcdVisible?true:bI.lcdVisible),a1=(undefined===bI.digitalFont?false:bI.digitalFont),bL=(undefined===bI.foregroundType?steelseries.ForegroundType.TYPE1:bI.foregroundType),bK=(undefined===bI.foregroundVisible?true:bI.foregroundVisible),bQ=(undefined===bI.customLayer?null:bI.customLayer),aZ=0,bc=10,bB=aZ,bE=0,be=0,bb=0,a8,by,ba,bF=1,bg,bf=false,bP,bw,aY,aX,bq,bH=r(a5),bm=ao,a9=false,bd=J(a4,a4),a0=bd.getContext("2d"),bz=J(a4,a4),aS=bz.getContext("2d"),bN,a3=J(a4,a4),bx=a3.getContext("2d"),bj=J(a4,a4),aU=bj.getContext("2d"),a6=J(a4,a4),a7=a6.getContext("2d"),bD=J(a4,a4),bl=bD.getContext("2d");bH.save();a4=(a4===0?Math.min(bH.canvas.width,bH.canvas.height):a4);bH.canvas.width=a4;bH.canvas.height=a4;bP=a4;bw=a4;aY=bP/2;aX=bw/2;var bt=br?bw*0.68:false;bq=Math.floor(bP*0.09)+"px "+W;var bh=function(bR){bH.save();bH.textAlign="right";bH.textBaseline="middle";bH.strokeStyle=bs.textColor;bH.fillStyle=bs.textColor;if(bs===steelseries.LcdColor.STANDARD||bs===steelseries.LcdColor.STANDARD_GREEN){bH.shadowColor="gray";bH.shadowOffsetX=bP*0.007;bH.shadowOffsetY=bP*0.007;bH.shadowBlur=bP*0.009}if(a1){bH.font=Math.floor(bP*0.075)+"px "+aE}else{bH.font=Math.floor(bP*0.075)+"px bold "+W}bH.fillText(Math.round(bR),(bP+(bP*0.4))/2-4,bP*0.607,bP*0.4);bH.restore()};var bM=function(b4,b9,bW,b7,bY,b1){var b2=Math.max(bP*0.012,2),bS=Math.max(bP*0.007,1.5),bZ=bP*0.13,bU=bP*0.05,b6=bP*0.07,b5=bP*0.4,b0=0,b3=0,bR=0,b8=0,bV,bX,bT=-bW-(b9/2);b4.save();b4.textAlign="center";b4.textBaseline="middle";b4.font=bq;b4.strokeStyle=aT.labelColor.getRgbaColor();b4.fillStyle=aT.labelColor.getRgbaColor();for(bV=bT,bX=0;bX<=10;bV-=b1*0.1,bX+=0.1){bR=Math.sin(bV);b8=Math.cos(bV);if(b0%2===0){b4.lineWidth=bS;b4.beginPath();b4.moveTo(aY+(b5-bU)*bR,aX+(b5-bU)*b8);b4.lineTo(aY+b5*bR,aX+b5*b8);b4.closePath();b4.stroke()}if(b0===10||b0===0){b4.lineWidth=b2;if(b9===0){if(Math.round(bX)!==bc){b4.fillText(Math.round(bX).toString(),aY+(b5-bZ)*bR,aX+(b5-bZ)*b8)}}b0=0;b3++;b4.beginPath();b4.moveTo(aY+(b5-b6)*bR,aX+(b5-b6)*b8);b4.lineTo(aY+b5*bR,aX+b5*b8);b4.closePath();b4.stroke()}b0++}b4.restore()};var a2=function(bR,bT){var bS;if(bT){bR.fillStyle="rgba(0, 0, 0, 0.5)";bR.strokeStyle="rgba(0, 0, 0, 0.5)"}else{bS=bR.createLinearGradient(0,bw*0.168224,0,bw*0.626168);bS.addColorStop(0,"#ffffff");bS.addColorStop(0.31,"#ffffff");bS.addColorStop(0.3101,"#ffffff");bS.addColorStop(0.32,"#202020");bS.addColorStop(1,"#202020");bR.fillStyle=bS}bR.save();bR.beginPath();bR.moveTo(bP*0.518691,bw*0.471962);bR.bezierCurveTo(bP*0.514018,bw*0.471962,bP*0.509345,bw*0.467289,bP*0.509345,bw*0.467289);bR.lineTo(bP*0.509345,bw*0.200934);bR.lineTo(bP*0.5,bw*0.168224);bR.lineTo(bP*0.490654,bw*0.200934);bR.lineTo(bP*0.490654,bw*0.467289);bR.bezierCurveTo(bP*0.490654,bw*0.467289,bP*0.481308,bw*0.471962,bP*0.481308,bw*0.471962);bR.bezierCurveTo(bP*0.471962,bw*0.481308,bP*0.467289,bw*0.490654,bP*0.467289,bw*0.5);bR.bezierCurveTo(bP*0.467289,bw*0.514018,bP*0.476635,bw*0.528037,bP*0.490654,bw*0.53271);bR.bezierCurveTo(bP*0.490654,bw*0.53271,bP*0.490654,bw*0.579439,bP*0.490654,bw*0.588785);bR.bezierCurveTo(bP*0.485981,bw*0.593457,bP*0.481308,bw*0.59813,bP*0.481308,bw*0.607476);bR.bezierCurveTo(bP*0.481308,bw*0.616822,bP*0.490654,bw*0.626168,bP*0.5,bw*0.626168);bR.bezierCurveTo(bP*0.509345,bw*0.626168,bP*0.518691,bw*0.616822,bP*0.518691,bw*0.607476);bR.bezierCurveTo(bP*0.518691,bw*0.59813,bP*0.514018,bw*0.593457,bP*0.504672,bw*0.588785);bR.bezierCurveTo(bP*0.504672,bw*0.579439,bP*0.504672,bw*0.53271,bP*0.509345,bw*0.53271);bR.bezierCurveTo(bP*0.523364,bw*0.528037,bP*0.53271,bw*0.514018,bP*0.53271,bw*0.5);bR.bezierCurveTo(bP*0.53271,bw*0.490654,bP*0.528037,bw*0.481308,bP*0.518691,bw*0.471962);bR.closePath();bR.fill();bR.restore()};var bn=function(bR){var bS;bS=bR.createLinearGradient(0,bw*0.401869,0,bw*0.616822);bS.addColorStop(0,"#ffffff");bS.addColorStop(0.51,"#ffffff");bS.addColorStop(0.52,"#ffffff");bS.addColorStop(0.5201,"#202020");bS.addColorStop(0.53,"#202020");bS.addColorStop(1,"#202020");bR.fillStyle=bS;bR.beginPath();bR.moveTo(bP*0.518691,bw*0.471962);bR.bezierCurveTo(bP*0.514018,bw*0.462616,bP*0.528037,bw*0.401869,bP*0.528037,bw*0.401869);bR.lineTo(bP*0.5,bw*0.331775);bR.lineTo(bP*0.471962,bw*0.401869);bR.bezierCurveTo(bP*0.471962,bw*0.401869,bP*0.485981,bw*0.462616,bP*0.481308,bw*0.471962);bR.bezierCurveTo(bP*0.471962,bw*0.481308,bP*0.467289,bw*0.490654,bP*0.467289,bw*0.5);bR.bezierCurveTo(bP*0.467289,bw*0.514018,bP*0.476635,bw*0.528037,bP*0.490654,bw*0.53271);bR.bezierCurveTo(bP*0.490654,bw*0.53271,bP*0.462616,bw*0.574766,bP*0.462616,bw*0.593457);bR.bezierCurveTo(bP*0.467289,bw*0.616822,bP*0.5,bw*0.612149,bP*0.5,bw*0.612149);bR.bezierCurveTo(bP*0.5,bw*0.612149,bP*0.53271,bw*0.616822,bP*0.537383,bw*0.593457);bR.bezierCurveTo(bP*0.537383,bw*0.574766,bP*0.509345,bw*0.53271,bP*0.509345,bw*0.53271);bR.bezierCurveTo(bP*0.523364,bw*0.528037,bP*0.53271,bw*0.514018,bP*0.53271,bw*0.5);bR.bezierCurveTo(bP*0.53271,bw*0.490654,bP*0.528037,bw*0.481308,bP*0.518691,bw*0.471962);bR.closePath();bR.fill();bR.restore()};var bA=function(bR){bR.fillStyle="#ffffff";bR.beginPath();bR.moveTo(bP*0.518691,bw*0.471962);bR.bezierCurveTo(bP*0.514018,bw*0.471962,bP*0.514018,bw*0.467289,bP*0.514018,bw*0.467289);bR.lineTo(bP*0.514018,bw*0.317757);bR.lineTo(bP*0.504672,bw*0.303738);bR.lineTo(bP*0.504672,bw*0.182242);bR.lineTo(bP*0.53271,bw*0.116822);bR.lineTo(bP*0.462616,bw*0.116822);bR.lineTo(bP*0.495327,bw*0.182242);bR.lineTo(bP*0.495327,bw*0.299065);bR.lineTo(bP*0.485981,bw*0.317757);bR.lineTo(bP*0.485981,bw*0.467289);bR.bezierCurveTo(bP*0.485981,bw*0.467289,bP*0.485981,bw*0.471962,bP*0.481308,bw*0.471962);bR.bezierCurveTo(bP*0.471962,bw*0.481308,bP*0.467289,bw*0.490654,bP*0.467289,bw*0.5);bR.bezierCurveTo(bP*0.467289,bw*0.518691,bP*0.481308,bw*0.53271,bP*0.5,bw*0.53271);bR.bezierCurveTo(bP*0.518691,bw*0.53271,bP*0.53271,bw*0.518691,bP*0.53271,bw*0.5);bR.bezierCurveTo(bP*0.53271,bw*0.490654,bP*0.528037,bw*0.481308,bP*0.518691,bw*0.471962);bR.closePath();bR.fill()};function bp(){a8=(H)/(bc-aZ);by=a8/10;ba=by/10}function aV(){bE=(bB%1000)/100;be=(bB%10000)/100;bb=(bB%100000)/100}var bG=function(bS){bS=bS||{};var bT=(undefined===bS.frame?false:bS.frame),bU=(undefined===bS.background?false:bS.background),bV=(undefined===bS.pointers?false:bS.pointers),bR=(undefined===bS.foreground?false:bS.foreground);a9=true;bp();if(bT&&bu){d(a0,aW,aY,aX,bP,bw)}if(bU&&bo){aQ(aS,aT,aY,aX,bP,bw);Q(aS,bQ,aY,aX,bP,bw);bM(aS,0,bm,0,10,a8,bF,0,true,true,null);ap(aS,bP,bw,bi,bk,aT,true,true,bt)}if(bU&&bC){bN=V(bP*0.4,bw*0.09,bs);aS.drawImage(bN,(bP-(bP*0.4))/2,bw*0.56)}if(bV){a2(a7,false);bn(aU,false);bA(bx,false)}if(bR&&bK){A(bl,bL,bP,bw,true,bO,bv)}};var bJ=function(bS){bS=bS||{};var bT=(undefined===bS.frame?false:bS.frame),bU=(undefined===bS.background?false:bS.background),bV=(undefined===bS.pointers?false:bS.pointers),bR=(undefined===bS.foreground?false:bS.foreground);if(bT){bd.width=a4;bd.height=a4;a0=bd.getContext("2d")}if(bU){bz.width=a4;bz.height=a4;aS=bz.getContext("2d")}if(bV){a6.width=a4;a6.height=a4;a7=a6.getContext("2d");bj.width=a4;bj.height=a4;aU=bj.getContext("2d");a3.width=a4;a3.height=a4;bx=a3.getContext("2d")}if(bR){bD.width=a4;bD.height=a4;bl=bD.getContext("2d")}};this.setValue=function(bR){bB=parseFloat(bR);this.repaint()};this.getValue=function(){return bB};this.setValueAnimated=function(bU,bV){bU=parseFloat(bU);var bR=(bU<aZ?aZ:bU),bS=this,bT;if(bB!==bR){if(undefined!==bg&&bg.isPlaying){bg.stop()}bT=Math.max(Math.abs(bB-bR)/10000*5,1);bg=new Tween({},"",Tween.regularEaseInOut,bB,bR,bT);bg.onMotionChanged=function(bW){bB=bW.target._pos;if(!bf){bf=true;ad(bS.repaint)}};if(bV&&typeof(bV)==="function"){bg.onMotionFinished=bV}bg.start()}return this};this.setFrameDesign=function(bR){bJ({frame:true});aW=bR;bG({frame:true});this.repaint();return this};this.setBackgroundColor=function(bR){bJ({background:true,pointer:true});aT=bR;bG({background:true,pointer:true});this.repaint();return this};this.setForegroundType=function(bR){bJ({foreground:true});bL=bR;bG({foreground:true});this.repaint();return this};this.setLcdColor=function(bR){bs=bR;bJ({background:true});bG({background:true});this.repaint();return this};this.setTitleString=function(bR){bi=bR;bJ({background:true});bG({background:true});this.repaint();return this};this.setUnitString=function(bR){bk=bR;bJ({background:true});bG({background:true});this.repaint();return this};this.repaint=function(){if(!a9){bG({frame:true,background:true,led:true,pointers:true,foreground:true})}bH.clearRect(0,0,bH.canvas.width,bH.canvas.height);if(bu){bH.drawImage(bd,0,0)}bH.drawImage(bz,0,0);if(bC){bh(bB)}aV();var bR=bP*0.006*0.5;bH.save();bH.translate(aY,aX);bH.rotate((bb-aZ)*ba);bH.translate(-aY,-aX);bH.shadowColor="rgba(0, 0, 0, 0.8)";bH.shadowOffsetX=bH.shadowOffsetY=bR;bH.shadowBlur=bR*2;bH.drawImage(a3,0,0);bR=bP*0.006*0.75;bH.shadowOffsetX=bH.shadowOffsetY=bR;bH.translate(aY,aX);bH.rotate((be-aZ)*by-(bb-aZ)*ba);bH.translate(-aY,-aX);bH.drawImage(bj,0,0);bR=bP*0.006;bH.shadowOffsetX=bH.shadowOffsetY=bR;bH.translate(aY,aX);bH.rotate((bE-aZ)*a8-(be-aZ)*by);bH.translate(-aY,-aX);bH.drawImage(a6,0,0);bH.restore();if(bK){bH.drawImage(bD,0,0)}bf=false};this.repaint();return this};var aF=function(aX,bx){bx=bx||{};var aS=(undefined===bx.width?0:bx.width),aT=(undefined===bx.height?0:bx.height),bw=r(aX),bb,bA,bl,bo=false,bq=false,a0=false,aZ=false,aY=B.createElement("canvas"),bt=aY.getContext("2d"),a5=B.createElement("canvas"),bv=a5.getContext("2d"),bz=B.createElement("canvas"),be=bz.getContext("2d"),a1=B.createElement("canvas"),bn=a1.getContext("2d"),bk=B.createElement("canvas"),bs=bk.getContext("2d"),bf=B.createElement("canvas"),bj=bf.getContext("2d"),bi=B.createElement("canvas"),bg=bi.getContext("2d"),a7=B.createElement("canvas"),aV=a7.getContext("2d"),bp=B.createElement("canvas"),a9=bp.getContext("2d"),aU=B.createElement("canvas"),bh=aU.getContext("2d");if(aS===0){aS=bw.canvas.width}if(aT===0){aT=bw.canvas.height}bw.canvas.width=aS;bw.canvas.height=aT;bb=aS<(aT*0.352517)?(aS*2.836734):aT;bA=bb*0.352517;bl=bb;aY.width=bA;aY.height=bl;a5.width=bA;a5.height=bl;bz.width=bA;bz.height=bl;a1.width=bA;a1.height=bl;bk.width=bA;bk.height=bl;bf.width=bA;bf.height=bl;bi.width=bA;bi.height=bl;a7.width=bA;a7.height=bl;bp.width=bA;bp.height=bl;aU.width=bA;aU.height=bl;var bc=function(bB){var bC,bD;bB.save();bB.save();bB.beginPath();bB.moveTo(0.107142*bA,0);bB.lineTo(bA-0.107142*bA,0);bB.quadraticCurveTo(bA,0,bA,0.107142*bA);bB.lineTo(bA,bl-0.107142*bA);bB.quadraticCurveTo(bA,bl,bA-0.107142*bA,bl);bB.lineTo(0.107142*bA,bl);bB.quadraticCurveTo(0,bl,0,bl-0.107142*bA);bB.lineTo(0,0.107142*bA);bB.quadraticCurveTo(0,0,0.107142*bA,bl);bB.closePath();bC=bB.createLinearGradient(0.040816*bA,0.007194*bl,0.952101*bA,0.995882*bl);bC.addColorStop(0,"rgb(152, 152, 154)");bC.addColorStop(0.01,"rgb(152, 152, 154)");bC.addColorStop(0.09,"#333333");bC.addColorStop(0.24,"rgb(152, 152, 154)");bC.addColorStop(0.55,"rgb(31, 31, 31)");bC.addColorStop(0.78,"#363636");bC.addColorStop(0.98,"#000000");bC.addColorStop(1,"#000000");bB.fillStyle=bC;bB.fill();bB.restore();bB.save();bB.beginPath();bB.moveTo(0.030612*bA+0.084183*bA,0.010791*bl);bB.lineTo(0.030612*bA+0.938775*bA-0.084183*bA,0.010791*bl);bB.quadraticCurveTo(0.030612*bA+0.938775*bA,0.010791*bl,0.030612*bA+0.938775*bA,0.010791*bl+0.084183*bA);bB.lineTo(0.030612*bA+0.938775*bA,0.010791*bl+0.978417*bl-0.084183*bA);bB.quadraticCurveTo(0.030612*bA+0.938775*bA,0.010791*bl+0.978417*bl,0.030612*bA+0.938775*bA-0.084183*bA,0.010791*bl+0.978417*bl);bB.lineTo(0.030612*bA+0.084183*bA,0.010791*bl+0.978417*bl);bB.quadraticCurveTo(0.030612*bA,0.010791*bl+0.978417*bl,0.030612*bA,0.010791*bl+0.978417*bl-0.084183*bA);bB.lineTo(0.030612*bA,0.010791*bl+0.084183*bA);bB.quadraticCurveTo(0.030612*bA,0.010791*bl,0.030612*bA+0.084183*bA,0.010791*bl);bB.closePath();bD=bB.createLinearGradient(-0.132653*bA,-0.053956*bl,2.061408*bA,0.667293*bl);bD.addColorStop(0,"#000000");bD.addColorStop(0.01,"#000000");bD.addColorStop(0.16,"#373735");bD.addColorStop(0.31,"#000000");bD.addColorStop(0.44,"#303030");bD.addColorStop(0.65,"#000000");bD.addColorStop(0.87,"#363636");bD.addColorStop(0.98,"#000000");bD.addColorStop(1,"#000000");bB.fillStyle=bD;bB.fill();bB.restore();bB.restore()};var a3=function(bD){var bF,bC,bB,bE;bD.save();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.805755*bl,0.397959*bA,0,H,false);bF=bD.createLinearGradient(0,0.665467*bl,0,0.946043*bl);bF.addColorStop(0,"#ffffff");bF.addColorStop(0.05,"rgb(204, 204, 204)");bF.addColorStop(0.1,"rgb(153, 153, 153)");bF.addColorStop(0.17,"#666666");bF.addColorStop(0.27,"#333333");bF.addColorStop(1,"#010101");bD.fillStyle=bF;bD.fill();bD.restore();bD.save();bD.scale(1.083333,1);bD.beginPath();bD.arc(0.461538*bA,0.816546*bl,0.367346*bA,0,H,false);bC=bD.createLinearGradient(0,0.68705*bl,0,0.946043*bl);bC.addColorStop(0,"#000000");bC.addColorStop(0.35,"#040404");bC.addColorStop(0.66,"#000000");bC.addColorStop(1,"#010101");bD.fillStyle=bC;bD.fill();bD.restore();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.809352*bl,0.357142*bA,0,H,false);bB=bD.createRadialGradient(0.5*bA,0.809352*bl,0,0.5*bA,0.809352*bl,0.362244*bA);bB.addColorStop(0,"#000000");bB.addColorStop(0.88,"#000000");bB.addColorStop(0.95,"rgb(94, 94, 94)");bB.addColorStop(1,"#010101");bD.fillStyle=bB;bD.fill();bD.restore();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.809352*bl,0.357142*bA,0,H,false);bE=bD.createLinearGradient(0,0.68705*bl,0,0.917266*bl);bE.addColorStop(0,"#000000");bE.addColorStop(1,"rgba(1, 1, 1, 0)");bD.fillStyle=bE;bD.fill();bD.restore();bD.restore()};var aW=function(bC){var bD,bB;bC.save();bC.save();bC.scale(1,1);bC.beginPath();bC.arc(0.5*bA,0.809352*bl,0.32653*bA,0,H,false);bD=bC.createRadialGradient(0.5*bA,0.809352*bl,0,0.5*bA,0.809352*bl,0.32653*bA);bD.addColorStop(0,"rgb(85, 185, 123)");bD.addColorStop(1,"rgb(0, 31, 0)");bC.fillStyle=bD;bC.fill();bC.restore();bC.save();bC.beginPath();bC.moveTo(0,0.812949*bl);bC.bezierCurveTo(0,0.910071*bl,0.224489*bA,0.989208*bl,0.5*bA,0.989208*bl);bC.bezierCurveTo(0.77551*bA,0.989208*bl,bA,0.910071*bl,bA,0.809352*bl);bC.bezierCurveTo(0.908163*bA,0.751798*bl,0.704081*bA,0.68705*bl,0.5*bA,0.68705*bl);bC.bezierCurveTo(0.285714*bA,0.68705*bl,0.081632*bA,0.751798*bl,0,0.812949*bl);bC.closePath();bB=bC.createRadialGradient(0.5*bA,0.809352*bl,0,0.5*bA,0.809352*bl,0.515306*bA);bB.addColorStop(0,"rgb(65, 187, 126)");bB.addColorStop(1,"rgba(4, 37, 8, 0)");bC.fillStyle=bB;bC.fill();bC.restore();bC.restore()};var ba=function(bB){var bC,bD;bB.save();bB.save();bB.scale(1,1);bB.beginPath();bB.arc(0.5*bA,0.809352*bl,0.32653*bA,0,H,false);bC=bB.createRadialGradient(0.5*bA,0.809352*bl,0,0.5*bA,0.809352*bl,0.32653*bA);bC.addColorStop(0,"rgba(0, 255, 0, 0.25)");bC.addColorStop(1,"rgba(0, 255, 0, 0.05)");bB.fillStyle=bC;bB.fill();bB.restore();bB.save();bB.scale(1,1);bB.beginPath();bB.arc(0.5*bA,0.809352*bl,0.32653*bA,0,H,false);bD=bB.createRadialGradient(0.5*bA,0.809352*bl,0,0.5*bA,0.809352*bl,0.32653*bA);bD.addColorStop(0,"rgba(1, 1, 1, 0)");bD.addColorStop(0.55,"rgba(0, 0, 0, 0)");bD.addColorStop(0.5501,"rgba(0, 0, 0, 0)");bD.addColorStop(0.78,"rgba(0, 0, 0, 0.12)");bD.addColorStop(0.79,"rgba(0, 0, 0, 0.12)");bD.addColorStop(1,"rgba(0, 0, 0, 0.5)");bB.fillStyle=bD;bB.fill();bB.restore();bB.fillStyle=bB.createPattern(by,"repeat");bB.fill();bB.restore()};var a4=function(bD){var bC,bB,bF,bE;bD.save();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.496402*bl,0.397959*bA,0,H,false);bC=bD.createLinearGradient(0,0.356115*bl,0,0.63669*bl);bC.addColorStop(0,"#ffffff");bC.addColorStop(0.05,"rgb(204, 204, 204)");bC.addColorStop(0.1,"rgb(153, 153, 153)");bC.addColorStop(0.17,"#666666");bC.addColorStop(0.27,"#333333");bC.addColorStop(1,"#010101");bD.fillStyle=bC;bD.fill();bD.restore();bD.save();bD.scale(1.083333,1);bD.beginPath();bD.arc(0.461538*bA,0.507194*bl,0.367346*bA,0,H,false);bB=bD.createLinearGradient(0,0.377697*bl,0,0.63669*bl);bB.addColorStop(0,"#000000");bB.addColorStop(0.35,"#040404");bB.addColorStop(0.66,"#000000");bB.addColorStop(1,"#010101");bD.fillStyle=bB;bD.fill();bD.restore();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.5*bl,0.357142*bA,0,H,false);bF=bD.createRadialGradient(0.5*bA,0.5*bl,0,0.5*bA,0.5*bl,0.362244*bA);bF.addColorStop(0,"#000000");bF.addColorStop(0.88,"#000000");bF.addColorStop(0.95,"#5e5e5e");bF.addColorStop(1,"#010101");bD.fillStyle=bF;bD.fill();bD.restore();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.5*bl,0.357142*bA,0,H,false);bE=bD.createLinearGradient(0,0.377697*bl,0,0.607913*bl);bE.addColorStop(0,"#000000");bE.addColorStop(1,"rgba(1, 1, 1, 0)");bD.fillStyle=bE;bD.fill();bD.restore();bD.restore()};var br=function(bB){var bC,bD;bB.save();bB.save();bB.scale(1,1);bB.beginPath();bB.arc(0.5*bA,0.5*bl,0.32653*bA,0,H,false);bC=bB.createRadialGradient(0.5*bA,0.5*bl,0,0.5*bA,0.5*bl,0.32653*bA);bC.addColorStop(0,"#fed434");bC.addColorStop(1,"#82330c");bB.fillStyle=bC;bB.fill();bB.restore();bB.save();bB.beginPath();bB.moveTo(0,0.503597*bl);bB.bezierCurveTo(0,0.600719*bl,0.224489*bA,0.679856*bl,0.5*bA,0.679856*bl);bB.bezierCurveTo(0.77551*bA,0.679856*bl,bA,0.600719*bl,bA,0.5*bl);bB.bezierCurveTo(0.908163*bA,0.442446*bl,0.704081*bA,0.377697*bl,0.5*bA,0.377697*bl);bB.bezierCurveTo(0.285714*bA,0.377697*bl,0.081632*bA,0.442446*bl,0,0.503597*bl);bB.closePath();bD=bB.createRadialGradient(0.5*bA,0.5*bl,0,0.5*bA,0.5*bl,0.515306*bA);bD.addColorStop(0,"#fed434");bD.addColorStop(1,"rgba(130, 51, 12, 0)");bB.fillStyle=bD;bB.fill();bB.restore();bB.restore()};var a6=function(bB){var bD,bC;bB.save();bB.save();bB.scale(1,1);bB.beginPath();bB.arc(0.5*bA,0.5*bl,0.32653*bA,0,H,false);bD=bB.createRadialGradient(0.5*bA,0.5*bl,0,0.5*bA,0.5*bl,0.32653*bA);bD.addColorStop(0,"rgba(255, 255, 0, 0.25)");bD.addColorStop(1,"rgba(255, 255, 0, 0.05)");bB.fillStyle=bD;bB.fill();bB.restore();bB.save();bB.scale(1,1);bB.beginPath();bB.arc(0.5*bA,0.5*bl,0.32653*bA,0,H,false);bC=bB.createRadialGradient(0.5*bA,0.5*bl,0,0.5*bA,0.5*bl,0.32653*bA);bC.addColorStop(0,"rgba(1, 1, 1, 0)");bC.addColorStop(0.55,"rgba(0, 0, 0, 0)");bC.addColorStop(0.5501,"rgba(0, 0, 0, 0)");bC.addColorStop(0.78,"rgba(0, 0, 0, 0.12)");bC.addColorStop(0.79,"rgba(0, 0, 0, 0.13)");bC.addColorStop(1,"rgba(0, 0, 0, 0.5)");bB.fillStyle=bC;bB.fill();bB.restore();bB.fillStyle=bB.createPattern(by,"repeat");bB.fill();bB.restore()};var bd=function(bD){var bF,bC,bE,bB;bD.save();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.18705*bl,0.397959*bA,0,H,false);bF=bD.createLinearGradient((0.5*bA),(0.046762*bl),((0.5)*bA),((0.327338)*bl));bF.addColorStop(0,"#ffffff");bF.addColorStop(0.05,"#cccccc");bF.addColorStop(0.1,"#999999");bF.addColorStop(0.17,"#666666");bF.addColorStop(0.27,"#333333");bF.addColorStop(1,"#010101");bD.fillStyle=bF;bD.fill();bD.restore();bD.save();bD.scale(1.083333,1);bD.beginPath();bD.arc(0.461538*bA,0.197841*bl,0.367346*bA,0,H,false);bC=bD.createLinearGradient((0.5*bA),(0.068345*bl),((0.5)*bA),((0.327338)*bl));bC.addColorStop(0,"#000000");bC.addColorStop(0.35,"#040404");bC.addColorStop(0.66,"#000000");bC.addColorStop(1,"#010101");bD.fillStyle=bC;bD.fill();bD.restore();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.190647*bl,0.357142*bA,0,H,false);bE=bD.createRadialGradient((0.5)*bA,((0.190647)*bl),0,((0.5)*bA),((0.190647)*bl),0.362244*bA);bE.addColorStop(0,"#000000");bE.addColorStop(0.88,"#000000");bE.addColorStop(0.95,"#5e5e5e");bE.addColorStop(1,"#010101");bD.fillStyle=bE;bD.fill();bD.restore();bD.save();bD.scale(1,1);bD.beginPath();bD.arc(0.5*bA,0.190647*bl,0.357142*bA,0,H,false);bB=bD.createLinearGradient((0.5*bA),(0.068345*bl),((0.5)*bA),((0.298561)*bl));bB.addColorStop(0,"#000000");bB.addColorStop(1,"rgba(1, 1, 1, 0)");bD.fillStyle=bB;bD.fill();bD.restore();bD.restore()};var bm=function(bB){var bD,bC;bB.save();bB.save();bB.scale(1,1);bB.beginPath();bB.arc(0.5*bA,0.190647*bl,0.32653*bA,0,H,false);bD=bB.createRadialGradient(0.5*bA,0.190647*bl,0,0.5*bA,0.190647*bl,0.32653*bA);bD.addColorStop(0,"#ff0000");bD.addColorStop(1,"#410004");bB.fillStyle=bD;bB.fill();bB.restore();bB.save();bB.beginPath();bB.moveTo(0,0.194244*bl);bB.bezierCurveTo(0,0.291366*bl,0.224489*bA,0.370503*bl,0.5*bA,0.370503*bl);bB.bezierCurveTo(0.77551*bA,0.370503*bl,bA,0.291366*bl,bA,0.190647*bl);bB.bezierCurveTo(0.908163*bA,0.133093*bl,0.704081*bA,0.068345*bl,0.5*bA,0.068345*bl);bB.bezierCurveTo(0.285714*bA,0.068345*bl,0.081632*bA,0.133093*bl,0,0.194244*bl);bB.closePath();bC=bB.createRadialGradient(0.5*bA,0.190647*bl,0,0.5*bA,0.190647*bl,0.515306*bA);bC.addColorStop(0,"#ff0000");bC.addColorStop(1,"rgba(118, 5, 1, 0)");bB.fillStyle=bC;bB.fill();bB.restore();bB.restore()};var a8=function(bC){var bB,bD;bC.save();bC.save();bC.scale(1,1);bC.beginPath();bC.arc(0.5*bA,0.190647*bl,0.32653*bA,0,H,false);bB=bC.createRadialGradient(0.5*bA,0.190647*bl,0,0.5*bA,0.190647*bl,0.32653*bA);bB.addColorStop(0,"rgba(255, 0, 0, 0.25)");bB.addColorStop(1,"rgba(255, 0, 0, 0.05)");bC.fillStyle=bB;bC.fill();bC.restore();bC.save();bC.scale(1,1);bC.beginPath();bC.arc(0.5*bA,0.190647*bl,0.32653*bA,0,H,false);bD=bC.createRadialGradient(0.5*bA,0.190647*bl,0,0.5*bA,0.190647*bl,0.32653*bA);bD.addColorStop(0,"rgba(1, 1, 1, 0)");bD.addColorStop(0.55,"rgba(0, 0, 0, 0)");bD.addColorStop(0.5501,"rgba(0, 0, 0, 0)");bD.addColorStop(0.78,"rgba(0, 0, 0, 0.12)");bD.addColorStop(0.79,"rgba(0, 0, 0, 0.13)");bD.addColorStop(1,"rgba(0, 0, 0, 0.5)");bC.fillStyle=bD;bC.fill();bC.restore();bC.fillStyle=bC.createPattern(by,"repeat");bC.fill();bC.restore()};function a2(bD,bB,bE){var bC=B.createElement("canvas");bC.width=bD;bC.height=bB;bE(bC.getContext("2d"));return bC}var by=a2(2,2,function(bB){bB.save();bB.strokeStyle="rgba(0, 0, 0, 0.1)";bB.beginPath();bB.lineTo(0,0,1,0);bB.lineTo(0,1,0,1);bB.stroke();bB.restore()});var bu=function(){aZ=true;bc(bt);a3(bv);aW(be);ba(bn);a4(bs);br(bj);a6(bg);bd(aV);bm(a9);a8(bh)};this.setRedOn=function(bB){bo=!!bB;this.repaint()};this.isRedOn=function(){return bo};this.setYellowOn=function(bB){bq=!!bB;this.repaint()};this.isYellowOn=function(){return bq};this.setGreenOn=function(bB){a0=!!bB;this.repaint()};this.isGreenOn=function(){return a0};this.repaint=function(){if(!aZ){bu()}bw.save();bw.clearRect(0,0,bw.canvas.width,bw.canvas.height);bw.drawImage(aY,0,0);bw.drawImage(a5,0,0);if(a0){bw.drawImage(bz,0,0)}bw.drawImage(a1,0,0);bw.drawImage(bk,0,0);if(bq){bw.drawImage(bf,0,0)}bw.drawImage(bi,0,0);bw.drawImage(a7,0,0);if(bo){bw.drawImage(bp,0,0)}bw.drawImage(aU,0,0);bw.restore()};this.repaint();return this};var N=function(aV,aZ){aZ=aZ||{};var a3,a7=(undefined===aZ.width?0:aZ.width),a6=(undefined===aZ.height?0:aZ.height),bf=(undefined===aZ.glowColor?"#ffff00":aZ.glowColor),a5,a2,be,aX=false,aT=false,aY=1,a1=B.createElement("canvas"),a8=a1.getContext("2d"),bg=B.createElement("canvas"),bb=bg.getContext("2d"),aU=B.createElement("canvas"),ba=aU.getContext("2d");a3=document.getElementById(aV).getContext("2d");if(a7===0){a7=a3.canvas.width}if(a6===0){a6=a3.canvas.height}a3.canvas.width=a7;a3.canvas.height=a6;a5=a7<a6?a7:a6;a2=a5;be=a5;function bd(bj,bh,bk){var bi=B.createElement("canvas");bi.width=bj;bi.height=bh;bk(bi.getContext("2d"));return bi}var aW=function(bh){var bj,bi=bd(1,1,function(bk){bk.fillStyle=bh;bk.beginPath();bk.rect(0,0,1,1);bk.fill()});bj=bi.getContext("2d").getImageData(0,0,2,2).data;return[bj[0],bj[1],bj[2]]};a1.width=a2;a1.height=be;bg.width=a2;bg.height=be;aU.width=a2;aU.height=be;var bc=function(bh){var bi;bh.save();bh.clearRect(0,0,bh.canvas.width,bh.canvas.height);bh.save();bh.beginPath();bh.moveTo(0.289473*a2,0.438596*be);bh.bezierCurveTo(0.289473*a2,0.561403*be,0.385964*a2,0.605263*be,0.385964*a2,0.745614*be);bh.bezierCurveTo(0.385964*a2,0.745614*be,0.587719*a2,0.745614*be,0.587719*a2,0.745614*be);bh.bezierCurveTo(0.587719*a2,0.605263*be,0.692982*a2,0.561403*be,0.692982*a2,0.438596*be);bh.bezierCurveTo(0.692982*a2,0.324561*be,0.605263*a2,0.22807*be,0.5*a2,0.22807*be);bh.bezierCurveTo(0.385964*a2,0.22807*be,0.289473*a2,0.324561*be,0.289473*a2,0.438596*be);bh.closePath();bi=bh.createLinearGradient(0,0.289473*be,0,0.701754*be);bi.addColorStop(0,"#eeeeee");bi.addColorStop(0.99,"#999999");bi.addColorStop(1,"#999999");bh.fillStyle=bi;bh.fill();bh.lineCap="butt";bh.lineJoin="round";bh.lineWidth=0.008771*a2;bh.strokeStyle="#cccccc";bh.stroke();bh.restore();bh.restore()};var a0=function(bi){var bk,bm=aW(bf),bn=bm[0],bl=bm[1],bh=bm[2],bj=au(bn,bl,bh);bi.save();bi.clearRect(0,0,bi.canvas.width,bi.canvas.height);bi.save();bi.beginPath();bi.moveTo(0.289473*a2,0.438596*be);bi.bezierCurveTo(0.289473*a2,0.561403*be,0.385964*a2,0.605263*be,0.385964*a2,0.745614*be);bi.bezierCurveTo(0.385964*a2,0.745614*be,0.587719*a2,0.745614*be,0.587719*a2,0.745614*be);bi.bezierCurveTo(0.587719*a2,0.605263*be,0.692982*a2,0.561403*be,0.692982*a2,0.438596*be);bi.bezierCurveTo(0.692982*a2,0.324561*be,0.605263*a2,0.22807*be,0.5*a2,0.22807*be);bi.bezierCurveTo(0.385964*a2,0.22807*be,0.289473*a2,0.324561*be,0.289473*a2,0.438596*be);bi.closePath();bk=bi.createLinearGradient(0,0.289473*be,0,0.701754*be);if(bn===bl&&bl===bh){bk.addColorStop(0,"hsl(0, 60%, 0%)");bk.addColorStop(1,"hsl(0, 40%, 0%)")}else{bk.addColorStop(0,"hsl("+bj[0]*255+", "+bj[1]*100+"%, 70%)");bk.addColorStop(1,"hsl("+bj[0]*255+", "+bj[1]*100+"%, 80%)")}bi.fillStyle=bk;bi.shadowOffsetX=0;bi.shadowOffsetY=0;bi.shadowBlur=30;bi.shadowColor=bf;bi.fill();bi.lineCap="butt";bi.lineJoin="round";bi.lineWidth=0.008771*a2;bi.strokeStyle="rgba("+bn+", "+bl+", "+bh+", 0.4)";bi.stroke();bi.restore();bi.restore()};var aS=function(bi){var bk,bl,bj,bh;bi.save();bi.clearRect(0,0,bi.canvas.width,bi.canvas.height);bi.save();bi.beginPath();bi.moveTo(0.350877*a2,0.333333*be);bi.bezierCurveTo(0.350877*a2,0.280701*be,0.41228*a2,0.236842*be,0.5*a2,0.236842*be);bi.bezierCurveTo(0.578947*a2,0.236842*be,0.64035*a2,0.280701*be,0.64035*a2,0.333333*be);bi.bezierCurveTo(0.64035*a2,0.385964*be,0.578947*a2,0.429824*be,0.5*a2,0.429824*be);bi.bezierCurveTo(0.41228*a2,0.429824*be,0.350877*a2,0.385964*be,0.350877*a2,0.333333*be);bi.closePath();bk=bi.createLinearGradient(0,0.245614*be,0,0.429824*be);bk.addColorStop(0,"#ffffff");bk.addColorStop(0.99,"rgba(255, 255, 255, 0)");bk.addColorStop(1,"rgba(255, 255, 255, 0)");bi.fillStyle=bk;bi.fill();bi.restore();bi.save();bi.beginPath();bi.moveTo(0.377192*a2,0.745614*be);bi.bezierCurveTo(0.377192*a2,0.745614*be,0.429824*a2,0.72807*be,0.491228*a2,0.72807*be);bi.bezierCurveTo(0.561403*a2,0.72807*be,0.605263*a2,0.736842*be,0.605263*a2,0.736842*be);bi.lineTo(0.605263*a2,0.763157*be);bi.lineTo(0.596491*a2,0.780701*be);bi.lineTo(0.605263*a2,0.798245*be);bi.lineTo(0.596491*a2,0.815789*be);bi.lineTo(0.605263*a2,0.833333*be);bi.lineTo(0.596491*a2,0.850877*be);bi.lineTo(0.605263*a2,0.868421*be);bi.lineTo(0.596491*a2,0.885964*be);bi.lineTo(0.605263*a2,0.894736*be);bi.bezierCurveTo(0.605263*a2,0.894736*be,0.570175*a2,0.95614*be,0.535087*a2,0.991228*be);bi.bezierCurveTo(0.526315*a2,0.991228*be,0.517543*a2,be,0.5*a2,be);bi.bezierCurveTo(0.482456*a2,be,0.473684*a2,be,0.464912*a2,0.991228*be);bi.bezierCurveTo(0.421052*a2,0.947368*be,0.394736*a2,0.903508*be,0.394736*a2,0.903508*be);bi.lineTo(0.394736*a2,0.894736*be);bi.lineTo(0.385964*a2,0.885964*be);bi.lineTo(0.394736*a2,0.868421*be);bi.lineTo(0.385964*a2,0.850877*be);bi.lineTo(0.394736*a2,0.833333*be);bi.lineTo(0.385964*a2,0.815789*be);bi.lineTo(0.394736*a2,0.798245*be);bi.lineTo(0.377192*a2,0.789473*be);bi.lineTo(0.394736*a2,0.771929*be);bi.lineTo(0.377192*a2,0.763157*be);bi.lineTo(0.377192*a2,0.745614*be);bi.closePath();bl=bi.createLinearGradient(0.473684*a2,0.72807*be,0.484702*a2,0.938307*be);bl.addColorStop(0,"#333333");bl.addColorStop(0.04,"#d9dad6");bl.addColorStop(0.19,"#e4e5e0");bl.addColorStop(0.24,"#979996");bl.addColorStop(0.31,"#fbffff");bl.addColorStop(0.4,"#818584");bl.addColorStop(0.48,"#f5f7f4");bl.addColorStop(0.56,"#959794");bl.addColorStop(0.64,"#f2f2f0");bl.addColorStop(0.7,"#828783");bl.addColorStop(0.78,"#fcfcfc");bl.addColorStop(1,"#666666");bi.fillStyle=bl;bi.fill();bi.restore();bi.save();bi.beginPath();bi.moveTo(0.377192*a2,0.745614*be);bi.bezierCurveTo(0.377192*a2,0.745614*be,0.429824*a2,0.72807*be,0.491228*a2,0.72807*be);bi.bezierCurveTo(0.561403*a2,0.72807*be,0.605263*a2,0.736842*be,0.605263*a2,0.736842*be);bi.lineTo(0.605263*a2,0.763157*be);bi.lineTo(0.596491*a2,0.780701*be);bi.lineTo(0.605263*a2,0.798245*be);bi.lineTo(0.596491*a2,0.815789*be);bi.lineTo(0.605263*a2,0.833333*be);bi.lineTo(0.596491*a2,0.850877*be);bi.lineTo(0.605263*a2,0.868421*be);bi.lineTo(0.596491*a2,0.885964*be);bi.lineTo(0.605263*a2,0.894736*be);bi.bezierCurveTo(0.605263*a2,0.894736*be,0.570175*a2,0.95614*be,0.535087*a2,0.991228*be);bi.bezierCurveTo(0.526315*a2,0.991228*be,0.517543*a2,be,0.5*a2,be);bi.bezierCurveTo(0.482456*a2,be,0.473684*a2,be,0.464912*a2,0.991228*be);bi.bezierCurveTo(0.421052*a2,0.947368*be,0.394736*a2,0.903508*be,0.394736*a2,0.903508*be);bi.lineTo(0.394736*a2,0.894736*be);bi.lineTo(0.385964*a2,0.885964*be);bi.lineTo(0.394736*a2,0.868421*be);bi.lineTo(0.385964*a2,0.850877*be);bi.lineTo(0.394736*a2,0.833333*be);bi.lineTo(0.385964*a2,0.815789*be);bi.lineTo(0.394736*a2,0.798245*be);bi.lineTo(0.377192*a2,0.789473*be);bi.lineTo(0.394736*a2,0.771929*be);bi.lineTo(0.377192*a2,0.763157*be);bi.lineTo(0.377192*a2,0.745614*be);bi.closePath();bj=bi.createLinearGradient(0.377192*a2,0.789473*be,0.605263*a2,0.789473*be);bj.addColorStop(0,"rgba(0, 0, 0, 0.4)");bj.addColorStop(0.15,"rgba(0, 0, 0, 0.32)");bj.addColorStop(0.85,"rgba(0, 0, 0, 0.33)");bj.addColorStop(1,"rgba(0, 0, 0, 0.4)");bi.fillStyle=bj;bi.fill();bi.restore();bi.save();bi.beginPath();bi.moveTo(0.421052*a2,0.947368*be);bi.bezierCurveTo(0.438596*a2,0.95614*be,0.447368*a2,0.973684*be,0.464912*a2,0.991228*be);bi.bezierCurveTo(0.473684*a2,be,0.482456*a2,be,0.5*a2,be);bi.bezierCurveTo(0.517543*a2,be,0.526315*a2,0.991228*be,0.535087*a2,0.991228*be);bi.bezierCurveTo(0.543859*a2,0.982456*be,0.561403*a2,0.95614*be,0.578947*a2,0.947368*be);bi.bezierCurveTo(0.552631*a2,0.938596*be,0.526315*a2,0.938596*be,0.5*a2,0.938596*be);bi.bezierCurveTo(0.473684*a2,0.938596*be,0.447368*a2,0.938596*be,0.421052*a2,0.947368*be);bi.closePath();bh=bi.createLinearGradient(0,0.938596*be,0,be);bh.addColorStop(0,"#050a06");bh.addColorStop(0.61,"#070602");bh.addColorStop(0.71,"#999288");bh.addColorStop(0.83,"#010101");bh.addColorStop(1,"#000000");bi.fillStyle=bh;bi.fill();bi.restore();bi.restore()};var a4=function(bh){bh.save();bh.setTransform(1,0,0,1,0,0);bh.clearRect(0,0,bh.canvas.width,bh.canvas.height);bh.restore()};var a9=function(){aX=true;bc(a8);a0(bb);aS(ba)};this.setOn=function(bh){aT=!!bh;this.repaint();return this};this.isOn=function(){return aT};this.setAlpha=function(bh){aY=bh;this.repaint();return this};this.getAlpha=function(){return aY};this.setGlowColor=function(bh){bf=bh;a9();this.repaint();return this};this.getGlowColor=function(){return bf};this.repaint=function(){if(!aX){a9()}a4(a3);a3.save();a3.drawImage(a1,0,0);a3.globalAlpha=aY;if(aT){a3.drawImage(bg,0,0)}a3.globalAlpha=1;a3.drawImage(aU,0,0);a3.restore()};this.repaint();return this};var aD=function(aX,a6){a6=a6||{};var bc=(undefined===a6._context?null:a6._context),bd=(undefined===a6.height?0:a6.height),a9=(undefined===a6.digits?6:a6.digits),bq=(undefined===a6.decimals?1:a6.decimals),a4=(undefined===a6.decimalBackColor?"#F0F0F0":a6.decimalBackColor),a8=(undefined===a6.decimalForeColor?"#F01010":a6.decimalForeColor),bb=(undefined===a6.font?"sans-serif":a6.font),bh=(undefined===a6.value?0:a6.value),aS=(undefined===a6.valueBackColor?"#050505":a6.valueBackColor),a3=(undefined===a6.valueForeColor?"#F8F8F8":a6.valueForeColor),bm=(undefined===a6.wobbleFactor?0.07:a6.wobbleFactor),a0=false,aZ,bi,a2=false,bk,aY,a5,bf,be,aT,bo,ba=[],aU,bp,bg,aW,bn,aV,a1,bj;if(bc){bi=bc}else{bi=r(aX)}if(bd===0){bd=bi.canvas.height}if(bh<0){bh=0}bk=Math.floor(bd*0.85);a5="600 "+bk+"px "+bb;aY=Math.floor(bd*0.68);bf=aY*(a9+bq);be=bk*11;aT=be/12;bo=aT*0.81;bi.canvas.width=bf;bi.canvas.height=bd;aU=J(bf,bd);bp=aU.getContext("2d");bg=J(bf,bd);aW=bg.getContext("2d");bn=J(aY,be*1.1);aV=bn.getContext("2d");a1=J(aY,be*1.1);bj=a1.getContext("2d");function bl(){var bs,br;a0=true;aW.rect(0,0,bf,bd);bs=aW.createLinearGradient(0,0,0,bd);bs.addColorStop(0,"rgba(0, 0, 0, 1)");bs.addColorStop(0.1,"rgba(0, 0, 0, 0.4)");bs.addColorStop(0.33,"rgba(255, 255, 255, 0.45)");bs.addColorStop(0.46,"rgba(255, 255, 255, 0)");bs.addColorStop(0.9,"rgba(0, 0, 0, 0.4)");bs.addColorStop(1,"rgba(0, 0, 0, 1)");aW.fillStyle=bs;aW.fill();aV.rect(0,0,aY,be*1.1);aV.fillStyle=aS;aV.fill();aV.strokeStyle="#f0f0f0";aV.lineWidth="1px";aV.moveTo(0,0);aV.lineTo(0,be*1.1);aV.stroke();aV.strokeStyle="#202020";aV.moveTo(aY,0);aV.lineTo(aY,be*1.1);aV.stroke();aV.textAlign="center";aV.textBaseline="middle";aV.font=a5;aV.fillStyle=a3;for(br=9;br<21;br++){aV.fillText(br%10,aY*0.5,aT*(br-9)+aT/2)}if(bq>0){bj.rect(0,0,aY,be*1.1);bj.fillStyle=a4;bj.fill();bj.strokeStyle="#f0f0f0";bj.lineWidth="1px";bj.moveTo(0,0);bj.lineTo(0,be*1.1);bj.stroke();bj.strokeStyle="#202020";bj.moveTo(aY,0);bj.lineTo(aY,be*1.1);bj.stroke();bj.textAlign="center";bj.textBaseline="middle";bj.font=a5;bj.fillStyle=a8;for(br=9;br<21;br++){bj.fillText(br%10,aY*0.5,aT*(br-9)+aT/2)}}for(br=0;br<(a9+bq);br++){ba[br]=Math.random()*bm*bd-bm*bd/2}}function a7(){var bx=1,bw=bh,bv,bt,bs,br,bu;for(bv=0;bv<bq;bv++){bw*=10}bs=Math.floor(bw);br=bw-bs;bs=String(bs);bu=9;for(bv=0;bv<bq+a9;bv++){bt=+bs.substring(bs.length-bv-1,bs.length-bv)||0;if(bu!==9){br=0}if(bv<bq){bp.drawImage(a1,bf-aY*bx,-(aT*(bt+br)+bo+ba[bv]))}else{bp.drawImage(bn,bf-aY*bx,-(aT*(bt+br)+bo+ba[bv]))}bx++;bu=bt}}this.setValueAnimated=function(br,bt){var bs=this;br=parseFloat(br);if(br<0){br=0}if(bh!==br){if(undefined!==aZ&&aZ.isPlaying){aZ.stop()}aZ=new Tween({},"",Tween.strongEaseOut,bh,br,2);aZ.onMotionChanged=function(bu){bh=bu.target._pos;if(!a2){a2=true;ad(bs.repaint)}};if(bt&&typeof(bt)==="function"){aZ.onMotionFinished=bt}aZ.start()}this.repaint();return this};this.setValue=function(br){bh=parseFloat(br);if(bh<0){bh=0}this.repaint();return this};this.getValue=function(){return bh};this.repaint=function(){if(!a0){bl()}a7();bp.drawImage(bg,0,0);bi.drawImage(aU,0,0);a2=false};this.repaint()};var e=function(a1,aT,aS,aX,aV,aZ){var a0=true,aU,aY,aW=aZ.symbolColor.getRgbaColor();a1.save();a1.lineWidth=1;a1.fillStyle=aW;a1.strokeStyle=aW;a1.translate(aT,aS);for(aU=0;aU<360;aU+=15){a0=!a0;a1.beginPath();a1.arc(0,0,aX*0.26,aU*l,(aU+15)*l,false);a1.arc(0,0,aX*0.23,(aU+15)*l,aU*l,true);a1.closePath();if(a0){a1.fill()}a1.stroke()}a1.translate(-aT,-aS);for(aU=0;360>=aU;aU+=90){a1.beginPath();a1.moveTo(aX*0.560747,aV*0.584112);a1.lineTo(aX*0.640186,aV*0.644859);a1.lineTo(aX*0.584112,aV*0.560747);a1.lineTo(aX*0.560747,aV*0.584112);a1.closePath();a1.fillStyle=aW;a1.fill();a1.stroke();a1.beginPath();a1.moveTo(aX*0.523364,aV*0.397196);a1.lineTo(aX*0.5,aV*0.196261);a1.lineTo(aX*0.471962,aV*0.397196);a1.lineTo(aX*0.523364,aV*0.397196);a1.closePath();aY=a1.createLinearGradient(0.476635*aX,0,0.518691*aX,0);aY.addColorStop(0,"rgb(222, 223, 218)");aY.addColorStop(0.48,"rgb(222, 223, 218)");aY.addColorStop(0.49,aW);aY.addColorStop(1,aW);a1.fillStyle=aY;a1.fill();a1.stroke();a1.translate(aT,aS);a1.rotate(aU*l);a1.translate(-aT,-aS)}a1.beginPath();a1.translate(aT,aS);a1.arc(0,0,aX*0.1,0,H,false);a1.lineWidth=aX*0.022;a1.stroke();a1.translate(-aT,-aS);a1.restore()};var E=function(aZ,a1,aS,aY,a0){var aX,aT,aW,aU,aV=a1.toString()+aS.type+aY.light.getHexColor()+aY.medium.getHexColor();if(!E.cache[aV]){aX=J(a1,a1);aT=aX.getContext("2d");switch(aS.type){case"type2":aW=aT.createLinearGradient(0,a1*0.471962,0,a1*0.130841);aW.addColorStop(0,a0.getRgbaColor());aW.addColorStop(0.36,a0.getRgbaColor());aW.addColorStop(0.361,aY.light.getRgbaColor());aW.addColorStop(1,aY.light.getRgbaColor());aT.fillStyle=aW;aT.beginPath();aT.moveTo(a1*0.518691,a1*0.471962);aT.lineTo(a1*0.509345,a1*0.462616);aT.lineTo(a1*0.509345,a1*0.341121);aT.lineTo(a1*0.504672,a1*0.130841);aT.lineTo(a1*0.495327,a1*0.130841);aT.lineTo(a1*0.490654,a1*0.341121);aT.lineTo(a1*0.490654,a1*0.462616);aT.lineTo(a1*0.481308,a1*0.471962);aT.closePath();aT.fill();break;case"type3":aT.beginPath();aT.rect(a1*0.495327,a1*0.130841,a1*0.009345,a1*0.373831);aT.closePath();aT.fillStyle=aY.light.getRgbaColor();aT.fill();break;case"type4":aW=aT.createLinearGradient(0.467289*a1,0,0.528036*a1,0);aW.addColorStop(0,aY.dark.getRgbaColor());aW.addColorStop(0.51,aY.dark.getRgbaColor());aW.addColorStop(0.52,aY.light.getRgbaColor());aW.addColorStop(1,aY.light.getRgbaColor());aT.fillStyle=aW;aT.beginPath();aT.moveTo(a1*0.5,a1*0.126168);aT.lineTo(a1*0.514018,a1*0.135514);aT.lineTo(a1*0.53271,a1*0.5);aT.lineTo(a1*0.523364,a1*0.602803);aT.lineTo(a1*0.476635,a1*0.602803);aT.lineTo(a1*0.467289,a1*0.5);aT.lineTo(a1*0.485981,a1*0.135514);aT.lineTo(a1*0.5,a1*0.126168);aT.closePath();aT.fill();break;case"type5":aW=aT.createLinearGradient(0.471962*a1,0,0.528036*a1,0);aW.addColorStop(0,aY.light.getRgbaColor());aW.addColorStop(0.5,aY.light.getRgbaColor());aW.addColorStop(0.5,aY.medium.getRgbaColor());aW.addColorStop(1,aY.medium.getRgbaColor());aT.fillStyle=aW;aT.beginPath();aT.moveTo(a1*0.5,a1*0.495327);aT.lineTo(a1*0.528037,a1*0.495327);aT.lineTo(a1*0.5,a1*0.149532);aT.lineTo(a1*0.471962,a1*0.495327);aT.lineTo(a1*0.5,a1*0.495327);aT.closePath();aT.fill();aT.lineWidth=1;aT.lineCap="square";aT.lineJoin="miter";aT.strokeStyle=aY.dark.getRgbaColor();aT.stroke();break;case"type6":aT.fillStyle=aY.medium.getRgbaColor();aT.beginPath();aT.moveTo(a1*0.481308,a1*0.485981);aT.lineTo(a1*0.481308,a1*0.392523);aT.lineTo(a1*0.485981,a1*0.317757);aT.lineTo(a1*0.495327,a1*0.130841);aT.lineTo(a1*0.504672,a1*0.130841);aT.lineTo(a1*0.514018,a1*0.317757);aT.lineTo(a1*0.518691,a1*0.38785);aT.lineTo(a1*0.518691,a1*0.485981);aT.lineTo(a1*0.504672,a1*0.485981);aT.lineTo(a1*0.504672,a1*0.38785);aT.lineTo(a1*0.5,a1*0.317757);aT.lineTo(a1*0.495327,a1*0.392523);aT.lineTo(a1*0.495327,a1*0.485981);aT.lineTo(a1*0.481308,a1*0.485981);aT.closePath();aT.fill();break;case"type7":aW=aT.createLinearGradient(0.481308*a1,0,0.518691*a1,0);aW.addColorStop(0,aY.dark.getRgbaColor());aW.addColorStop(1,aY.medium.getRgbaColor());aT.fillStyle=aW;aT.beginPath();aT.moveTo(a1*0.490654,a1*0.130841);aT.lineTo(a1*0.481308,a1*0.5);aT.lineTo(a1*0.518691,a1*0.5);aT.lineTo(a1*0.504672,a1*0.130841);aT.lineTo(a1*0.490654,a1*0.130841);aT.closePath();aT.fill();break;case"type8":aW=aT.createLinearGradient(0.471962*a1,0,0.528036*a1,0);aW.addColorStop(0,aY.light.getRgbaColor());aW.addColorStop(0.5,aY.light.getRgbaColor());aW.addColorStop(0.5,aY.medium.getRgbaColor());aW.addColorStop(1,aY.medium.getRgbaColor());aT.fillStyle=aW;aT.strokeStyle=aY.dark.getRgbaColor();aT.beginPath();aT.moveTo(a1*0.5,a1*0.53271);aT.lineTo(a1*0.53271,a1*0.5);aT.bezierCurveTo(a1*0.53271,a1*0.5,a1*0.509345,a1*0.457943,a1*0.5,a1*0.149532);aT.bezierCurveTo(a1*0.490654,a1*0.457943,a1*0.467289,a1*0.5,a1*0.467289,a1*0.5);aT.lineTo(a1*0.5,a1*0.53271);aT.closePath();aT.fill();aT.stroke();break;case"type9":aW=aT.createLinearGradient(0.471962*a1,0,0.528036*a1,0);aW.addColorStop(0,"rgb(50, 50, 50)");aW.addColorStop(0.5,"#666666");aW.addColorStop(1,"rgb(50, 50, 50)");aT.fillStyle=aW;aT.strokeStyle="#2E2E2E";aT.beginPath();aT.moveTo(a1*0.495327,a1*0.233644);aT.lineTo(a1*0.504672,a1*0.233644);aT.lineTo(a1*0.514018,a1*0.439252);aT.lineTo(a1*0.485981,a1*0.439252);aT.lineTo(a1*0.495327,a1*0.233644);aT.closePath();aT.moveTo(a1*0.490654,a1*0.130841);aT.lineTo(a1*0.471962,a1*0.471962);aT.lineTo(a1*0.471962,a1*0.528037);aT.bezierCurveTo(a1*0.471962,a1*0.528037,a1*0.476635,a1*0.602803,a1*0.476635,a1*0.602803);aT.bezierCurveTo(a1*0.476635,a1*0.607476,a1*0.481308,a1*0.607476,a1*0.5,a1*0.607476);aT.bezierCurveTo(a1*0.518691,a1*0.607476,a1*0.523364,a1*0.607476,a1*0.523364,a1*0.602803);aT.bezierCurveTo(a1*0.523364,a1*0.602803,a1*0.528037,a1*0.528037,a1*0.528037,a1*0.528037);aT.lineTo(a1*0.528037,a1*0.471962);aT.lineTo(a1*0.509345,a1*0.130841);aT.lineTo(a1*0.490654,a1*0.130841);aT.closePath();aT.fill();aT.beginPath();aT.moveTo(a1*0.495327,a1*0.219626);aT.lineTo(a1*0.504672,a1*0.219626);aT.lineTo(a1*0.504672,a1*0.135514);aT.lineTo(a1*0.495327,a1*0.135514);aT.lineTo(a1*0.495327,a1*0.219626);aT.closePath();aT.fillStyle=aY.medium.getRgbaColor();aT.fill();break;case"type10":aT.beginPath();aT.moveTo(a1*0.5,a1*0.149532);aT.bezierCurveTo(a1*0.5,a1*0.149532,a1*0.443925,a1*0.490654,a1*0.443925,a1*0.5);aT.bezierCurveTo(a1*0.443925,a1*0.53271,a1*0.467289,a1*0.556074,a1*0.5,a1*0.556074);aT.bezierCurveTo(a1*0.53271,a1*0.556074,a1*0.556074,a1*0.53271,a1*0.556074,a1*0.5);aT.bezierCurveTo(a1*0.556074,a1*0.490654,a1*0.5,a1*0.149532,a1*0.5,a1*0.149532);aT.closePath();aW=aT.createLinearGradient(0.471962*a1,0,0.528036*a1,0);aW.addColorStop(0,aY.light.getRgbaColor());aW.addColorStop(0.5,aY.light.getRgbaColor());aW.addColorStop(0.5,aY.medium.getRgbaColor());aW.addColorStop(1,aY.medium.getRgbaColor());aT.fillStyle=aW;aT.strokeStyle=aY.medium.getRgbaColor();aT.lineWidth=1;aT.lineCap="square";aT.lineJoin="miter";aT.fill();aT.stroke();break;case"type11":aT.beginPath();aT.moveTo(0.5*a1,0.168224*a1);aT.lineTo(0.485981*a1,0.5*a1);aT.bezierCurveTo(0.485981*a1,0.5*a1,0.481308*a1,0.584112*a1,0.5*a1,0.584112*a1);aT.bezierCurveTo(0.514018*a1,0.584112*a1,0.509345*a1,0.5*a1,0.509345*a1,0.5*a1);aT.lineTo(0.5*a1,0.168224*a1);aT.closePath();aW=aT.createLinearGradient(0,0.168224*a1,0,0.584112*a1);aW.addColorStop(0,aY.medium.getRgbaColor());aW.addColorStop(1,aY.dark.getRgbaColor());aT.fillStyle=aW;aT.strokeStyle=aY.dark.getRgbaColor();aT.fill();aT.stroke();break;case"type12":aT.beginPath();aT.moveTo(0.5*a1,0.168224*a1);aT.lineTo(0.485981*a1,0.5*a1);aT.lineTo(0.5*a1,0.504672*a1);aT.lineTo(0.509345*a1,0.5*a1);aT.lineTo(0.5*a1,0.168224*a1);aT.closePath();aW=aT.createLinearGradient(0,0.168224*a1,0,0.504672*a1);aW.addColorStop(0,aY.medium.getRgbaColor());aW.addColorStop(1,aY.dark.getRgbaColor());aT.fillStyle=aW;aT.strokeStyle=aY.dark.getRgbaColor();aT.fill();aT.stroke();break;case"type13":case"type14":aT.beginPath();aT.moveTo(0.485981*a1,0.168224*a1);aT.lineTo(0.5*a1,0.130841*a1);aT.lineTo(0.509345*a1,0.168224*a1);aT.lineTo(0.509345*a1,0.509345*a1);aT.lineTo(0.485981*a1,0.509345*a1);aT.lineTo(0.485981*a1,0.168224*a1);aT.closePath();if(aS.type==="type13"){aW=aT.createLinearGradient(0,0.5*a1,0,0.130841*a1);aW.addColorStop(0,a0.getRgbaColor());aW.addColorStop(0.85,a0.getRgbaColor());aW.addColorStop(0.85,aY.medium.getRgbaColor());aW.addColorStop(1,aY.medium.getRgbaColor());aT.fillStyle=aW}else{aW=aT.createLinearGradient(0.485981*a1,0,0.509345*a1,0);aW.addColorStop(0,aY.veryDark.getRgbaColor());aW.addColorStop(0.5,aY.light.getRgbaColor());aW.addColorStop(1,aY.veryDark.getRgbaColor());aT.fillStyle=aW}aT.fill();break;case"type15":case"type16":aT.beginPath();aT.moveTo(a1*0.509345,a1*0.457943);aT.lineTo(a1*0.5015,a1*0.13);aT.lineTo(a1*0.4985,a1*0.13);aT.lineTo(a1*0.490654,a1*0.457943);aT.bezierCurveTo(a1*0.490654,a1*0.457943,a1*0.490654,a1*0.457943,a1*0.490654,a1*0.457943);aT.bezierCurveTo(a1*0.471962,a1*0.462616,a1*0.457943,a1*0.481308,a1*0.457943,a1*0.5);aT.bezierCurveTo(a1*0.457943,a1*0.518691,a1*0.471962,a1*0.537383,a1*0.490654,a1*0.542056);aT.bezierCurveTo(a1*0.490654,a1*0.542056,a1*0.490654,a1*0.542056,a1*0.490654,a1*0.542056);if(aS.type==="type15"){aT.lineTo(a1*0.490654,a1*0.57);aT.bezierCurveTo(a1*0.46,a1*0.58,a1*0.46,a1*0.62,a1*0.490654,a1*0.63);aT.bezierCurveTo(a1*0.47,a1*0.62,a1*0.48,a1*0.59,a1*0.5,a1*0.59);aT.bezierCurveTo(a1*0.53,a1*0.59,a1*0.52,a1*0.62,a1*0.509345,a1*0.63);aT.bezierCurveTo(a1*0.54,a1*0.62,a1*0.54,a1*0.58,a1*0.509345,a1*0.57);aT.lineTo(a1*0.509345,a1*0.57)}else{aT.lineTo(a1*0.490654,a1*0.621495);aT.lineTo(a1*0.509345,a1*0.621495)}aT.lineTo(a1*0.509345,a1*0.542056);aT.bezierCurveTo(a1*0.509345,a1*0.542056,a1*0.509345,a1*0.542056,a1*0.509345,a1*0.542056);aT.bezierCurveTo(a1*0.528037,a1*0.537383,a1*0.542056,a1*0.518691,a1*0.542056,a1*0.5);aT.bezierCurveTo(a1*0.542056,a1*0.481308,a1*0.528037,a1*0.462616,a1*0.509345,a1*0.457943);aT.bezierCurveTo(a1*0.509345,a1*0.457943,a1*0.509345,a1*0.457943,a1*0.509345,a1*0.457943);aT.closePath();if(aS.type==="type15"){aW=aT.createLinearGradient(0,0,0,a1*0.63)}else{aW=aT.createLinearGradient(0,0,0,a1*0.621495)}aW.addColorStop(0,aY.medium.getRgbaColor());aW.addColorStop(0.388888,aY.medium.getRgbaColor());aW.addColorStop(0.5,aY.light.getRgbaColor());aW.addColorStop(0.611111,aY.medium.getRgbaColor());aW.addColorStop(1,aY.medium.getRgbaColor());aT.fillStyle=aW;aT.strokeStyle=aY.dark.getRgbaColor();aT.fill();aT.stroke();aT.beginPath();aU=a1*0.06542/2;aT.arc(a1*0.5,a1*0.5,aU,0,H);aW=aT.createLinearGradient(a1*0.5-aU,a1*0.5+aU,0,a1*0.5+aU);aW.addColorStop(0,"#e6b35c");aW.addColorStop(0.01,"#e6b35c");aW.addColorStop(0.99,"#c48200");aW.addColorStop(1,"#c48200");aT.fillStyle=aW;aT.closePath();aT.fill();aT.beginPath();aU=a1*0.046728/2;aT.arc(a1*0.5,a1*0.5,aU,0,H);aW=aT.createRadialGradient(a1*0.5,a1*0.5,0,a1*0.5,a1*0.5,aU);aW.addColorStop(0,"#c5c5c5");aW.addColorStop(0.19,"#c5c5c5");aW.addColorStop(0.22,"#000000");aW.addColorStop(0.8,"#000000");aW.addColorStop(0.99,"#707070");aW.addColorStop(1,"#707070");aT.fillStyle=aW;aT.closePath();aT.fill();break;case"type17":aT.beginPath();aT.closePath();aW=aT.createLinearGradient(0,0.168224*a1,0,0.504672*a1);aW.addColorStop(0,aY.medium.getRgbaColor());aW.addColorStop(1,aY.dark.getRgbaColor());aT.fillStyle=aW;aT.strokeStyle=aY.dark.getRgbaColor();aT.fill();aT.stroke();break;case"type1":default:aW=aT.createLinearGradient(0,a1*0.471962,0,a1*0.130841);aW.addColorStop(0,aY.veryDark.getRgbaColor());aW.addColorStop(0.3,aY.medium.getRgbaColor());aW.addColorStop(0.59,aY.medium.getRgbaColor());aW.addColorStop(1,aY.veryDark.getRgbaColor());aT.fillStyle=aW;aT.beginPath();aT.moveTo(a1*0.518691,a1*0.471962);aT.bezierCurveTo(a1*0.514018,a1*0.457943,a1*0.509345,a1*0.415887,a1*0.509345,a1*0.401869);aT.bezierCurveTo(a1*0.504672,a1*0.383177,a1*0.5,a1*0.130841,a1*0.5,a1*0.130841);aT.bezierCurveTo(a1*0.5,a1*0.130841,a1*0.490654,a1*0.383177,a1*0.490654,a1*0.397196);aT.bezierCurveTo(a1*0.490654,a1*0.415887,a1*0.485981,a1*0.457943,a1*0.481308,a1*0.471962);aT.bezierCurveTo(a1*0.471962,a1*0.481308,a1*0.467289,a1*0.490654,a1*0.467289,a1*0.5);aT.bezierCurveTo(a1*0.467289,a1*0.518691,a1*0.481308,a1*0.53271,a1*0.5,a1*0.53271);aT.bezierCurveTo(a1*0.518691,a1*0.53271,a1*0.53271,a1*0.518691,a1*0.53271,a1*0.5);aT.bezierCurveTo(a1*0.53271,a1*0.490654,a1*0.528037,a1*0.481308,a1*0.518691,a1*0.471962);aT.closePath();aT.fill();break}E.cache[aV]=aX}aZ.drawImage(E.cache[aV],0,0);return this};E.cache={};var d=function(a5,aZ,aX,aW,a3,a0){var aV,a2,a4,aT,aY,aU,aS,a1=a3.toString()+a0+aZ.design;if(!d.cache[a1]){aV=J(a3,a0);a2=aV.getContext("2d");a2.fillStyle="#848484";a2.strokeStyle="rgba(132, 132, 132, 0.5)";a2.beginPath();a2.arc(aX,aW,a3/2,0,H,true);a2.closePath();a2.fill();a2.stroke();a2.beginPath();a2.arc(aX,aW,a3*0.990654/2,0,H,true);a2.closePath();switch(aZ.design){case"metal":a4=a2.createLinearGradient(0,a3*0.004672,0,a0*0.990654);a4.addColorStop(0,"#fefefe");a4.addColorStop(0.07,"rgb(210, 210, 210)");a4.addColorStop(0.12,"rgb(179, 179, 179)");a4.addColorStop(1,"rgb(213, 213, 213)");a2.fillStyle=a4;a2.fill();break;case"brass":a4=a2.createLinearGradient(0,a3*0.004672,0,a0*0.990654);a4.addColorStop(0,"rgb(249, 243, 155)");a4.addColorStop(0.05,"rgb(246, 226, 101)");a4.addColorStop(0.1,"rgb(240, 225, 132)");a4.addColorStop(0.5,"rgb(90, 57, 22)");a4.addColorStop(0.9,"rgb(249, 237, 139)");a4.addColorStop(0.95,"rgb(243, 226, 108)");a4.addColorStop(1,"rgb(202, 182, 113)");a2.fillStyle=a4;a2.fill();break;case"steel":a4=a2.createLinearGradient(0,a3*0.004672,0,a0*0.990654);a4.addColorStop(0,"rgb(231, 237, 237)");a4.addColorStop(0.05,"rgb(189, 199, 198)");a4.addColorStop(0.1,"rgb(192, 201, 200)");a4.addColorStop(0.5,"rgb(23, 31, 33)");a4.addColorStop(0.9,"rgb(196, 205, 204)");a4.addColorStop(0.95,"rgb(194, 204, 203)");a4.addColorStop(1,"rgb(189, 201, 199)");a2.fillStyle=a4;a2.fill();break;case"gold":a4=a2.createLinearGradient(0,a3*0.004672,0,a0*0.990654);a4.addColorStop(0,"rgb(255, 255, 207)");a4.addColorStop(0.15,"rgb(255, 237, 96)");a4.addColorStop(0.22,"rgb(254, 199, 57)");a4.addColorStop(0.3,"rgb(255, 249, 203)");a4.addColorStop(0.38,"rgb(255, 199, 64)");a4.addColorStop(0.44,"rgb(252, 194, 60)");a4.addColorStop(0.51,"rgb(255, 204, 59)");a4.addColorStop(0.6,"rgb(213, 134, 29)");a4.addColorStop(0.68,"rgb(255, 201, 56)");a4.addColorStop(0.75,"rgb(212, 135, 29)");a4.addColorStop(1,"rgb(247, 238, 101)");a2.fillStyle=a4;a2.fill();break;case"anthracite":a4=a2.createLinearGradient(0,0.004672*a0,0,0.995326*a0);a4.addColorStop(0,"rgb(118, 117, 135)");a4.addColorStop(0.06,"rgb(74, 74, 82)");a4.addColorStop(0.12,"rgb(50, 50, 54)");a4.addColorStop(1,"rgb(79, 79, 87)");a2.fillStyle=a4;a2.fill();break;case"tiltedGray":a4=a2.createLinearGradient(0.233644*a3,0.084112*a0,0.81258*a3,0.910919*a0);a4.addColorStop(0,"#ffffff");a4.addColorStop(0.07,"rgb(210, 210, 210)");a4.addColorStop(0.16,"rgb(179, 179, 179)");a4.addColorStop(0.33,"#ffffff");a4.addColorStop(0.55,"#c5c5c5");a4.addColorStop(0.79,"#ffffff");a4.addColorStop(1,"#666666");a2.fillStyle=a4;a2.fill();break;case"tiltedBlack":a4=a2.createLinearGradient(0.228971*a3,0.079439*a0,0.802547*a3,0.898591*a0);a4.addColorStop(0,"#666666");a4.addColorStop(0.21,"#000000");a4.addColorStop(0.47,"#666666");a4.addColorStop(0.99,"#000000");a4.addColorStop(1,"#000000");a2.fillStyle=a4;a2.fill();break;case"glossyMetal":a4=a2.createRadialGradient(0.5*a3,0.5*a0,0,0.5*a3,0.5*a3,0.5*a3);a4.addColorStop(0,"rgb(207, 207, 207)");a4.addColorStop(0.96,"rgb(205, 204, 205)");a4.addColorStop(1,"rgb(244, 244, 244)");a2.fillStyle=a4;a2.fill();a2.beginPath();a2.arc(0.5*a3,0.5*a0,0.973962*a3/2,0,H);a2.closePath();a4=a2.createLinearGradient(0,a0-0.971962*a0,0,0.971962*a0);a4.addColorStop(0,"rgb(249, 249, 249)");a4.addColorStop(0.23,"rgb(200, 195, 191)");a4.addColorStop(0.36,"#ffffff");a4.addColorStop(0.59,"rgb(29, 29, 29)");a4.addColorStop(0.76,"rgb(200, 194, 192)");a4.addColorStop(1,"rgb(209, 209, 209)");a2.fillStyle=a4;a2.fill();a2.beginPath();a2.arc(0.5*a3,0.5*a0,0.869158*a3/2,0,H);a2.closePath();a2.fillStyle="#f6f6f6";a2.fill();a2.beginPath();a2.arc(0.5*a3,0.5*a0,0.85*a3/2,0,H);a2.closePath();a2.fillStyle="#333333";a2.fill();break;case"blackMetal":aU=[0,0.125,0.347222,0.5,0.680555,0.875,1];aS=[new K(254,254,254,1),new K(0,0,0,1),new K(153,153,153,1),new K(0,0,0,1),new K(153,153,153,1),new K(0,0,0,1),new K(254,254,254,1)];a2.save();a2.arc(aX,aW,a3*0.990654/2,0,H,true);a2.clip();aT=a3*0.495327;aY=a3*0.42056;a4=new G(aU,aS);a4.fillCircle(a2,aX,aW,aY,aT);a2.strokeStyle="#848484";a2.strokeStyle="rgba(132, 132, 132, 0.8)";a2.beginPath();a2.lineWidth=a3/90;a2.arc(aX,aW,a3/2,0,H,true);a2.closePath();a2.stroke();a2.restore();break;case"shinyMetal":aU=[0,0.125,0.25,0.347222,0.5,0.652777,0.75,0.875,1];aS=[new K(254,254,254,1),new K(210,210,210,1),new K(179,179,179,1),new K(238,238,238,1),new K(160,160,160,1),new K(238,238,238,1),new K(179,179,179,1),new K(210,210,210,1),new K(254,254,254,1)];a2.save();a2.arc(aX,aW,a3*0.990654/2,0,H,true);a2.clip();aT=a3*0.495327;aY=a3*0.42056;a4=new G(aU,aS);a4.fillCircle(a2,aX,aW,aY,aT);a2.strokeStyle="#848484";a2.strokeStyle="rgba(132, 132, 132, 0.8)";a2.beginPath();a2.lineWidth=a3/90;a2.arc(aX,aW,a3/2,0,H,true);a2.closePath();a2.stroke();a2.restore();break;case"chrome":aU=[0,0.09,0.12,0.16,0.25,0.29,0.33,0.38,0.48,0.52,0.63,0.68,0.8,0.83,0.87,0.97,1];aS=[new K(255,255,255,1),new K(255,255,255,1),new K(136,136,138,1),new K(164,185,190,1),new K(158,179,182,1),new K(112,112,112,1),new K(221,227,227,1),new K(155,176,179,1),new K(156,176,177,1),new K(254,255,255,1),new K(255,255,255,1),new K(156,180,180,1),new K(198,209,211,1),new K(246,248,247,1),new K(204,216,216,1),new K(164,188,190,1),new K(255,255,255,1)];a2.save();a2.arc(aX,aW,a3*0.990654/2,0,H,true);a2.clip();aT=a3*0.495327;aY=a3*0.42056;a4=new G(aU,aS);a4.fillCircle(a2,aX,aW,aY,aT);a2.strokeStyle="#848484";a2.strokeStyle="rgba(132, 132, 132, 0.8)";a2.beginPath();a2.lineWidth=a3/90;a2.arc(aX,aW,a3/2,0,H,true);a2.closePath();a2.stroke();a2.restore();break}a2.fillStyle="rgb(191, 191, 191)";a2.beginPath();a2.arc(aX,aW,a3*0.841121/2,0,H,true);a2.closePath();a2.fill();a2.globalCompositeOperation="destination-out";a2.beginPath();a2.arc(aX,aW,a3*0.83/2,0,H,true);a2.closePath();a2.fill();d.cache[a1]=aV}a5.drawImage(d.cache[a1],0,0);return this};d.cache={};var k=function(a6,aY,a1,aZ,aV){var a2,aW,aT,aX,a4,a5,a3,aU=[],aS=[],a0=a1.toString()+aZ+aY.design+aV;if(!k.cache[a0]){a2=Math.sqrt(a1*a1+aZ*aZ)*0.04;a2=Math.ceil(Math.min(a2,(aV?a1:aZ)*0.1));aW=J(a1,aZ);aT=aW.getContext("2d");if(aV){aX=Math.ceil(a1*0.05);a4=aX-1;a5=Math.floor(a1*0.028571)}else{aX=Math.ceil(aZ*0.05);a4=aX-1;a5=Math.floor(aZ*0.028571)}P(aT,0,0,a1,aZ,aX);aT.fillStyle="#838383";aT.fill();P(aT,1,1,a1-2,aZ-2,a4);switch(aY.design){case"metal":a3=aT.createLinearGradient(0,a1*0.004672,0,aZ*0.990654);a3.addColorStop(0,"#fefefe");a3.addColorStop(0.07,"rgb(210, 210, 210)");a3.addColorStop(0.12,"rgb(179, 179, 179)");a3.addColorStop(1,"rgb(213, 213, 213)");aT.fillStyle=a3;aT.fill();break;case"brass":a3=aT.createLinearGradient(0,a1*0.004672,0,aZ*0.990654);a3.addColorStop(0,"rgb(249, 243, 155)");a3.addColorStop(0.05,"rgb(246, 226, 101)");a3.addColorStop(0.1,"rgb(240, 225, 132)");a3.addColorStop(0.5,"rgb(90, 57, 22)");a3.addColorStop(0.9,"rgb(249, 237, 139)");a3.addColorStop(0.95,"rgb(243, 226, 108)");a3.addColorStop(1,"rgb(202, 182, 113)");aT.fillStyle=a3;aT.fill();break;case"steel":a3=aT.createLinearGradient(0,a1*0.004672,0,aZ*0.990654);a3.addColorStop(0,"rgb(231, 237, 237)");a3.addColorStop(0.05,"rgb(189, 199, 198)");a3.addColorStop(0.1,"rgb(192, 201, 200)");a3.addColorStop(0.5,"rgb(23, 31, 33)");a3.addColorStop(0.9,"rgb(196, 205, 204)");a3.addColorStop(0.95,"rgb(194, 204, 203)");a3.addColorStop(1,"rgb(189, 201, 199)");aT.fillStyle=a3;aT.fill();break;case"gold":a3=aT.createLinearGradient(0,a1*0.004672,0,aZ*0.990654);a3.addColorStop(0,"rgb(255, 255, 207)");a3.addColorStop(0.15,"rgb(255, 237, 96)");a3.addColorStop(0.22,"rgb(254, 199, 57)");a3.addColorStop(0.3,"rgb(255, 249, 203)");a3.addColorStop(0.38,"rgb(255, 199, 64)");a3.addColorStop(0.44,"rgb(252, 194, 60)");a3.addColorStop(0.51,"rgb(255, 204, 59)");a3.addColorStop(0.6,"rgb(213, 134, 29)");a3.addColorStop(0.68,"rgb(255, 201, 56)");a3.addColorStop(0.75,"rgb(212, 135, 29)");a3.addColorStop(1,"rgb(247, 238, 101)");aT.fillStyle=a3;aT.fill();break;case"anthracite":a3=aT.createLinearGradient(0,0.004672*aZ,0,0.995326*aZ);a3.addColorStop(0,"rgb(118, 117, 135)");a3.addColorStop(0.06,"rgb(74, 74, 82)");a3.addColorStop(0.12,"rgb(50, 50, 54)");a3.addColorStop(1,"rgb(79, 79, 87)");aT.fillStyle=a3;aT.fill();break;case"tiltedGray":a3=aT.createLinearGradient(0.233644*a1,0.084112*aZ,0.81258*a1,0.910919*aZ);a3.addColorStop(0,"#ffffff");a3.addColorStop(0.07,"rgb(210, 210, 210)");a3.addColorStop(0.16,"rgb(179, 179, 179)");a3.addColorStop(0.33,"#ffffff");a3.addColorStop(0.55,"#c5c5c5");a3.addColorStop(0.79,"#ffffff");a3.addColorStop(1,"#666666");aT.fillStyle=a3;aT.fill();break;case"tiltedBlack":a3=aT.createLinearGradient(0.228971*a1,0.079439*aZ,0.802547*a1,0.898591*aZ);a3.addColorStop(0,"#666666");a3.addColorStop(0.21,"#000000");a3.addColorStop(0.47,"#666666");a3.addColorStop(0.99,"#000000");a3.addColorStop(1,"#000000");aT.fillStyle=a3;aT.fill();break;case"glossyMetal":P(aT,1,1,a1-2,aZ-2,aX);aT.clip();a3=aT.createLinearGradient(0,1,0,aZ-2);a3.addColorStop(0,"rgb(249, 249, 249)");a3.addColorStop(0.2,"rgb(200, 195, 191)");a3.addColorStop(0.3,"#ffffff");a3.addColorStop(0.6,"rgb(29, 29, 29)");a3.addColorStop(0.8,"rgb(200, 194, 192)");a3.addColorStop(1,"rgb(209, 209, 209)");aT.fillStyle=a3;aT.fill();P(aT,a2-2,a2-2,a1-(a2-2)*2,aZ-(a2-2)*2,a5);aT.clip();aT.fillStyle="#f6f6f6";aT.fill();P(aT,a2-1,a2-1,a1-(a2-1)*2,aZ-(a2-1)*2,a5);aT.clip();aT.fillStyle="#333333";break;case"blackMetal":aU=[0,0.125,0.347222,0.5,0.680555,0.875,1];aS=[new K("#FFFFFF"),new K("#000000"),new K("#999999"),new K("#000000"),new K("#999999"),new K("#000000"),new K("#FFFFFF")];aT.beginPath();P(aT,1,1,a1-2,aZ-2,aX);aT.closePath();aT.clip();a3=new G(aU,aS);a3.fillRect(aT,a1/2,aZ/2,a1,aZ,a2,a2);break;case"shinyMetal":aU=[0,0.125,0.25,0.347222,0.5,0.652777,0.75,0.875,1];aS=[new K("#FFFFFF"),new K("#D2D2D2"),new K("#B3B3B3"),new K("#EEEEEE"),new K("#A0A0A0"),new K("#EEEEEE"),new K("#B3B3B3"),new K("#D2D2D2"),new K("#FFFFFF")];aT.beginPath();P(aT,1,1,a1-2,aZ-2,aX);aT.closePath();aT.clip();a3=new G(aU,aS);a3.fillRect(aT,a1/2,aZ/2,a1,aZ,a2,a2);break;case"chrome":aU=[0,0.09,0.12,0.16,0.25,0.29,0.33,0.38,0.48,0.52,0.63,0.68,0.8,0.83,0.87,0.97,1];aS=[new K("#FFFFFF"),new K("#FFFFFF"),new K("#888890"),new K("#A4B9BE"),new K("#9EB3B6"),new K("#707070"),new K("#DDE3E3"),new K("#9BB0B3"),new K("#9CB0B1"),new K("#FEFFFF"),new K("#FFFFFF"),new K("#9CB4B4"),new K("#C6D1D3"),new K("#F6F8F7"),new K("#CCD8D8"),new K("#A4BCBE"),new K("#FFFFFF")];aT.beginPath();P(aT,1,1,a1-2,aZ-2,aX);aT.closePath();aT.clip();a3=new G(aU,aS);a3.fillRect(aT,a1/2,aZ/2,a1,aZ,a2,a2);break}P(aT,a2,a2,a1-(a2)*2,aZ-(a2)*2,a5);aT.fillStyle="rgb(192, 192, 192)";aT.globalCompositeOperation="destination-out";P(aT,a2,a2,a1-a2*2,aZ-a2*2,a5);aT.fill();k.cache[a0]=aW}a6.drawImage(k.cache[a0],0,0);return this};k.cache={};var aQ=function(a7,aX,a1,a0,a2,bb){var aT,a4,aZ,bc,a3,a9=a2*0.831775/2,a8,aS,a5,aV,a6,aW,aU,ba,aY=a2.toString()+bb+aX.name;if(!aQ.cache[aY]){aT=J(a2,bb);a4=aT.getContext("2d");a4.beginPath();a4.arc(a1,a0,a9,0,H,true);a4.closePath();if(aX.name==="CARBON"||aX.name==="PUNCHED_SHEET"||aX.name==="BRUSHED_METAL"||aX.name==="BRUSHED_STAINLESS"){if(aX.name==="CARBON"){a4.fillStyle=a4.createPattern(f,"repeat");a4.fill()}if(aX.name==="PUNCHED_SHEET"){a4.fillStyle=a4.createPattern(ar,"repeat");a4.fill()}aZ=a4.createLinearGradient(a9,0,a2-a9,0);aZ.addColorStop(0,"rgba(0, 0, 0, 0.25)");aZ.addColorStop(0.5,"rgba(0, 0, 0, 0)");aZ.addColorStop(1,"rgba(0, 0, 0, 0.25)");a4.fillStyle=aZ;a4.beginPath();a4.arc(a1,a0,a9,0,H,true);a4.closePath();a4.fill();if(aX.name==="BRUSHED_METAL"||aX.name==="BRUSHED_STAINLESS"){a8=(aX.name==="BRUSHED_METAL"?true:false);aS=parseInt(aX.gradientStop.getHexColor().substr(-6),16);a5=p(aS,5,0.1,a8,0.5);a4.fillStyle=a4.createPattern(a5.fill(0,0,a2,bb),"no-repeat");a4.fill()}}else{if(aX.name==="STAINLESS"||aX.name==="TURNED"){bc=[0,0.03,0.1,0.14,0.24,0.33,0.38,0.5,0.62,0.67,0.76,0.81,0.85,0.97,1];a3=[new K("#FDFDFD"),new K("#FDFDFD"),new K("#B2B2B4"),new K("#ACACAE"),new K("#FDFDFD"),new K("#8E8E8E"),new K("#8E8E8E"),new K("#FDFDFD"),new K("#8E8E8E"),new K("#8E8E8E"),new K("#FDFDFD"),new K("#ACACAE"),new K("#B2B2B4"),new K("#FDFDFD"),new K("#FDFDFD")];aZ=new G(bc,a3);aZ.fillCircle(a4,a1,a0,0,a9);if(aX.name==="TURNED"){aV=a9;a6=aV*0.55;aW=l*(500/aV);a4.save();a4.beginPath();a4.arc(a1,a0,aV,0,H);a4.closePath();a4.clip();a4.lineWidth=0.5;aU=H-aW*0.3;for(ba=0;ba<aU;ba+=aW){a4.strokeStyle="rgba(240, 240, 255, 0.25)";a4.beginPath();a4.arc(a1+a6,a0,a6,0,H);a4.stroke();a4.translate(a1,a0);a4.rotate(aW*0.3);a4.translate(-a1,-a0);a4.strokeStyle="rgba(25, 10, 10, 0.1)";a4.beginPath();a4.arc(a1+a6,a0,a6,0,H);a4.stroke();a4.translate(a1,a0);a4.rotate(aW-aW*0.3);a4.translate(-a1,-a0)}a4.restore()}}else{aZ=a4.createLinearGradient(0,a2*0.084112,0,a9*2);aZ.addColorStop(0,aX.gradientStart.getRgbaColor());aZ.addColorStop(0.4,aX.gradientFraction.getRgbaColor());aZ.addColorStop(1,aX.gradientStop.getRgbaColor());a4.fillStyle=aZ;a4.fill()}}aZ=a4.createRadialGradient(a1,a0,0,a1,a0,a9);aZ.addColorStop(0,"rgba(0, 0, 0, 0)");aZ.addColorStop(0.7,"rgba(0, 0, 0, 0)");aZ.addColorStop(0.71,"rgba(0, 0, 0, 0)");aZ.addColorStop(0.86,"rgba(0, 0, 0, 0.03)");aZ.addColorStop(0.92,"rgba(0, 0, 0, 0.07)");aZ.addColorStop(0.97,"rgba(0, 0, 0, 0.15)");aZ.addColorStop(1,"rgba(0, 0, 0, 0.3)");a4.fillStyle=aZ;a4.beginPath();a4.arc(a1,a0,a9,0,H,true);a4.closePath();a4.fill();aQ.cache[aY]=aT}a7.drawImage(aQ.cache[aY],0,0);return this};aQ.cache={};var Q=function(a1,aU,aT,aS,aX,aW){var a0=aX*0.831775,aV=aW*0.831775,aZ=(aX-a0)/2,aY=(aW-aV)/2;if(aU!==null&&aU.height>0&&aU.width>0){a1.save();a1.beginPath();a1.arc(aT,aS,aX*0.831775/2,0,H,true);a1.clip();a1.drawImage(aU,aZ,aY,a0,aV);a1.restore()}return this};var Y=function(a9,aZ,a4,be,aT){var bd,aW,a1,bf,a5,bc,a6,aS,aV,aX,a8,a3,a2,aY,bb,aU,a7,a0=a4.toString()+be+aT+aZ.name;if(!Y.cache[a0]){bc=Math.sqrt(a4*a4+be*be)*0.04;bc=Math.ceil(Math.min(bc,(aT?a4:be)*0.1))-1;var ba=Math.floor((aT?a4:be)*0.028571);a6=J(a4,be);aS=a6.getContext("2d");aV=aZ;aS.lineWidth=0;P(aS,bc,bc,a4-bc*2,be-bc*2,ba);if(aZ.name==="CARBON"||aZ.name==="PUNCHED_SHEET"||aZ.name==="STAINLESS"||aZ.name==="BRUSHED_METAL"||aZ.name==="BRUSHED_STAINLESS"||aZ.name==="TURNED"){if(aZ.name==="CARBON"){aS.fillStyle=aS.createPattern(f,"repeat");aS.fill()}if(aZ.name==="PUNCHED_SHEET"){aS.fillStyle=aS.createPattern(ar,"repeat");aS.fill()}if(aZ.name==="STAINLESS"||aZ.name==="TURNED"){bf=[0,0.03,0.1,0.14,0.24,0.33,0.38,0.5,0.62,0.67,0.76,0.81,0.85,0.97,1];a5=[new K("#FDFDFD"),new K("#FDFDFD"),new K("#B2B2B4"),new K("#ACACAE"),new K("#FDFDFD"),new K("#8E8E8E"),new K("#8E8E8E"),new K("#FDFDFD"),new K("#8E8E8E"),new K("#8E8E8E"),new K("#FDFDFD"),new K("#ACACAE"),new K("#B2B2B4"),new K("#FDFDFD"),new K("#FDFDFD")];a1=new G(bf,a5);aS.clip();a1.fillRect(aS,a4/2,be/2,a4-bc*2,be-bc*2,a4/2,be/2);a1=aS.createLinearGradient(0,bc,0,be-bc*2);a1.addColorStop(0,"rgba(0, 0, 0, 0.25)");a1.addColorStop(0.1,"rgba(0, 0, 0, 0.05)");a1.addColorStop(1,"rgba(0, 0, 0, 0)");aS.fillStyle=a1;aS.fill();if(aZ.name==="TURNED"){aX=Math.sqrt((a4-bc*2)*(a4-bc*2)+(be-bc*2)*(be-bc*2))/2;a8=aX*0.55;a3=a4/2;a2=be/2;aY=H/360*(400/aX);aS.save();P(aS,bc,bc,a4-bc*2,be-bc*2,ba);aS.clip();aS.lineWidth=0.5;aW=H-aY*0.3;for(bd=0;bd<aW;bd+=aY){aS.strokeStyle="rgba(240, 240, 255, 0.25)";aS.beginPath();aS.arc(a3+a8,a2,a8,0,H);aS.stroke();aS.translate(a3,a2);aS.rotate(aY*0.3);aS.translate(-a3,-a2);aS.strokeStyle="rgba(25, 10, 10, 0.1)";aS.beginPath();aS.arc(a3+a8,a2,a8,0,H);aS.stroke();aS.translate(a3,a2);aS.rotate(-aY*0.3);aS.translate(-a3,-a2);aS.translate(a3,a2);aS.rotate(aY);aS.translate(-a3,-a2)}aS.restore()}}a1=aS.createLinearGradient(bc,bc,a4-bc*2,be-bc*2);a1.addColorStop(0,"rgba(0, 0, 0, 0.25)");a1.addColorStop(0.5,"rgba(0, 0, 0, 0)");a1.addColorStop(1,"rgba(0, 0, 0, 0.25)");aS.fillStyle=a1;P(aS,bc,bc,a4-bc*2,be-bc*2,ba);aS.fill();if(aZ.name==="BRUSHED_METAL"||aZ.name==="BRUSHED_STAINLESS"){bb=(aZ.name==="BRUSHED_METAL"?true:false);aU=parseInt(aZ.gradientStop.getHexColor().substr(-6),16);a7=p(aU,5,0.1,bb,0.5);aS.fillStyle=aS.createPattern(a7.fill(0,0,a4,be),"no-repeat");aS.fill()}}else{a1=aS.createLinearGradient(0,bc,0,be-bc*2);a1.addColorStop(0,aZ.gradientStart.getRgbaColor());a1.addColorStop(0.4,aZ.gradientFraction.getRgbaColor());a1.addColorStop(1,aZ.gradientStop.getRgbaColor());aS.fillStyle=a1;aS.fill()}a5=["rgba(0, 0, 0, 0.30)","rgba(0, 0, 0, 0.20)","rgba(0, 0, 0, 0.13)","rgba(0, 0, 0, 0.09)","rgba(0, 0, 0, 0.06)","rgba(0, 0, 0, 0.04)","rgba(0, 0, 0, 0.03)"];for(bd=0;bd<7;bd++){aS.strokeStyle=a5[bd];P(aS,bc+bd,bc+bd,a4-bc*2-(2*bd),be-bc*2-(2*bd),ba);aS.stroke()}Y.cache[a0]=a6}a9.drawImage(Y.cache[a0],0,0);return this};Y.cache={};var A=function(a4,a8,aZ,a9,aS,a2,a7,a6,aT){var a3,a1,a5=Math.ceil(a9*0.084112),aX=aZ*0.5-a5/2,aV=a9*0.5-a5/2,a0=aZ*0.008,aU,aY,aW=a8.type+aZ+a9+aS+(a2!==undefined?a2.type:"-")+(a7!==undefined?a7.style:"-")+(aT!==undefined?aT.type:"-");if(!A.cache[aW]){a3=J(aZ,a9);a1=a3.getContext("2d");if(aS){a1.shadowColor="rgba(0, 0, 0, 0.8)";a1.shadowOffsetX=a1.shadowOffsetY=a0;a1.shadowBlur=a0*2;if(a6===steelseries.GaugeType.TYPE5){if(steelseries.Orientation.WEST===aT){aX=aZ*0.733644-a5/2;a1.drawImage(F(a5,a2,a7),aX,aV)}else{if(steelseries.Orientation.EAST===aT){aX=aZ*(1-0.733644)-a5/2;a1.drawImage(F(a5,a2,a7),aX,aV)}else{aV=a9*0.733644-a5/2;a1.drawImage(F(a5,a2,a7),aX,a9*0.6857)}}}else{a1.drawImage(F(a5,a2,a7),aX,aV)}a1.shadowOffsetX=a1.shadowOffsetY=0;a1.shadowBlur=0}switch(a8.type){case"type2":a1.beginPath();a1.moveTo(aZ*0.135514,a9*0.696261);a1.bezierCurveTo(aZ*0.214953,a9*0.588785,aZ*0.317757,a9*0.5,aZ*0.462616,a9*0.425233);a1.bezierCurveTo(aZ*0.612149,a9*0.345794,aZ*0.733644,a9*0.317757,aZ*0.873831,a9*0.322429);a1.bezierCurveTo(aZ*0.766355,a9*0.112149,aZ*0.528037,a9*0.023364,aZ*0.313084,a9*0.130841);a1.bezierCurveTo(aZ*0.09813,a9*0.238317,aZ*0.028037,a9*0.485981,aZ*0.135514,a9*0.696261);a1.closePath();aU=a1.createLinearGradient(0.313084*aZ,0.135514*a9,0.495528*aZ,0.493582*a9);aU.addColorStop(0,"rgba(255, 255, 255, 0.275)");aU.addColorStop(1,"rgba(255, 255, 255, 0.015)");break;case"type3":a1.beginPath();a1.moveTo(aZ*0.084112,a9*0.509345);a1.bezierCurveTo(aZ*0.21028,a9*0.556074,aZ*0.462616,a9*0.560747,aZ*0.5,a9*0.560747);a1.bezierCurveTo(aZ*0.537383,a9*0.560747,aZ*0.794392,a9*0.560747,aZ*0.915887,a9*0.509345);a1.bezierCurveTo(aZ*0.915887,a9*0.2757,aZ*0.738317,a9*0.084112,aZ*0.5,a9*0.084112);a1.bezierCurveTo(aZ*0.261682,a9*0.084112,aZ*0.084112,a9*0.2757,aZ*0.084112,a9*0.509345);a1.closePath();aU=a1.createLinearGradient(0,0.093457*a9,0,0.556073*a9);aU.addColorStop(0,"rgba(255, 255, 255, 0.275)");aU.addColorStop(1,"rgba(255, 255, 255, 0.015)");break;case"type4":a1.beginPath();a1.moveTo(aZ*0.67757,a9*0.24299);a1.bezierCurveTo(aZ*0.771028,a9*0.308411,aZ*0.822429,a9*0.411214,aZ*0.813084,a9*0.528037);a1.bezierCurveTo(aZ*0.799065,a9*0.654205,aZ*0.719626,a9*0.757009,aZ*0.593457,a9*0.799065);a1.bezierCurveTo(aZ*0.485981,a9*0.831775,aZ*0.369158,a9*0.808411,aZ*0.285046,a9*0.728971);a1.bezierCurveTo(aZ*0.2757,a9*0.719626,aZ*0.252336,a9*0.714953,aZ*0.233644,a9*0.728971);a1.bezierCurveTo(aZ*0.214953,a9*0.747663,aZ*0.219626,a9*0.771028,aZ*0.228971,a9*0.7757);a1.bezierCurveTo(aZ*0.331775,a9*0.878504,aZ*0.476635,a9*0.915887,aZ*0.616822,a9*0.869158);a1.bezierCurveTo(aZ*0.771028,a9*0.822429,aZ*0.873831,a9*0.691588,aZ*0.88785,a9*0.53271);a1.bezierCurveTo(aZ*0.897196,a9*0.38785,aZ*0.836448,a9*0.257009,aZ*0.719626,a9*0.182242);a1.bezierCurveTo(aZ*0.705607,a9*0.172897,aZ*0.682242,a9*0.163551,aZ*0.663551,a9*0.186915);a1.bezierCurveTo(aZ*0.654205,a9*0.205607,aZ*0.668224,a9*0.238317,aZ*0.67757,a9*0.24299);a1.closePath();aU=a1.createRadialGradient((0.5)*aZ,((0.5)*a9),0,((0.5)*aZ),((0.5)*a9),0.38785*aZ);aU.addColorStop(0,"rgba(255, 255, 255, 0)");aU.addColorStop(0.82,"rgba(255, 255, 255, 0)");aU.addColorStop(0.83,"rgba(255, 255, 255, 0)");aU.addColorStop(1,"rgba(255, 255, 255, 0.15)");a1.beginPath();a1.moveTo(aZ*0.261682,a9*0.224299);a1.bezierCurveTo(aZ*0.285046,a9*0.238317,aZ*0.252336,a9*0.285046,aZ*0.24299,a9*0.317757);a1.bezierCurveTo(aZ*0.24299,a9*0.350467,aZ*0.271028,a9*0.383177,aZ*0.271028,a9*0.397196);a1.bezierCurveTo(aZ*0.2757,a9*0.415887,aZ*0.261682,a9*0.457943,aZ*0.238317,a9*0.509345);a1.bezierCurveTo(aZ*0.224299,a9*0.542056,aZ*0.17757,a9*0.612149,aZ*0.158878,a9*0.612149);a1.bezierCurveTo(aZ*0.144859,a9*0.612149,aZ*0.088785,a9*0.546728,aZ*0.130841,a9*0.369158);a1.bezierCurveTo(aZ*0.140186,a9*0.336448,aZ*0.214953,a9*0.200934,aZ*0.261682,a9*0.224299);a1.closePath();aY=a1.createLinearGradient(0.130841*aZ,0.369158*a9,0.273839*aZ,0.412877*a9);aY.addColorStop(0,"rgba(255, 255, 255, 0.275)");aY.addColorStop(1,"rgba(255, 255, 255, 0.015)");a1.fillStyle=aY;a1.fill();break;case"type5":a1.beginPath();a1.moveTo(aZ*0.084112,a9*0.5);a1.bezierCurveTo(aZ*0.084112,a9*0.271028,aZ*0.271028,a9*0.084112,aZ*0.5,a9*0.084112);a1.bezierCurveTo(aZ*0.700934,a9*0.084112,aZ*0.864485,a9*0.224299,aZ*0.906542,a9*0.411214);a1.bezierCurveTo(aZ*0.911214,a9*0.439252,aZ*0.911214,a9*0.518691,aZ*0.845794,a9*0.537383);a1.bezierCurveTo(aZ*0.794392,a9*0.546728,aZ*0.551401,a9*0.411214,aZ*0.392523,a9*0.457943);a1.bezierCurveTo(aZ*0.168224,a9*0.509345,aZ*0.135514,a9*0.7757,aZ*0.093457,a9*0.593457);a1.bezierCurveTo(aZ*0.088785,a9*0.560747,aZ*0.084112,a9*0.53271,aZ*0.084112,a9*0.5);a1.closePath();aU=a1.createLinearGradient(0,0.084112*a9,0,0.644859*a9);aU.addColorStop(0,"rgba(255, 255, 255, 0.275)");aU.addColorStop(1,"rgba(255, 255, 255, 0.015)");break;case"type1":default:a1.beginPath();a1.moveTo(aZ*0.084112,a9*0.509345);a1.bezierCurveTo(aZ*0.205607,a9*0.448598,aZ*0.336448,a9*0.415887,aZ*0.5,a9*0.415887);a1.bezierCurveTo(aZ*0.672897,a9*0.415887,aZ*0.789719,a9*0.443925,aZ*0.915887,a9*0.509345);a1.bezierCurveTo(aZ*0.915887,a9*0.2757,aZ*0.738317,a9*0.084112,aZ*0.5,a9*0.084112);a1.bezierCurveTo(aZ*0.261682,a9*0.084112,aZ*0.084112,a9*0.2757,aZ*0.084112,a9*0.509345);a1.closePath();aU=a1.createLinearGradient(0,0.088785*a9,0,0.490654*a9);aU.addColorStop(0,"rgba(255, 255, 255, 0.275)");aU.addColorStop(1,"rgba(255, 255, 255, 0.015)");break}a1.fillStyle=aU;a1.fill();A.cache[aW]=a3}a4.drawImage(A.cache[aW],0,0);return this};A.cache={};var aK=function(a1,aZ,aX,aV){var aT,aW,a2,a0,aS,aU,aY=aZ.toString()+aX+aV;if(!aK.cache[aY]){aT=J(aZ,aX);aW=aT.getContext("2d");a0=Math.sqrt(aZ*aZ+aX*aX)*0.04;a0=Math.min(a0,(aV?aZ:aX)*0.1);aS=a0*1.3;aU=aS*1.33;aW.beginPath();aW.moveTo(aS,aX-aS);aW.lineTo(aZ-aS,aX-aS);aW.bezierCurveTo(aZ-aS,aX-aS,aZ-aU,aX*0.7,aZ-aU,aX*0.5);aW.bezierCurveTo(aZ-aU,aU,aZ-aS,aS,aZ-a0,aS);aW.lineTo(aS,aS);aW.bezierCurveTo(aS,aS,aU,aX*0.285714,aU,aX*0.5);aW.bezierCurveTo(aU,aX*0.7,aS,aX-aS,a0,aX-aS);aW.closePath();a2=aW.createLinearGradient(0,(aX-a0),0,a0);a2.addColorStop(0,"rgba(255, 255, 255, 0)");a2.addColorStop(0.06,"rgba(255, 255, 255, 0)");a2.addColorStop(0.07,"rgba(255, 255, 255, 0)");a2.addColorStop(0.12,"rgba(255, 255, 255, 0)");a2.addColorStop(0.17,"rgba(255, 255, 255, 0.013546)");a2.addColorStop(0.1701,"rgba(255, 255, 255, 0)");a2.addColorStop(0.79,"rgba(255, 255, 255, 0)");a2.addColorStop(0.8,"rgba(255, 255, 255, 0)");a2.addColorStop(0.84,"rgba(255, 255, 255, 0.082217)");a2.addColorStop(0.93,"rgba(255, 255, 255, 0.288702)");a2.addColorStop(0.94,"rgba(255, 255, 255, 0.298039)");a2.addColorStop(0.96,"rgba(255, 255, 255, 0.119213)");a2.addColorStop(0.97,"rgba(255, 255, 255, 0)");a2.addColorStop(1,"rgba(255, 255, 255, 0)");aW.fillStyle=a2;aW.fill();aK.cache[aY]=aT}a1.drawImage(aK.cache[aY],0,0);return this};aK.cache={};var F=function(a0,aT,aS){var aW,aX,aV=a0/2,aU=a0/2,aZ,aY=a0.toString()+aT.type+aS.style;if(!F.cache[aY]){aW=J(a0*1.18889,a0*1.18889);aX=aW.getContext("2d");switch(aT.type){case"metalKnob":aX.beginPath();aX.moveTo(0,a0*0.5);aX.bezierCurveTo(0,a0*0.222222,a0*0.222222,0,a0*0.5,0);aX.bezierCurveTo(a0*0.777777,0,a0,a0*0.222222,a0,a0*0.5);aX.bezierCurveTo(a0,a0*0.777777,a0*0.777777,a0,a0*0.5,a0);aX.bezierCurveTo(a0*0.222222,a0,0,a0*0.777777,0,a0*0.5);aX.closePath();aZ=aX.createLinearGradient(0,0,0,a0);aZ.addColorStop(0,"rgb(92, 95, 101)");aZ.addColorStop(0.47,"rgb(46, 49, 53)");aZ.addColorStop(1,"rgb(22, 23, 26)");aX.fillStyle=aZ;aX.fill();aX.beginPath();aX.moveTo(a0*0.055555,a0*0.5);aX.bezierCurveTo(a0*0.055555,a0*0.277777,a0*0.277777,a0*0.055555,a0*0.5,a0*0.055555);aX.bezierCurveTo(a0*0.722222,a0*0.055555,a0*0.944444,a0*0.277777,a0*0.944444,a0*0.5);aX.bezierCurveTo(a0*0.944444,a0*0.722222,a0*0.722222,a0*0.944444,a0*0.5,a0*0.944444);aX.bezierCurveTo(a0*0.277777,a0*0.944444,a0*0.055555,a0*0.722222,a0*0.055555,a0*0.5);aX.closePath();aZ=aX.createLinearGradient(0,0.055555*a0,0,0.944443*a0);switch(aS.style){case"black":aZ.addColorStop(0,"rgb(43, 42, 47)");aZ.addColorStop(1,"rgb(26, 27, 32)");break;case"brass":aZ.addColorStop(0,"rgb(150, 110, 54)");aZ.addColorStop(1,"rgb(124, 95, 61)");break;case"silver":default:aZ.addColorStop(0,"rgb(204, 204, 204)");aZ.addColorStop(1,"rgb(87, 92, 98)");break}aX.fillStyle=aZ;aX.fill();aX.beginPath();aX.moveTo(a0*0.777777,a0*0.833333);aX.bezierCurveTo(a0*0.722222,a0*0.722222,a0*0.611111,a0*0.666666,a0*0.5,a0*0.666666);aX.bezierCurveTo(a0*0.388888,a0*0.666666,a0*0.277777,a0*0.722222,a0*0.222222,a0*0.833333);aX.bezierCurveTo(a0*0.277777,a0*0.888888,a0*0.388888,a0*0.944444,a0*0.5,a0*0.944444);aX.bezierCurveTo(a0*0.611111,a0*0.944444,a0*0.722222,a0*0.888888,a0*0.777777,a0*0.833333);aX.closePath();aZ=aX.createRadialGradient((0.555555)*a0,((0.944444)*a0),0,((0.555555)*a0),((0.944444)*a0),0.388888*a0);aZ.addColorStop(0,"rgba(255, 255, 255, 0.6)");aZ.addColorStop(1,"rgba(255, 255, 255, 0)");aX.fillStyle=aZ;aX.fill();aX.beginPath();aX.moveTo(a0*0.944444,a0*0.277777);aX.bezierCurveTo(a0*0.833333,a0*0.111111,a0*0.666666,0,a0*0.5,0);aX.bezierCurveTo(a0*0.333333,0,a0*0.166666,a0*0.111111,a0*0.055555,a0*0.277777);aX.bezierCurveTo(a0*0.166666,a0*0.333333,a0*0.333333,a0*0.388888,a0*0.5,a0*0.388888);aX.bezierCurveTo(a0*0.666666,a0*0.388888,a0*0.833333,a0*0.333333,a0*0.944444,a0*0.277777);aX.closePath();aZ=aX.createRadialGradient(0.5*a0,0,0,((0.5)*a0),0,0.583333*a0);aZ.addColorStop(0,"rgba(255, 255, 255, 0.749019)");aZ.addColorStop(1,"rgba(255, 255, 255, 0)");aX.fillStyle=aZ;aX.fill();aX.beginPath();aX.moveTo(a0*0.277777,a0*0.555555);aX.bezierCurveTo(a0*0.277777,a0*0.388888,a0*0.388888,a0*0.277777,a0*0.5,a0*0.277777);aX.bezierCurveTo(a0*0.611111,a0*0.277777,a0*0.777777,a0*0.388888,a0*0.777777,a0*0.555555);aX.bezierCurveTo(a0*0.777777,a0*0.666666,a0*0.611111,a0*0.777777,a0*0.5,a0*0.777777);aX.bezierCurveTo(a0*0.388888,a0*0.777777,a0*0.277777,a0*0.666666,a0*0.277777,a0*0.555555);aX.closePath();aZ=aX.createLinearGradient(0,0.277777*a0,0,0.722221*a0);aZ.addColorStop(0,"#000000");aZ.addColorStop(1,"rgb(204, 204, 204)");aX.fillStyle=aZ;aX.fill();aX.beginPath();aX.moveTo(a0*0.333333,a0*0.555555);aX.bezierCurveTo(a0*0.333333,a0*0.444444,a0*0.388888,a0*0.333333,a0*0.5,a0*0.333333);aX.bezierCurveTo(a0*0.611111,a0*0.333333,a0*0.722222,a0*0.444444,a0*0.722222,a0*0.555555);aX.bezierCurveTo(a0*0.722222,a0*0.611111,a0*0.611111,a0*0.722222,a0*0.5,a0*0.722222);aX.bezierCurveTo(a0*0.388888,a0*0.722222,a0*0.333333,a0*0.611111,a0*0.333333,a0*0.555555);aX.closePath();aZ=aX.createLinearGradient(0,0.333333*a0,0,0.666666*a0);aZ.addColorStop(0,"rgb(10, 9, 1)");aZ.addColorStop(1,"rgb(42, 41, 37)");aX.fillStyle=aZ;aX.fill();break;case"standardKnob":aZ=aX.createLinearGradient(0,0,0,a0);aZ.addColorStop(0,"rgb(180, 180, 180)");aZ.addColorStop(0.46,"rgb(63, 63, 63)");aZ.addColorStop(1,"rgb(40, 40, 40)");aX.fillStyle=aZ;aX.beginPath();aX.arc(aV,aU,a0/2,0,H,true);aX.closePath();aX.fill();aZ=aX.createLinearGradient(0,a0-a0*0.77,0,a0-a0*0.77+a0*0.77);switch(aS.style){case"black":aZ.addColorStop(0,"rgb(191, 191, 191)");aZ.addColorStop(0.5,"rgb(45, 44, 49)");aZ.addColorStop(1,"rgb(125, 126, 128)");break;case"brass":aZ.addColorStop(0,"rgb(223, 208, 174)");aZ.addColorStop(0.5,"rgb(123, 95, 63)");aZ.addColorStop(1,"rgb(207, 190, 157)");break;case"silver":default:aZ.addColorStop(0,"rgb(215, 215, 215)");aZ.addColorStop(0.5,"rgb(116, 116, 116)");aZ.addColorStop(1,"rgb(215, 215, 215)");break}aX.fillStyle=aZ;aX.beginPath();aX.arc(aV,aU,a0*0.77/2,0,H,true);aX.closePath();aX.fill();aZ=aX.createRadialGradient(aV,aU,0,aV,aU,a0*0.77/2);aZ.addColorStop(0,"rgba(0, 0, 0, 0)");aZ.addColorStop(0.75,"rgba(0, 0, 0, 0)");aZ.addColorStop(0.76,"rgba(0, 0, 0, 0.01)");aZ.addColorStop(1,"rgba(0, 0, 0, 0.2)");aX.fillStyle=aZ;aX.beginPath();aX.arc(aV,aU,a0*0.77/2,0,H,true);aX.closePath();aX.fill();break}F.cache[aY]=aW}return F.cache[aY]};F.cache={};var af=function(a0,aT,aV){var aX,aW,aU=2*Math.round(a0/4),aS=2*Math.round(a0/4),aZ,aY=a0.toString()+aT+aV.outerColor_ON;if(!af.cache[aY]){aX=J(a0,a0);aW=aX.getContext("2d");switch(aT){case 0:aZ=aW.createRadialGradient(aU,aS,0,aU,aS,a0*0.5/2);aZ.addColorStop(0,aV.innerColor1_OFF);aZ.addColorStop(0.2,aV.innerColor2_OFF);aZ.addColorStop(1,aV.outerColor_OFF);aW.fillStyle=aZ;aW.beginPath();aW.arc(aU,aS,a0*0.5/2,0,H,true);aW.closePath();aW.fill();aZ=aW.createRadialGradient(aU,aS,0,aU,aS,a0*0.5/2);aZ.addColorStop(0,"rgba(0, 0, 0, 0)");aZ.addColorStop(0.8,"rgba(0, 0, 0, 0)");aZ.addColorStop(1,"rgba(0, 0, 0, 0.4)");aW.fillStyle=aZ;aW.beginPath();aW.arc(aU,aS,a0*0.5/2,0,H,true);aW.closePath();aW.fill();aZ=aW.createLinearGradient(0,0.35*a0,0,0.35*a0+0.15*a0);aZ.addColorStop(0,"rgba(255, 255, 255, 0.4)");aZ.addColorStop(1,"rgba(255, 255, 255, 0)");aW.fillStyle=aZ;aW.beginPath();aW.arc(aU,0.35*a0+0.2*a0/2,a0*0.2,0,H,true);aW.closePath();aW.fill();break;case 1:aZ=aW.createRadialGradient(aU,aS,0,aU,aS,a0*0.5/2);aZ.addColorStop(0,aV.innerColor1_ON);aZ.addColorStop(0.2,aV.innerColor2_ON);aZ.addColorStop(1,aV.outerColor_ON);aW.fillStyle=aZ;aW.beginPath();aW.arc(aU,aS,a0*0.5/2,0,H,true);aW.closePath();aW.fill();aZ=aW.createRadialGradient(aU,aS,0,aU,aS,a0*0.5/2);aZ.addColorStop(0,"rgba(0, 0, 0, 0)");aZ.addColorStop(0.8,"rgba(0, 0, 0, 0)");aZ.addColorStop(1,"rgba(0, 0, 0, 0.4)");aW.fillStyle=aZ;aW.beginPath();aW.arc(aU,aS,a0*0.5/2,0,H,true);aW.closePath();aW.fill();aZ=aW.createLinearGradient(0,0.35*a0,0,0.35*a0+0.15*a0);aZ.addColorStop(0,"rgba(255, 255, 255, 0.4)");aZ.addColorStop(1,"rgba(255, 255, 255, 0)");aW.fillStyle=aZ;aW.beginPath();aW.arc(aU,0.35*a0+0.2*a0/2,a0*0.2,0,H,true);aW.closePath();aW.fill();aZ=aW.createRadialGradient(aU,aS,0,aU,aS,a0/2);aZ.addColorStop(0,O(aV.coronaColor,0));aZ.addColorStop(0.6,O(aV.coronaColor,0.4));aZ.addColorStop(0.7,O(aV.coronaColor,0.25));aZ.addColorStop(0.8,O(aV.coronaColor,0.15));aZ.addColorStop(0.85,O(aV.coronaColor,0.05));aZ.addColorStop(1,O(aV.coronaColor,0));aW.fillStyle=aZ;aW.beginPath();aW.arc(aU,aS,a0/2,0,H,true);aW.closePath();aW.fill();break}af.cache[aY]=aX}return af.cache[aY]};af.cache={};var V=function(aT,a6,a8){var a1,aX,aW=0,aS=0,a2=aT,a7=a6,aY=Math.min(aT,a6)*0.095,a4,aU=1,a5=1,aZ=aT-2,a3=a6-2,aV=aY-1,a0=aT.toString()+a6+JSON.stringify(a8);if(!V.cache[a0]){a1=J(aT,a6);aX=a1.getContext("2d");a4=aX.createLinearGradient(0,aS,0,aS+a7);a4.addColorStop(0,"#4c4c4c");a4.addColorStop(0.08,"#666666");a4.addColorStop(0.92,"#666666");a4.addColorStop(1,"#e6e6e6");aX.fillStyle=a4;P(aX,aW,aS,a2,a7,aY);aX.fill();a4=aX.createLinearGradient(0,a5,0,a5+a3);a4.addColorStop(0,a8.gradientStartColor);a4.addColorStop(0.03,a8.gradientFraction1Color);a4.addColorStop(0.49,a8.gradientFraction2Color);a4.addColorStop(0.5,a8.gradientFraction3Color);a4.addColorStop(1,a8.gradientStopColor);aX.fillStyle=a4;P(aX,aU,a5,aZ,a3,aV);aX.fill();V.cache[a0]=a1}return V.cache[a0]};V.cache={};var w=function(aU,aV,aS,aT){var aY,aX,aW=aU.toString()+aV+aS+aT;if(!w.cache[aW]){aY=B.createElement("canvas");aX=aY.getContext("2d");aY.width=aU;aY.height=aU;aX.fillStyle=aV;if(aS){aX.beginPath();aX.moveTo(aU*0.5,aU);aX.lineTo(0,0);aX.lineTo(aU,0);aX.closePath();aX.fill()}else{if(aT){aX.beginPath();aX.moveTo(aU,aU*0.5);aX.lineTo(0,0);aX.lineTo(0,aU);aX.closePath();aX.fill()}else{aX.beginPath();aX.moveTo(aU*0.5,0);aX.lineTo(aU,aU);aX.lineTo(0,aU);aX.closePath();aX.fill()}}w.cache[aW]=aY}return w.cache[aW]};w.cache={};var ah=function(aU,a0,aT){var a1=aU*2,aW,aV,a2,aY=a0.state+aU+JSON.stringify(aT),aX=function(){var a3=aT[0];if(a0.state==="up"){a2=aV.createRadialGradient(0.5*aU,0.2*a1,0,0.5*aU,0.2*a1,0.5*aU);a2.addColorStop(0,a3.innerColor1_ON);a2.addColorStop(0.2,a3.innerColor2_ON);a2.addColorStop(1,a3.outerColor_ON)}else{a2=aV.createLinearGradient(0,0,0,0.5*a1);a2.addColorStop(0,"#323232");a2.addColorStop(1,"#5c5c5c")}aV.fillStyle=a2;aV.beginPath();aV.moveTo(0.5*aU,0);aV.lineTo(aU,0.2*a1);aV.lineTo(0.752*aU,0.2*a1);aV.lineTo(0.752*aU,0.37*a1);aV.lineTo(0.252*aU,0.37*a1);aV.lineTo(0.252*aU,0.2*a1);aV.lineTo(0,0.2*a1);aV.closePath();aV.fill();if(a0.state!=="up"){aV.strokeStyle="rgba(0, 0, 0, 0.4)";aV.beginPath();aV.moveTo(0,0.2*a1);aV.lineTo(0.5*aU,0);aV.lineTo(aU,0.2*a1);aV.moveTo(0.252*aU,0.2*a1);aV.lineTo(0.252*aU,0.37*a1);aV.stroke();aV.strokeStyle="rgba(255, 255, 255, 0.3)";aV.beginPath();aV.moveTo(0.252*aU,0.37*a1);aV.lineTo(0.752*aU,0.37*a1);aV.lineTo(0.752*aU,0.2*a1);aV.lineTo(aU,0.2*a1);aV.stroke()}else{a2=aV.createRadialGradient(0.5*aU,0.2*a1,0,0.5*aU,0.2*a1,0.7*aU);a2.addColorStop(0,O(a3.coronaColor,0));a2.addColorStop(0.5,O(a3.coronaColor,0.3));a2.addColorStop(0.7,O(a3.coronaColor,0.2));a2.addColorStop(0.8,O(a3.coronaColor,0.1));a2.addColorStop(0.85,O(a3.coronaColor,0.05));a2.addColorStop(1,O(a3.coronaColor,0));aV.fillStyle=a2;aV.beginPath();aV.arc(0.5*aU,0.2*a1,0.7*aU,0,H,true);aV.closePath();aV.fill()}},aZ=function(){var a3=aT[1];aV.beginPath();if(a0.state==="steady"){a2=a3.outerColor_ON;aV.fillStyle=a2;aV.rect(0.128*aU,0.41*a1,0.744*aU,0.074*a1);aV.rect(0.128*aU,0.516*a1,0.744*aU,0.074*a1);aV.closePath();aV.fill()}else{a2=aV.createLinearGradient(0,0.41*a1,0,0.41*a1+0.074*a1);a2.addColorStop(0,"#323232");a2.addColorStop(1,"#5c5c5c");aV.fillStyle=a2;aV.rect(0.128*aU,0.41*a1,0.744*aU,0.074*a1);aV.closePath();aV.fill();a2=aV.createLinearGradient(0,0.516*a1,0,0.516*a1+0.074*a1);a2.addColorStop(0,"#323232");a2.addColorStop(1,"#5c5c5c");aV.fillStyle=a2;aV.rect(0.128*aU,0.516*a1,0.744*aU,0.074*a1);aV.closePath();aV.fill()}if(a0.state!=="steady"){aV.strokeStyle="rgba(0, 0, 0, 0.4)";aV.beginPath();aV.moveTo(0.128*aU,0.41*a1+0.074*a1);aV.lineTo(0.128*aU,0.41*a1);aV.lineTo(0.128*aU+0.744*aU,0.41*a1);aV.stroke();aV.beginPath();aV.moveTo(0.128*aU,0.516*a1+0.074*a1);aV.lineTo(0.128*aU,0.516*a1);aV.lineTo(0.128*aU+0.744*aU,0.516*a1);aV.stroke();aV.strokeStyle="rgba(255, 255, 255, 0.3)";aV.beginPath();aV.moveTo(0.128*aU+0.744*aU,0.41*a1);aV.lineTo(0.128*aU+0.744*aU,0.41*a1+0.074*a1);aV.lineTo(0.128*aU,0.41*a1+0.074*a1);aV.stroke();aV.beginPath();aV.moveTo(0.128*aU+0.744*aU,0.516*a1);aV.lineTo(0.128*aU+0.744*aU,0.516*a1+0.074*a1);aV.lineTo(0.128*aU,0.516*a1+0.074*a1);aV.stroke()}else{a2=aV.createRadialGradient(0.5*aU,0.5*a1,0,0.5*aU,0.5*a1,0.7*aU);a2.addColorStop(0,O(a3.coronaColor,0));a2.addColorStop(0.5,O(a3.coronaColor,0.3));a2.addColorStop(0.7,O(a3.coronaColor,0.2));a2.addColorStop(0.8,O(a3.coronaColor,0.1));a2.addColorStop(0.85,O(a3.coronaColor,0.05));a2.addColorStop(1,O(a3.coronaColor,0));aV.fillStyle=a2;aV.beginPath();aV.arc(0.5*aU,0.5*a1,0.7*aU,0,H,true);aV.closePath();aV.fill()}},aS=function(){var a3=aT[2];if(a0.state==="down"){a2=aV.createRadialGradient(0.5*aU,0.8*a1,0,0.5*aU,0.8*a1,0.5*aU);a2.addColorStop(0,a3.innerColor1_ON);a2.addColorStop(0.2,a3.innerColor2_ON);a2.addColorStop(1,a3.outerColor_ON)}else{a2=aV.createLinearGradient(0,0.63*a1,0,a1);a2.addColorStop(0,"#323232");a2.addColorStop(1,"#5c5c5c")}aV.beginPath();aV.fillStyle=a2;aV.moveTo(0.5*aU,a1);aV.lineTo(aU,0.8*a1);aV.lineTo(0.725*aU,0.8*a1);aV.lineTo(0.725*aU,0.63*a1);aV.lineTo(0.252*aU,0.63*a1);aV.lineTo(0.252*aU,0.8*a1);aV.lineTo(0,0.8*a1);aV.closePath();aV.fill();if(a0.state!=="down"){aV.strokeStyle="rgba(0, 0, 0, 0.4)";aV.beginPath();aV.moveTo(0,0.8*a1);aV.lineTo(0.252*aU,0.8*a1);aV.moveTo(0.252*aU,0.63*a1);aV.lineTo(0.752*aU,0.63*a1);aV.stroke();aV.beginPath();aV.moveTo(0.752*aU,0.8*a1);aV.lineTo(aU,0.8*a1);aV.stroke();aV.strokeStyle="rgba(255, 255, 255, 0.3)";aV.beginPath();aV.moveTo(0,0.8*a1);aV.lineTo(0.5*aU,a1);aV.lineTo(aU,0.8*a1);aV.stroke();aV.beginPath();aV.moveTo(0.752*aU,0.8*a1);aV.lineTo(0.752*aU,0.63*a1);aV.stroke()}else{a2=aV.createRadialGradient(0.5*aU,0.8*a1,0,0.5*aU,0.8*a1,0.7*aU);a2.addColorStop(0,O(a3.coronaColor,0));a2.addColorStop(0.5,O(a3.coronaColor,0.3));a2.addColorStop(0.7,O(a3.coronaColor,0.2));a2.addColorStop(0.8,O(a3.coronaColor,0.1));a2.addColorStop(0.85,O(a3.coronaColor,0.05));a2.addColorStop(1,O(a3.coronaColor,0));aV.fillStyle=a2;aV.beginPath();aV.arc(0.5*aU,0.8*a1,0.7*aU,0,H,true);aV.closePath();aV.fill()}};if(!ah.cache[aY]){aW=J(aU*2,aU*4);aV=aW.getContext("2d");aV.translate(aU*0.5,aU*0.5);switch(a0.state){case"up":aS();aZ();aX();break;case"steady":aS();aX();aZ();break;case"down":default:aX();aZ();aS();break}ah.cache[aY]=aW}return ah.cache[aY]};ah.cache={};var ap=function(a1,aX,aV,aS,aW,aY,aT,aZ,a0,aU){aU=(undefined===aU?aU=steelseries.GaugeType.TYPE1:aU);a1.save();a1.textAlign=(aZ?"center":"left");a1.textBaseline="middle";a1.strokeStyle=aY.labelColor.getRgbaColor();a1.fillStyle=aY.labelColor.getRgbaColor();if(aZ){a1.font=0.046728*aX+"px "+W;a1.fillText(aS,aX/2,aV*0.3,aX*0.3);a1.fillText(aW,aX/2,aV*0.38,aX*0.3)}else{if(aT){a1.font=0.1*aX+"px "+W;a1.save();a1.translate(0.671428*aX,0.1375*aV);a1.rotate(1.570796);a1.fillText(aS,0,0);a1.translate(-0.671428*aX,-0.1375*aV);a1.restore();a1.font=0.071428*aX+"px "+W;if(a0){if(aU.type==="type2"){a1.textAlign="right";a1.fillText(aW,0.36*aX,aV*0.79,aX*0.25)}else{a1.fillText(aW,0.63*aX,aV*0.85,aX*0.2)}}else{a1.textAlign="center";if(aU.type==="type2"){a1.fillText(aW,aX/2,aV*0.92,aX*0.2)}else{a1.fillText(aW,aX/2,aV*0.89,aX*0.2)}}}else{a1.font=0.035*aX+"px "+W;a1.fillText(aS,aX*0.15,aV*0.25,aX*0.3);a1.font=0.025*aX+"px "+W;a1.fillText(aW,aX*0.0625,aV*0.7,aX*0.07)}}a1.restore()};var f=m(12,12,function(aU){var aV=aU.canvas.width,aT=aU.canvas.height,aS=0,aX=0,aW;aU.save();aU.save();aU.beginPath();aU.rect(0,0,aV*0.5,aT*0.5);aU.closePath();aU.restore();aW=aU.createLinearGradient(0,aX*aT,0,0.5*aT+aX*aT);aW.addColorStop(0,"rgb(35, 35, 35)");aW.addColorStop(1,"rgb(23, 23, 23)");aU.fillStyle=aW;aU.fill();aU.save();aU.beginPath();aU.rect(aV*0.083333,0,aV*0.333333,aT*0.416666);aU.closePath();aU.restore();aS=0.083333;aX=0;aW=aU.createLinearGradient(0,aX*aT,0,0.416666*aT+aX*aT);aW.addColorStop(0,"rgb(38, 38, 38)");aW.addColorStop(1,"rgb(30, 30, 30)");aU.fillStyle=aW;aU.fill();aU.save();aU.beginPath();aU.rect(aV*0.5,aT*0.5,aV*0.5,aT*0.5);aU.closePath();aU.restore();aS=0.5;aX=0.5;aW=aU.createLinearGradient(0,aX*aT,0,0.5*aT+aX*aT);aW.addColorStop(0,"rgb(35, 35, 35)");aW.addColorStop(1,"rgb(23, 23, 23)");aU.fillStyle=aW;aU.fill();aU.save();aU.beginPath();aU.rect(aV*0.583333,aT*0.5,aV*0.333333,aT*0.416666);aU.closePath();aU.restore();aS=0.583333;aX=0.5;aW=aU.createLinearGradient(0,aX*aT,0,0.416666*aT+aX*aT);aW.addColorStop(0,"rgb(38, 38, 38)");aW.addColorStop(1,"rgb(30, 30, 30)");aU.fillStyle=aW;aU.fill();aU.save();aU.beginPath();aU.rect(aV*0.5,0,aV*0.5,aT*0.5);aU.closePath();aU.restore();aS=0.5;aX=0;aW=aU.createLinearGradient(0,aX*aT,0,0.5*aT+aX*aT);aW.addColorStop(0,"#303030");aW.addColorStop(1,"rgb(40, 40, 40)");aU.fillStyle=aW;aU.fill();aU.save();aU.beginPath();aU.rect(aV*0.583333,aT*0.083333,aV*0.333333,aT*0.416666);aU.closePath();aU.restore();aS=0.583333;aX=0.083333;aW=aU.createLinearGradient(0,aX*aT,0,0.416666*aT+aX*aT);aW.addColorStop(0,"rgb(53, 53, 53)");aW.addColorStop(1,"rgb(45, 45, 45)");aU.fillStyle=aW;aU.fill();aU.save();aU.beginPath();aU.rect(0,aT*0.5,aV*0.5,aT*0.5);aU.closePath();aU.restore();aS=0;aX=0.5;aW=aU.createLinearGradient(0,aX*aT,0,0.5*aT+aX*aT);aW.addColorStop(0,"#303030");aW.addColorStop(1,"#282828");aU.fillStyle=aW;aU.fill();aU.save();aU.beginPath();aU.rect(aV*0.083333,aT*0.583333,aV*0.333333,aT*0.416666);aU.closePath();aU.restore();aS=0.083333;aX=0.583333;aW=aU.createLinearGradient(0,aX*aT,0,0.416666*aT+aX*aT);aW.addColorStop(0,"#353535");aW.addColorStop(1,"#2d2d2d");aU.fillStyle=aW;aU.fill();aU.restore()});var ar=m(15,15,function(aT){var aU=aT.canvas.width,aS=aT.canvas.height,aV;aT.save();aT.save();aT.beginPath();aT.rect(0,0,aU,aS);aT.closePath();aT.restore();aT.fillStyle="#1D2123";aT.fill();aT.save();aT.beginPath();aT.moveTo(0,aS*0.266666);aT.bezierCurveTo(0,aS*0.4,aU*0.066666,aS*0.466666,aU*0.2,aS*0.466666);aT.bezierCurveTo(aU*0.333333,aS*0.466666,aU*0.4,aS*0.4,aU*0.4,aS*0.266666);aT.bezierCurveTo(aU*0.4,aS*0.133333,aU*0.333333,aS*0.066666,aU*0.2,aS*0.066666);aT.bezierCurveTo(aU*0.066666,aS*0.066666,0,aS*0.133333,0,aS*0.266666);aT.closePath();aV=aT.createLinearGradient(0,0.066666*aS,0,0.466666*aS);aV.addColorStop(0,"#000000");aV.addColorStop(1,"#444444");aT.fillStyle=aV;aT.fill();aT.save();aT.beginPath();aT.moveTo(0,aS*0.2);aT.bezierCurveTo(0,aS*0.333333,aU*0.066666,aS*0.4,aU*0.2,aS*0.4);aT.bezierCurveTo(aU*0.333333,aS*0.4,aU*0.4,aS*0.333333,aU*0.4,aS*0.2);aT.bezierCurveTo(aU*0.4,aS*0.066666,aU*0.333333,0,aU*0.2,0);aT.bezierCurveTo(aU*0.066666,0,0,aS*0.066666,0,aS*0.2);aT.closePath();aT.fillStyle="#050506";aT.fill();aT.save();aT.beginPath();aT.moveTo(aU*0.466666,aS*0.733333);aT.bezierCurveTo(aU*0.466666,aS*0.866666,aU*0.533333,aS*0.933333,aU*0.666666,aS*0.933333);aT.bezierCurveTo(aU*0.8,aS*0.933333,aU*0.866666,aS*0.866666,aU*0.866666,aS*0.733333);aT.bezierCurveTo(aU*0.866666,aS*0.6,aU*0.8,aS*0.533333,aU*0.666666,aS*0.533333);aT.bezierCurveTo(aU*0.533333,aS*0.533333,aU*0.466666,aS*0.6,aU*0.466666,aS*0.733333);aT.closePath();aV=aT.createLinearGradient(0,0.533333*aS,0,0.933333*aS);aV.addColorStop(0,"#000000");aV.addColorStop(1,"#444444");aT.fillStyle=aV;aT.fill();aT.save();aT.beginPath();aT.moveTo(aU*0.466666,aS*0.666666);aT.bezierCurveTo(aU*0.466666,aS*0.8,aU*0.533333,aS*0.866666,aU*0.666666,aS*0.866666);aT.bezierCurveTo(aU*0.8,aS*0.866666,aU*0.866666,aS*0.8,aU*0.866666,aS*0.666666);aT.bezierCurveTo(aU*0.866666,aS*0.533333,aU*0.8,aS*0.466666,aU*0.666666,aS*0.466666);aT.bezierCurveTo(aU*0.533333,aS*0.466666,aU*0.466666,aS*0.533333,aU*0.466666,aS*0.666666);aT.closePath();aT.fillStyle="#050506";aT.fill();aT.restore()});var p=function(aU,aT,aV,aS,aZ){this.fill=function(bo,bm,a3,a1){var bl,bd,bc,bg,bj,bf,bq,a5,a9,a8,a4=255,a7=(aU>>16)&255,be=(aU>>8)&255,a0=aU&255,bi=0,bp=255*aV,bb,bh,bk,br,a2,a6,ba,bn;bo=Math.floor(bo);bm=Math.floor(bm);a3=Math.ceil(a3);a1=Math.ceil(a1);bj=a3-bo;bf=a1-bm;bq=J(bj,bf);a5=bq.getContext("2d");a9=a5.createImageData(bj,bf);a8=a5.createImageData(bj,bf);if(aZ!==0){bg=[];for(bl=0;bl<bj;bl++){bg[bl]=(255*aZ*Math.sin(bl/bj*ao))|0}}for(bc=0;bc<bf;bc++){if(aT!==0){bb=bh=bk=0}for(bd=0;bd<bj;bd++){br=(bc*bj*4)+(bd*4);a2=a7;a6=be;ba=a0;if(aZ!==0){bn=bg[bd];a2+=bn;a6+=bn;ba+=bn}if(aS){bi=((2*Math.random()-1)*bp)|0;a9.data[br]=aX(a2+bi);a9.data[br+1]=aX(a6+bi);a9.data[br+2]=aX(ba+bi);a9.data[br+3]=a4}else{a9.data[br]=aW(a2,bp);a9.data[br+1]=aW(a6,bp);a9.data[br+2]=aW(ba,bp);a9.data[br+3]=a4}}}if(aT>0){aY(a9,a8,bj,bf,aT,a4);a5.putImageData(a8,bo,bm)}else{a5.putImageData(a9,bo,bm)}return bq};function aW(a0,a1){a0+=((2*Math.random()-1)*a1)|0;return(a0<0?0:(a0>255?255:a0))}function aX(a0){return(a0<0?0:(a0>255?255:a0))}function aY(bb,a1,a0,bc,a7,a3){var ba,a9,a5,a2,a6,bd,a4,a8;if(a7>=a0){a7=a0-1}a2=1/(a7*2+1);a6=0;for(a9=0;a9<bc;a9++){bd=a4=a8=0;for(ba=0;ba<a7;ba++){a5=(a6+ba)*4;bd+=bb.data[a5];a4+=bb.data[a5+1];a8+=bb.data[a5+2]}for(ba=0;ba<a0;ba++){if(ba>a7){a5=(a6-a7-1)*4;bd-=bb.data[a5];a4-=bb.data[a5+1];a8-=bb.data[a5+2]}if(ba+a7<a0){a5=(a6+a7)*4;bd+=bb.data[a5];a4+=bb.data[a5+1];a8+=bb.data[a5+2]}a5=a6*4;a1.data[a5]=(bd*a2)|0;a1.data[a5+1]=(a4*a2)|0;a1.data[a5+2]=(a8*a2)|0;a1.data[a5+3]=a3;a6++}}}return this};var K=function(aS,aX,aY,aZ){var aU,aW,a0,aV;if(arguments.length===1){aY=parseInt(aS.substr(5,2),16);aX=parseInt(aS.substr(3,2),16);aS=parseInt(aS.substr(1,2),16);aZ=1}else{if(arguments.length===3){aZ=1}}function aT(){aU=D(aS,255);aW=D(aX,255);a0=D(aY,255);aV=D(aZ,1)}aT();this.getRed=function(){return aU};this.setRed=function(a1){aU=D(a1,255)};this.getGreen=function(){return aW};this.setGreen=function(a1){aW=D(a1,255)};this.getBlue=function(){return a0};this.setBlue=function(a1){a0=D(a1,255)};this.getAlpha=function(){return aV};this.setAlpha=function(a1){aV=D(a1,1)};this.getRgbaColor=function(){return"rgba("+aU+", "+aW+", "+a0+", "+aV+")"};this.getRgbColor=function(){return"rgb("+aU+", "+aW+", "+a0+")"};this.getHexColor=function(){return"#"+aU.toString(16)+aW.toString(16)+a0.toString(16)}};var G=function(aV,aT){var aS=aV.length-1,aU;for(aU=0;aU<=aS;aU++){aV[aU]=H*aV[aU]-ao}this.fillCircle=function(a8,a0,aZ,be,bc){var bb,aX=Math.ceil(bc),a2=aX*2,a7,aY,a3,a1,a6,a5,a4,aW,bf,bd,ba,a9;a7=a8.createImageData(a2,a2);aY=255;for(a1=0;a1<a2;a1++){a5=aX-a1;a4=a5*a5;for(a3=0;a3<a2;a3++){a6=a3-aX;aW=Math.sqrt((a6*a6)+a4);if(aW<=aX&&aW>=be){bb=Math.atan2(a6,a5);for(aU=0;aU<aS;aU++){if(bb>=aV[aU]&&bb<aV[aU+1]){bd=aO(aT[aU],aT[aU+1],aV[aU+1]-aV[aU],bb-aV[aU],true)}}bf=((a2-a1)*a2*4)+(a3*4);a7.data[bf]=bd[0];a7.data[bf+1]=bd[1];a7.data[bf+2]=bd[2];a7.data[bf+3]=aY}}}ba=J(a2,a2);a9=ba.getContext("2d");a9.putImageData(a7,0,0);a8.drawImage(ba,a0-aX,aZ-aX)};this.fillRect=function(a7,aZ,aY,a6,a4,be,bd){var ba,bb,aW,a5,aX,a1,a0,a3,a2,bf,bc,a9,a8;a6=Math.ceil(a6);a4=Math.ceil(a4);bb=a6/2;aW=a4/2;be=Math.ceil(be);bd=Math.ceil(bd);a5=a7.createImageData(a6,a4);aX=255;for(a0=0;a0<a4;a0++){a2=aW-a0;for(a1=0;a1<a6;a1++){if(a0>bd&&a0<=a4-bd){if(a1>be&&a1<a6-be){a1=a6-be}}a3=a1-bb;ba=Math.atan2(a3,a2);for(aU=0;aU<aS;aU++){if(ba>=aV[aU]&&ba<aV[aU+1]){bc=aO(aT[aU],aT[aU+1],aV[aU+1]-aV[aU],ba-aV[aU],true)}}bf=((a4-a0)*a6*4)+(a1*4);a5.data[bf]=bc[0];a5.data[bf+1]=bc[0];a5.data[bf+2]=bc[0];a5.data[bf+3]=aX}}a9=J(a6,a4);a8=a9.getContext("2d");a8.putImageData(a5,0,0);a7.drawImage(a9,aZ-bb,aY-aW)}};var h=function(aV,aT,aU,aS){this.getColorAt=function(a0){var aZ=0,a2=0,aY=1,a1=1,aX,aW;a0=(a0<0?0:(a0>1?1:a0));for(aX=0;aX<aU.length;aX++){if(aU[aX]<a0&&aZ<aU[aX]){aZ=aU[aX];a2=aX}if(aU[aX]===a0){return aS[aX]}if(aU[aX]>a0&&aY>=aU[aX]){aY=aU[aX];a1=aX}}aW=(a0-aZ)/(aY-aZ);return aO(aS[a2],aS[a1],1,aW)};this.getStart=function(){return aV};this.getEnd=function(){return aT}};function O(aV,aY){var aU=("#"===aV.charAt(0))?aV.substring(1,7):aV,aX=parseInt((aU).substring(0,2),16),aW=parseInt((aU).substring(2,4),16),aS=parseInt((aU).substring(4,6),16),aT="rgba("+aX+","+aW+","+aS+","+aY+")";return aT}function aO(a2,a3,a0,aW,aS){var a9=1/255,a8=a2.getRed(),aX=a2.getGreen(),aU=a2.getBlue(),aT=a2.getAlpha(),a6=a3.getRed()-a8,aZ=a3.getGreen()-aX,a7=a3.getBlue()-aU,aV=a3.getAlpha()*a9-aT*a9,a5=a6/a0*aW,a4=aZ/a0*aW,a1=a7/a0*aW,aY=aV/a0*aW;aS=aS||false;if(aS){return[(a8+a5).toFixed(0),(aX+a4).toFixed(0),(aU+a1).toFixed(0),aT+aY]}else{return new K((a8+a5).toFixed(0),(aX+a4).toFixed(0),(aU+a1).toFixed(0),aT+aY)}}function aA(aU,aT,aS){return{start:aU,stop:aT,color:aS}}Math.log10=function(aS){return(Math.log(aS)/Math.LN10)};function g(aT,aS){var aW=Math.floor(Math.log10(aT)),aV=aT/Math.pow(10,aW),aU;if(aS){if(1.5>aV){aU=1}else{if(3>aV){aU=2}else{if(7>aV){aU=5}else{aU=10}}}}else{if(1>=aV){aU=1}else{if(2>=aV){aU=2}else{if(5>=aV){aU=5}else{aU=10}}}}return aU*Math.pow(10,aW)}function P(aW,aU,aZ,aV,aX,aT){var aY=aU+aV,aS=aZ+aX;aW.beginPath();aW.moveTo(aU+aT,aZ);aW.lineTo(aY-aT,aZ);aW.quadraticCurveTo(aY,aZ,aY,aZ+aT);aW.lineTo(aY,aZ+aX-aT);aW.quadraticCurveTo(aY,aS,aY-aT,aS);aW.lineTo(aU+aT,aS);aW.quadraticCurveTo(aU,aS,aU,aS-aT);aW.lineTo(aU,aZ+aT);aW.quadraticCurveTo(aU,aZ,aU+aT,aZ);aW.closePath()}function J(aU,aS){var aT=B.createElement("canvas");aT.width=aU;aT.height=aS;return aT}function m(aU,aS,aV){var aT=B.createElement("canvas");aT.width=aU;aT.height=aS;aV(aT.getContext("2d"));return aT}function aB(aS){var aU,aT=m(1,1,function(aV){aV.fillStyle=aS;aV.beginPath();aV.rect(0,0,1,1);aV.fill()});aU=aT.getContext("2d").getImageData(0,0,2,2).data;return[aU[0],aU[1],aU[2],aU[3]]}function s(aW){var aT,aZ,aU,aX,aY,aV=aB(aW),aS=new K(aV[0],aV[1],aV[2],aV[3]);aT=aP(aS,0.32);aZ=aP(aS,0.62);aU=ax(aS,0.84);aX=ax(aS,0.94);aY=ax(aS,1);return new C(aT,aZ,aS,aU,aX,aY)}function au(aS,aT,aY){var aU,aX,aW,aV,a0,aZ;aS/=255;aT/=255;aY/=255;aX=Math.max(aS,aT,aY);aU=Math.min(aS,aT,aY);a0=(aX+aU)/2;if(aX===aU){aW=aV=0}else{aZ=aX-aU;aV=a0>0.5?aZ/(2-aX-aU):aZ/(aX+aU);switch(aX){case aS:aW=(aT-aY)/aZ+(aT<aY?6:0);break;case aT:aW=(aY-aS)/aZ+2;break;case aY:aW=(aS-aT)/aZ+4;break}aW/=6}return[aW,aV,a0]}function ac(aY,aW,a0){var aS,aX,a1,aV=Math.floor(aY*6),aZ=aY*6-aV,aU=a0*(1-aW),aT=a0*(1-aZ*aW),a2=a0*(1-(1-aZ)*aW);switch(aV%6){case 0:aS=a0;aX=a2;a1=aU;break;case 1:aS=aT;aX=a0;a1=aU;break;case 2:aS=aU;aX=a0;a1=a2;break;case 3:aS=aU;aX=aT;a1=a0;break;case 4:aS=a2;aX=aU;a1=a0;break;case 5:aS=a0;aX=aU;a1=aT;break}return[Math.floor(aS*255),Math.floor(aX*255),Math.floor(a1*255)]}function ay(aS,aV,aY){var aT,aZ,aW,aU,aX,a0;aS=aS/255;aV=aV/255;aY=aY/255;aZ=Math.max(aS,aV,aY);aT=Math.min(aS,aV,aY);aX=aZ;a0=aZ-aT;aU=aZ===0?0:a0/aZ;if(aZ===aT){aW=0}else{switch(aZ){case aS:aW=(aV-aY)/a0+(aV<aY?6:0);break;case aV:aW=(aY-aS)/a0+2;break;case aY:aW=(aS-aV)/a0+4;break}aW/=6}return[aW,aU,aX]}function D(aT,aS){return(aT<0?0:(aT>aS?aS:aT))}function aP(aT,aU){var aW=Math.floor(aT.getRed()*(1-aU)),aV=Math.floor(aT.getGreen()*(1-aU)),aS=Math.floor(aT.getBlue()*(1-aU));aW=D(aW,255);aV=D(aV,255);aS=D(aS,255);return new K(aW,aV,aS,aT.getAlpha())}function ax(aT,aU){var aW=Math.round(aT.getRed()*(1+aU)),aV=Math.round(aT.getGreen()*(1+aU)),aS=Math.round(aT.getBlue()*(1+aU));aW=D(aW,255);aV=D(aV,255);aS=D(aS,255);return new K(aW,aV,aS,aT.getAlpha())}function o(aU,aS,aT){var aW,aV;if(aT<=aS){throw"Rotary bounds are of negative or zero size"}aW=aT-aS;aV=Math.floor((aU-aS)/aW);return aU-(aV*aW)}function ak(aT,aS){return o((aS-aT),-180,180)}var ad=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(aS){window.setTimeout(aS,1000/16)}}());function r(aS){var aT=(typeof aS==="string"||aS instanceof String)?B.getElementById(aS):aS;return aT.getContext("2d")}var i;(function(){i=function(aX,aV,aS,aW,aT,aU){this.gradientStart=aX;this.gradientFraction=aV;this.gradientStop=aS;this.labelColor=aW;this.symbolColor=aT;this.name=aU}}());var ai;(function(){ai=function(aS,aV,aU,aT,aX,aW){this.gradientStartColor=aS;this.gradientFraction1Color=aV;this.gradientFraction2Color=aU;this.gradientFraction3Color=aT;this.gradientStopColor=aX;this.textColor=aW}}());var C;(function(){C=function(aX,aW,aU,aT,aS,aV){this.veryDark=aX;this.dark=aW;this.medium=aU;this.light=aT;this.lighter=aS;this.veryLight=aV}}());var am;(function(){am=function(aU,aS,aY,aW,aV,aT,aX){this.innerColor1_ON=aU;this.innerColor2_ON=aS;this.outerColor_ON=aY;this.coronaColor=aW;this.innerColor1_OFF=aV;this.innerColor2_OFF=aT;this.outerColor_OFF=aX}}());var aJ;(function(){aJ=function(aS){this.type=aS}}());var S;(function(){S=function(aS){this.type=aS}}());var aN;(function(){aN=function(aS){this.type=aS}}());var n;(function(){n=function(aS){this.style=aS}}());var al;(function(){al=function(aS){this.design=aS}}());var aa;(function(){aa=function(aS){this.type=aS}}());var a;(function(){a=function(aS){this.type=aS}}());var u;(function(){u=function(aS){this.format=aS}}());var aI;(function(){aI=function(aS){this.type=aS}}());var aC;(function(){aC=function(aS){this.state=aS}}());var t={DARK_GRAY:new i(new K(0,0,0,1),new K(51,51,51,1),new K(153,153,153,1),new K(255,255,255,1),new K(180,180,180,1),"DARK_GRAY"),SATIN_GRAY:new i(new K(45,57,57,1),new K(45,57,57,1),new K(45,57,57,1),new K(167,184,180,1),new K(137,154,150,1),"SATIN_GRAY"),LIGHT_GRAY:new i(new K(130,130,130,1),new K(181,181,181,1),new K(253,253,253,1),new K(0,0,0,1),new K(80,80,80,1),"LIGHT_GRAY"),WHITE:new i(new K(255,255,255,1),new K(255,255,255,1),new K(255,255,255,1),new K(0,0,0,1),new K(80,80,80,1),"WHITE"),BLACK:new i(new K(0,0,0,1),new K(0,0,0,1),new K(0,0,0,1),new K(255,255,255,1),new K(150,150,150,1),"BLACK"),BEIGE:new i(new K(178,172,150,1),new K(204,205,184,1),new K(231,231,214,1),new K(0,0,0,1),new K(80,80,80,1),"BEIGE"),BROWN:new i(new K(245,225,193,1),new K(245,225,193,1),new K(255,250,240,1),new K(109,73,47,1),new K(89,53,27,1),"BROWN"),RED:new i(new K(198,93,95,1),new K(212,132,134,1),new K(242,218,218,1),new K(0,0,0,1),new K(90,0,0,1),"RED"),GREEN:new i(new K(65,120,40,1),new K(129,171,95,1),new K(218,237,202,1),new K(0,0,0,1),new K(0,90,0,1),"GREEN"),BLUE:new i(new K(45,83,122,1),new K(115,144,170,1),new K(227,234,238,1),new K(0,0,0,1),new K(0,0,90,1),"BLUE"),ANTHRACITE:new i(new K(50,50,54,1),new K(47,47,51,1),new K(69,69,74,1),new K(250,250,250,1),new K(180,180,180,1),"ANTHRACITE"),MUD:new i(new K(80,86,82,1),new K(70,76,72,1),new K(57,62,58,1),new K(255,255,240,1),new K(225,225,210,1),"MUD"),PUNCHED_SHEET:new i(new K(50,50,54,1),new K(47,47,51,1),new K(69,69,74,1),new K(255,255,255,1),new K(180,180,180,1),"PUNCHED_SHEET"),CARBON:new i(new K(50,50,54,1),new K(47,47,51,1),new K(69,69,74,1),new K(255,255,255,1),new K(180,180,180,1),"CARBON"),STAINLESS:new i(new K(130,130,130,1),new K(181,181,181,1),new K(253,253,253,1),new K(0,0,0,1),new K(80,80,80,1),"STAINLESS"),BRUSHED_METAL:new i(new K(50,50,54,1),new K(47,47,51,1),new K(69,69,74,1),new K(0,0,0,1),new K(80,80,80,1),"BRUSHED_METAL"),BRUSHED_STAINLESS:new i(new K(50,50,54,1),new K(47,47,51,1),new K(110,110,112,1),new K(0,0,0,1),new K(80,80,80,1),"BRUSHED_STAINLESS"),TURNED:new i(new K(130,130,130,1),new K(181,181,181,1),new K(253,253,253,1),new K(0,0,0,1),new K(80,80,80,1),"TURNED")};var aq={BEIGE:new ai("#c8c8b1","rgb(241, 237, 207)","rgb(234, 230, 194)","rgb(225, 220, 183)","rgb(237, 232, 191)","#000000"),BLUE:new ai("#ffffff","rgb(231, 246, 255)","rgb(170, 224, 255)","rgb(136, 212, 255)","rgb(192, 232, 255)","#124564"),ORANGE:new ai("#ffffff","rgb(255, 245, 225)","rgb(255, 217, 147)","rgb(255, 201, 104)","rgb(255, 227, 173)","#503700"),RED:new ai("#ffffff","rgb(255, 225, 225)","rgb(253, 152, 152)","rgb(252, 114, 115)","rgb(254, 178, 178)","#4f0c0e"),YELLOW:new ai("#ffffff","rgb(245, 255, 186)","rgb(210, 255, 0)","rgb(158, 205, 0)","rgb(210, 255, 0)","#405300"),WHITE:new ai("#ffffff","#ffffff","rgb(241, 246, 242)","rgb(229, 239, 244)","#ffffff","#000000"),GRAY:new ai("#414141","rgb(117, 117, 117)","rgb(87, 87, 87)","#414141","rgb(81, 81, 81)","#ffffff"),BLACK:new ai("#414141","#666666","#333333","#000000","#333333","#cccccc"),GREEN:new ai("rgb(33, 67, 67)","rgb(33, 67, 67)","rgb(29, 58, 58)","rgb(28, 57, 57)","rgb(23, 46, 46)","rgba(0, 185, 165, 255)"),BLUE2:new ai("rgb(0, 68, 103)","rgb(8, 109, 165)","rgb(0, 72, 117)","rgb(0, 72, 117)","rgb(0, 68, 103)","rgb(111, 182, 228)"),BLUE_BLACK:new ai("rgb(22, 125, 212)","rgb(3, 162, 254)","rgb(3, 162, 254)","rgb(3, 162, 254)","rgb(11, 172, 244)","#000000"),BLUE_DARKBLUE:new ai("rgb(18, 33, 88)","rgb(18, 33, 88)","rgb(19, 30, 90)","rgb(17, 31, 94)","rgb(21, 25, 90)","rgb(23, 99, 221)"),BLUE_GRAY:new ai("rgb(135, 174, 255)","rgb(101, 159, 255)","rgb(44, 93, 255)","rgb(27, 65, 254)","rgb(12, 50, 255)","#b2b4ed"),STANDARD:new ai("rgb(131, 133, 119)","rgb(176, 183, 167)","rgb(165, 174, 153)","rgb(166, 175, 156)","rgb(175, 184, 165)","rgb(35, 42, 52)"),STANDARD_GREEN:new ai("#ffffff","rgb(219, 230, 220)","rgb(179, 194, 178)","rgb(153, 176, 151)","rgb(114, 138, 109)","#080C06"),BLUE_BLUE:new ai("rgb(100, 168, 253)","rgb(100, 168, 253)","rgb(95, 160, 250)","rgb(80, 144, 252)","rgb(74, 134, 255)","#002cbb"),RED_DARKRED:new ai("rgb(72, 36, 50)","rgb(185, 111, 110)","rgb(148, 66, 72)","rgb(83, 19, 20)","rgb(7, 6, 14)","#FE8B92"),DARKBLUE:new ai("rgb(14, 24, 31)","rgb(46, 105, 144)","rgb(19, 64, 96)","rgb(6, 20, 29)","rgb(8, 9, 10)","#3DB3FF"),LILA:new ai("rgb(175, 164, 255)","rgb(188, 168, 253)","rgb(176, 159, 255)","rgb(174, 147, 252)","rgb(168, 136, 233)","#076148"),BLACKRED:new ai("rgb(8, 12, 11)","rgb(10, 11, 13)","rgb(11, 10, 15)","rgb(7, 13, 9)","rgb(9, 13, 14)","#B50026"),DARKGREEN:new ai("rgb(25, 85, 0)","rgb(47, 154, 0)","rgb(30, 101, 0)","rgb(30, 101, 0)","rgb(25, 85, 0)","#233123"),AMBER:new ai("rgb(182, 71, 0)","rgb(236, 155, 25)","rgb(212, 93, 5)","rgb(212, 93, 5)","rgb(182, 71, 0)","#593A0A"),LIGHTBLUE:new ai("rgb(125, 146, 184)","rgb(197, 212, 231)","rgb(138, 155, 194)","rgb(138, 155, 194)","rgb(125, 146, 184)","#090051"),SECTIONS:new ai("#b2b2b2","#ffffff","#c4c4c4","#c4c4c4","#b2b2b2","#000000")};var q={RED:new C(new K(82,0,0,1),new K(158,0,19,1),new K(213,0,25,1),new K(240,82,88,1),new K(255,171,173,1),new K(255,217,218,1)),GREEN:new C(new K(8,54,4,1),new K(0,107,14,1),new K(15,148,0,1),new K(121,186,37,1),new K(190,231,141,1),new K(234,247,218,1)),BLUE:new C(new K(0,11,68,1),new K(0,73,135,1),new K(0,108,201,1),new K(0,141,242,1),new K(122,200,255,1),new K(204,236,255,1)),ORANGE:new C(new K(118,83,30,1),new K(215,67,0,1),new K(240,117,0,1),new K(255,166,0,1),new K(255,255,128,1),new K(255,247,194,1)),YELLOW:new C(new K(41,41,0,1),new K(102,102,0,1),new K(177,165,0,1),new K(255,242,0,1),new K(255,250,153,1),new K(255,252,204,1)),CYAN:new C(new K(15,109,109,1),new K(0,109,144,1),new K(0,144,191,1),new K(0,174,239,1),new K(153,223,249,1),new K(204,239,252,1)),MAGENTA:new C(new K(98,0,114,1),new K(128,24,72,1),new K(191,36,107,1),new K(255,48,143,1),new K(255,172,210,1),new K(255,214,23,1)),WHITE:new C(new K(210,210,210,1),new K(220,220,220,1),new K(235,235,235,1),new K(255,255,255,1),new K(255,255,255,1),new K(255,255,255,1)),GRAY:new C(new K(25,25,25,1),new K(51,51,51,1),new K(76,76,76,1),new K(128,128,128,1),new K(204,204,204,1),new K(243,243,243,1)),BLACK:new C(new K(0,0,0,1),new K(5,5,5,1),new K(10,10,10,1),new K(15,15,15,1),new K(20,20,20,1),new K(25,25,25,1)),RAITH:new C(new K(0,32,65,1),new K(0,65,125,1),new K(0,106,172,1),new K(130,180,214,1),new K(148,203,242,1),new K(191,229,255,1)),GREEN_LCD:new C(new K(0,55,45,1),new K(15,109,93,1),new K(0,185,165,1),new K(48,255,204,1),new K(153,255,227,1),new K(204,255,241,1)),JUG_GREEN:new C(new K(0,56,0,1),new K(32,69,36,1),new K(50,161,0,1),new K(129,206,0,1),new K(190,231,141,1),new K(234,247,218,1))};var x={RED_LED:new am("#FF9A89","#FF9A89","#FF3300","#FF8D70","#7E1C00","#7E1C00","#641B00"),GREEN_LED:new am("#9AFF89","#9AFF89","#59FF2A","#A5FF00","#1C7E00","#1C7E00","#1B6400"),BLUE_LED:new am("#899AFF","#899AFF","#0033FF","#708DFF","#001C7E","#001C7E","#001B64"),ORANGE_LED:new am("#FEA23F","#FEA23F","#FD6C00","#FD6C00","#592800","#592800","#421F00"),YELLOW_LED:new am("#FFFF62","#FFFF62","#FFFF00","#FFFF00","#6B6D00","#6B6D00","#515300"),CYAN_LED:new am("#00FFFF","#00FFFF","#1BC3C3","#00FFFF","#083B3B","#083B3B","#052727"),MAGENTA_LED:new am("#D300FF","#D300FF","#8600CB","#C300FF","#38004B","#38004B","#280035")};var L={TYPE1:new aJ("type1"),TYPE2:new aJ("type2"),TYPE3:new aJ("type3"),TYPE4:new aJ("type4"),TYPE5:new aJ("type5")};var az={NORTH:new S("north"),SOUTH:new S("south"),EAST:new S("east"),WEST:new S("west")};var aL={STANDARD_KNOB:new aN("standardKnob"),METAL_KNOB:new aN("metalKnob")};var U={BLACK:new n("black"),BRASS:new n("brass"),SILVER:new n("silver")};var aM={BLACK_METAL:new al("blackMetal"),METAL:new al("metal"),SHINY_METAL:new al("shinyMetal"),BRASS:new al("brass"),STEEL:new al("steel"),CHROME:new al("chrome"),GOLD:new al("gold"),ANTHRACITE:new al("anthracite"),TILTED_GRAY:new al("tiltedGray"),TILTED_BLACK:new al("tiltedBlack"),GLOSSY_METAL:new al("glossyMetal")};var aw={TYPE1:new aa("type1"),TYPE2:new aa("type2"),TYPE3:new aa("type3"),TYPE4:new aa("type4"),TYPE5:new aa("type5"),TYPE6:new aa("type6"),TYPE7:new aa("type7"),TYPE8:new aa("type8"),TYPE9:new aa("type9"),TYPE10:new aa("type10"),TYPE11:new aa("type11"),TYPE12:new aa("type12"),TYPE13:new aa("type13"),TYPE14:new aa("type14"),TYPE15:new aa("type15"),TYPE16:new aa("type16"),TYPE17:new aa("type17")};var aH={TYPE1:new a("type1"),TYPE2:new a("type2"),TYPE3:new a("type3"),TYPE4:new a("type4"),TYPE5:new a("type5")};var v={STANDARD:new u("standard"),FRACTIONAL:new u("fractional"),SCIENTIFIC:new u("scientific")};var Z={NORMAL:new aI("normal"),HORIZONTAL:new aI("horizontal"),TANGENT:new aI("tangent")};var aG={UP:new aC("up"),STEADY:new aC("steady"),DOWN:new aC("down"),OFF:new aC("off")};return{Radial:X,RadialBargraph:y,RadialVertical:ae,Linear:M,LinearBargraph:z,DisplaySingle:j,DisplayMulti:R,Level:an,Compass:av,WindDirection:I,Horizon:aj,Led:at,Clock:c,Battery:ab,StopWatch:ag,Altimeter:aR,TrafficLight:aF,LightBulb:N,Odometer:aD,drawFrame:d,drawBackground:aQ,drawForeground:A,rgbaColor:K,ConicalGradient:G,setAlpha:O,getColorFromFraction:aO,gradientWrapper:h,BackgroundColor:t,LcdColor:aq,ColorDef:q,LedColor:x,GaugeType:L,Orientation:az,FrameDesign:aM,PointerType:aw,ForegroundType:aH,KnobType:aL,KnobStyle:U,LabelNumberFormat:v,TickLabelOrientation:Z,TrendState:aG,Section:aA}}());