var _SCIntern=function(a){function h(a,f){this.element=null;this.name="";this.name=f;if(a)this.element=a.getElementById(f)}function g(a,f,c,d){this.eventId=a;this.cbFunction=f;this.cbArgument1=c;this.cbArgument2=d}a.drawRectShape=function(){var b=0,f=1,c="",f="",d=this.getOutlineWidth(),e=0;this.checkIfInterior()===!0&&(b=1);f=this.checkIfOutline()===!0?1:0;c="rgba("+this.getInteriorColor()+","+b+")";f="rgba("+this.getOutlineColor()+","+f+")";e=this.getOutlineStyle();if(this.frmElmnt!==null)a.removeSVG(this.frmElmnt), this.frmElmnt=null;switch(e){case a.SOLID:this.frmElmnt=a.createSVGRect(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,c,f,d,this.getInnerFill());break;case a.DASHED:case a.DOTTED:this.frmElmnt=a.createSVGRectDashed(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,c,f,d,this.getInnerFill(),e);break;default:a.log_append_ln("Unknown outline style")}};a.InfoType=function(){this.textg=this.img=this.valuePrev=this.value=this.e=this.type=this.name= null;this.h=this.w=this.y=this.x=0;this.fSz=this.fSt=this.fN=null};a.PainterType_MPainter=function(b){var f,c,d,e,n;function r(b,d,c,e,f,n,j){if(b.value!==null){var g=null,r=null,m=null,s=1,o=null,p=0,q=null,h=null,u=null,X=null,G={rValue:b.value.toString()};if(b.type!==a.INFO_T_FILE){if(c===!0&&(g=k.getTcrFormatSource(),g.value!==null)){if(typeof f!=="undefined"&&f!=null&&f==!0&&(m=k.getTcrGainSource())!=null&&m.value!=null&&!isNaN(m.value))s=m.value;if(typeof n!=="undefined"&&n!=null&&n==!0&&(o= k.getTcrOffsetSource())!=null&&o.value!=null&&!isNaN(o.value))p=o.value;if(!isNaN(G.rValue))G.rValue=parseFloat(G.rValue)*parseFloat(s)+parseFloat(p);if(typeof e!=="undefined"&&e!=null&&e==!0){if((q=k.getTcrMinValueSource())!=null&&q.value!=null&&!isNaN(q.value))h=parseFloat(q.value);if((u=k.getTcrMaxValueSource())!=null&&u.value!=null&&!isNaN(u.value))X=parseFloat(u.value);if(h!==null&&G.rValueX)a.MsgBoxErrorFlag= !0,a.err_append_ln("Invalid entry: "+G.rValue+" > "+X+"!")}a.TCR_convertToValueFormat(g.value,G)}if(d===!0&&(r=k.getTcrUnitSource())!=null&&r.value!=null&&r.value!=void 0)G.rValue=G.rValue+" "+r.value;if(d===!0){c=0;c=e=null;d=k.getFormatSource().value;if(d!==null){if(G.rValue.length===0)G.rValue=a.getTimestamp_ms()/1E3;d.indexOf("%t")!==-1?(c=G.rValue*1E3,e=new Date(0),d.indexOf("%tu")!==-1?(e.setTime(c),c=e,e=new Date(0),e.setMilliseconds(c.getUTCMilliseconds()),e.setSeconds(c.getUTCSeconds()), e.setMinutes(c.getUTCMinutes()),e.setHours(c.getUTCHours()),e.setDate(c.getUTCDate()),e.setMonth(c.getUTCMonth()),e.setFullYear(c.getUTCFullYear()),c=e,d=d.replace("%tu",""),G.rValue=c.strftime(d)):(e.setTime(c),d=d.replace("%t",""),G.rValue=e.strftime(d))):G.rValue=a.sprintf(d,G.rValue)}if((b.type===a.INFO_T_PPO||b.type===a.INFO_T_PASSWORDPPO)&&j!==void 0&&j.ppo!==null&&j.ppo.unit.length>0)G.rValue=G.rValue+" "+j.ppo.unit}b.value=G.rValue}}}function j(b,d,c){b.type=d.type;b.name=d.name;if(b.type=== a.INFO_T_FILE){d.value=d.name;c=d.value.indexOf("|");if(c!=-1)d.value=d.value.substring(0,c);b.value=a.rl_resolveInfoName(d.value)}else b.value=a.RW_readSource(d.type,d.name,c)}var k=this;this.objId=0;this.objStr="";this.h=this.w=this.y=this.x=this.hOrg=this.wOrg=this.yOrg=this.xOrg=this.ptId=0;this.instanceValidUpAction=this.instanceValidDownAction=this.instanceDisabled=this.instanceDraw=this.painterGroupElement=this.shpElmnt=this.svgDoc=null;this.repaintElements=[];this.externEventListener=[];this.editModeFlag= this.mouseInFlag=!1;this.editSource=new a.InfoType;this.paintSource=new a.InfoType;this.pressedSource=new a.InfoType;this.disabledSource=new a.InfoType;this.formatSource=new a.InfoType;this.tcrFormatSource=new a.InfoType;this.tcrUnitSource=new a.InfoType;this.tcrGainSource=new a.InfoType;this.tcrOffsetSource=new a.InfoType;this.tcrMinValueSource=new a.InfoType;this.tcrMaxValueSource=new a.InfoType;this.drawCellTxtOnXLinesSource=new a.InfoType;this.reloadFilePeriode=new a.InfoType;this.blendSources= [];this.blendSourcesPrevString=[];this.onLostActionFunc=this.onDrawActionFunc=this.onGainActionFunc=this.executeActionMouseUp=this.executeActionMouseDown=null;this.isDisabledPrev=this.isDisabled=!1;this.isVisible=!0;this.notify=function(b,d){var c=0;switch(b){case a.VIEW_GAIN_FOCUS:if(this.instanceDisabled()===!1&&this.onGainActionFunc)this.onGainActionFunc();break;case a.VIEW_LOST_FOCUS:if(this.instanceDisabled()===!1&&this.onLostActionFunc)this.onLostActionFunc();break;case a.DRAW_OBJECT:this.instanceDraw&& this.instanceDraw();if(k.instanceDisabled&&(k.isDisabled=k.instanceDisabled(),k.isDisabled!==k.isDisabledPrev))k.isDisabledPrev=k.isDisabled,k.scheduleFullRedrawPainter();this.genericDraw();if(this.instanceDisabled()===!1&&this.onDrawActionFunc)this.onDrawActionFunc();break;case a.MOUSE_DOWN:if(a.OB_checkMouseCoordinates(this,d)===!0)if(this.instanceDisabled()===!1){var e=this.anyMouseDownExternalEventListener(),f=this.anyMouseUpExternalEventListener(),n=this.instanceValidDownAction(),j=this.instanceValidUpAction(); if(n===!0||j===!0||e===!0||f===!0){this.isPressed=!0;d.consumedFlag=!0;d.consumedPainter=this;this.scheduleFullRedrawPainter();if(n===!0)this.executeActionMouseDown(),d.actionExecutedFlag=!0;if(e===!0)this.callExternalListener(b,d),d.actionExecutedFlag=!0;c=1}}else c=0;else c=0;break;case a.MOUSE_UP:if(a.g_MouseDownEventInfo.consumedFlag===!0&&a.g_MouseDownEventInfo.consumedPainter!==null)a.OB_checkMouseCoordinates(this,a.g_MouseDownEventInfo)===!0||a.g_MouseDownEventInfo.consumedPainter===this?this.instanceDisabled()=== !1?(this.executeActionMouseUp&&this.executeActionMouseUp(),this.anyMouseUpExternalEventListener()&&this.callExternalListener(b,d)):a.getDebugLevel()>=2&&a.log_append_ln("hmi_mpainter Disabled while down case"):a.getDebugLevel()>=2&&a.log_append_ln("hmi-mpainter Undo case"),this.isPressed=!1,this.scheduleFullRedrawPainter();break;case a.MOUSE_MOVE:if(a.OB_checkMouseCoordinates(this,d)===!0){if(this.instanceDisabled()===!1&&this.mouseInFlag===!1)this.mouseInFlag=!0,d.type=a.MOUSE_OVER,d.typeStr=a.MOUSE_OVER_STR, this.getNumExternEventListener()&&this.callExternalListener(a.MOUSE_OVER,d)}else if(this.mouseInFlag===!0)this.mouseInFlag=!1,d.type=a.MOUSE_OUT,d.typeStr=a.MOUSE_OUT_STR,this.getNumExternEventListener()&&(c=this.callExternalListener(a.MOUSE_OUT,d))}return c};this.dragImpl=function(b,d){var c=0,e=0,f=0,n=0,j=0,k=0,n=!1,g=0,r=0,m=0,c=c=0,k=Date.now(),s=Date.now(),s=k-b.lastWriteTSmS;a.getDebugLevel()>=3&&a.log_append_ln("dragImpl(..., "+d+" ) dragInfoPtr.lastWriteTSmS "+b.lastWriteTSmS+" timeNowMs "+ k+" dragInfoPtr.previousToWriteValue "+b.previousToWriteValue+" deltaMs "+s);c=b.lastWriteTSmS<=0||b.destType!==a.INFO_T_PPO?a.RW_readSource(b.destType,b.destName):b.previousToWriteValue;isNaN(c)===!0&&(a.log_append_ln("WARNING this.dragImpl destPrevious value ["+c+"] is NaN so force to 0 "),c=0);a.toFixed(c,4);e=a.RW_readSource_parseFloat(b.typeValueMin,b.nameValueMin,1);f=a.RW_readSource_parseFloat(b.typeValueMax,b.nameValueMax,1);n=a.RW_readSource_parseInt(b.typeOptionFlag,b.nameOptionFlag);c= e;j=f;n=(n&2)==2;g=a.RW_readSource_parseFloat(b.typePxMin,b.namePxMin,1);r=a.RW_readSource_parseFloat(b.typePxMax,b.namePxMax,1);isNaN(d)===!0&&(a.log_append_ln("WARNING this.dragImpl offset value ["+d+"] is NaN so force to 0 "),d=0);if(r!=g){m=0;r!=g?m=(j-c)*(d-g)/(r-g)+c:a.log_append_ln("ERROR in dragWritePPOFromDrag iOffsetMax == iOffsetMin = "+g);c=a.MIN(e,f);j=a.MAX(e,f);mj&&(m=j);isNaN(m)===!0&&(a.log_append_ln("WARNING this.dragImpl destNow value ["+m+"] is NaN so force to 0 "), m=0);n==!0?(c=a.toFixed(m,0),a.getDebugLevel()>=3&&a.log_append_ln("this.dragImpl dragInfoPtr.sliderOptionInteger active so rounds to int before write value= "+m+" destRounded = "+c)):c=a.toFixed(m,4);if(b.destType===a.INFO_T_PPO){if((b.lastWriteTSmS<=0||s>=a.DRAGINFO_WRITE_MIN_MS)&&b.previousToWriteValue!=c)a.getDebugLevel()>=3&&a.log_append_ln("dragImpl( "+d+" ) WRITE PPO destRounded: "+c+" dragInfoPtr.destName "+b.destName+" deltaMs "+s),a.writePPO(b.destName,c,!0),b.lastWriteTSmS=k}else if(b.previousToWriteValue!= c)a.RW_writeSource(b.destType,b.destName,c),a.getDebugLevel()>=3&&a.log_append_ln("dragImpl( "+d+" ) WRITE CO destRounded: "+c+" dragInfoPtr.destName "+b.destName+" deltaMs "+s),b.lastWriteTSmS=k;b.previousToWriteValue=c;a.scheduleRepaint()}else n?(c=a.toFixed(m,0),a.getDebugLevel()>=3&&a.log_append_ln("this.dragImpl dragInfoPtr.sliderOptionInteger active so rounds to int before write value= "+m+" destRounded = "+c)):c=a.toFixed(m,4);return c};this.onDrag=function(){var b=this.getOffsetStruct();this.dragXInfo!== null&&(this.dragImpl(this.dragXInfo,a.g_MouseMoveEventInfo.x-this.xOrg-b.xOff-this.dragXInfo.relDownPos),a.getDebugLevel()>=3&&(a.log_append_ln("this.onDrag"),a.log_append_ln("sc.g_MouseMoveEventInfo.x: "+a.g_MouseMoveEventInfo.x),a.log_append_ln("this.xOrg: "+this.xOrg),a.log_append_ln("offset.xOff: "+b.xOff),a.log_append_ln("this.dragXInfo.relDownPos: "+this.dragXInfo.relDownPos)));this.dragYInfo!==null&&(this.dragImpl(this.dragYInfo,a.g_MouseMoveEventInfo.y-this.yOrg-b.yOff-this.dragYInfo.relDownPos), a.getDebugLevel()>=3&&(a.log_append_ln("this.onDrag"),a.log_append_ln("sc.g_MouseMoveEventInfo.y: "+a.g_MouseMoveEventInfo.y),a.log_append_ln("this.yOrg: "+this.yOrg),a.log_append_ln("offset.yOff: "+b.yOff),a.log_append_ln("this.dragYInfo.relDownPos: "+this.dragYInfo.relDownPos)));this.setOffset(b)};this.getDragXOffset=function(){var b=0;this.dragXInfo!==null&&(b=this.getDragOffset(this.dragXInfo));a.getDebugLevel()>=3&&a.log_append_ln("this.getDragXOffset: "+b);isNaN(b)===!0&&(a.log_append_ln("WARNING this.getDragXOffset dOffset value ["+ b+"] is NaN so force to 0 "),b=0);return b};this.getDragYOffset=function(){var b=0;this.dragYInfo!==null&&(b=this.getDragOffset(this.dragYInfo));isNaN(b)===!0&&(a.log_append_ln("WARNING this.getDragYOffset dOffset value ["+b+"] is NaN so force to 0 "),b=0);return b};this.getDragOffset=function(b){var c=0,d=0,e=c=0,f=e=0,n=0,c=0;b!==null&&(n=b.lastWriteTSmS<=0||b.destType!==a.INFO_T_PPO?a.RW_readSource(b.destType,b.destName):b.previousToWriteValue,isNaN(n)===!0&&(a.log_append_ln("WARNING this.getDragOffset destNow value ["+ n+"] is NaN so force to 0 for "+b.destName),n=0));c=parseFloat(a.RW_readSource(b.typeValueMin,b.nameValueMin));d=e=parseFloat(a.RW_readSource(b.typeValueMax,b.nameValueMax));e=parseFloat(a.RW_readSource(b.typePxMin,b.namePxMin));f=parseFloat(a.RW_readSource(b.typePxMax,b.namePxMax));b=0;d!=c?b=(n-c)*(f-e)/(d-c)+e:a.log_append_ln("ERROR in dragGetOffsetFromPPO iMaxPPO == iMinPPO = "+c);c=b;isNaN(c)===!0&&(a.log_append_ln("WARNING this.getDragOffset dOffset value ["+c+"] is NaN so force to 0 "),c=0); cf&&(c=f);return c};this.dragYInfo=this.dragXInfo=null;var o="0, 0, 0",u=!0,p="0, 0, 0",s=!1,q=!1,m=!0,t=null,v=1,x=0,w=10,y="",z=0,I=10,D="",A=0,F=!1,H=!1,N=!1,L=0,J=0,M=!1,B={xOff:0,yOff:0,wOff:0,hOff:0},C=0,E=0;f=0;d=0;n=0;c="";e="";this.getOffsetStruct=function(){return B};this.hasAnyOffset=function(){var a=!1;if(B.xOff!=0||B.yOff!=0||B.wOff!=0||B.hOff!=0||C!=0||E!=0)a=!0;return a};this.scheduleFullRedrawPainter=function(){F=!0};this.isFullPainterRedrawRequired=function(){var b=!1; return b=a.getDebugLevel()>=4?!0:F};this.resetFullRedrawFlag=function(){F=!1};this.genericDraw=function(){if(this.isFullPainterRedrawRequired()===!0){k.getShapeElement()&&(k.getShapeElement().setAttribute("stroke","rgb("+k.getOutlineColor()+")"),k.checkIfOutline()===!0?k.getShapeElement().setAttribute("stroke-width",k.getOutlineWidth()):k.getShapeElement().setAttribute("stroke-width","0"),k.ptId!==a.PT_NAME_BARGRAPH_ID&&(k.getShapeElement().setAttribute("fill","rgb("+k.getInteriorColor()+")"),k.checkIfInterior()=== !0?k.getShapeElement().setAttribute("fill-opacity","1"):k.getShapeElement().setAttribute("fill-opacity","0")));var b="",j=0,g=0,r=0;f>0?(j=0,j-=Math.abs(f)):f<0&&(j=Math.abs(f));j!==0&&(g=c===""||isNaN(c)===!0?k.x+k.w/2+d:c,r=e===""||isNaN(e)===!0?k.y+k.h/2+n:e,b="rotate("+j+","+g+","+r+")");j=k.getMainGroupElement();g=null;j!==null?(b.length>0&&j.setAttributeNS(null,"transform",b),b.length===0&&(g=j.getAttributeNS(null,"transform"),g!==null&&g.length>0&&j.setAttributeNS(null,"transform",""))):a.log_append_ln("getMainGroupElement returned null!")}this.typeDraw!== null&&this.typeDraw();this.resetFullRedrawFlag()};this.typeDraw=null;this.setTextHPos=function(a){L!=a&&(L=a,this.scheduleFullRedrawPainter())};this.getTextHPos=function(){return L};this.setTextVPos=function(a){J!=a&&(J=a,this.scheduleFullRedrawPainter())};this.getTextVPos=function(){return J};this.setMultiline=function(a){H!=a&&(H=a,this.scheduleFullRedrawPainter())};this.getIsMultiline=function(){return H};this.setAutoAdjust=function(a){N!=a&&(N=a,this.scheduleFullRedrawPainter())};this.getIsAutoAjust= function(){return N};this.setTextColor=function(a){t!=a&&(t=a,this.scheduleFullRedrawPainter())};this.setOutlineColor=function(a){p!=a&&(p=a,this.scheduleFullRedrawPainter())};this.setInnerFill=function(a){s!=a&&(s=a,this.scheduleFullRedrawPainter())};this.setU3d=function(a){q!=a&&(q=a,this.scheduleFullRedrawPainter())};this.setInteriorColor=function(a){o!=a&&(o=a,this.scheduleFullRedrawPainter())};this.setHasOutline=function(a){m!=a&&(m=a,this.scheduleFullRedrawPainter())};this.setHasInterior=function(a){u!= a&&(u=a,this.scheduleFullRedrawPainter())};this.setPressedFlag=function(a){M!=a&&(M=a,this.scheduleFullRedrawPainter())};this.setUseFont=function(b){var c={ppo:null},d="",e=0,d=0,f="",e="";if(b.type===null){if(w!=I&&(w!=I||y!=D||z!=A))w=I,y=D,z=A,this.scheduleFullRedrawPainter()}else if(b.type==a.INFO_T_FONT){if(w!=b.fSz||y!=b.fN||z!=b.fSt)w=b.fSz,y=b.fN,z=b.fSt,this.scheduleFullRedrawPainter()}else if(d=a.RW_readSource(b.type,b.name,c),e=d.split(","),e.length==3&&(f=e[0],d=parseInt(e[1],10),e=parseInt(e[2], 10),!(isNaN(e)===!0||isNaN(d)===!0||e<=0||d<0||d>=5)))if(w!=e||y!=f||z!=d)w=e,y=f,z=d,this.scheduleFullRedrawPainter()};this.getPressedFlag=function(){return M};this.getColorFromString=function(b){var c="",c=-1,b=b.toString(),c=b.indexOf("#");if(c!=-1)return b=parseInt(b.slice(1,b.length),16),c=a.getRValue(b)+","+a.getGValue(b)+","+a.getBValue(b);c=b.indexOf(",");return c!=-1?b:c=a.getRValue(b)+","+a.getGValue(b)+","+a.getBValue(b)};this.getInteriorColor=function(){return this.getColorFromString(o)}; this.getOutlineColor=function(){return this.getColorFromString(p)};this.getTextColor=function(){var a="0,0,0,";return a=t!==null?this.getColorFromString(t):this.getOutlineColor()};this.getOutlineStyle=function(){return x};this.getOutlineWidth=function(){return v};this.getInnerFill=function(){return s};this.getU3d=function(){return q};this.checkIfInterior=function(){return u};this.checkIfOutline=function(){return m};this.getFontSize=function(){return w};this.getFontName=function(){return y};this.getFontStyle= function(){return z};this.getSvgFontStyle=function(){var a="normal";switch(this.getFontStyle()){case 0:a="normal";break;case 1:a="normal";break;case 2:a="italic";break;case 3:a="italic";break;default:a="normal"}return a};this.getSvgFontWeight=function(){var a="lighter";switch(this.getFontStyle()){case 0:a="lighter";break;case 1:a="bold";break;case 2:a="lighter";break;case 3:a="bold";break;default:a="lighter"}return a};this._getRepaintElement=function(a){for(var b=0,c=!1,d=0,e=null,b=0;b=3&&a.log_append_ln("getRepaintElement: "+ b+" not found!");return c};this.getShapeElement=function(){return this.shpElmnt};this.getMainGroupElement=function(){var a=null;return a=this.svgDoc.getElementById(this.objStr)};this.getNumRepaints=function(){return this.repaintElements.length};this.changeRepaintVisibility=function(a,b){b?this.showRepaint(a):this.hideRepaint(a)};this.hideRepaint=function(b){var c=this.getRepaintElement(b);c===null?a.log_append_ln(b+" is null (hideRepaint)"):c.setAttributeNS(null,"visibility","hidden")};this.showRepaint= function(b){var c=this.getRepaintElement(b);c===null?a.log_append_ln(b+" is null (showRepaint)"):c.setAttributeNS(null,"visibility","")};this.setVisibility=function(a){this.isVisible=a;var b=this.getMainGroupElement();b==null?console.log("setVisibility() domElmnt == null"):a?b.setAttributeNS(null,"visibility","visible"):b.setAttributeNS(null,"visibility","hidden")};this.setOffset=function(b){var c=this.getDragXOffset(),d=this.getDragYOffset();isNaN(c)===!0&&(a.log_append_ln("WARNING this.setOffset offsetDragx value ["+ c+"] is NaN so force to 0 "),c=0);isNaN(d)===!0&&(a.log_append_ln("WARNING this.setOffset offsetDragy value ["+d+"] is NaN so force to 0 "),d=0);if(isNaN(b.xOff)===!0)a.log_append_ln("WARNING this.setOffset offsetStruct.xOff value ["+b.xOff+"] is NaN so force to 0 "),b.xOff=0;if(isNaN(b.yOff)===!0)a.log_append_ln("WARNING this.setOffset offsetStruct.yOff value ["+b.yOff+"] is NaN so force to 0 "),b.yOff=0;if(isNaN(b.wOff)===!0)a.log_append_ln("WARNING this.setOffset offsetStruct.wOff value ["+b.wOff+ "] is NaN so force to 0 "),b.wOff=0;if(isNaN(b.hOff)===!0)a.log_append_ln("WARNING this.setOffset offsetStruct.hOff value ["+b.hOff+"] is NaN so force to 0 "),b.hOff=0;if(isNaN(B.xOff)===!0)a.log_append_ln("WARNING this.setOffset offsetStructPrev.xOff value ["+B.xOff+"] is NaN so force to 0 "),B.xOff=0;if(isNaN(B.yOff)===!0)a.log_append_ln("WARNING this.setOffset offsetStructPrev.yOff value ["+B.yOff+"] is NaN so force to 0 "),B.yOff=0;if(isNaN(B.wOff)===!0)a.log_append_ln("WARNING this.setOffset offsetStructPrev.wOff value ["+ B.wOff+"] is NaN so force to 0 "),B.wOff=0;if(isNaN(B.hOff)===!0)a.log_append_ln("WARNING this.setOffset offsetStructPrev.hOff value ["+B.hOff+"] is NaN so force to 0 "),B.hOff=0;isNaN(C)===!0&&(a.log_append_ln("WARNING this.setOffset offsetDragStructPrev.dragXOff value ["+C+"] is NaN so force to 0 "),C=0);isNaN(E)===!0&&(a.log_append_ln("WARNING this.setOffset offsetDragStructPrev.dragYOff value ["+E+"] is NaN so force to 0 "),E=0);if(B.xOff!==b.xOff||B.yOff!==b.yOff||B.wOff!==b.wOff||B.hOff!==b.hOff|| C!==c||E!==d){this.x=this.xOrg+b.xOff+c;if(isNaN(this.x)===!0)a.log_append_ln("WARNING this.setOffset this.x value ["+this.x+"] is NaN so force to 0 "),this.x=0;this.y=this.yOrg+b.yOff+d;if(isNaN(this.y)===!0)a.log_append_ln("WARNING this.setOffset this.y value ["+this.y+"] is NaN so force to 0 "),this.y=0;this.w=this.wOrg+b.wOff;if(isNaN(this.w)===!0)a.log_append_ln("WARNING this.setOffset this.w value ["+this.w+"] is NaN so force to 0 "),this.w=0;this.h=this.hOrg+b.hOff;if(isNaN(this.h)===!0)a.log_append_ln("WARNING this.setOffset this.h value ["+ this.h+"] is NaN so force to 0 "),this.h=0;if(this.w<0){this.x+=this.w;if(this.x<0)this.x=0;this.w=-this.w}if(this.h<0){this.y+=this.h;if(this.y<0)this.y=0;this.h=-this.h}a.getDebugLevel>=2&&a.log_append_ln("this.setOffset \nthis.x = "+this.x+" \nthis.y = "+this.y+" \nthis.w = "+this.w+" \nthis.h = "+this.h);B.xOff=b.xOff;B.yOff=b.yOff;B.wOff=b.wOff;B.hOff=b.hOff;C=c;E=d;this.scheduleFullRedrawPainter()}};this.setRotate=function(a){if(c!==a.cxAbs||e!==a.cyAbs||f!==a.angle||d!==a.cxOff||n!==a.cyOff)c= a.cxAbs,e=a.cyAbs,d=a.cxOff,n=a.cyOff,f=a.angle,this.scheduleFullRedrawPainter()};this.addExternListener=function(b,c,d,e){typeof c==="function"?((b===a.MOUSE_OVER||b===a.MOUSE_OUT)&&a.g_MouseMoveNotificationList.push(this),this.externEventListener.push(new g(b,c,d,e))):a.log_append_ln("addExternListener error: Invalid callback function (painter x:"+this.x+" y:"+this.y+" w:"+this.w+" h:"+this.h+")")};this.getNumExternEventListener=function(){return this.externEventListener.length};this.anyMouseDownExternalEventListener= function(){for(var b=0,b=0;b=3&&(a.log_append_ln("hmi_mpainter activateEditMode editSource fSizeOrg: "+c),a.log_append_ln("hmi_mpainter activateEditMode editSource value: "+d));var f=e=0,f=a.getLeftPos(a.g_MouseDownEventInfo.ViewItem.ClickableDiv.handle);e=a.getTopPos(a.g_MouseDownEventInfo.ViewItem.ClickableDiv.handle);var b=a.getScreenCrds(this.x,this.y,this.w, this.h),n=null;lUpperLeft=a.ME_teq2screenCoord(b.x+f,b.y+e);n=a.ME_teq2screenCoord(b.x+f+b.w,b.y+e+b.h);e=lUpperLeft.y+"px";var f=lUpperLeft.x+"px",j=n.x-lUpperLeft.x+"px",n=n.y-lUpperLeft.y+"px";this.ptId===a.PT_NAME_FILEVIEWER_ID?($(a.g_HTMLControlTextareaElmnt).css("position","absolute"),$(a.g_HTMLControlTextareaElmnt).css("top",e),$(a.g_HTMLControlTextareaElmnt).css("left",f),$(a.g_HTMLControlTextareaElmnt).css("width",j),$(a.g_HTMLControlTextareaElmnt).css("height",n),b=b.scaleFactor*c,$(a.g_HTMLControlTextareaElmnt).css("font-size", b+"px"),$(a.g_HTMLControlTextareaElmnt).css("font-family",this.getFontName()),$(a.g_HTMLControlTextareaElmnt).css("font-style",this.getSvgFontStyle()),$(a.g_HTMLControlTextareaElmnt).css("font-weight",this.getSvgFontWeight()),$(a.g_HTMLControlTextareaElmnt).val(d),$(a.g_HTMLControlTextareaElmnt).css("display","block"),$(a.g_HTMLControlTextareaElmnt).focus()):((e=this.svgDoc.getElementById(this.objStr))&&e.setAttribute("visibility","hidden"),n=this.editSource.type===a.INFO_T_PASSWORDPPO||this.editSource.type=== a.INFO_T_PASSWORDCONTAINER?a.g_HTMLControlPwInputElement:a.g_HTMLControlInputElmnt,e=e.getBoundingClientRect(),$(n).css("position","absolute"),$(n).css("top",e.top.toString()+"px"),$(n).css("left",e.left.toString()+"px"),$(n).css("width",(e.width-2).toString()+"px"),$(n).css("height",(e.height-4).toString()+"px"),b=b.scaleFactor*c,$(n).css("font-size",b+"px"),$(n).css("font-family",this.getFontName()),$(n).css("font-style",this.getSvgFontStyle()),$(n).css("font-weight",this.getSvgFontWeight()),$(n).val(d), $(n).css("color","black"),$(n).css("border-color","black"),$(n).css("border-width","1px"),$(n).css("outline","0"),$(n).css("box-shadow","inset 0 0px 0px rgb(0, 0, 0), 0 0 0px rgb(0, 0, 0)"),$(n).css("display","block"),$(n).focus(),$(n).select(),n.setSelectionRange(0,9999));this.editModeFlag=!0}};a.hideInputField=function(b){b===a.PT_NAME_FILEVIEWER_ID?$(a.g_HTMLControlTextareaElmnt).css("display","none").css("top","0px").css("left","0px").css("width","0px").css("height","0px").val(""):($(a.g_HTMLControlPwInputElement).css("display", "none").css("top","0px").css("left","0px").css("width","0px").css("height","0px").val(""),$(a.g_HTMLControlInputElmnt).css("display","none").css("top","0px").css("left","0px").css("width","0px").css("height","0px").val(""))};this.leaveEditMode=function(b){var c=this.svgDoc.getElementById(this.objStr);a.getDebugLevel>=3&&a.log_append_ln("hmi_mpainter leaveEditMode");if(this.editModeFlag===!0){if(b)if(b=this.getEditSource(),b!==null){b.value=this.editSource.type===a.INFO_T_PASSWORDPPO||this.editSource.type=== a.INFO_T_PASSWORDCONTAINER?a.g_HTMLControlPwInputElement.value:a.g_HTMLControlInputElmnt.value;var d=null,e={rValue:b.value},d=k.getTcrFormatSource();d.value!==null&&a.TCR_convertToRawValueByFormat(d.value,e);b.value=e.rValue;this.ptId===a.PT_NAME_FILEVIEWER_ID?(d=a.g_HTMLControlTextareaElmnt.value,d=d.replace(/\n/gi,a.FVLINESEPTOKEN2),d=d.replace(/\t/gi,a.FVCOLSEPTOKEN2),a.getDebugLevel()>=2&&a.log_append_ln(d),a.RW_writeSource(b.type,b.name,d)):b.type===a.INFO_T_PPO?a.writePPO(b.name,b.value,!0): a.RW_writeSource(b.type,b.name,b.value)}else a.log_append_ln("hmi_mpainter Leave edit mode error");a.hideInputField(this.ptId);this.editModeFlag=!1;c&&c.setAttribute("visibility","visible")}};if(b){if(b.cbDis)this.instanceDisabled=b.cbDis;if(b.cbHasDown)this.instanceValidDownAction=b.cbHasDown;if(b.cbHasUp)this.instanceValidUpAction=b.cbHasUp;if(b.cbD)this.instanceDraw=b.cbD;if(b.cbADown)this.executeActionMouseDown=b.cbADown;if(b.cbAUp)this.executeActionMouseUp=b.cbAUp;if(b.cbAGain)this.onGainActionFunc= b.cbAGain;if(b.cbADraw)this.onDrawActionFunc=b.cbADraw;if(b.cbALost)this.onLostActionFunc=b.cbALost;if(b.dragX)this.dragXInfo=b.dragX,this.dragXInfo.relDownPos=0,this.dragXInfo.lastWriteTSmS=0;if(b.dragY)this.dragYInfo=b.dragY,this.dragYInfo.relDownPos=0,this.dragYInfo.lastWriteTSmS=0;this.objId=b.oId;this.objStr="sc_obj_"+this.objId;this.shpStr=this.objStr+"_shp";this.frmGroup="sc_obj_"+this.objId+"_frm";this.frmOuterGroup=this.frmGroup+"_outer";this.frmInnerGroup=this.frmGroup+"_inner";this.olnGroup= "sc_obj_"+this.objId+"_oln";this.bgElmnt=this.frm3dElmnt=this.frmElmnt=null;this.ptId=b.ptId;this.ptStr="sc_pty_"+this.ptId;this.xOrg=this.x=b.x;this.yOrg=this.y=b.y;this.wOrg=this.w=b.w;this.hOrg=this.h=b.h;o=b.iC;u=b.hI?!0:!1;p=b.oC;m=b.hO?!0:!1;v=b.oW;x=b.oS;y=b.fN;w=b.fSz;z=b.fSt;D=y;I=w;A=z;if(b.sDc)this.shpElmnt=(this.svgDoc=b.sDc)?this.svgDoc.getElementById(this.shpStr):null,this.painterGroupElement=this.svgDoc?this.svgDoc.getElementById(this.objStr):null}this.scheduleFullRedrawPainter()}; return a}(_SCIntern||{});_SCIntern=function(a){a.PainterType_Button=function(h){this.base=a.PainterType_MPainter;this.base(h);this.isPressed=!1;this.updateImage=a.updateImage;this.hideImages=a.hideImages;this.clearText=a.clearText;this.drawSourceText=a.drawSourceText;this.paintSrcNOCACHEElmt=0;this.updateButtonSourceElement=function(g,b){var f=0;this.getU3d()===!0&&(f+=1);g.type!==a.INFO_T_FILE&&(f=this.getOutlineWidth());g.x=this.x+f;g.y=this.y+f;g.w=this.w-2*f;g.h=this.h-2*f;a.setSvgAttrC(g.e,"x",g.x);a.setSvgAttrC(g.e, "y",g.y);a.setSvgAttrC(g.e,"width",g.w);a.setSvgAttrC(g.e,"height",g.h);g.type===a.INFO_T_FILE?(this.clearText(g),this.updateImage(g,b)):(this.hideImages(g),this.clearText(g),this.drawSourceText(g))};this.drawBackGroundShape=function(){var g=0,b=g="",f=this.getOutlineWidth(),c=this.getRepaintElement(this.frmOuterGroup),d=this.getRepaintElement(this.frmInnerGroup);if(this.checkIfInterior()===!0){for(g=1;c!=null&&c.hasChildNodes();)c.removeChild(c.firstChild);for(;d!=null&&d.hasChildNodes();)d.removeChild(d.firstChild); g="rgba("+this.getInteriorColor()+","+g+")";b="rgba("+this.getOutlineColor()+",0)";this.bgElmnt=a.createSVGInOutRect(this.svgDoc,d,c,this.x,this.y,this.w,this.h,g,b,f,this.getInnerFill())}};this.drawOutLineShape=function(){for(var g=0,b="",g="",f=this.getOutlineWidth(),c=0,d=this.getRepaintElement(this.olnGroup),g=this.checkIfOutline()===!0?1:0;d!=null&&d.hasChildNodes();)d.removeChild(d.firstChild);b="rgba("+this.getInteriorColor()+",0)";g="rgba("+this.getOutlineColor()+","+g+")";c=this.getOutlineStyle(); switch(c){case a.SOLID:this.frmElmnt=a.createSVGOlnRect(this.svgDoc,d,this.x,this.y,this.w,this.h,b,g,f,this.getInnerFill());break;case a.DASHED:case a.DOTTED:this.frmElmnt=a.createSVGOlnRectDashed(this.svgDoc,d,this.x,this.y,this.w,this.h,b,g,f,this.getInnerFill(),c);break;default:a.log_append_ln("Unknown outline style")}};this.typeDraw=function(){var g=null,b=null,f=null,c=null,d=0,g=b=0;if(this.isFullPainterRedrawRequired()===!0||this.paintSrcNOCACHEElmt>0){this.paintSrcNOCACHEElmt=0;this.drawBackGroundShape(); if(this.frm3dElmnt!==null)a.removeSVG(this.frm3dElmnt),this.frm3dElmnt=null;if(this.getU3d()===!0)g=this.getOutlineWidth(),this.frm3dElmnt=this.isPressed===!1&&this.getPressedFlag()===!1?a.createSVGRect_3dFrame(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,g):a.createSVGRect(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x+g,this.y+g,this.w-2*g,this.h-2*g,"rgba(0,0,0,0.0)","rgba(0,0,0,1.0)",1);g=this.getPaintSource();b=this.getPressedSource();f=this.getDisabledSource(); c=this.getBlendSources();d=c.length;if(this.isDisabled===!0&&f.name!==null)g.type=f.type,g.name=f.name,g.value=f.value,g.valuePrev=f.valuePrev;else if((this.isPressed===!0||this.getPressedFlag()===!0)&&b.name!==null)g.type=b.type,g.name=b.name,g.value=b.value,g.valuePrev=b.valuePrev;g.name!==null?(this.updateButtonSourceElement(g,b),g.name.indexOf("NOCACHE")===0&&g.type===a.INFO_T_FILE&&this.paintSrcNOCACHEElmt++):(this.hideImages(g),this.clearText(g));for(b=0;b',c='
=2&&a.log_append_ln("Start loadCoInitValues()");for(d in c)a.getDebugLevel()>=3&&a.log_append_ln("co_itq '"+ d+"' = '"+c[d]+"'"),v(d,c[d],!0);a.getDebugLevel()>=2&&a.log_append_ln("End loadCoInitValues()")}if(b.staticCSV)d=b.staticCSV,a.getDebugLevel()>=2&&a.log_append_ln("Start loadStaticCSV()"),k(d,!0),a.getDebugLevel()>=2&&a.log_append_ln("End loadStaticCSV()");if(b.languageCSV)d=b.languageCSV,a.getDebugLevel()>=2&&a.log_append_ln("Start loadInitialLanguageCSV()"),k(d,!1),a.getDebugLevel()>=2&&a.log_append_ln("End loadInitialLanguageCSV()");if(b.SVGViewExtension)Q=b.SVGViewExtension;if(b.LocalPPORefresh)L= b.LocalPPORefresh;if(b.PPOInitFile)J=b.PPOInitFile;if(b.TargetTypeNr)a.TARGET_TYPE_NR=b.TargetTypeNr;if(b.MsgBox)a.MsgBox=b.MsgBox;if(b.FullRedraw)a.FullRedraw=b.FullRedraw;if(b.cgiFail&&(a.Link.cgiFailMax=parseInt(b.cgiFail,10),isNaN(a.Link.cgiFailMax)===!0))a.Link.cgiFailMax=1;a.HMI_CGI_RELATIVTOROOT=b.CGI_RELATIVTOROOT?b.CGI_RELATIVTOROOT:a.CGI_RELATIVTOROOT_WEBROOT}a.getDebugLevel()>=1&&(b=a.GetBrowserInfos(),$("#SC_BrowserInfo").html(b.name+" "+b.fullVersion+"
HMI.js Version: "+a.HMI_VERSION+ "
Build: "+a.HMI_BUILD_DT+"
Target: "+a.TARGET_TYPE_NR),$("#SC_UserAgent").html(navigator.userAgent.toLowerCase()));if(a.g_MouseDownEventInfo===void 0)return a.showCriticalErrorScreen(101,"JavaScript Module hmi_mouse.js missing!"),!1;if(Date.prototype.strftime===void 0)return a.showCriticalErrorScreen(102,"JavaScript Module hmi_strftime.js missing!"),!1;if(a.PainterType_MPainter===void 0)return a.showCriticalErrorScreen(103,"JavaScript Module hmi_mpainter.js missing!"),!1;if(a.PainterType_Button=== void 0)return a.showCriticalErrorScreen(104,"JavaScript Module hmi_button.js missing!"),!1;if(a.PainterType_TextField===void 0)return a.showCriticalErrorScreen(105,"JavaScript Module hmi_textfield.js missing!"),!1;if(a.PainterType_Oval===void 0)return a.showCriticalErrorScreen(106,"JavaScript Module hmi_circle.js missing!"),!1;if(a.PainterType_Polygon===void 0)return a.showCriticalErrorScreen(107,"JavaScript Module hmi_polygon.js missing!"),!1;if(a.PainterType_Polyline===void 0)return a.showCriticalErrorScreen(108, "JavaScript Module hmi_polyline.js missing!"),!1;if(a.PainterType_IGraphic===void 0)return a.showCriticalErrorScreen(109,"JavaScript Module hmi_igraphic.js missing!"),!1;if(a.PainterType_Bargraph===void 0)return a.showCriticalErrorScreen(110,"JavaScript Module hmi_bargraph.js missing!"),!1;if(a.PainterType_Rectangle===void 0)return a.showCriticalErrorScreen(111,"JavaScript Module hmi_rectangle.js missing!"),!1;a.initMsgBoxVars();a.VM_doRepaint();a.initSpiderLink();J.length>0&&a.loadAndParseTCRFile(J); $("body").append('
');a.g_HTMLControlDropDownElmnt=document.getElementById("SC_HTMLControlDropDown");a.g_HTMLControlDropDownElmnt!==null?($(a.g_HTMLControlDropDownElmnt).css("display","none"),$(a.g_HTMLControlDropDownElmnt).css("z-index", "2147483638"),$(a.g_HTMLControlDropDownElmnt).css("overflow","auto"),$(a.g_HTMLControlDropDownElmnt).on("height","100px"),$(a.g_HTMLControlDropDownElmnt).on("change",n)):a.err_append_ln("SC_HTMLControlDropDown not found!");a.g_HTMLControlInputElmnt=document.getElementById("SC_HTMLControlInput");a.g_HTMLControlInputElmnt!==null?($(a.g_HTMLControlInputElmnt).css("display","none"),$(a.g_HTMLControlInputElmnt).css("z-index","2147483638"),$(a.g_HTMLControlInputElmnt).on("blur",e)):a.err_append_ln("SC_HTMLControlInput not found!"); a.g_HTMLControlPwInputElement=document.getElementById("SC_HTMLControlInputPW");a.g_HTMLControlPwInputElement!==null?($(a.g_HTMLControlPwInputElement).css("display","none"),$(a.g_HTMLControlPwInputElement).css("z-index","2147483638"),$(a.g_HTMLControlPwInputElement).on("blur",e)):a.err_append_ln("g_HTMLControlPwInputElement not found!");a.g_HTMLControlTextareaElmnt=document.getElementById("SC_HTMLControlTextArea");a.g_HTMLControlTextareaElmnt!==null?($(a.g_HTMLControlTextareaElmnt).css("display","none"), $(a.g_HTMLControlTextareaElmnt).css("z-index","2147483638")):a.err_append_ln("SC_HTMLControlTextArea not found!");a.lastActivityTs_ms=a.getTimestamp_ms();a.getDebugLevel()>=2&&a.log_append_ln("SpiderControl.init() End");return!0}function u(){$("body").append('
HMI.js Debug Console
Browser:
\t\t\t
User Agent:


\t\t\tCurrent Page:
\t\t\tRepaint Cnt:
\t\t\tRefresh Cnt:
\t\t\tMouse Move:
\t\t\t\t\t\t\t\t\t
\t\t\t
'); $("#SC_ClearWebConsole").click(function(a){a.stopImmediatePropagation();$("#SC_WebConsoleContents").html("
Cleared
")});$("#SC_StopStartWebConsole").click(function(b){b.stopImmediatePropagation();P&&($("#SC_StopStartWebConsole").attr("value","Start"),a.log_append_ln("Console Stoped"));if(P=!P)$("#SC_StopStartWebConsole").attr("value","Stop"),a.log_append_ln("Console Started")});$("#SC_WebConsoleWrapper").css({"font-family":"Courier New","font-size":"11px",position:"fixed",border:"solid 1px black", "background-color":"white",top:"5px",right:"5px",width:"250px",height:"80%",padding:"10px",overflow:"scroll"});T=!1;$("#SC_ConsoleLeftRight").click(function(a){a.stopImmediatePropagation();T?($("#SC_ConsoleLeftRight").attr("value","Left"),$("#SC_WebConsoleWrapper").css({left:"",right:"5px"})):($("#SC_ConsoleLeftRight").attr("value","Right"),$("#SC_WebConsoleWrapper").css({left:"5px",right:""}));T=!T})}function p(b){a.getDebugLevel()>=3&&a.log_append_ln("unloadView");if(b!==null){if(b.unloadedFlag=== !1&&b.SVGWindow!==null){b.SVGWindow.onunload=null;b.SVGWindow.onbeforeunload=null;b.unloadedFlag=!0;b.LostFunc();b.LostFunc=null;b.RepaintFunc=null;var c=b.SVGPPOArray,d=0;if(c!==null)if(c)for(d=0;d0&&a.g_PPOList[e].regView--}else a.log_append_ln("ERROR hmi.js unloadViewPPOs() failed!");a.destroyMouseMoveNotifyList();a.getDebugLevel()>=3&&a.log_append_ln("Unloaded: ("+b.ViewName+")");b.MouseCircle=null}}else a.log_append_ln("unloadView() Error: viewItem not found!")} function s(b){b=a.ViewList.getViewByDestinationDivId(b);b!==null&&(p(b),a.ME_destroyViewKeyEventListener(b.SVGDocument),a.ME_destroyMouseEventHandler(b),b.DestinationDiv.jQHan.html(""),a.ViewList.removeViewByDestinationDivId(b.DestinationDiv.id))}function q(b){if(a.SpecialCO.language.value!=b)k(b,!1),a.SpecialCO.language.value=b}function m(b){b=parseInt(b,10);if(isNaN(b)===!1)a.SpecialCO.skiprefresh.value=b}function t(b){var c=null;$.ajax({type:"GET",global:!1,async:!1,timeout:a.AjaxTimeout,cache:!0, success:function(b){c=b;a.getDebugLevel()>=3&&console.log("Result: "+c)},error:function(c){a.getDebugLevel()>=2&&console.log("Error retrieving = 1: "+b+" => "+c)},url:b,dataType:"text"});return c}function v(b,c,d){var e=0,b=a.rl_resolveInfoName(b);if(b!==a.SpecialCO.dateTimeLocalNow.name&&b!==a.SpecialCO.dateLocalNow.name&&b!==a.SpecialCO.timeLocalNow.name&&b!==a.SpecialCO.mbRunningTime.name)if(b===a.SpecialCO.blink.name)a.directWriteContainer(b,c);else if(b===a.SpecialCO.language.name)q(c);else if(b=== a.SpecialCO.mbMsgBox.name&&d===!0)a.noop();else if(b==a.SpecialCO.MB_SilentDebugPrintOut.name){if(c=="1"&&a.getDebugLevel()>0)a.log_append_ln(a.SilentDebugStr),a.SilentDebugStr=""}else if(b==a.SpecialCO.polltime.name)x(c);else if(b==a.SpecialCO.skiprefresh.name)m(c);else if(b==a.SpecialCO.mbTmzEn.name){if(c=parseInt(c,10),isNaN(c)===!1)a.SpecialCO.mbTmzEn.value=c}else if(b==a.SpecialCO.mbInactivity.name||b==a.SpecialCO.mbInactivity.alias)c=="0"&&a.resetInactivity();else if(b==a.SpecialCO.mbInactivityMin.name)c== "0"&&a.resetInactivity();else if(b==a.SpecialCO.mbMsgBox.name){if(a.SpecialCO.mbMsgBox.value=c,a.SpecialCO.mbMsgBox.value.length==0)a.SpecialCO.mbMsgBoxNr.value="0"}else if(b==a.SpecialCO.mbMsgBoxNr.name)a.SpecialCO.mbMsgBoxNr.value=c;else if(b==a.SpecialCO.autoincr.name)a.SpecialCO.autoincr.value=c;else if(a.prefixicmp(a.SpecialCO.MB_Calendar.name,b)===!0)e=a.mb_calendarWriteVal(b.substring(12,b.length),c),e===0&&a.directWriteContainer(b,c);else if(b==a.SpecialCO.MB_ClearFileCache.name)c=="7"?(a.g_MouseDownEventInfo.ViewItem.Embed.handle.contentWindow.location.reload(!0), a.initial=!1):c!="0"&&console.log("MB_clearFileCache = "+c+" is not supported in HTML5");else if(b==a.SpecialCO.MB_domDeltaFlag.name){var f,n=[],j=null,g=[],k=null,r=null,s=null,o=d=null,p=null,h=0,u=0,w=o="",v=null,E=-1,O=-1,K=b=-1,y=null,R=null,z=0,d=function(a){for(z=0;z0)for(z=v.length-1;z>0;z--)typeof v[z]!=="undefined"&&v[z].objId!=null&& z!=v[z].objId&&(v[v[z].objId]=v[z],v.splice(z,1))},P=function(){n=f.getElementsByTagName("defs");r=n[0];k=y;g=k.getElementsByTagName("defs");s=g[0];k=s.parentNode;if(n.length>0&&g.length>0)j=r.parentNode,k.replaceChild(r,s);for(h=0;hE){k.insertBefore(r,s);break}k.lastChild==p?appendChild(r):k.insertBefore(r,p.nextSibling)}},e=function(){var a=0,b=null;do{if(typeof v[a]!=="undefined"&&v[a]!=void 0&&v[a]!=null)b=v[a].svgDoc;a++}while(b==null&&a0&&(y=e(),w=t("deltajs_teq.svg")),w!=null&&w.length>0&&d("_SCIntern."),o=t("delta_teq.svg"),o!=null&&o.length>0&&(f=(new DOMParser).parseFromString(o, "application/xml"),P()));if(c=="2"){v=a.g_MouseDownEventInfo.ViewItem.PObjArrFunc();if((o=t("delta_teq.svg"))&&o.length>0){f=(new DOMParser).parseFromString(o,"application/xml");n=f.getElementsByTagName("defs");j=n[0].parentNode;for(h=0;h0&&b<0?b=E:E!=null&&E>0&&b>0&&(K=E))}if(typeof v!=="undefined"&&v!=null&&v.length>0){y=e();if(b>0){v.splice(b,v.length-b);for(h=b;h<=K;h++)v.push(void 0); if(y!=null){if((o=s=y.getElementById("sc_obj_"+b))!=null)k=s.parentNode;for(;o!=null;)s=s.nextSibling,typeof o.tagName!=="undefined"&&o.id&&(E=parseInt(o.id.substr(7)),E!=null&&E>=b&&k.removeChild(o)),o=s}}w=t("deltajs_teq.svg")}w!=null&&w.length>0&&d("_SCIntern.");b>0&&f!=null&&P()}if(c=="3"&&a.g_MouseDownEventInfo.ViewItem!=null&&(c=K=-1,v=a.g_MouseDownEventInfo.ViewItem.PObjArrFunc(),o=t("delta_teq.svg"),v!=null)){if(typeof v[0]==="undefined"||v[0]==void 0||v[0]==null||v[0].objId!=0||typeof v[v- length-1]==="undefined"||v[v-length-1]==void 0||v[v-length-1]==null||v[v-length-1].objId!=v-length-1){b=v.length;for(h=0;h0){f=(new DOMParser).parseFromString(o,"application/xml");n=f.getElementsByTagName("defs");j=n[0].parentNode;for(h=1;h0&&b<0?b=E:E!=null&&E>=0&&b>0&&(K=E));K==-1&&(K=b)}y=e();w=t("deltajs_teq.svg");w!=null&&w.length>0&&d("_SCIntern.");d=null;b==-1&&(b=K=1);for(h=b;h<=K;h++)if((s=y.getElementById("sc_obj_"+h))!=null)d=s.nextElementSibling,k=s.parentNode,(lDummyTagPtr=f.getElementById("sc_obj_"+h))!=null?(c=h,k.replaceChild(lDummyTagPtr,s)):k.removeChild(s);for(;h=2&&a.log_append_ln("registerPPO: "+ c);if(a.g_PPOList[c]===void 0){var d=new a.PPOListItemType;d.name=c;d.address=c;a.g_PPOList[c]=d;a.PPOSize++}if(b===H)a.g_PPOList[c].regView++;else if(b===N)a.g_PPOList[c].regHMI=!0}function y(b){b=a.rl_resolveInfoName(b);return S[b]!==void 0?S[b]:Y[b]!==void 0?Y[b]:b}function z(a){return y(a)}function I(){if(a.g_MouseDownEventInfo.ViewItem!==null)return a.g_MouseDownEventInfo.ViewItem.ViewJumpScheduledFlag}function D(b,c,d,e,f){var n="",j=0,g=0,k="",r="",n=b,m=0,s={},o=e;s.operator="";s.nPosStart= 0;s.baseAddr=0;do{j=n.indexOf(c);if(j>=0){g=n.indexOf(d,j+c.length);if(g===-1)g=n.length;j+c.length===g&&(g=n.indexOf(d,j+c.length+1));g===-1&&(g=n.length+1);k=n.substring(j,g+d.length);if(e&&j>=2)if(n[j-1]=="+"||n[j-1]=="-"||n[j-1]=="*"||n[j-1]=="/"||n[j-1]=="%"){if(j-2>=0){var k=j-2,p=n,h=0,q="0",s=0,q=k,r={},u=!1;r.baseAddr=0;for(r.nPosStart=0;k>=0;){var t=p.charAt(k),v=!1;switch(t){case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":v=!0;break;default:v=!1}if(v=== !1&&(t!="-"||u))break;else h=k,r.nPosStart=k,k--,t=="-"&&(u=!0)}q=p.substring(h,q+1);k=parseInt(q,10);isNaN(k)===!1&&(s=k);r.baseAddr=s;s=r;s.operator=n[j-1];k=n.substring(s.nPosStart,g+d.length)}}else o=!1;r=n.substring(j+c.length,g);if(o){o=k;k=s;p="";p=0;p="";h=0;p=f(r);r=parseInt(p,10);isNaN(r)===!1&&(h=r);switch(k.operator){case "+":p=k.baseAddr+h;break;case "-":p=k.baseAddr-h;break;case "*":p=k.baseAddr*h;break;case "/":p=h===0?0:k.baseAddr/h;break;case "%":p=h===0?0:k.baseAddr%h;break;default:p= 0}p=p.toString();n=n.replace(o,p)}else o=k,k="",k=f(r),n=n.replace(o,k);o=e}m++}while(j>=0&&g>=0&&m<100);m>=100&&a.log_append_ln("Resolve Loop aborted cycleCnt >= 100!",b);return n}function A(b,c){var d="No Message",e={rValue:d,pIdx:0};if(a.g_PPOList&&a.g_PPOList[b]!==void 0){if(a.g_PPOList[b].regView===0&&a.g_PPOList[b].regHMI===!1)a.g_PPOList[b].regHMI=!0;e.rValue=a.g_PPOList[b].value;a.TCR_readFormatedPPOValue(b,e,a.g_PPOList[b]);if(c!==void 0)c.ppo=a.g_PPOList[b];d=e.rValue}return d}function F(b){var c= a.CONTAINER_INITIAL_VALUE,c=null,b=a.rl_resolveInfoName(b);if(b==a.SpecialCO.language.name)c=a.SpecialCO.language.value;else if(b==a.SpecialCO.polltime.name)c=a.SpecialCO.polltime.value;else if(b==a.SpecialCO.MB_SilentDebugPrintOut.name)c=a.SpecialCO.MB_SilentDebugPrintOut.value;else if(b==a.SpecialCO.skiprefresh.name)c=a.co_readSkipRefreshCO();else if(b==a.SpecialCO.dateTimeLocalNow.name)c=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.dateTimeLocalNow.name,!1,null,null,!0);else if(b==a.SpecialCO.dateLocalNow.name)c= a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.dateLocalNow.name,!1,null,null,!0);else if(b==a.SpecialCO.timeLocalNow.name)c=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,!1,null,null,!0);else if(b==a.SpecialCO.mbTmzEn.name)c=a.SpecialCO.mbTmzEn.value;else if(b==a.SpecialCO.mbRunningTime.name){c=a.getTimestamp_ms();if(c-a.FirstRpntTs_ms!==0)a.SpecialCO.mbRunningTime.value=a.toFixedNotRound((c-a.FirstRpntTs_ms)/1E3,0);c=a.SpecialCO.mbRunningTime.value}else if(b==a.SpecialCO.mbInactivity.name|| b==a.SpecialCO.mbInactivity.alias){c=a.getTimestamp_ms();if(c-a.lastActivityTs_ms!==0)a.SpecialCO.mbInactivity.value=a.toFixedNotRound((c-a.lastActivityTs_ms)/1E3,0);c=a.SpecialCO.mbInactivity.value}else if(b==a.SpecialCO.mbInactivityMin.name){c=a.getTimestamp_ms();if(c-a.lastActivityTs_ms!==0)a.SpecialCO.mbInactivityMin.value=a.toFixedNotRound((c-a.lastActivityTs_ms)/6E4,0);c=a.SpecialCO.mbInactivityMin.value}else if(b==a.SpecialCO.mbMsgBox.name)c=a.SpecialCO.mbMsgBox.value;else if(b==a.SpecialCO.mbMsgBoxNr.name)c= a.SpecialCO.mbMsgBoxNr.value;else if(b==a.SpecialCO.autoincr.name)c=a.SpecialCO.autoincr.value;else if(a.prefixicmp(a.SpecialCO.MB_Calendar.name,b)===!0)c=a.mb_calendarReadVal(b.substring(12,b.length),b);else if(b==a.SpecialCO.MB_BrowserTypeID.name)c=a.SpecialCO.MB_BrowserTypeID.value;else if(b==a.SpecialCO.IsWebBrowser.name)c=a.SpecialCO.IsWebBrowser.value;else if(b==a.SpecialCO.MB_IsApp.name)c=a.SpecialCO.MB_IsApp.value;else if(b==a.SpecialCO.MB_ClearFileCache.name)c=a.SpecialCO.MB_ClearFileCache.value; else if(b==a.SpecialCO.MB_SCREEN_WIDTH.name)c=a.SpecialCO.MB_SCREEN_WIDTH.value();else if(b==a.SpecialCO.MB_SCREEN_HEIGHT.name)c=a.SpecialCO.MB_SCREEN_HEIGHT.value();else if(b==a.SpecialCO.MB_WND_INNER_WIDTH.name)c=a.SpecialCO.MB_WND_INNER_WIDTH.value();else if(b==a.SpecialCO.MB_WND_INNER_HEIGHT.name)c=a.SpecialCO.MB_WND_INNER_HEIGHT.value();else if(b==a.SpecialCO.MB_domDeltaFlag.name)c=a.SpecialCO.MB_domDeltaFlag.value;else if(b==a.SpecialCO.MB_DebugBoxLevel.name)c=a.SpecialCO.MB_DebugBoxLevel.value; else{if(a.prefixcmp(a.SpecialCO.NOINITSESSCO.name,b)&&(c=a.readSessionContainer(b),c!==!1))return c;if(a.prefixcmp(a.SpecialCO.MB_PERCO.name,b)&&(c=a.readPersistentContainer(b),c!==!1))return c;c=a.directReadContainer(b)}return c}a.HMI_VERSION="1.6.30.145.14";a.CLIENT="hmi.js";a.ILR_VERSION="1.2";a.CntReadPPOSource=0;a.HMI_BUILD_DT=_hmibuild;a.MsgBox="";a.FullRedraw=!1;a.HMI_CGI_RELATIVTOROOT=a.CGI_RELATIVTOROOT_WEBROOT;a.cgiHost="";a.host="";a.SilentDebugStr="";a.SvgNs="http://www.w3.org/2000/svg"; a.XmlNs="http://www.w3.org/XML/1998/namespace";a.TARGET_TYPE_STD_BASE=100;a.TARGET_TYPE_SAIA=a.TARGET_TYPE_STD_BASE+1;a.TARGET_TYPE_PHOENIX=a.TARGET_TYPE_STD_BASE+9;a.TARGET_TYPE_PANASONIC=a.TARGET_TYPE_STD_BASE+10;a.TARGET_TYPE_NR=a.TARGET_TYPE_STD_BASE;a.INFO_T_UNDEFINED=0;a.INFO_T_PPO=1;a.INFO_T_HTMLTAG=2;a.INFO_T_STRING=3;a.INFO_T_FILE=4;a.INFO_T_CONTAINER=5;a.INFO_T_TEQINDEX=6;a.INFO_T_URL=7;a.INFO_T_SYMBOL=8;a.INFO_T_PASSWORDPPO=9;a.INFO_T_PASSWORDCONTAINER=10;a.INFO_T_COLOR=11;a.INFO_T_FONT= 12;a.INFO_T_CGI=14;a.INFO_T_CYPH_STRING=15;a.MAXKEYCODE=1E3;a.ENTER=209;a.DRAW_OBJECT=200;a.ESCAPE=255;a.REMOVE_SELECTION=202;a.SILENTDEBUGSTR_MAX="100000";a.WRITEVALWORKERMAXPENDINGWRITEVAL=5;a.VIEW_GAIN_FOCUS=a.MAXKEYCODE+1;a.VIEW_LOST_FOCUS=a.MAXKEYCODE+2;a.CHANGE_DDL_VALUE=1E3;a.PT_NAME_UTFSTRINGSAVED_ID=0;a.PT_NAME_RECTANGLE_ID=1;a.PT_NAME_LINE_ID=2;a.PT_NAME_BUTTON_ID=3;a.PT_NAME_BARGRAPH_ID=4;a.PT_NAME_TEXTFIELD_ID=5;a.PT_NAME_EVENT_ID=6;a.PT_NAME_OVAL_ID=7;a.PT_NAME_POLYGON_ID=8;a.PT_NAME_FILEVIEWER_ID= 9;a.PT_NAME_IGRAPHIC_ID=10;a.PT_NAME_DEGRADEV_ID=11;a.PT_NAME_MOIRE_ID=12;a.PT_NAME_POLYLINE_ID=13;a.PT_NAME_SPHERE2_ID=14;a.PT_NAME_DROPDOWN_ID=15;a.PT_NAME_CIRCULARGAUGE_ID=16;a.UNICODEFILE_ISO8859_ENCODINGSTR="ISO-8859-1";a.UNICODEFILE_UTF8_ENCODINGSTR="UTF-8";a.UNICODEFILE_UTF8_BOM0=239;a.UNICODEFILE_UTF8_BOM1=187;a.UNICODEFILE_UTF8_BOM2=191;a.UNICODEFILE_UTF16BE_ENCODINGSTR="UTF-16BE";a.UNICODEFILE_UTF16BE_BOM0=254;a.UNICODEFILE_UTF16BE_BOM1=255;a.UNICODEFILE_UTF16LE_ENCODINGSTR="UTF-16LE";a.UNICODEFILE_UTF16LE_BOM0= 255;a.UNICODEFILE_UTF16LE_BOM1=254;a.CGI_RELATIVTOROOT_HTMLTAGNAME="CGI_RELATIVTOROOT";a.CGI_RELATIVTOROOT_WEBROOT="";a.CGI_RELATIVTOROOT_DOCBASE=".";a.JS_PT_ONLINE_TREND=100;a.JS_PT_OFFLINE_TREND=101;a.JS_PT_SAVED_TREND=102;a.CONTAINER_INITIAL_VALUE="";a.ZoomMode="";var H=1,N=2,L=!1,J="";a.FirstRpntTs_ms=0;a.lastActivityTs_ms=0;a.previousDrawDateTimeFormat=0;a.previousMBTmzEn=0;a.inverseCTM=null;a.DRAGINFO_WRITE_MIN_MS=100;a.SOLID=0;a.DASHED=1;a.DOTTED=2;a.DASHRECT_LENGTH_MULT=4;a.DDL_MAX_LN=50; a.SpecialCO={blink:{name:"@BLINKCO",value:"0"},autoincr:{name:"AUTOINCRCO",value:0},lastPage:{name:"@LAST_PAGE",value:""},currentPage:{name:"@CURRENT_PAGE",value:""},language:{name:"@LANGUAGE",value:""},polltime:{name:"MB_PollTimeSubstitute",value:0},skiprefresh:{name:"MB_SkipPPORefresh",value:0},dateTimeLocalNow:{name:"MB_LocalDateTime",value:0},dateLocalNow:{name:"MB_LocalDate",value:0},timeLocalNow:{name:"MB_LocalTime",value:0},mbTmzEn:{name:"MB_tmz_en",value:0},mbRunningTime:{name:"MB_RunningTime", value:0},mbInactivity:{name:"MB_InactivityCounter",alias:"@MB_InactivityCounter",value:0},mbInactivityMin:{name:"MB_InactivityCounterMin",value:0},mbMsgBox:{name:"MessageBoxCO",value:0},mbMsgBoxNr:{name:"MSGBOX_NR",value:0},MB_Calendar:{name:"MB_Calendar",value:0},MB_BrowserTypeID:{name:"MB_BrowserTypeID",value:5},IsWebBrowser:{name:"IsWebBrowser",value:1},MB_IsApp:{name:"MB_IsApp",value:0},MB_ClearFileCache:{name:"MB_clearFileCache",value:""},NOINITSESSCO:{name:"_NOINITSESSCO_",value:19},MB_PERCO:{name:"MB_PERCO_", value:19},MB_SCREEN_WIDTH:{name:"MB_SCREEN_WIDTH",value:function(){return screen.width.toString()}},MB_SCREEN_HEIGHT:{name:"MB_SCREEN_HEIGHT",value:function(){return screen.height.toString()}},MB_WND_INNER_WIDTH:{name:"MB_WND_INNER_WIDTH",value:function(){return window.innerWidth.toString()}},MB_WND_INNER_HEIGHT:{name:"MB_WND_INNER_HEIGHT",value:function(){return window.innerHeight.toString()}},MB_domDeltaFlag:{name:"MB_domDeltaFlag",value:0},MB_DebugBoxLevel:{name:"MB_DebugBoxLevel",value:0},userLevel:{name:"userLevel", value:10},MB_SilentDebugPrintOut:{name:"MB_SilentDebugPrintOut",value:0}};a.COND={UNDEFINED:0,EQUAL:1,NO_CONDITION:2,NOT_EQUAL:3,GREATER:4,GREATER_EQUAL:5,LESSER:6,LESSER_EQUAL:7,AND_EQUAL:8,AND_EQUAL0:9,AND_NOTEQUAL0:10,EQUAL_IGNORECASE:11,NOT_EQUAL_IGNORECASE:12,IS_INT:13,IS_FLOAT:14,OR_EQUAL0:15,OR_NOT_EQUAL0:16};a.mP=function(b){var c=null;switch(b.ptId){case a.PT_NAME_UTFSTRINGSAVED_ID:c={};break;case a.PT_NAME_RECTANGLE_ID:c=new a.PainterType_Rectangle(b);break;case a.PT_NAME_LINE_ID:c=new a.PainterType_Line(b); break;case a.PT_NAME_BUTTON_ID:c=new a.PainterType_Button(b);break;case a.PT_NAME_BARGRAPH_ID:c=new a.PainterType_Bargraph(b);break;case a.PT_NAME_TEXTFIELD_ID:c=new a.PainterType_TextField(b);break;case a.PT_NAME_EVENT_ID:c=new a.PainterType_EventP(b);break;case a.PT_NAME_OVAL_ID:c=new a.PainterType_Oval(b);break;case a.PT_NAME_POLYGON_ID:c=new a.PainterType_Polygon(b);break;case a.PT_NAME_FILEVIEWER_ID:c=new a.PainterType_FileViewer(b);break;case a.PT_NAME_IGRAPHIC_ID:c=new a.PainterType_IGraphic(b); break;case a.PT_NAME_DEGRADEV_ID:c={};break;case a.PT_NAME_MOIRE_ID:c={};break;case a.PT_NAME_POLYLINE_ID:c=new a.PainterType_Polyline(b);break;case a.PT_NAME_SPHERE2_ID:c={};break;case a.PT_NAME_DROPDOWN_ID:c=new a.PainterType_DropDown(b);break;case a.PT_NAME_CIRCULARGAUGE_ID:c={};break;case a.JS_PT_ONLINE_TREND:c=new a.PainterType_OnlineTrend(b);break;case a.JS_PT_OFFLINE_TREND:c=new a.PainterType_OfflineTrend(b);break;case a.JS_PT_SAVED_TREND:c=new a.PainterType_SavedTrend(b);break;default:c={}}return c}; a.LPRItemType=function(a,b){this.address=a;this.value=b};var M="",B="";a.LocalPPORefreshType=function(){this.cbWrite=this.cbUpdate=null;this.PPOList={};this.PPOSize=0;this.ListChanged=!1;this.getNumPPOs=function(){return this.PPOSize}};a.LocalPPORefresh=new a.LocalPPORefreshType;a.isFirstLoadViewCall=!0;a.fileLoaded=!1;a.fileEncoding="";a.onSvgWindowError=function(b,c,d){a.err_append_ln("Uncaught SVG Window Error! errorMsg:");a.err_append_ln(b);a.err_append_ln("url: "+c+" lineNumber: "+d)};a.onHtmlWindowError= function(b,c,d){a.err_append_ln("Uncaught HTML Window Error! errorMsg:");a.err_append_ln(b);a.err_append_ln("url: "+c+" lineNumber: "+d)};a.SaveFileError="Saving files on the client side is not supported in the HTML5 client!";a.LoadFileError="Loading files on the client side is not supported in the HTML5 client!";a.SavedError="Saved Trending is not supported in the HTML5 client!";a.showCriticalErrorScreen=function(b,c){var d=a.GetBrowserInfos();$("body").html('

HMI.js Visualisation Error #'+ b+":

");$("body").append(''+c+"
");$("body").append('

Browser Info:

');$("body").append(''+d.name+" "+d.fullVersion+"
sc.HMI_VERSION: "+a.HMI_VERSION+"
sc.HMI_BUILD_DT: "+a.HMI_BUILD_DT+"
sc.TARGET_TYPE_NR: "+ a.TARGET_TYPE_NR+"

");$("body").css("background-color","rgb(0,0,102)")};a.getTopPos=function(a){for(var b=0;a!==null;)b+=a.offsetTop,a=a.offsetParent;return b};a.getLeftPos=function(a){for(var b=0;a!==null;)b+=a.offsetLeft,a=a.offsetParent;return b};a.registerModalPainter=function(b){a.g_MouseDownEventInfo!==null&&a.g_MouseDownEventInfo.ViewItem!==null&&a.g_MouseDownEventInfo.ViewItem.SVGWindow!==null&&a.g_MouseDownEventInfo.ViewItem.SVGWindow.g_ModalPainter=== null?a.g_MouseDownEventInfo.ViewItem.SVGWindow.g_ModalPainter=b:a.log_append_ln("ERROR registerModalPainter failed!")};a.removeModalPainter=function(){a.g_MouseDownEventInfo!==null&&a.g_MouseDownEventInfo.ViewItem!==null&&a.g_MouseDownEventInfo.ViewItem.SVGWindow!==null&&a.g_MouseDownEventInfo.ViewItem.SVGWindow.g_ModalPainter!==null?a.g_MouseDownEventInfo.ViewItem.SVGWindow.g_ModalPainter=null:a.log_append_ln("ERROR removeModalPainter failed!")};a.resetInactivity=function(){a.lastActivityTs_ms=a.getTimestamp_ms()}; a.ViewInstanceType=function(){this.unloadedFlag=!1;this.RepaintFunc=this.GainFunc=this.LostFunc=this.NotifyFunc=this.SVGPPOArray=this.SVGDocument=this.SVGWindow=this.SVGRootElmnt=null;this.mouseDisabled=this.locked=!1;this.DestinationDiv={id:"",handle:null,jQHan:null};this.ClickableDiv={id:"",handle:null,jQHan:null};this.Embed={id:"",handle:null,jQHan:null};this.ViewName="";this.Height=this.Width=0;this.ViewJumpScheduledFlag=!1;this.ViewJumpScheduledName="";this.MouseCircle=null;this.MouseEventDispatcher= a.ME_mouseEventDispatcher;this.SVGRegisterMade=this.scheduleGainFocus=!1};a.ViewInstanceListType=function(){this.list=[];this.getNumViews=function(){return this.list.length};this.addView=function(a){this.list.push(a)};this.removeViewByDestinationDivId=function(b){for(var c=0,d=this.getNumViews(),e=!1,c=0;c=0&&(b=this.list[a]);return b};this.getViewByDestinationDivId=function(a){for(var b= 0,c=this.getNumViews(),d=!1,e=null,b=0;b=2&&(a.log_append_ln("startDrag"),a.log_append_ln("painter.x"+b.x),a.log_append_ln("sc.g_MouseDownEventInfo.x"+a.g_MouseDownEventInfo.x), a.log_append_ln("painter.dragXInfo.relDownPos"+b.dragXInfo.relDownPos))};a.releaseDragIfRequired=function(){if(a.g_MouseDragObject!==null){if(a.g_MouseDragObject.dragXInfo!==null)a.g_MouseDragObject.dragXInfo.lastWriteTSmS=0;if(a.g_MouseDragObject.dragYInfo!==null)a.g_MouseDragObject.dragYInfo.lastWriteTSmS=0;var b=a.g_MouseDragObject.getOffsetStruct();a.g_MouseDragObject.dragXInfo!==null&&(a.g_MouseDragObject.dragImpl(a.g_MouseDragObject.dragXInfo,a.g_MouseMoveEventInfo.x-a.g_MouseDragObject.xOrg- b.xOff-a.g_MouseDragObject.dragXInfo.relDownPos),a.getDebugLevel()>=3&&(a.log_append_ln("releaseDragIfRequired"),a.log_append_ln("sc.g_MouseMoveEventInfo.x: "+a.g_MouseMoveEventInfo.x),a.log_append_ln("sc.g_MouseDragObject.xOrg: "+a.g_MouseDragObject.xOrg),a.log_append_ln("offset.xOff: "+b.xOff),a.log_append_ln("sc.g_MouseDragObject.dragXInfo.relDownPos: "+a.g_MouseDragObject.dragXInfo.relDownPos)));a.g_MouseDragObject.dragYInfo!==null&&(a.g_MouseDragObject.dragImpl(a.g_MouseDragObject.dragYInfo, a.g_MouseMoveEventInfo.y-a.g_MouseDragObject.yOrg-b.yOff-a.g_MouseDragObject.dragYInfo.relDownPos),a.getDebugLevel()>=3&&(a.log_append_ln("releaseDragIfRequired"),a.log_append_ln("sc.g_MouseMoveEventInfo.y: "+a.g_MouseMoveEventInfo.y),a.log_append_ln("sc.g_MouseDragObject.yOrg: "+a.g_MouseDragObject.yOrg),a.log_append_ln("offset.yOff: "+b.yOff),a.log_append_ln("sc.g_MouseDragObject.dragYInfo.relDownPos: "+a.g_MouseDragObject.dragYInfo.relDownPos)));a.g_MouseDragObject.setOffset(b);a.g_MouseDragObject= null;a.getDebugLevel()>=2&&a.log_append_ln("releaseDrag")}};a.getSrvCSVFileBOMEncodeStr=function(b,c){var d="";b!==null&&b!==void 0&&(a.g_FileEncodeStrList[b]===void 0&&j(b,c),a.g_FileEncodeStrList[b]!==void 0&&(d=a.g_FileEncodeStrList[b]));return d};a.createMouseCircle=function(b){if(b!==null&&b.SVGDocument!==null)b.MouseCircle=b.SVGDocument.createElementNS(a.SvgNs,"circle"),b.MouseCircle!==null&&(b.MouseCircle.setAttributeNS(null,"visibility","hidden"),b.MouseCircle.setAttributeNS(null,"cx",25), b.MouseCircle.setAttributeNS(null,"cy",25),b.MouseCircle.setAttributeNS(null,"r",5),b.MouseCircle.setAttributeNS(null,"fill","red"),b.MouseCircle.setAttributeNS(null,"id","MouseCircle"),b.SVGRootElmnt.appendChild(b.MouseCircle))};a.showMouseCirlce=function(a,b,c){a.MouseCircle!==null&&(a.MouseCircle.setAttributeNS(null,"visibility",""),a.MouseCircle.setAttributeNS(null,"cx",b),a.MouseCircle.setAttributeNS(null,"cy",c))};a.registerSVG=function(b,c,d,e,f,n,j,k,g,r,m,s,o){a.getDebugLevel()>=2&&a.log_append_ln("sc.registerSVG "+ m);b=a.ViewList.getViewByDestinationDivId(decodeURIComponent(b));if(b!==null){b.ClickableDiv.jQHan.css("width",s);b.ClickableDiv.jQHan.css("height",o);b.Embed.jQHan.css("width",s);b.Embed.jQHan.css("height",o);b.width=s;b.height=o;b.ViewJumpScheduledFlag=!1;b.ViewJumpScheduledName="";b.ViewName=m;b.SVGWindow=c;b.SVGDocument=d;b.SVGRootElmnt=e;b.SVGPPOArray=r;b.NotifyFunc=f;b.RepaintFunc=n;b.GainFunc=j;b.PObjArrFunc=g;b.LostFunc=k;c=b.SVGPPOArray;d=0;if(c!==null&&a.g_PPOList)for(d=0;d=2&&a.log_append_ln("Registered: ("+b.ViewName+")");a.getDebugLevel()>=1&&a.createMouseCircle(b)}else a.log_append_ln("registerSVG() Error: viewItem not found!")};a.destorySVG=function(b){var c=a.ViewList.getViewByDestinationDivId(decodeURIComponent(b));a.getDebugLevel()>=2&&a.log_append_ln("sc.destroySVG ("+b+")");p(c)};a.doInstanceRepaint= function(b){b=a.ViewList.getViewByDestinationDivId(b);b!==null&&b.RepaintFunc()};a.disableMouse=function(b){b=a.ViewList.getViewByDestinationDivId(b);if(b!==null)b.mouseDisabled=!0};a.enableMouse=function(b){b=a.ViewList.getViewByDestinationDivId(b);if(b!==null)b.mouseDisabled=!1};a.lockInstance=function(b){b=a.ViewList.getViewByDestinationDivId(b);if(b!==null)b.locked=!0,b.ClickableDiv.jQHan.css("background-color","rgba(255, 255, 255, 1.0)")};a.unlockInstance=function(b){b=a.ViewList.getViewByDestinationDivId(b); if(b!==null)b.locked=!1,b.ClickableDiv.jQHan.css("background-color","rgba(255, 255, 255, 0.0)")};a.Init=function(b){b.DebugLevel>=2&&u();a.log_append_ln("SpiderControl.init()");b===null&&a.log_append_ln("Error SpiderControl.init() params is undefined ! ");return o(b)};a.loadTEQFileBlocking=function(b){var c="text/csv;charset="+a.UNICODEFILE_ISO8859_ENCODINGSTR;a.fileLoaded=!1;$.ajax({type:"GET",global:!1,beforeSend:function(a){a.overrideMimeType(c)},async:!1,cache:!0,url:b,timeout:a.AjaxTimeout,success:function(){a.fileLoaded= !0},error:function(){a.fileLoaded=!1},complete:function(){}});return a.fileLoaded};a.loadSvgzFileBlocking=function(b){a.fileLoaded=!1;$.ajax({type:"GET",global:!1,beforeSend:function(){},async:!1,cache:!0,url:b,timeout:a.AjaxTimeout,complete:function(){},success:function(){a.fileLoaded=!0},error:function(){a.fileLoaded=!1}});return a.fileLoaded};a.checkIfBrowserIsSupportedAndTEQOnServer=function(b){var c=b+".teq",b="Loading "+b+" Failed !!

Please load all files with *.teq (Views) extension on the server/PLC! Then refresh this page.

Bitte laden Sie alle Dateien mit *.teq (Views) Erweiterung auf den Server/SPS! Dann diese Seite neu laden."; if(document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")===!1)return a.showCriticalErrorScreen(2,"Your browser does not support SVG!
Ihr Browser unterstuetzt kein SVG!
\t\t\t
\t\t\t Browser Compatibility
Browser Kompatibilitaet
\t\t\t
\t\t\t - Microsoft Internet Explorer 11 and above
\t\t\t - Chrome
\t\t\t - Firefox
\t\t\t - Safari
"),!1;return a.isFirstLoadViewCall===!0&&a.loadTEQFileBlocking(c)=== !1?(window.console&&window.console.log&&window.console.log(b),a.showCriticalErrorScreen(1,b),!1):!0};a.isDefinedInJS=function(a){var b=!1;a!==void 0&&(b=!0);return b};a.checkWebserverSVGZSupport=function(){return"success"};a.CheckSpiderLoadView=function(b){var c="success",d=!1;if(b.length!==0){if(a.isFirstLoadViewCall===!0&&a.checkIfBrowserIsSupportedAndTEQOnServer(b)===!0)(c=a.checkWebserverSVGZSupport(b))==="success"?(a.isFirstLoadViewCall=!1,d=!0):c==="no_html5"?a.showCriticalErrorScreen(200,"Webserver does not support HTML5!
Couldn't load view: "+ b+"_teq."+Q):c==="no_file"?a.showCriticalErrorScreen(201,"View doen't exist!
View: "+b+"_teq."+Q):a.showCriticalErrorScreen(202,"CheckSpiderLoadView error 202 for view!
View: "+b+"_teq."+Q);a.isFirstLoadViewCall===!1&&a.checkIfBrowserIsSupportedAndTEQOnServer(b)===!0&&(d=!0)}return d};a.LoadView=function(b,c,d,e){if(c.length!==0)if(a.CheckSpiderLoadView(c,d,e)===!0)if($("#destId")===null&&a.log_append_ln("sc.LoadView Error Destination Div Id Not Found!"),b===null)a.log_append_ln("sc.LoadView() destId is undefined"); else{var n=c;a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC&&(n="archivereader?"+c);f(b,n,d,e)}else a.log_append_ln("ERROR sc.LoadView check failed for "+c)};a.UnloadView=function(b){a.getDebugLevel()>=3&&a.log_append_ln("SpiderControl.UnloadView()");b===null?a.log_append_ln("SpiderControl.UnloadView() destId is undefined"):s(b)};a.EnableWebConsole=function(){u()};a.ReadPPO=function(b){a.getDebugLevel()>=4&&a.log_append_ln("SpiderControl.ReadPPO()");return c(b)};a.WritePPO=function(b,c){a.getDebugLevel()>= 4&&a.log_append_ln("SpiderControl.WritePPO()");a.writePPO(b,c,!1)};a.getDebugLevel=function(){return R};a.ReadContainer=function(b){a.getDebugLevel()>=4&&a.log_append_ln("SpiderControl.ReadContainer()");return d(b)};a.ScheduleViewJump=function(){a.getDebugLevel()>=3&&a.log_append_ln("SpiderControl.ScheduleViewJump()")};a.checkContainerRange=function(b,c,d,e){for(var f="",n=0,f=a.MIN(d,e),d=a.MAX(d,e),n=f;n<=d;n++)if(f=c+n,b===f)return!0;return!1};a.checkSessionContainerName=function(b){return a.checkContainerRange(b, a.SpecialCO.NOINITSESSCO.name,0,a.SpecialCO.NOINITSESSCO.value)};a.checkPersistanContainer=function(b){return a.checkContainerRange(b,a.SpecialCO.MB_PERCO.name,0,a.SpecialCO.NOINITSESSCO.value)};a.writeSessionContainer=function(b,c){var d=!1;a.checkSessionContainerName(b)===!0&&(d=a.writeSessionStorage(b,c));return d};a.readSessionContainer=function(b){var c=!1;a.checkSessionContainerName(b)===!0&&(c=a.readSessionStorage(b));return c};a.writePersistentContainer=function(b,c){var d=!1;a.checkPersistanContainer(b)=== !0&&(d=a.writeLocalStorage(b,c));return d};a.readPersistentContainer=function(b){var c=!1;a.checkPersistanContainer(b)===!0&&(c=a.readLocalStorage(b));return c};a.writeSessionStorage=function(b,c){var d=!1;a.checkStorage()!==!1&&(sessionStorage.setItem(b,c),d=!0);return d};a.readSessionStorage=function(b){var c=!1;a.checkStorage()!==!1&&(c=sessionStorage.getItem(b),c===null&&(c=""));return c};a.writeLocalStorage=function(b,c){var d=!1;a.checkStorage()!==!1&&(localStorage.setItem(b,c),d=!0);return d}; a.readLocalStorage=function(b){var c=!1;a.checkStorage()!==!1&&(c=localStorage.getItem(b),c===null&&(c=""));return c};a.checkStorage=function(){var a=!1;Storage!==void 0&&(a=!0);return a};a.directReadContainer=function(b){return U[b]?U[b].mValue:a.CONTAINER_INITIAL_VALUE};a.directWriteContainer=function(b,c){if(c===void 0)a.getDebugLevel()>=2&&a.log_append_ln("directWriteContainer called with 'undefined' value (co name: '"+b+"'"),c=a.CONTAINER_INITIAL_VALUE;b===void 0&&a.getDebugLevel()>=2&&a.log_append_ln("directWriteContainer called with 'undefined' name"); U[b]={mName:b,mValue:c};a.updateUserLevelTimestamp()};a.SetRefresh=function(b){a.getDebugLevel()>=3&&a.log_append_ln("SpiderControl.SetRefreshRate()");x(b)};a.WriteContainer=function(b,c){a.getDebugLevel()>=3&&a.log_append_ln("sc.WriteContainer name = "+b+" , value = "+c);a.RW_writeSource(a.INFO_T_CONTAINER,b,c)};a.readDateTimeFormat=function(){return y("PM_AM")};a.localRefreshPPO=function(){a.LocalPPORefresh.cbUpdate!==null?(a.LocalPPORefresh.PPOList={},a.LocalPPORefresh.PPOSize=a.prepareLPRList(a.LocalPPORefresh.PPOList), a.LocalPPORefresh.PPOSize&&(a.LocalPPORefresh.cbUpdate(a.LocalPPORefresh)?a.updateInternalPPOList(a.LocalPPORefresh.PPOList):a.getDebugLevel()>=2&&a.log_append_ln("sc.LocalPPORefresh.cbUpdate returned not true"))):a.getDebugLevel()>=2&&a.log_append_ln("LocalPPORefresh.cbUpdate not set")};a.VM_doRepaint=function(){var b=!1,c=K,d=0,d=a.getTimestamp_ms(),e=!1,f=0,n=null,j=!1;if(a.g_WriteValWorkerPendingWriteValsListSize>=a.WRITEVALWORKERMAXPENDINGWRITEVAL)a.getDebugLevel()>=2&&a.log_append_ln("sc.VM_doRepaint too many pending writeVals [ "+ a.g_WriteValWorkerPendingWriteValsListSize+" ] in worker Thread so skips repaint for 5ms"),window.setTimeout(_SCIntern.VM_doRepaint,5);else if(I()===!0&&a.g_WriteValWorkerPendingWriteValsListSize>0)a.getDebugLevel()>=2&&a.log_append_ln("sc.VM_doRepaint should make a view jump but pending writeVals [ "+a.g_WriteValWorkerPendingWriteValsListSize+" ] in worker Thread so skips repaint for 5ms"),window.setTimeout(_SCIntern.VM_doRepaint,5);else{for(f=0;f=da||aa===!0){aa=!1;da=d;a.SpecialCO.blink.value=a.SpecialCO.blink.value=="1"?"0":"1";v(a.SpecialCO.blink.name,a.SpecialCO.blink.value,!1);if(a.SpecialCO.autoincr.value>=a.SpecialCO.autoincr.value.MAX_VALUE)a.SpecialCO.autoincr.value= 0;a.SpecialCO.autoincr.value++;a.getDebugLevel()>=2&&$("#SC_RefreshCnt").html(a.SpecialCO.autoincr.value);L===!0?a.localRefreshPPO():a.SL_refreshPPO()}a.checkUserLevelTimestamp()===!1?a.WriteContainer(a.SpecialCO.userLevel.name,0):a.updateUserLevelTimestamp();if(ba){ba=!1;c=0;f=a.g_OnlineTrendEmitter.length;for(c=0;c=2)Dbg_RepaintStart_ms=a.getTimestamp_ms(),a.CntReadPPOSource=0;a.ViewList.doViewRepaints(); a.getDebugLevel()>=3&&(Dbg_RepaintStop_ms=a.getTimestamp_ms(),Dbg_RepaintDuration_ms=Dbg_RepaintStop_ms-Dbg_RepaintStart_ms,a.log_append_ln("RpnDur_ms: "+Dbg_RepaintDuration_ms+" (nPPO:"+a.CntReadPPOSource+")"))}a.isMsgBoxScheduled()===!0&&(a.resetMsgBoxScheduled(),a.openMsgBox());if(I()===!0){a.getDebugLevel()>=2&&a.log_append_ln("vm_isViewJumpRequested() === true");e=a.g_MouseDownEventInfo.ViewItem.ViewJumpScheduledName;if(e!==""&&(j="",j=e.lastIndexOf(".teq"),j=j!=-1?e.substr(0,j):e,j!==""))if(a.TARGET_TYPE_NR=== a.TARGET_TYPE_PANASONIC&&j.lastIndexOf("archivereader?")<0&&(j="archivereader?"+j),j+="_teq."+Q,c=encodeURIComponent(a.g_MouseDownEventInfo.ViewItem.DestinationDiv.id),a.loadSvgzFileBlocking(j)===!0){if(a.g_MouseDownEventInfo.ViewItem.Embed.handle.src!=j+"#"+c)p(a.g_MouseDownEventInfo.ViewItem),a.g_MouseDownEventInfo.ViewItem.Embed.handle.src=j+"#"+c,a.getDebugLevel()>=2&&a.log_append_ln("iframe: '"+a.g_MouseDownEventInfo.ViewItem.Embed.handle.src+"'");a.getDebugLevel()>=2&&$("#SC_CurrentPage").html(e); b=!0}else a.err_append_ln("Page: "+j+" doesn't exist!");a.SpecialCO.lastPage.value=a.SpecialCO.currentPage.value;a.SpecialCO.currentPage.value=e;v(a.SpecialCO.lastPage.name,a.SpecialCO.lastPage.value,!1);v(a.SpecialCO.currentPage.name,a.SpecialCO.currentPage.value,!1);a.getDebugLevel()>=2&&a.log_append_ln("vm_viewJumpRequestDone()");a.g_MouseDownEventInfo.ViewItem.ViewJumpScheduledFlag=!1;a.scheduleRefresh()}ca++;a.getDebugLevel()>=2&&$("#SC_RepaintCnt").html(ca)}a.previousDrawDateTimeFormat=a.readDateTimeFormat(); a.previousMBTmzEn=a.SpecialCO.mbTmzEn.value;d=a.getTimestamp_ms()-d;b?(a.getDebugLevel()>=2&&a.log_append_ln("viewJmpFlag so restarts repaint immediately"),window.setTimeout(_SCIntern.VM_doRepaint,0)):d>O?window.setTimeout(_SCIntern.VM_doRepaint,5):(O-d>=1E4&&a.log_append_ln("VM_doRepaint makes sleeps for more then 10s! (HMI_Repaint - rpntDuration) = "+(O-d)+" rpntDuration = "+d),window.setTimeout(_SCIntern.VM_doRepaint,O-d))}};a.getRefreshPeriod=function(){return K};a.getViewDOMHandles=function(a){a.ClickableDiv.handle= $(a.ClickableDiv.id)[0];a.ClickableDiv.jQHan=$(a.ClickableDiv.id);a.Embed.handle=$(a.Embed.id)[0];a.Embed.jQHan=$(a.Embed.id)};a.CMP=function(b,c,d){var e=0,f=0,e=0;if(c!==null&&d!==null&&b!==null)switch(b){case a.COND.UNDEFINED:return 1;case a.COND.EQUAL:return a.isEqual(c,d);case a.COND.NO_CONDITION:return 1;case a.COND.NOT_EQUAL:return a.isNotEqual(c,d);case a.COND.GREATER:return a.isGreater(c,d);case a.COND.GREATER_EQUAL:return a.isGreaterOrEqual(c,d);case a.COND.LESSER:return a.isLesser(c,d); case a.COND.LESSER_EQUAL:return a.isLesserOrEqual(c,d);case a.COND.AND_EQUAL:return e=a.parseNumber(c),f=a.parseNumber(d),e=(e&f)===f===!0?1:0,a.getDebugLevel()>=3&&a.log_append_ln("sc.COND.AND_EQUAL: res:"+e),e;case a.COND.AND_EQUAL0:return e=a.parseNumber(c),f=a.parseNumber(d),(e&f)===0;case a.COND.AND_NOTEQUAL0:return e=a.parseNumber(c),f=a.parseNumber(d),(e&f)!==0;case a.COND.IS_INT:return a.isInt(c);case a.COND.IS_FLOAT:return a.isFloat(c);case a.COND.EQUAL_IGNORECASE:return a.isEqualIgnoreCase(c, d);case a.COND.NOT_EQUAL_IGNORECASE:return a.isNotEqualIgnoreCase(c,d);case a.COND.OR_EQUAL0:return a.isOrEqual0(c,d);case a.COND.OR_NOT_EQUAL0:return a.isOrNotEqual0(c,d);default:return!1}else return 0};a.isDecimalStr=function(a,b){var c=0,d="";if(a!==null&&a!==void 0&&(d=String(a).trim(),d.length>0)){c=d.match(/e/gi);if(c!==null&&c.length>1)return 0;c=c!==null&&c.length==1?d.match(/[+-]/g):d.match(/[+-]/g);if(c!==null&&c.length>2)return 0;c=d.match(/[.,]/g);if(c!==null&&c.length>1)return 0;c=d.match(/^[-+][0-9]+\.[0-9]+[eE][-+]?[0-9]+$/g); if(c!==null&&c.length>0)return 0;c=1;b===1&&(c=0,d=Number(d),isNaN(d)||d%1==0&&(c=1))}return c};a.isEqual=function(b,c){var d=0,e=parseFloat(b),f=parseFloat(c);if(a.isDecimalStr(b,0)==0||a.isDecimalStr(c,0)==0||isNaN(f)||isNaN(e))return String(b)==String(c)&&(d=1),d;e==f&&(d=1);return d};a.isNotEqual=function(b,c){var d=0,e=parseFloat(b),f=parseFloat(c);if(a.isDecimalStr(b,0)==0||a.isDecimalStr(c,0)==0||isNaN(f)||isNaN(e))return String(b)!=String(c)&&(d=1),d;e!=f&&(d=1);return d};a.isGreater=function(a, b){var c=0,d=parseFloat(a),e=parseFloat(b);isNaN(d)&&(d=0);isNaN(e)&&(e=0);d>e&&(c=1);return c};a.isGreaterOrEqual=function(a,b){var c=0,d=parseFloat(a),e=parseFloat(b);isNaN(d)&&(d=0);isNaN(e)&&(e=0);d>=e&&(c=1);return c};a.isLesser=function(a,b){var c=0,d=parseFloat(a),e=parseFloat(b);isNaN(d)&&(d=0);isNaN(e)&&(e=0);d=lUpperLeft.x&&c.y>=lUpperLeft.y&&c.x<=lLowerRight.x&&c.y<=lLowerRight.y&&(d=!0)}else a.log_append_ln("OB_checkMouseCoordinates error");return d};a.writePPO=function(b,c,d){b=a.g_PPOList[b];b.resolved=a.rl_resolveInfoName(b.address);var e= {writeEnabled:!1,rValue:c};a.TCR_writeFormatedPPOValue(b,e);if(e.writeEnabled===!0){if(d===!0)b.value=c;L===!0?a.LocalPPORefresh.cbWrite!==null?a.LocalPPORefresh.cbWrite(b.resolved,e.rValue):a.log_append_ln("LocalPPORefresh.cbWrite not set"):a.sl_writeValue(b.resolved,e.rValue)}};a.getContainerList=function(){return U};a.RW_readSource=function(b,c,d){var e=c;b==a.INFO_T_PPO||b==a.INFO_T_PASSWORDPPO?(a.CntReadPPOSource++,e=A(c,d)):b==a.INFO_T_CONTAINER||b==a.INFO_T_PASSWORDCONTAINER?e=F(c):b==a.INFO_T_HTMLTAG? e=y(c):b==a.INFO_T_FILE&&(e="File Not Found",b=a.loadFileSource(c),b!==null&&(e=b));return e};a.RW_readSource_parseFloat=function(b,c,d){var e=c,f=0;b==a.INFO_T_PPO||b==a.INFO_T_PASSWORDPPO?e=A(c):b==a.INFO_T_CONTAINER||b==a.INFO_T_PASSWORDCONTAINER?e=F(c):b==a.INFO_T_HTMLTAG?e=y(c):b==a.INFO_T_STRING&&(e=c);d===1?isNaN(parseFloat(e,10))!==!0?f=parseFloat(e,10):a.getDebugLevel()>=1&&a.log_append_ln("WARNING sc.RW_readSource_parseFloat("+b+", "+c+") ! value ["+e+"] is NaN so returns 0 "):f=parseFloat(e, 10);return f};a.RW_readSource_parseInt=function(b,c){var d=c,e=0;b==a.INFO_T_PPO||b==a.INFO_T_PASSWORDPPO?d=A(c):b==a.INFO_T_CONTAINER||b==a.INFO_T_PASSWORDCONTAINER?d=F(c):b==a.INFO_T_HTMLTAG?d=y(c):b==a.INFO_T_STRING&&(d=c);isNaN(parseInt(d,10))!==!0?e=parseInt(d,10):a.getDebugLevel()>=1&&a.log_append_ln("WARNING sc.RW_readSource_parseInt("+b+", "+c+") ! value ["+d+"] is NaN so returns 0 ");return e};a.RW_writeSource=function(b,c,d){a.getDebugLevel()>=2&&a.log_append_ln("sc.RW_writeSource("+b+" , "+ c+" , "+d+")");if(b==a.INFO_T_CONTAINER||b==a.INFO_T_PASSWORDCONTAINER)v(c,d,!1);else if(b==a.INFO_T_PPO||b==a.INFO_T_PASSWORDPPO)a.writePPO(c,d,!1);else if(b==a.INFO_T_TEQINDEX){if(b=c,b!==null)if(c=b=a.rl_resolveInfoName(b),d=b.lastIndexOf(".teq"),d!=-1&&(c=b.substr(0,d)),a.CheckSpiderLoadView(c,0,0)===!0)if(a.stringcmp(c,a.MsgBox)===!0)a.MsgBox.length>0&&a.openMsgBox();else{if(a.stringcmp(a.g_MouseDownEventInfo.ViewItem.ViewName,c)!==!0)a.g_MouseDownEventInfo.ViewItem.ViewJumpScheduledFlag=!0, a.g_MouseDownEventInfo.ViewItem.ViewJumpScheduledName=b}else a.log_append_ln("ERROR vm_scheduleSVGPicture check failed for "+b)}else b==a.INFO_T_URL?window.open(d,c):b===a.INFO_T_CGI&&a.userCGIAction(d)};a.sl_isPPOScheduled=function(b){var c=!1;a.g_PPOList[b]&&(c=a.g_PPOList[b].regView>0||a.g_PPOList[b].regHMI===!0);return c};a.sl_getPPOWriteAddress=function(b){var c="",d="";for(d in a.g_PPOList)if(a.g_PPOList[d].address==b)c=a.g_PPOList[d].writeAddr;return c};a.prepareLPRList=function(b){var c=0, d=0;if(a.g_PPOList){B=M;M="";for(d in a.g_PPOList)if(a.sl_isPPOScheduled(d))a.g_PPOList[d].resolved=a.rl_resolveInfoName(a.g_PPOList[d].address),b[a.g_PPOList[d].resolved]=new a.LPRItemType(a.g_PPOList[d].resolved,a.g_PPOList[d].value),M+=a.g_PPOList[d].resolved,c++;a.LocalPPORefresh.ListChanged=!1;if(M!==B)a.LocalPPORefresh.ListChanged=!0}return c};a.getPPOValueBylprList=function(a,b){for(var c=0,c=0;c=2)a.Dbg_RpnSchedule_ms=a.getTimestamp_ms()};a.scheduleRefresh=function(){aa=!0};a.scheduleOnlineTrendRefresh=function(){ba=!0};a.getTimestamp_s=function(){var a=(new Date).getTime(); a/=1E3;return a=Math.round(a)};a.getTimestamp_ms=function(){return(new Date).getTime()};a.sl_updatePPOListByName=function(b,c){var d="",e=!1;if(a.g_PPOList)for(d in a.g_PPOList)if(a.g_PPOList[d].name==b&&a.g_PPOList[d].value!==c)a.g_PPOList[d].value=c,e=!0;return e};a.sl_updatePPOList=function(b,c){var d="",e=!1;if(a.g_PPOList){for(d in a.g_PPOList)if(a.g_PPOList[d].resolved==b&&a.g_PPOList[d].value!==c)a.g_PPOList[d].value=c,e=!0;return e}};a.dg_append_ln=function(b){a.getDebugLevel()>0&&(a.SilentDebugStr!= null&&b!=null&&a.SilentDebugStr.length+b.length<=a.SILENTDEBUGSTR_MAX?a.SilentDebugStr+=b+"\n":a.SilentDebugStr!=null&&b!=null&&a.SilentDebugStr.length+b.length>=a.SILENTDEBUGSTR_MAX&&(a.SilentDebugStr+="MAX MSG LENGTH REACHED SO STOPS SILENT MSG! \n"))};a.log_append_ln=function(b){if(a.getDebugLevel()>0){if(P){var c=b+"
";a.getDebugLevel()>0&&P&&$("#SC_WebConsoleContents").prepend(c)}window.console&&window.console.log(b)}};a.GetBrowserInfos=function(){var a=navigator.userAgent,b=navigator.appName, c=parseFloat(navigator.appVersion).toString(),d=parseInt(navigator.appVersion,10),e;if((e=a.indexOf("Opera"))!=-1){if(b="Opera",c=a.substring(e+6),(e=a.indexOf("Version"))!=-1)c=a.substring(e+8)}else if((e=a.indexOf("MSIE"))!=-1)b="Microsoft Internet Explorer",c=a.substring(e+5);else if(a.indexOf("Trident")!=-1&&(e=a.indexOf("rv:"))!=-1)b="Microsoft Internet Explorer",c=a.substring(e+3);else if(a.indexOf("Edge")!=-1&&(e=a.indexOf("Edge"))!=-1)b="Edge",c=a.substring(e+5);else if((e=a.indexOf("Chrome"))!= -1)b="Chrome",c=a.substring(e+7);else if((e=a.indexOf("Safari"))!=-1){if(b="Safari",c=a.substring(e+7),(e=a.indexOf("Version"))!=-1)c=a.substring(e+8)}else if((e=a.indexOf("Firefox"))!=-1)b="Firefox",c=a.substring(e+8);else if((d=a.lastIndexOf(" ")+1)<(e=a.lastIndexOf("/")))if(b=a.substring(d,e),c=a.substring(e+1),b.toLowerCase()==b.toUpperCase())b=navigator.appName;if((a=c.indexOf(";"))!=-1)c=c.substring(0,a);if((a=c.indexOf(" "))!=-1)c=c.substring(0,a);c.indexOf(")")!=-1&&c.indexOf("(")==-1&&(c= c.replace(")",""));d=parseInt(c,10);isNaN(d)&&(c=parseFloat(navigator.appVersion).toString(),d=parseInt(navigator.appVersion,10));return{name:b,version:d,fullVersion:c}};a.destroyMouseMoveNotifyList=function(){a.g_MouseMoveNotificationList=[]};a.getOnlineTrendEmitterInstance=function(b){for(var c=0,d=a.g_OnlineTrendEmitter.length,c=0;c=2&&a.log_append_ln("registerOnlineTrendEmitter "+b.trendIndex)};a.registerOfflineTrendEmitter=function(a){V.push(a)};a.registerSavedTrendEmitter=function(a){W.push(a)};a.updateUserLevelTimestamp=function(){var b=a.getTimestamp_s(); a.writeLocalStorage(a.SpecialCO.userLevel.name,b)};a.checkUserLevelTimestamp=function(){var b=!1,c=0,d=0,c=0,e=a.SpecialCO.userLevel.value;if(a.checkStorage()===!1)return!0;c=a.readLocalStorage(a.SpecialCO.userLevel.name);if(c===!1)return b;c=parseInt(c,10);d=a.getTimestamp_s();d-c>16};a.getGValue=function(a){return isNaN(a)===!0?0:(a&65280)>>8};a.getBValue= function(a){return isNaN(a)===!0?0:a&255};a.Sleep=function(a){var f=(new Date).getTime(),c=0;do c=(new Date).getTime();while(c-ff[c];c++}while(c0?c.rValue.substring(0,a)+f+c.rValue.substring(a,c.rValue.length):f+c.rValue}; a.calculateMyTextWidth=function(b,f,c,d,e,n){var g=-1;try{var j=a.createSVGTextExt(document,d,0,0,"0,0,0","start",c,f,b,e,n);if(j!==null)j.textContent=b,g=j.getComputedTextLength();d.removeChild(j)}catch(k){a.log_append_ln("sc.calculateMyTextWidth exception= "+k)}finally{a.getDebugLevel()>=2&&a.log_append_ln("sc.calculateMyTextWidth( "+b+" , "+f+" , "+c+" ) = "+g)}return g};a.parseContentsAsMultiArray=function(b,f){for(var c=0,d=0,e=0,b=b.replace(/\n/gi,a.FVLINESEPTOKEN2),b=b.replace(/\t/gi,a.FVCOLSEPTOKEN2), n=b.split(/\\n/),d=null,g=[],c=f.maxCol=0;c0&&g[g.length-1]&&g[g.length-1][0]===""&&g.pop();if(g.length>0&&f!==null&&f.autowrap===!0&&f.hasColLayout===!1&&f.maxCol===1&&f.width>0&&f.innerSVGElmnt!==null&&f.svgFontStyle!== null&&f.svgFontWeight!==null)for(var j=-1,c=0;cf.width&&(d=n.split(" "),d.length>0))){for(var e=0,k=d[0],n="",o=k,j=a.calculateMyTextWidth(o,f.fontSize,f.fontFamily,f.innerSVGElmnt,f.svgFontStyle,f.svgFontWeight);j0&&(n+=" "),n+=j;g[c][0]=k;g[g.length]=g[g.length-1][0].split(/\\t/);for(d=g.length-2;d>c;d--)g[d+1][0]=g[d][0];g[c+1][0]=n}return g};a.parseTwoColCSVContent=function(b){for(var f=0,c={},d=0,b=b.split("\n"),e,d=b.length,f=0;f=3&&(e=b[f].split(";"),e.length==2?c[e[0]]=e[1]:a.getDebugLevel()>=2&&a.log_append_ln("ERROR parseCSVContent item parse error"));return c};a.parseCSV=function(b){return a.parseCGI_CSV_Content(b)}; a.parseCGI_CSV_Content=function(a){var f=0,c=[],d=0;a.length>0&&a.lastIndexOf("\n",a.length-1)!=a.length-1&&(a+="\n");a=a.split("\n").filter(h);d=a.length;for(f=0;f0){a[f].lastIndexOf(";",a[f].length-1)!=a[f].length-1&&(a[f]+=";");var e=a[f].replace(/;;/g,"; ;");c.push(e.split(";").filter(h))}return c};a.parse_CSV_Content=function(a){for(var f=0,c=[],d=0,a=a.split("\n").filter(h),d=a.length,f=0;f=3&&c.push(a[f].split(";").filter(h));return c};a.noop=function(){}; a.setSVGCordAttr=function(b,f,c){c=Math.round(c);c>1&&(c-=0.5);c<0.5&&(c=0.5);a.setSVGAttr(b,f,c)};a.createSVGElement=function(b,f){var c=b.createElementNS(a.SvgNs,f);c===null&&a.log_append_ln("ERROR sc.createSVGElement failed for name "+f);return c};a.setSVGAttr=function(a,f,c){a.setAttributeNS(null,f,c)};a.removeSVG=function(b){b===null||b.parentNode===null?a.noop():b.parentNode.removeChild(b)};a.createInnerSVG=function(b,f,c,d,e,n){b=a.createSVGElement(b,"svg");b!==null&&(a.setSVGAttr(b,"x",c), a.setSVGAttr(b,"y",d),a.setSVGAttr(b,"width",e),a.setSVGAttr(b,"height",n),a.setSVGAttr(b,"viewBox","0 0 "+e+" "+n),a.setSVGAttr(b,"version","1.1"),f.appendChild(b));return b};a.createTriangle=function(b,f,c,d,e,n,g,j,k){b=b.createElementNS(a.SvgNs,"polygon");b.setAttributeNS(null,"points",c+","+d+" "+e+","+n+" "+g+","+j);b.setAttributeNS(null,"fill",k);return f.appendChild(b)};a.createHorizontalLine=function(a,f,c,d,e,n){var r=null;c==e?r=g(a,f,c,d-f,1,n):f==d&&(r=g(a,f,c,1,e-c,n));return r};a.createSVGSimpleRect= function(a,f,c,d,e,n){return g(a,f,c,d,e,n)};a.createSVGTSpan=function(b,f,c,d,e){b=b.createElementNS(a.SvgNs,"tspan");c!==null&&b.setAttributeNS(null,"dx",c);d!==null&&b.setAttributeNS(null,"dy",d);if(e!==null)b.textContent=e;f.appendChild(b);return b};a.createClipRect=function(b,f,c,d,e,n,g){var j=b.createElementNS(a.SvgNs,"clipPath");j.setAttributeNS(null,"id",g);f.appendChild(j);e<0&&(e=0);b=b.createElementNS(a.SvgNs,"rect");b.setAttributeNS(null,"x",c);b.setAttributeNS(null,"y",d);b.setAttributeNS(null, "width",e);b.setAttributeNS(null,"height",n);j.appendChild(b);return j};a.createSVGText=function(b,f,c,d,e,n,g,j,k,o){b=b.createElementNS(a.SvgNs,"text");b.setAttributeNS(a.XmlNs,"xml:space","preserve");b.setAttributeNS(null,"text-anchor",n);b.setAttributeNS(null,"x",c);b.setAttributeNS(null,"y",d);b.setAttributeNS(null,"fill",e);b.setAttributeNS(null,"font-size",j);b.setAttributeNS(null,"font-family",g);b.setAttributeNS(null,"font-weight",o);b.setAttributeNS(null,"font-style",k);f.appendChild(b); return b};a.createSVGTextExt=function(b,f,c,d,e,n,g,j,k,o,h){var p=b.createElementNS(a.SvgNs,"text");p.setAttributeNS(a.XmlNs,"xml:space","preserve");p.setAttributeNS(null,"text-anchor",n);p.setAttributeNS(null,"x",c);p.setAttributeNS(null,"y",d);p.setAttributeNS(null,"fill","rgb("+e+")");p.setAttributeNS(null,"font-size",j);p.setAttributeNS(null,"font-family",g);p.setAttributeNS(null,"font-weight",h);p.setAttributeNS(null,"font-style",o);f.appendChild(p);b=b.createTextNode(k);p.appendChild(b);return p}; a.createSVGRectDashed=function(b,f,c,d,e,n,r,j,k,o,h){var p=null,p=null,s=0,q=0,m=0,t=0,v=0,x=v=0,k=parseInt(k,10),w=1,y=null;isNaN(k)===!0&&(k=0);if(b===null||f===null)return null;y=a.createSVGElement(b,"g");if(y!==null){r!==null&&(p=o===!0?g(b,c+k,d+k,e-k*2,n-k*2,r):g(b,c,d,e,n,r),y.appendChild(p));if(k>0){h===a.DOTTED?w=1:h===a.DASHED&&(w=4);s=k*w;q=k;v=c+e;t=d;for(m=c+1,x=0,x=0;m+s0){h===a.DOTTED?v=1:h===a.DASHED&&(v=4);o=k*v;p=k;m=c+e;q=d;for(s=c+1,t=0,t=0;s+o0&&(h=g(b,c,d,e,p,j),k.appendChild(h),h=g(b,c,d+n-p,e,p,j),k.appendChild(h),h=g(b,c,d,p,n,j),k.appendChild(h),p=g(b,c+e-p,d,p,n,j),k.appendChild(p)),f.appendChild(k));return k};a.createSVGInOutRect=function(b,f,c,d,e,n,r,j,k,o,h){var p=null,s=p=p=null,p=null,s=parseInt(o,10);isNaN(s)===!0&&(s= 0);if(b===null||f===null)return null;o=a.createSVGElement(b,"g");o!==null&&(j!==null&&(p=h===!0?g(b,d+s,e+s,n-s*2,r-s*2,j):g(b,d,e,n,r,j),o.appendChild(p)),f.appendChild(o));if(b===null||c===null)return null;o=a.createSVGElement(b,"g");o!==null&&(s>0&&(p=g(b,d,e,n,s,k),o.appendChild(p),p=g(b,d,e+r-s,n,s,k),o.appendChild(p),p=g(b,d,e,s,r,k),o.appendChild(p),s=g(b,d+n-s,e,s,r,k),o.appendChild(s)),c.appendChild(o));return o};a.createSVGOlnRect=function(b,f,c,d,e,n,r,j,k){var o=null,r=o=o=null,r=parseInt(k, 10);isNaN(r)===!0&&(r=0);if(b===null||f===null)return null;k=a.createSVGElement(b,"g");k!==null&&(r>0&&(o=g(b,c,d,e,r,j),k.appendChild(o),o=g(b,c,d+n-r,e,r,j),k.appendChild(o),o=g(b,c,d,r,n,j),k.appendChild(o),r=g(b,c+e-r,d,r,n,j),k.appendChild(r)),f.appendChild(k));return k};a.createSVGLine=function(b,f,c,d,e,n,g,j){if(b===null||f===null)return null;b=a.createSVGElement(b,"line");a.setSVGAttr(b,"x1",c);a.setSVGAttr(b,"y1",d);a.setSVGAttr(b,"x2",e);a.setSVGAttr(b,"y2",n);a.setSVGAttr(b,"stroke",g); a.setSVGAttr(b,"stroke-width",j);f.appendChild(b);return b};a.createSVGEllipseExt=function(b,f,c,d,e,n,g,j,k,o){if(b===null||f===null)return null;b=a.createSVGElement(b,"ellipse");o===!0&&(c+=k,d+=k,e-=k*2,n-=k*2);a.setSvgAttrC(b,"cx",c+e/2);a.setSvgAttrC(b,"cy",d+n/2);a.setSvgAttrC(b,"rx",e/2);a.setSvgAttrC(b,"ry",n/2);a.setSVGAttr(b,"fill",g);k>0&&j!==null&&(a.setSVGAttr(b,"stroke",j),a.setSVGAttr(b,"stroke-width",k));f.appendChild(b);return b};a.createSVGEllipse=function(b,f,c,d,e,n,g,j,k){if(b=== null||f===null)return null;b=a.createSVGElement(b,"ellipse");a.setSVGAttr(b,"cx",c);a.setSVGAttr(b,"cy",d);a.setSVGAttr(b,"rx",e);a.setSVGAttr(b,"ry",n);k===null&&(k="none");a.setSVGAttr(b,"fill",k);j>0&&g!==null&&(a.setSVGAttr(b,"stroke",g),a.setSVGAttr(b,"stroke-width",j));f.appendChild(b);return b};a.createSVGPolygon=function(b,f,c,d,e,n,g){if(b===null||f===null)return null;for(var b=a.createSVGElement(b,"polygon"),j=c.length,k=0,o="",k=0;k0&&e!==null&&(a.setSVGAttr(b,"stroke",e),a.setSVGAttr(b,"stroke-width",n));f.appendChild(b);return b};a.createSVGPolyline=function(b,f,c,d,e,n,g,j){if(b===null||f===null)return null;for(var b=a.createSVGElement(b,"polyline"),k="",o=0,o=0;o0&&g!==null&&(a.setSVGAttr(b,"stroke",g), a.setSVGAttr(b,"stroke-width",j));f.appendChild(b);return b};a.createSVGPie=function(b,f,c,d,e,n,g,j,k,o,h,p){if(b===null||f===null)return null;var b=a.createSVGElement(b,"path"),s=0,q=1;if(k)for(s=1;j>g;)j-=360;else for(;j0&&o!==null&&(a.setSVGAttr(b,"stroke",o),a.setSVGAttr(b,"stroke-width",h));f.appendChild(b);return b};a.toFixed=function(a,f){var c="",c=Math.pow(10,f||0);return c=c!=0?String(Math.round(a*c)/c):String(Math.round(a))};a.toFixedInt=function(a,f){var c="",c=Math.pow(10,f||0);return c=c!=0?Math.round(a*c)/c:Math.round(a)};a.toFixedNotRound=function(a,f){var c="",c=1,c=a.toString(),d=c.indexOf("."),e=a,c=d!==-1?c.substr(0,1+d+f):c,c=parseFloat(c);isNaN(c)===!1&&(e=c.toString());return e}; a.stringcmp=function(a,f){var c=!1;if(a===void 0||f===void 0)return c;if(a===null||f===null)return c;var d=f.toString();a.toString().toLowerCase()===d.toLowerCase()&&(c=!0);return c};a.prefixcmp=function(a,f){var c=!1;if(a===void 0||f===void 0)return c;if(a===null||f===null)return c;f.substring(0,a.length)===a&&(c=!0);return c};a.prefixicmp=function(a,f){var c=!1;if(a===void 0||f===void 0||a===null||f===null)return c;var d=a.toLowerCase();f.toLowerCase().substring(0,d.length)===d&&(c=!0);return c}; a.atoi=function(a){return parseInt(a,10)};a.BIT_clearBit=function(a,f){a&=~f;return a};a.BIT_setBit=function(a,f){a|=f;return a};a.parseNumber=function(b){var f=0,f=0,f=b.indexOf("0x");return f=f!==-1?a.ahextoi(b):a.atoi(b)};a.ahextoi=function(a){return parseInt(a,16)};a.atof=function(a){return parseFloat(a)};a.strstr=function(a,f){var c=a.indexOf(f,0);return c===-1?null:a.slice(c,a.length)};a.strlen=function(a){var f=0;if(a!==null&&a.length!==null)f=a.length;return f};a.MAX=function(a,f){return Math.max(a, f)};a.MIN=function(a,f){return Math.min(a,f)};a.StrEndWith=function(a,f){return a.indexOf(f,a.length-f.length)!==-1};a.CircularBuffer=function(b){b=b.toFixed(0);this.pTail=this.pHeader=-1;this.size=b;this.newestTS=this.lastAddedIndex=this.level=0;this.yetAddedTSPints={};this.bufferArr=[];this.clear=function(){var a;this.pTail=this.pHeader=-1;this.newestTS=this.lastAddedIndex=this.level=0;if(this.bufferArr!==null)for(;this.bufferArr.length>0;)this.bufferArr.pop();if(this.yetAddedTSPints!==null)for(a in this.yetAddedTSPints)delete this.yetAddedTSPints[a]}; this.add=function(b){var c=-1,d=-1,e=0;this.size<0&&b!==null&&this.yetAddedTSPints[b.t_s]!=void 0&&(c=this.yetAddedTSPints[b.t_s]);if(c>=0)a.getDebugLevel()>=2&&a.log_append_ln("Trend Buffer yet contains a Point with the to add point's timestamp so no new add made! for TS "+b.t_s+" \n");else{if(this.pTail==-1&&this.pHeader==-1)d=this.pTail=this.pHeader=0,this.bufferArr[d]=b,this.lastAddedIndex=this.yetAddedTSPints[b.t_s]=d,this.newestTS=b.t_s;else{if(this.size<0){if(this.pTail++,d=this.pTail,this.newestTS> b.t_s)if(b.t_s=this.bufferArr.length&&(e=0),b.t_s0&&c===0;e--)b.t_s=this.bufferArr[e-1].t_s&&(c=1,d=e);else if(b.t_s>this.bufferArr[e].t_s)for(c=0;ethis.bufferArr[e].t_s&&b.t_s<=this.bufferArr[e+1].t_s&&(c=1,d=e+1)}else if(this.pHeader===0&&this.pTail===0)this.pTail++,d=this.pTail;else if(this.pHeaderthis.pTail&&this.pHeaderthis.pTail&&this.pHeader==this.size-1)this.pTail++,this.pHeader=0,d=this.pTail;if(this.size<0&&d!==this.bufferArr.length)for(e=this.bufferArr.length-1;e>=d;e--)this.bufferArr[e+1]=this.bufferArr[e],this.yetAddedTSPints[this.bufferArr[e+1].t_s]=e+1;this.bufferArr[d]=b;this.lastAddedIndex= this.yetAddedTSPints[b.t_s]=d;if(this.newestTS0&&a>=0?this.pHeader==-1&&this.pTail==-1?b=null:this.pHeader+a<=this.pTail?b=this.bufferArr[this.pHeader+a]:this.pHeader>this.pTail?this.pHeader+a<=this.size-1?b=this.bufferArr[this.pHeader+a]:this.pHeader+a>this.size-1&&(b=this.bufferArr[this.pHeader+a-this.size]):b=null:b=null;return b}};a.str_ascii2byte=function(a, f){var c="",d=c=0,d=d=0;if(a!==null&&f!==null){if(f.buffer!==null){d=a.length;if(d+1>>1!=d>>1)return-1;for(d=0;d>2,c=(c&3)<<4|d>>4,g=(d&15)<<2|e>> 6,j=e&63,isNaN(d)?g=j=64:isNaN(e)&&(j=64),f=f+this._keyStr.charAt(n)+this._keyStr.charAt(c)+this._keyStr.charAt(g)+this._keyStr.charAt(j);return f},decode:function(b){for(var f="",c,d,e,n,g,j=0,b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");j>4,d=(d&15)<<4|n>>2,e=(n&3)<<6|g,f+=String.fromCharCode(c),n!=64&&(f+=String.fromCharCode(d)),g!= 64&&(f+=String.fromCharCode(e));return f=a.Base64._utf8_decode(f)},_utf8_encode:function(a){for(var f=0,a=a.replace(/\r\n/g,"\n"),c="",f=0;f127&&d<2048?c+=String.fromCharCode(d>>6|192):(c+=String.fromCharCode(d>>12|224),c+=String.fromCharCode(d>>6&63|128)),c+=String.fromCharCode(d&63|128))}return c},_utf8_decode:function(a){for(var f="",c=0,d=0,e=0,n=0;c191&& d<224?(e=a.charCodeAt(c+1),f+=String.fromCharCode((d&31)<<6|e&63),c+=2):(e=a.charCodeAt(c+1),n=a.charCodeAt(c+2),f+=String.fromCharCode((d&15)<<12|(e&63)<<6|n&63),c+=3);return f}};a.requestFullScreen=function(a){var f=a.requestFullScreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullScreen;f&&f.call(a)};return a}(_SCIntern||{});_SCIntern=function(a){a.AlarmSrvConfigType=function(){this.response="";this.asynchUpdateCb=function(h){a.AlarmSrvConfig.response=h}};a.AlarmSrvConfig=new a.AlarmSrvConfigType;a.getAlarmDateTimeByIntMSecUTC=function(h){return a.getAlarmDateTimeByIntMSec_Flag(h,!1)};a.getAlarmDateTimeByIntMSec=function(h){return a.getAlarmDateTimeByIntMSec_Flag(h,!a.SpecialCO.mbTmzEn.value)};a.getAlarmDateTimeByIntMSec_Flag=function(h,g){var b=parseInt(h,10),f=0;isNaN(b)===!1&&(b<=0?f="---":(b=new Date(b),f=a.DateTime_ReadDT(a.readDateTimeFormat(), a.SpecialCO.dateTimeLocalNow.name,g,b,null,!0)));return f};a.HisLineType=function(h,g,b){var f=!1,c=parseInt(b.Version.value,10);isNaN(c)===!0&&(c=1);var d=parseInt(b.ColorMode.value,10);isNaN(d)===!0&&(d=0);this.setStateColor=function(b){if(b===void 0||b.length<=0)b="255,255,255";this.color=a.FVCOLUMNBACKGROUNDCOLORSPECSTARTSTR+b+"#"};this.setStateColor(b.StateNoStateColor.value);this.itemId=parseInt(h[0],10);if(isNaN(this.itemId)===!0)this.itemId=h[0];this.typeId=parseInt(h[1],10);if(isNaN(this.typeId)=== !0)this.typeId=h[1];this.TID_HtmlTag=g+"_"+this.typeId;if(c>=20&&a.Link.SrvInfo_ALR2Activ){this.Grp1=parseInt(h[2],10);if(isNaN(this.Grp1)===!0)this.Grp1=h[2];this.Grp1_HtmlTag=g+"_GRP1_"+this.Grp1;this.Grp2=parseInt(h[3],10);if(isNaN(this.Grp2)===!0)this.Grp2=h[3];this.Grp2_HtmlTag=g+"_GRP2_"+this.Grp2;this.Grp3=parseInt(h[4],10);if(isNaN(this.Grp3)===!0)this.Grp3=h[4];this.Grp3_HtmlTag=g+"_GRP3_"+this.Grp3;this.Prio=parseInt(h[5],10);if(isNaN(this.Prio)===!0)this.Prio=h[5];this.Prio_HtmlTag=g+"_PRIO_"+ this.Prio;var e=parseInt(h[6],16);isNaN(e)===!0&&(e=0);var n=parseInt(h[7],16);isNaN(n)===!0&&(n=0);this.on=1E3*e+n;e=parseInt(h[8],16);isNaN(e)===!0&&(e=0);n=parseInt(h[9],16);isNaN(n)===!0&&(n=0);this.off=1E3*e+n;this.on>0&&this.off<=0&&(f=!0);this.state=parseInt(h[10],10);if(isNaN(this.state))this.state=h[10];if(this.state===0)this.state="NAK",d===0&&(f===!0?this.setStateColor(b.StateOnNackedColor.value):this.setStateColor(b.StateOffNackedColor.value));else if(this.state==1)this.state="ACK",d=== 0&&(f===!0?this.setStateColor(b.StateOnAckedColor.value):this.setStateColor(b.StateOffAckedColor.value));if(c>=22&&a.Link.SrvInfo_ALR2Activ&&a.Link.SrvInfo_ALR2Version>=2.01){this.Grp4=parseInt(h[11],10);if(isNaN(this.Grp4)===!0)this.Grp4=h[11];this.Grp4_HtmlTag=g+"_GRP4_"+this.Grp4;this.Grp5=parseInt(h[12],10);if(isNaN(this.Grp5)===!0)this.Grp5=h[12];this.Grp5_HtmlTag=g+"_GRP5_"+this.Grp5;this.Grp6=parseInt(h[13],10);if(isNaN(this.Grp6)===!0)this.Grp6=h[13];this.Grp6_HtmlTag=g+"_GRP6_"+this.Grp6; this.Grp7=parseInt(h[14],10);if(isNaN(this.Grp7)===!0)this.Grp7=h[14];this.Grp7_HtmlTag=g+"_GRP7_"+this.Grp7;this.Grp8=parseInt(h[15],10);if(isNaN(this.Grp8)===!0)this.Grp8=h[15];this.Grp8_HtmlTag=g+"_GRP8_"+this.Grp8;this.Grp9=parseInt(h[16],10);if(isNaN(this.Grp9)===!0)this.Grp9=h[16];this.Grp9_HtmlTag=g+"_GRP9_"+this.Grp9;this.Grp10=parseInt(h[17],10);if(isNaN(this.Grp10)===!0)this.Grp10=h[17];this.Grp10_HtmlTag=g+"_GRP10_"+this.Grp10;this.AlrTxt=h[18]}h="";d==1&&this.Grp1>=0?(h=b.AlrCoPrefix.name+ "Grp1Color["+this.Grp1+"]."+b.AlrCoIndex.name,this.setStateColor(a.RW_readSource(a.INFO_T_CONTAINER,h))):d==2&&this.Grp2>=0?(h=b.AlrCoPrefix.name+"Grp2Color["+this.Grp2+"]."+b.AlrCoIndex.name,this.setStateColor(a.RW_readSource(a.INFO_T_CONTAINER,h))):d==3&&this.Grp3>=0?(h=b.AlrCoPrefix.name+"Grp3Color["+this.Grp3+"]."+b.AlrCoIndex.name,this.setStateColor(a.RW_readSource(a.INFO_T_CONTAINER,h))):d==4&&this.Prio>=0&&(h=b.AlrCoPrefix.name+"PrioColor["+this.Prio+"]."+b.AlrCoIndex.name,this.setStateColor(a.RW_readSource(a.INFO_T_CONTAINER, h)))}else{this.on=parseInt(h[2],16);this.off=parseInt(h[3],16);this.on!==0&&this.off===0&&(f=!0);this.state=parseInt(h[4],10);if(isNaN(this.state))this.state=h[4];if(this.state===0)this.state="NAK",f===!0?this.setStateColor(b.StateOnNackedColor.value):this.setStateColor(b.StateOffNackedColor.value);else if(this.state==1)this.state="ACK",f===!0?this.setStateColor(b.StateOnAckedColor.value):this.setStateColor(b.StateOffAckedColor.value)}};a.DefLineType=function(h,g,b){var f=!1;this.setStateColor=function(b){this.color= a.FVCOLUMNBACKGROUNDCOLORSPECSTARTSTR+b+"#"};this.setStateColor(b.StateNoStateColor.value);this.typeId=parseInt(h[0],10);if(isNaN(this.typeId)===!0)this.typeId=h[0];this.TID_HtmlTag=g+"_"+this.typeId;this.counter=parseInt(h[1],10);if(isNaN(this.counter)===!0)this.counter=h[1];this.on=parseInt(h[2],16);this.off=parseInt(h[3],16);this.on!==0&&this.off===0&&(f=!0);this.state=parseInt(h[4],10);if(isNaN(this.state))this.state=h[4];if(this.counter===0)this.setStateColor(b.StateNoStateColor.value),this.state= "--";else if(this.state===0)this.state="NAK",f===!0?this.setStateColor(b.StateOnNackedColor.value):this.setStateColor(b.StateOffNackedColor.value);else if(this.state==1)this.state="ACK",f===!0?this.setStateColor(b.StateOnAckedColor.value):this.setStateColor(b.StateOffAckedColor.value)};a.AlarmBase=function(h,g,b,f){this.index=h;this.coPrefix=g;this.nRow=b;this.specific_update=null;this.previousConfigResponse="";this.fileViewer=f;this.rArrayOverview=this.rArrayHistory=null;this.sta=0;this.BACnet=null; this.isBACnet=function(){var a=!1;this.BACnet!==null&&(a=!0);return a};this.getDisplayedNumRow=function(){var a=this.nRow;this.fileViewer!==null&&this.fileViewer.getNrOfRowDisplayed!==null&&(a=this.fileViewer.getNrOfRowDisplayed());return a};this.getMaxFilteredPage=this.getMaxPage=null;this.loadHistoryCGI_psc=function(b,d){var e=0,f="",e="";a.getDebugLevel()>=2&&a.log_append_ln("loadHistoryCGI_psc() called; startLine = "+b+"; endline = "+d);this.co.LoadAlrsRemoteMode.value==="1"?this.co.LoadAlrsRemoteFile.value.length> 0?(a.loadData("plc?"+this.co.LoadAlrsRemoteFile.value+"cfg",a.AlarmSrvConfig.asynchUpdateCb,!1),e=a.loadGeneralCGI("plc?"+this.co.LoadAlrsRemoteFile.value+"Alr")):(a.getDebugLevel()>=2&&a.log_append_ln("Warning during loadHistoryCGI_psc() from Panasonic Alarming , LoadAlrsRemoteFile not right configured : ["+this.co.LoadAlrsRemoteFile.value+"]"),e=a.loadGeneralCGI("plc?alarm1Alr")):(a.getDebugLevel()>=2&&a.log_append_ln("Warning during loadHistoryCGI_psc() from Panasonic Alarming , LoadAlrsRemoteMode not right configured : ["+ this.co.LoadAlrsRemoteMode.value+"]"),e=a.loadGeneralCGI("plc?alarm1Alr"));if(e!=void 0&&e.length>0)for(var g=e.split("\n"),e=0;e=20&&a.Link.SrvInfo_ALR2Activ?(e="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value, e+="&action=lhis&startLine="+b,e+="&endLine="+d,this.co.FilterTIDs.value.length>0&&this.co.FilterTIDs.value!="0"&&(e+="&TID="+this.co.FilterTIDs.value),this.co.FilterGrp1s.value.length>0&&this.co.FilterGrp1s.value!="0"&&(e+="&grp1="+this.co.FilterGrp1s.value),this.co.FilterGrp2s.value.length>0&&this.co.FilterGrp2s.value!="0"&&(e+="&grp2="+this.co.FilterGrp2s.value),this.co.FilterGrp3s.value.length>0&&this.co.FilterGrp3s.value!="0"&&(e+="&grp3="+this.co.FilterGrp3s.value),this.co.FilterPrios.value.length> 0&&this.co.FilterPrios.value!="0"&&(e+="&prio="+this.co.FilterPrios.value),this.co.SortMode.value.length>0&&this.co.SortMode.value!="0"&&(e+="&sortTON="+this.co.SortMode.value),this.co.FilterMode.value.length>0&&this.co.FilterMode.value!="0"&&(e+="&filterON="+this.co.FilterMode.value),this.co.FilterAckMode.value.length>0&&this.co.FilterAckMode.value!="0"&&(e+="&filterACK="+this.co.FilterAckMode.value)):(e="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value,e+="&action=loadHistory&startLine="+ b,e+="&endLine="+d,this.co.SortMode.value.length>0&&this.co.SortMode.value!="0"&&(e+="&sortTON="+this.co.SortMode.value),this.co.FilterMode.value.length>0&&this.co.FilterMode.value!="0"&&(e+="&filterON="+this.co.FilterMode.value),this.co.FilterAckMode.value.length>0&&this.co.FilterAckMode.value!="0"&&(e+="&filterACK="+this.co.FilterAckMode.value),this.co.FilterTIDs.value.length>0&&this.co.FilterTIDs.value!="-1"&&(e+="&TID="+this.co.FilterTIDs.value)),e=a.loadGeneralCGI(e));return e};this.loadHistoryAlarmBlock= function(b,d){var e=this.loadHistoryCGI(b,d);return a.parseCGI_CSV_Content(e)};this.updateIndices=function(a,b){var e={start:0,stop:0,start:-1,end:-1};e.end=(a+1)*this.getDisplayedNumRow()-1;if(e.end>=b)e.end=b-1;if(e.end<0)e.end=0;e.start=a*this.getDisplayedNumRow();if(e.start<0)e.start=0;return e};this.update_co=function(b){var d=!1;if(b){if(b=a.ReadContainer(this.name),b!=this.value)this.value=b,d=!0}else a.WriteContainer(this.name,this.value),d=!0;return d};this.config={version:0,overViewSize:0, maxHistorySize:0,actualHistorySize:0,blockSize:0,stateIndex:0,actualFilteredSize:0};this.exec_deleteByType=function(){var b="",d=parseInt(this.co.Version.value,10);isNaN(d)===!0&&(d=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?typeId!==void 0&&typeId!=="0"&&typeId!==""&&typeId!=="-1"?(d>=20&&a.Link.SrvInfo_ALR2Activ?a.log_append_ln("exec_deleteByType Not implemented for Alarming2 Macros !"):b="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=delete&type="+typeId,b.length>0&&a.loadGeneralCGI(b)): a.log_append_ln("Error in exec_deleteByType :typeId Not OK!"):a.log_append_ln("exec_deleteByType Not implemented on Panasonic Server !")};this.exec_deleteByItem=function(b){var d="",e=parseInt(this.co.Version.value,10);isNaN(e)===!0&&(e=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?b!==void 0&&b!=="0"&&b!==""&&b!=="-1"?(e>=20&&a.Link.SrvInfo_ALR2Activ?a.log_append_ln("exec_deleteByItem Not implemented for Alarming2 Macros !"):d="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=delete&item="+ b,d.length>0&&a.loadGeneralCGI(d)):a.log_append_ln("Error in exec_deleteByItem :itemId Not OK!"):a.log_append_ln("exec_deleteByItem Not implemented on Panasonic Server !")};this.exec_deleteList=function(){var b="",d=parseInt(this.co.Version.value,10);isNaN(d)===!0&&(d=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?(d>=20&&a.Link.SrvInfo_ALR2Activ?a.log_append_ln("exec_deleteList Not implemented for Alarming2 Macros !"):b="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=delete&completList=1", b.length>0&&a.loadGeneralCGI(b)):a.log_append_ln("exec_deleteList Not implemented on Panasonic Server !")};this.exec_acknowledgeByType=function(b){var d="",d=parseInt(this.co.Version.value,10);isNaN(d)===!0&&(d=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?b!==void 0&&b!=="0"&&b!==""&&b!=="-1"?(d>=20&&a.Link.SrvInfo_ALR2Activ?(d="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,d+="&action=ack",d+="&TID="+b):d="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=acknowledge&type="+ b,d.length>0&&a.loadGeneralCGI(d)):a.log_append_ln("Error in exec_acknowledgeByType :typeId Not OK!"):a.log_append_ln("exec_acknowledgeByType Not implemented on Panasonic Server !")};this.exec_acknowledgeByItem=function(b){var d="",d=parseInt(this.co.Version.value,10);isNaN(d)===!0&&(d=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?b!==void 0&&b!=="0"&&b!==""&&b!=="-1"?(d>=20&&a.Link.SrvInfo_ALR2Activ?(d="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,d+="&action=ack",d+="&item="+ b):d="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=acknowledge&item="+b,d.length>0&&a.loadGeneralCGI(d)):a.log_append_ln("Error in exec_acknowledgeByItem :itemId Not OK!"):a.log_append_ln("exec_acknowledgeByItem Not implemented on Panasonic Server !")};this.exec_acknowledgeByGrp1=function(b){var d="",e=parseInt(this.co.Version.value,10);isNaN(e)===!0&&(e=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?b!==void 0&&b!=="0"&&b!==""&&b!=="-1"?(e>=20&&a.Link.SrvInfo_ALR2Activ?(d="alarm2"+ a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,d+="&action=ack",d+="&grp1="+b):a.log_append_ln("exec_acknowledgeByGrp1 Not implemented before Alarming2 Macros !"),d.length>0&&a.loadGeneralCGI(d)):a.log_append_ln("Error in exec_acknowledgeByGrp1 :grp1 Not OK!"):a.log_append_ln("exec_acknowledgeByGrp1 Not implemented on Panasonic Server !")};this.exec_acknowledgeByGrp2=function(b){var d="",e=parseInt(this.co.Version.value,10);isNaN(e)===!0&&(e=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC? b!==void 0&&b!=="0"&&b!==""&&b!=="-1"?(e>=20&&a.Link.SrvInfo_ALR2Activ?(d="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,d+="&action=ack",d+="&grp2="+b):a.log_append_ln("exec_acknowledgeByGrp2 Not implemented before Alarming2 Macros !"),d.length>0&&a.loadGeneralCGI(d)):a.log_append_ln("Error in exec_acknowledgeByGrp2 :grp2 Not OK!"):a.log_append_ln("exec_acknowledgeByGrp2 Not implemented on Panasonic Server !")};this.exec_acknowledgeByGrp3=function(b){var d="",e=parseInt(this.co.Version.value, 10);isNaN(e)===!0&&(e=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?b!==void 0&&b!=="0"&&b!==""&&b!=="-1"?(e>=20&&a.Link.SrvInfo_ALR2Activ?(d="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,d+="&action=ack",d+="&grp3="+b):a.log_append_ln("exec_acknowledgeByGrp3 Not implemented before Alarming2 Macros !"),d.length>0&&a.loadGeneralCGI(d)):a.log_append_ln("Error in exec_acknowledgeByGrp3 :grp3 Not OK!"):a.log_append_ln("exec_acknowledgeByGrp3 Not implemented on Panasonic Server !")}; this.exec_acknowledgeByGrp4=function(b){var d="",e=parseInt(this.co.Version.value,10);isNaN(e)===!0&&(e=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?b!==void 0&&b!=="0"&&b!==""&&b!=="-1"?(e>=22&&a.Link.SrvInfo_ALR2Activ?(d="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,d+="&action=ack",d+="&grp4="+b):a.log_append_ln("exec_acknowledgeByGrp4 Not implemented before Alarming2 Macros version 22 !"),d.length>0&&a.loadGeneralCGI(d)):a.log_append_ln("Error in exec_acknowledgeByGrp4 :grp4 Not OK!"): a.log_append_ln("exec_acknowledgeByGrp4 Not implemented on Panasonic Server !")};this.exec_acknowledgeByPrio=function(b){var d="",e=parseInt(this.co.Version.value,10);isNaN(e)===!0&&(e=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?b!==void 0&&b!=="0"&&b!==""&&b!=="-1"?(e>=20&&a.Link.SrvInfo_ALR2Activ?(d="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,d+="&action=ack",d+="&prio="+b):a.log_append_ln("exec_acknowledgeByPrio Not implemented before Alarming2 Macros !"),d.length>0&& a.loadGeneralCGI(d)):a.log_append_ln("Error in exec_acknowledgeByPrio :prio Not OK!"):a.log_append_ln("exec_acknowledgeByPrio Not implemented on Panasonic Server !")};this.exec_acknowledgeList=function(){var b="",b=parseInt(this.co.Version.value,10);isNaN(b)===!0&&(b=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?(b>=20&&a.Link.SrvInfo_ALR2Activ?(b="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,b+="&action=ack"):b="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=acknowledge&completList=1", b.length>0&&a.loadGeneralCGI(b)):a.log_append_ln("exec_acknowledgeList Not implemented on Panasonic Server !")};this.exec_acknowledgeListAdv=function(){var b="",d=parseInt(this.co.Version.value,10);isNaN(d)===!0&&(d=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?(d>=20&&a.Link.SrvInfo_ALR2Activ?(b="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,b+="&action=ack",this.co.ACKItems.value.length>0&&this.co.ACKItems.value!=="0"&&this.co.ACKItems.value!=="-1"&&(b+="&item="+this.co.ACKItems.value), this.co.ACKTIDs.value.length>0&&this.co.ACKTIDs.value!=="0"&&this.co.ACKTIDs.value!=="-1"&&(b+="&TID="+this.co.ACKTIDs.value),this.co.ACKGrp1s.value.length>0&&this.co.ACKGrp1s.value!=="0"&&this.co.ACKGrp1s.value!=="-1"&&(b+="&grp1="+this.co.ACKGrp1s.value),this.co.ACKGrp2s.value.length>0&&this.co.ACKGrp2s.value!=="0"&&this.co.ACKGrp2s.value!=="-1"&&(b+="&grp2="+this.co.ACKGrp2s.value),this.co.ACKGrp3s.value.length>0&&this.co.ACKGrp3s.value!=="0"&&this.co.ACKGrp3s.value!=="-1"&&(b+="&grp3="+this.co.ACKGrp3s.value), this.co.ACKPrios.value.length>0&&this.co.ACKPrios.value!=="0"&&this.co.ACKPrios.value!=="-1"&&(b+="&prio="+this.co.ACKPrios.value),d>=22&&this.co.ACKGrp4s.value.length>0&&this.co.ACKGrp4s.value!=="0"&&this.co.ACKGrp4s.value!=="-1"&&(b+="&grp4="+this.co.ACKGrp4s.value)):a.log_append_ln("exec_acknowledgeListAdv Not implemented before Alarming2 Macros !"),b.length>0&&a.loadGeneralCGI(b)):a.log_append_ln("exec_acknowledgeListAdv Not implemented on Panasonic Server !")};this.exec_restartAlarmServer=function(){var b= "",b=parseInt(this.co.Version.value,10);isNaN(b)===!0&&(b=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?(b>=20&&a.Link.SrvInfo_ALR2Activ?(b="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,b+="&action=reinitAlarming"):b="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=reinitAlarming",b.length>0&&a.loadGeneralCGI(b)):a.log_append_ln("exec_restartAlarmServer Not implemented on Panasonic Server !")};this.exec_clearAlarmServer=function(){var b="",b=parseInt(this.co.Version.value, 10);isNaN(b)===!0&&(b=1);a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC?(b>=20&&a.Link.SrvInfo_ALR2Activ?(b="alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value,b+="&action=clearLogFiles"):b="alarm"+a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=clearLogFiles",b.length>0&&a.loadGeneralCGI(b)):a.log_append_ln("exec_clearAlarmServer Not implemented on Panasonic Server !")};this.readAllSpecialAlarmContainers=function(){var a=this.co,b=[];Object.keys(a).forEach(function(e){a[e].update!== null&&a[e].update(!0)===!0&&b.push(a[e])});return b};this.loadAndParseSrvCfg=function(){var b=!1,d=parseInt(this.co.Version.value,10);isNaN(d)===!0&&(d=1);a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC?this.co.LoadAlrsRemoteMode.value==="1"?this.co.LoadAlrsRemoteFile.value.length>0?a.loadData("plc?"+this.co.LoadAlrsRemoteFile.value+"cfg",a.AlarmSrvConfig.asynchUpdateCb,!1):(a.getDebugLevel()>=2&&a.log_append_ln("Warning during load cfg from Panasonic Alarming , LoadAlrsRemoteFile not right configured : ["+ this.co.LoadAlrsRemoteFile.value+"]"),a.loadData("plc?alarm1cfg",a.AlarmSrvConfig.asynchUpdateCb,!1)):(a.getDebugLevel()>=2&&a.log_append_ln("Warning during load cfg from Panasonic Alarming , LoadAlrsRemoteMode not right configured : ["+this.co.LoadAlrsRemoteMode.value+"]"),a.loadData("plc?alarm1cfg",a.AlarmSrvConfig.asynchUpdateCb,!1)):d>=20&&a.Link.SrvInfo_ALR2Activ?a.loadData("alarm2"+a.getSrvExt()+"?cgiVer=2&list="+this.co.AlarmsListNr.value+"&action=sta",a.AlarmSrvConfig.asynchUpdateCb,!1):a.loadData("alarm"+ a.getSrvExt()+"?list="+this.co.AlarmsListNr.value+"&action=configNSta",a.AlarmSrvConfig.asynchUpdateCb,!1);if(a.AlarmSrvConfig.response.length>0&&a.stringcmp(a.AlarmSrvConfig.response,this.previousConfigResponse)===!1&&(b=!0,this.previousConfigResponse=a.AlarmSrvConfig.response,this.parseAlarmSrvConfig()===!0)){if(this.getMaxPage!==null)this.co.MaxPageNr.value=this.getMaxPage(),this.co.MaxPageNr.update(!1);if(d>=20&&a.Link.SrvInfo_ALR2Activ&&this.getMaxPage!==null)this.co.MaxFilteredPageNr.value= this.getMaxPage(),this.co.MaxFilteredPageNr.update(!1)}if(a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC&&d>=20&&a.Link.SrvInfo_ALR2Activ&&this.getMaxFilteredPage!==null&&this.co.MaxFilteredPageNr.value!==this.getMaxFilteredPage())b=!0,this.co.MaxFilteredPageNr.value=this.getMaxFilteredPage(),this.co.MaxFilteredPageNr.update(!1);return b};this.update=function(){var b=0,d=0,e=d=0,f=1;this.fileViewer.getDrawCellTxtOnXLinesSource&&(b=this.fileViewer.getDrawCellTxtOnXLinesSource(),b!==null&&b.value!==null&& b.value!==void 0&&b.value.length>0&&b.value!="0"&&(f=parseInt(b.value,10)));isNaN(f)&&(f=1);f<=0&&(f=1);var g=this.readAllSpecialAlarmContainers();if(this.co.AlarmsListNr.value==="")this.co.AlarmsListNr.value="ALRLIST0";var j=parseInt(this.co.Version.value,10);isNaN(j)===!0&&(j=1);var k=4,o=6,h=8,p=-1,s=10;j>=22&&a.Link.SrvInfo_ALR2Activ&&(k=5,o=7,h=9,p=11,s=19);var q=this.loadAndParseSrvCfg();if(g.length>0||q===!0||a.previousDrawDateTimeFormat!==a.readDateTimeFormat()||a.previousMBTmzEn!==a.SpecialCO.mbTmzEn.value){for(b= 0;b=20&&a.Link.SrvInfo_ALR2Activ)a.log_append_ln("Error in update Alarming , ACKALRSDEFTYPES no more supported in alarming2");else if(this.fileViewer.checkIfMultiSelect()===!0)for(e=0;e=20&&a.Link.SrvInfo_ALR2Activ)if(this.fileViewer.checkIfMultiSelect()===!0)for(e=0;e=20&&a.Link.SrvInfo_ALR2Activ)if(this.fileViewer.checkIfMultiSelect()===!0)for(e=0;e=20&&a.Link.SrvInfo_ALR2Activ)if(this.fileViewer.checkIfMultiSelect()=== !0)for(e=0;e=22&&a.Link.SrvInfo_ALR2Activ)if(this.fileViewer.checkIfMultiSelect()===!0)for(e=0;e=20&&a.Link.SrvInfo_ALR2Activ)if(this.fileViewer.checkIfMultiSelect()===!0)for(e=0;e=20&&a.Link.SrvInfo_ALR2Activ? a.log_append_ln("Error in update Alarming , ACKALRSDEFLIST no more supported in alarming2"):this.exec_acknowledgeList():a.stringcmp("ACKALRSHISLIST",g[b].value)===!0?this.exec_acknowledgeList():a.stringcmp("ACKALRSHISADV",g[b].value)===!0?j>=20&&a.Link.SrvInfo_ALR2Activ?this.exec_acknowledgeListAdv():a.log_append_ln("Error in update Alarming , ACKALRSHISADV only supported s\ufffdnce alarming2"):a.stringcmp("DELALRSHISLIST",g[b].value)===!0?this.exec_deleteList():a.stringcmp("RESTARTTRGTALARMING", g[b].value)===!0?this.exec_restartAlarmServer():a.stringcmp("CLEARTRGTLOGFILES",g[b].value)===!0&&this.exec_clearAlarmServer()}else if(a.stringcmp(this.co.SelectMode.name,g[b].name)===!0)a.getDebugLevel()>=2&&a.log_append_ln(g[b].value),a.stringcmp("STOM",g[b].value)===!0?this.fileViewer.changeSelection(-1):a.stringcmp("MTOS",g[b].value)===!0&&this.fileViewer.changeSelection(-1);else if(a.stringcmp(this.co.AlarmMacroType.name,g[b].name)===!0&&(a.getDebugLevel()>=2&&a.log_append_ln(g[b].value),a.stringcmp("20", g[b].value)===!0)){if(this.BACnet===null)this.BACnet=new a.BACnet_Alarming(this);a.getDebugLevel()>=2&&a.log_append_ln("this is a BACnet alarming macro")}if(q&&a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC&&(a.getDebugLevel()>=2&&a.log_append_ln(" Panasonic forces that alarm his reload since the alarmcfg request changed this.co.LoadAlrsAction.name = "+this.co.LoadAlrsAction.name+" this.co.LoadAlrsAction.value = "+this.co.LoadAlrsAction.value),this.co.LoadAlrsAction.value!=="STARTLOADDATAS"))this.co.LoadAlrsAction.value= "STARTLOADDATAS",this.co.LoadAlrsAction.update(!1),g.push(this.co.LoadAlrsAction);this.specific_update(g);this.fileViewer.removeSelection()}};this.specific_update=a.noop;this.parseAlarmSrvConfig=function(){var b=a.AlarmSrvConfig.response,d=null,e=!1,f=0,g=1,j=parseInt(this.co.Version.value,10);isNaN(j)===!0&&(j=1);a.getDebugLevel()>=3&&b!==null&&a.log_append_ln("Alarming , parseAlarmSrvConfig contents : ["+b+"]");b!==null?d=a.parseCGI_CSV_Content(b):a.log_append_ln("Alarming ERROR: Failed to parseCGI_CSV_Content! "); j>=20&&a.Link.SrvInfo_ALR2Activ?(f=1,d[0]!==null&&d[0][0]!==null&&isNaN(parseFloat(d[0][0],10))!==!0&&(g=parseFloat(d[0][0],10))):g=0;g!==0&&a.log_append_ln("Alarming parseAlarmSrvConfig ERROR: error code not Ok "+g);if(g===0&&d!==null&&d[f]!==null){if(d[f][0]!==null&&isNaN(parseFloat(d[f][0],10))!==!0)this.config.version=parseFloat(d[f][0],10);if(d[f][1]!==null&&(this.config.overViewSize=0,isNaN(parseInt(d[f][1],10))!==!0))this.config.overViewSize=parseInt(d[f][1],10);if(d[f][2]!==null&&(this.config.maxHistorySize= 0,isNaN(parseInt(d[f][2],10))!==!0))this.config.maxHistorySize=parseInt(d[f][2],10);if(d[f][3]!==null&&(this.config.actualHistorySize=0,isNaN(parseInt(d[f][3],10))!==!0))this.config.actualHistorySize=parseInt(d[f][3],10);if(d[f][4]!==null&&(this.config.blockSize=0,isNaN(parseInt(d[f][4],10))!==!0))this.config.blockSize=parseInt(d[f][4],10);if(d[f][5]!==null&&(this.config.stateIndex=0,isNaN(parseInt(d[f][5],10))!==!0))this.config.stateIndex=parseInt(d[f][5],10),e=!0}return e};this.co={Language:{name:"@LANGUAGE", value:"0",update:this.update_co},AlrCoPrefix:{name:g,value:g,update:null},AlrCoIndex:{name:h,value:h,update:null},AlarmList:{name:g+"AlarmsList."+h,value:"0",update:this.update_co},AlarmsListNr:{name:g+"AlarmsListNr."+h,value:"ALRLIST0",update:this.update_co},LoadAlrsRemoteMode:{name:g+"LoadAlrsRemoteMode."+h,value:"1",update:this.update_co},LoadAlrsRemoteFile:{name:g+"LoadAlrsRemoteFile."+h,value:"",update:this.update_co},SelectMode:{name:g+"SelectMode."+h,value:"0",update:this.update_co},AlarmsListSize:{name:g+ "AlarmsListSize."+h,value:"0",update:this.update_co},PageNr:{name:g+"PageNr."+h,value:"0",update:this.update_co},MaxPageNr:{name:g+"MaxPageNr."+h,value:"0",update:this.update_co},MaxFilteredPageNr:{name:g+"MaxFilteredPageNr."+h,value:"0",update:this.update_co},SelAlrsTypesAct:{name:g+"SelAlrsTypesAct."+h,value:"0",update:this.update_co},AlarmsListHeaderSP:{name:g+"AlarmsListHeaderSP."+h,value:"0",update:this.update_co},FilterMode:{name:g+"FilterMode."+h,value:"0",update:this.update_co},SortMode:{name:g+ "SortMode."+h,value:"0",update:this.update_co},FilterAckMode:{name:g+"FilterAckMode."+h,value:"0",update:this.update_co},FilterTIDs:{name:g+"FilterTIDs."+h,value:"0",update:this.update_co},AlarmsTxtFromCSV:{name:g+"AlarmsTxtFromCSV."+h,value:"0",update:this.update_co},AlarmListSizeCSV:{name:g+"AlarmListSizeCSV."+h,value:"0",update:this.update_co},StateNoStateColor:{name:g+"StateNoStateColor."+h,value:"0",update:this.update_co},StateOnNackedColor:{name:g+"StateOnNackedColor."+h,value:"0",update:this.update_co}, StateOnAckedColor:{name:g+"StateOnAckedColor."+h,value:"0",update:this.update_co},StateOffNackedColor:{name:g+"StateOffNackedColor."+h,value:"0",update:this.update_co},StateOffAckedColor:{name:g+"StateOffAckedColor."+h,value:"0",update:this.update_co},LoadAlrsAction:{name:g+"LoadAlrsAction."+h,value:"0",update:this.update_co},LoadAlrsBargVal:{name:g+"LoadAlrsBargVal."+h,value:"0",update:this.update_co},SaveAlrsAction:{name:g+"SaveAlrsAction."+h,value:"0",update:this.update_co},SortAlrsColAction:{name:g+ "SortAlrsColAction."+h,value:"0",update:this.update_co},SortAlrsColNr:{name:g+"SortAlrsColNr."+h,value:"0",update:this.update_co},AlarmMacroType:{name:g+"AlarmMacroType."+h,value:"0",update:this.update_co},AlarmTextExtraParam10:{name:g+"AlarmTextExtraParam1On."+h,value:"0",update:this.update_co},AlarmTextExtraParam20:{name:g+"AlarmTextExtraParam2On."+h,value:"0",update:this.update_co},AlarmTextExtraParam30:{name:g+"AlarmTextExtraParam3On."+h,value:"0",update:this.update_co},AlarmTextExtraParam40:{name:g+ "AlarmTextExtraParam4On."+h,value:"0",update:this.update_co},AlarmTextExtraParam50:{name:g+"AlarmTextExtraParam4On."+h,value:"0",update:this.update_co},Version:{name:g+"Version."+h,value:"0",update:this.update_co},FilterGrp1s:{name:g+"FilterGrp1s."+h,value:"0",update:this.update_co},FilterGrp2s:{name:g+"FilterGrp2s."+h,value:"0",update:this.update_co},FilterGrp3s:{name:g+"FilterGrp3s."+h,value:"0",update:this.update_co},FilterPrios:{name:g+"FilterPrios."+h,value:"0",update:this.update_co},ACKTIDs:{name:g+ "ACKTIDs."+h,value:"0",update:this.update_co},ACKItems:{name:g+"ACKItems."+h,value:"0",update:this.update_co},ACKGrp1s:{name:g+"ACKGrp1s."+h,value:"0",update:this.update_co},ACKGrp2s:{name:g+"ACKGrp2s."+h,value:"0",update:this.update_co},ACKGrp3s:{name:g+"ACKGrp3s."+h,value:"0",update:this.update_co},ACKPrios:{name:g+"ACKPrios."+h,value:"0",update:this.update_co},ColorMode:{name:g+"ColorMode."+h,value:"0",update:this.update_co}};this.generateHistoryAlarmContainerValue=function(){var b=0,d="",e=parseInt(this.co.Version.value, 10);isNaN(e)===!0&&(e=1);if(this.rArrayHistory===null)return"";for(b=0;b=22&&a.Link.SrvInfo_ALR2Activ&&(d+=this.rArrayHistory[b].AlrTxt,d+=a.FVCOLSEPTOKEN2),e>=20&&a.Link.SrvInfo_ALR2Activ&&(d+=this.rArrayHistory[b].Grp1,d+= a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp1_HtmlTag),d+=a.FVCOLSEPTOKEN2,d+=this.rArrayHistory[b].Grp2,d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp2_HtmlTag),d+=a.FVCOLSEPTOKEN2,d+=this.rArrayHistory[b].Grp3,d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp3_HtmlTag),d+=a.FVCOLSEPTOKEN2),e>=22&&a.Link.SrvInfo_ALR2Activ&&(d+=this.rArrayHistory[b].Grp4,d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG, this.rArrayHistory[b].Grp4_HtmlTag),d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp5_HtmlTag),d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp6_HtmlTag),d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp7_HtmlTag),d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp8_HtmlTag),d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp9_HtmlTag),d+=a.FVCOLSEPTOKEN2, d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Grp10_HtmlTag),d+=a.FVCOLSEPTOKEN2),e>=20&&a.Link.SrvInfo_ALR2Activ&&(d+=this.rArrayHistory[b].Prio,d+=a.FVCOLSEPTOKEN2,d+=a.RW_readSource(a.INFO_T_HTMLTAG,this.rArrayHistory[b].Prio_HtmlTag),d+=a.FVCOLSEPTOKEN2),d+=e>=20&&a.Link.SrvInfo_ALR2Activ?a.getAlarmDateTimeByIntMSec(this.rArrayHistory[b].on):a.getAlarmDateTimeByIntMSec(1E3*this.rArrayHistory[b].on),d+=a.FVCOLSEPTOKEN2,d+=e>=20&&a.Link.SrvInfo_ALR2Activ?a.getAlarmDateTimeByIntMSec(this.rArrayHistory[b].off): a.getAlarmDateTimeByIntMSec(1E3*this.rArrayHistory[b].off),d+=a.FVCOLSEPTOKEN2,d+=this.rArrayHistory[b].state,d+=a.FVLINESEPTOKEN2;return d};this.addPartialResponseToHistory=function(b,d){var e=0,f=b.length,g=null,e=0,j=parseInt(this.co.Version.value,10);isNaN(j)===!0&&(j=1);if(j>=20&&a.Link.SrvInfo_ALR2Activ){if(e=1,f>=2&&(b[0][0]!==null&&isNaN(parseFloat(b[0][0],10))!==!0&&(e=parseFloat(b[0][0],10)),b[1][1]!==null))isNaN(parseFloat(b[1][1],10))!==!0?this.config.actualFilteredSize=parseFloat(b[1][1], 10):a.log_append_ln("Alarming addPartialResponseToHistory ERROR in parsing actualFilteredSize : "+b[1][1])}else e=0;if(e!==0)a.log_append_ln("Alarming addPartialResponseToHistory ERROR: error code not Ok "+e);else{d.rInt=-1;e=0;for(j>=20&&a.Link.SrvInfo_ALR2Activ&&(e=2);e=2&&j<22||!a.Link.SrvInfo_ALR2Activ)&&b[e].length>=5&&this.isBACnet()===!0&&a.Link.SrvInfo_ALRActiv===!0&&a.Link.SrvInfo_ALRVersion>= 1.11)b[e][5]==="20"?(g=new a.BACnet_HisLineType(b[e],this.co.AlarmsListNr.value,this.co),d.rArray.push(g),d.rInt=1):(a.log_append_ln("Alarming addPartialResponseToHistory ERROR: EXTRAPARAMSTYPE should be beckhoff one is not for "+b[5]),d.rInt=-1);else if(b[e].length>=5)g=new a.HisLineType(b[e],this.co.AlarmsListNr.value,this.co),d.rArray.push(g),d.rInt=1;else{d.rInt=-1;break}}};this.co.AlarmsListNr.update(!0);if(this.co.AlarmsListNr.value.length===0)this.co.AlarmsListNr.value="ALRLIST0"};a.AlarmDefOnlineType= function(h,g,b){this.base=a.AlarmBase;this.base(h,"@MACROALRDEFON",g,b);this.specific_update=function(){this.rArrayOverview=null;var a=parseInt(this.co.PageNr.value,10);isNaN(a)===!0&&(a=0);this.rArrayOverview=this.loadOverviewByIndices(this.updateIndices(a,this.config.overViewSize),a,this.config.overViewSize);this.co.SelAlrsTypesAct.value="0";this.co.SelAlrsTypesAct.update(!1);this.co.AlarmList.value=this.co.AlarmsListHeaderSP.value+this.generateOverviewAlarmContainerValue();this.co.AlarmList.update(!1); this.co.AlarmsListSize.value=this.config.overViewSize;this.co.AlarmsListSize.update(!1)};this.getMaxPage=function(){var a=0;this.config.overViewSize>0&&this.getDisplayedNumRow()>0&&(a=Math.ceil(this.config.overViewSize/this.getDisplayedNumRow()-1));return a};this.generateOverviewAlarmContainerValue=function(){for(var b=0,c=this.rArrayOverview.length,d="",b=0;b=0&&a.end>=0){e.rInt=1;if(a.end+1>=d)a.end=d-1;if(b>=0)for(;e.rInt>0&&e.rArray.length=2&&b<22||!a.Link.SrvInfo_ALR2Activ)&&this.isBACnet()===!0&&a.Link.SrvInfo_ALRActiv===!0&&a.Link.SrvInfo_ALRVersion>=1.11?a.BACnet_generateHistoryAlarmContainerValue(this,this.BACnet.TextFlags):this.generateHistoryAlarmContainerValue();this.co.AlarmList.update(!1);this.co.AlarmsListSize.value=this.config.actualHistorySize;this.co.AlarmsListSize.update(!1)};this.getMaxPage=function(){var a=0;this.config.actualHistorySize>0&&this.getDisplayedNumRow()> 0&&(a=Math.ceil(this.config.actualHistorySize/this.getDisplayedNumRow()-1));return a};this.getMaxFilteredPage=function(){var a=0;this.config.actualFilteredSize>=0&&this.getDisplayedNumRow()>1?(a=Math.ceil(this.config.actualFilteredSize/this.getDisplayedNumRow()-1),a<0&&(a=0)):this.config.actualHistorySize>0&&this.getDisplayedNumRow()>0&&(a=Math.ceil(this.config.actualHistorySize/this.getDisplayedNumRow()-1));return a};this.loadHistoryByIndices=function(a,b,e){var f={rArray:[],rInt:0},g=[],j=g=0;if(a.start>= 0&&a.end>=0){f.rInt=1;if(a.end+1>=e)a.end=e-1;if(b>=0)for(;f.rInt>0&&f.rArray.length0&&a.rArray.length=this.config.actualHistorySize&&(d=this.config.actualHistorySize-1);return a.rArray};this.compareAlarms=function(b,c,d){var e=!1,g=parseInt(this.co.Version.value,10);isNaN(g)=== !0&&(g=1);if(d>0)switch(d){case 1:e=b.itemId=20&&a.Link.SrvInfo_ALR2Activ?b.Grp1=22&&a.Link.SrvInfo_ALR2Activ?b.Grp1=20&&a.Link.SrvInfo_ALR2Activ?a.str_isLesser(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp1_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp1_HtmlTag)):b.off=22&&a.Link.SrvInfo_ALR2Activ?a.str_isLesser(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp1_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp1_HtmlTag)):g>=20&&a.Link.SrvInfo_ALR2Activ?b.Grp2=22&&a.Link.SrvInfo_ALR2Activ){e=b.Grp2=20&&a.Link.SrvInfo_ALR2Activ){e=a.str_isLesser(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp2_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp2_HtmlTag));break}break;case 8:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e= a.str_isLesser(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp2_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp2_HtmlTag));break}else if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=b.Grp3=22&&a.Link.SrvInfo_ALR2Activ){e=b.Grp3=20&&a.Link.SrvInfo_ALR2Activ){e=a.str_isLesser(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp3_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp3_HtmlTag));break}break;case 10:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=a.str_isLesser(a.RW_readSource(a.INFO_T_HTMLTAG, b.Grp3_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp3_HtmlTag));break}else if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=b.Prio=20&&a.Link.SrvInfo_ALR2Activ){e=a.str_isLesser(a.RW_readSource(a.INFO_T_HTMLTAG,b.Prio_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Prio_HtmlTag));break}break;case 12:if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=b.on=20&&a.Link.SrvInfo_ALR2Activ){e=b.off=20&&a.Link.SrvInfo_ALR2Activ){e=a.str_isLesser(b.state, c.state);break}break;case 19:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=b.Prio=22&&a.Link.SrvInfo_ALR2Activ){e=a.str_isLesser(a.RW_readSource(a.INFO_T_HTMLTAG,b.Prio_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Prio_HtmlTag));break}break;case 21:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=b.on=22&&a.Link.SrvInfo_ALR2Activ){e=b.off=22&&a.Link.SrvInfo_ALR2Activ&&(e=a.str_isLesser(b.state,c.state))}else switch(d){case -1:e= b.itemId>c.itemId;break;case -2:e=b.typeId>c.typeId;break;case -3:e=a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG,b.TID_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.TID_HtmlTag));break;case -4:e=g>=20&&a.Link.SrvInfo_ALR2Activ?b.Grp1>c.Grp1:b.on>c.on;break;case -5:e=g>=22&&a.Link.SrvInfo_ALR2Activ?b.Grp1>c.Grp1:g>=20&&a.Link.SrvInfo_ALR2Activ?a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp1_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp1_HtmlTag)):b.off>c.off;break;case -6:e=g>=22&&a.Link.SrvInfo_ALR2Activ? a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp1_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp1_HtmlTag)):g>=20&&a.Link.SrvInfo_ALR2Activ?b.Grp2>c.Grp2:a.str_isGreater(b.state,c.state);break;case -7:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=b.Grp2>c.Grp2;break}else if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp2_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp2_HtmlTag));break}break;case -8:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG, b.Grp2_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp2_HtmlTag));break}else if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=b.Grp3>c.Grp3;break}break;case -9:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=b.Grp3>c.Grp3;break}else if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp3_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Grp3_HtmlTag));break}break;case -10:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG,b.Grp3_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG, c.Grp3_HtmlTag));break}else if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=b.Prio>c.Prio;break}break;case -11:if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG,b.Prio_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Prio_HtmlTag));break}break;case -12:if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=b.on>c.on;break}break;case -13:if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=b.off>c.off;break}break;case -14:if(g>=20&&a.Link.SrvInfo_ALR2Activ){e=a.str_isGreater(b.state,c.state);break}break;case -19:if(g>= 22&&a.Link.SrvInfo_ALR2Activ){e=b.Prio>c.Prio;break}break;case -20:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=a.str_isGreater(a.RW_readSource(a.INFO_T_HTMLTAG,b.Prio_HtmlTag),a.RW_readSource(a.INFO_T_HTMLTAG,c.Prio_HtmlTag));break}break;case -21:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=b.on>c.on;break}break;case -22:if(g>=22&&a.Link.SrvInfo_ALR2Activ){e=b.off>c.off;break}break;case -23:g>=22&&a.Link.SrvInfo_ALR2Activ&&(e=a.str_isGreater(b.state,c.state))}return e};this.sortHisByNr=function(a){var b=!1;if(this.rArrayHistory){if(this.rArrayHistory.length> 1)for(var d=!1,e=!0,g=0,r=this.rArrayHistory.length;e===!0;){e=!1;for(g=0;g+1=2&&a.log_append_ln(b[c].value);else if(a.stringcmp(this.co.SortAlrsColAction.name,b[c].name)===!0){if(a.stringcmp("SORTHISSOFFALARMS",b[c].value)===!0){var d=parseInt(this.co.SortAlrsColNr.value,10);isNaN(d)===!1&&(this.sortHisByNr(d),this.fileViewer.resetScrollIndex())}}else a.stringcmp(this.co.SaveAlrsAction.name,b[c].name)===!0&&a.stringcmp("SAVEDATASTOFILE",b[c].value)===!0&&a.err_append_ln(a.SaveFileError); this.co.AlarmList.value=this.co.AlarmsListHeaderSP.value+this.generateHistoryAlarmContainerValue();this.co.AlarmList.update(!1);this.co.AlarmsListSize.value=this.rArrayHistory!==null?this.rArrayHistory.length+" / "+this.config.actualHistorySize:"0 / "+this.config.actualHistorySize;this.co.AlarmsListSize.update(!1);this.co.SortAlrsColAction.value="0";this.co.SortAlrsColAction.update(!1);this.co.LoadAlrsAction.value="0";this.co.LoadAlrsAction.update(!1);this.co.SaveAlrsAction.value="0";this.co.SaveAlrsAction.update(!1)}}; a.AlarmHisOfflineType.prototype=new a.AlarmBase;return a}(_SCIntern||{});_SCIntern=function(a){function h(){var a=0;$("#SC_HTMLControlDropDown option:selected").each(function(){a=$(this).val()});return a}function g(){var a=0;$("#SC_HTMLControlDropDown option:selected").each(function(){a=$(this).text()});return a}a.PainterType_DropDown=function(b){this.base=a.PainterType_MPainter;this.base(b);var f=this;this.table=null;this.listInfoType=function(){this.srcType=0;this.srcPrevValue=this.srcValue=this.srcName=""};this.listInfoArray=[];this.prevListNamesText=this.prevListText= "";this.lastListFilesloadIndex=-1;this.editModeActionFlag=!1;this.frmElmntOut=this.frmElmntInt=this.initDDLFunc=null;this.numRows=0;this.arrowSvg=null;var c=0;this.getTotalNrOfRows=function(){return this.numRows};a.DropDownMaxSize=15;this.activateEditMode=function(){a.registerModalPainter(this);if(this.listInfoArray[0].srcName){var b=0;f.table=f.getListTable();for(b=c=0;b=3&&(a.log_append_ln("hmi-dropdown editSource_getFontSize(): "+r),a.log_append_ln("hmi-dropdown editSource_getValue(): "+j));var k=0,o=0,o=a.getLeftPos(a.g_MouseDownEventInfo.ViewItem.ClickableDiv.handle),k=a.getTopPos(a.g_MouseDownEventInfo.ViewItem.ClickableDiv.handle),g=a.getScreenCrds(f.x,f.y,f.w,f.h),k=g.h+g.y+k+"px",o=g.x+o+"px",h=g.w+"px";$(a.g_HTMLControlDropDownElmnt).css("position","absolute");$(a.g_HTMLControlDropDownElmnt).css("top", k);$(a.g_HTMLControlDropDownElmnt).css("left",o);$(a.g_HTMLControlDropDownElmnt).css("width",h);g=g.scaleFactor*r;$(a.g_HTMLControlDropDownElmnt).css("background-color",b);$(a.g_HTMLControlDropDownElmnt).css("color",e);$(a.g_HTMLControlDropDownElmnt).css("font-size",g+"px");$(a.g_HTMLControlDropDownElmnt).css("font-family",f.getFontName());$(a.g_HTMLControlDropDownElmnt).css("font-style",f.getSvgFontStyle());$(a.g_HTMLControlDropDownElmnt).css("font-weight",f.getSvgFontWeight());$(a.g_HTMLControlDropDownElmnt).css("display", "block");$(a.g_HTMLControlDropDownElmnt).val(j);b=null;b=e=0;$(a.g_HTMLControlDropDownElmnt).empty();f.editSource_getValue_parseInt_DropDown();for(e=0;e'+f.table[e]+""),b.appendTo(a.g_HTMLControlDropDownElmnt));b=f.numRows>a.DDL_MAX_LN?a.DDL_MAX_LN:f.numRows;b==1&&(b=2);e=b;if(b>a.DropDownMaxSize)e=a.DropDownMaxSize;$(a.g_HTMLControlDropDownElmnt).attr("size",e);this.editModeFlag=!0}};this.leaveEditMode=function(){a.removeModalPainter(); if(this.editModeFlag===!0)$(a.g_HTMLControlDropDownElmnt).css("display","none"),$(a.g_HTMLControlDropDownElmnt).css("top","0px"),$(a.g_HTMLControlDropDownElmnt).css("left","0px"),this.editModeFlag=!1};this.execDropDownAction=function(b,c,f,r,j){if(b!==void 0)if(this.editModeFlag===!1)switch(b){case 8:this.activateEditMode(),a.getDebugLevel()>=2&&a.log_append_ln("hmi-dropdown this.editModeFlag")}else if(this.editModeActionFlag===!0&&this.editModeFlag===!0)switch(b){case 6:a.RW_writeSource(r,j,h()); break;case 7:a.RW_writeSource(r,j,g())}};this.execScrollerAction=function(){};this.execDDLAct=function(b,c,f,g,j){if(this.execDDLAct.onlyonce===void 0)a.SL_refreshPPO(),this.execDDLAct.onlyonce=!1;this.execDropDownAction(b,c,f,g,j)};this.addDDLInfo=function(a,b){var c=new this.listInfoType;c.srcType=a;c.srcName=b;this.listInfoArray.push(c);this.checkIfListChanged()};this.checkIfListChanged=function(){var b="",c=0,f=0,g=1,c=this.getReloadFilePeriode();if(c!=null&&c.value!=null&&!isNaN(c.value))g=c.value; for(c=0;c=0&&(f=0):g>1&&a.SpecialCO.autoincr.value%g!==0&&(f=0);c!==0&&(b+="\n");if(this.listInfoArray[c].srcType!==a.INFO_T_FILE||f===1)this.listInfoArray[c].srcValue=a.RW_readSource(this.listInfoArray[c].srcType,this.listInfoArray[c].srcName);b+=this.listInfoArray[c].srcValue}if(f=== 1)this.lastListFilesloadIndex=a.SpecialCO.autoincr.value;if(b!==this.prevListText)this.prevListText=b,this.scheduleFullRedrawPainter()};this.getTableRow=function(a){var b="";this.table.length>0&&(b=this.table[a]);b===void 0&&(b="");return b};this.getListTable=function(){for(var b="",c=0,c=0;c=2&&a.log_append_ln("hmi-dropdown Undo case"),this.scheduleFullRedrawPainter());break;case a.REMOVE_SELECTION:case a.VIEW_LOST_FOCUS:this.editModeFlag&&(this.leaveEditMode(!1),f=1);break;case a.CHANGE_DDL_VALUE:this.editModeActionFlag=!0,this.executeActionMouseDown(),this.leaveEditMode(!0),this.editModeActionFlag= !1,f=1}return f};if(b.initDDL)this.initDDLFunc=b.initDDL};a.PainterType_DropDown.prototype=new a.PainterType_MPainter;return a}(_SCIntern||{});_SCIntern=function(a){function h(){this.x=0;this.v=!1;this.index=this.p=this.w=0;this.clipId=""}a.DEFAULT_SCROLLER_WIDTH=20;a.DEFAULT_SCROLLER_WIDTH_TOUCH=50;a.FVCOMMENTLINESTARTSTR="#!";a.FVLINESPECLINESTARTSTR="#sp;";a.FVCOLUMNFOREGROUNDCOLORSPECSTARTSTR="#sfc;";a.FVCOLUMNBACKGROUNDCOLORSPECSTARTSTR="#sbc;";a.FVCOLUMNCOLORSPECENDSTR="#";a.FVCOLUMNCOLORSPECRGBTOKENSEPSTR=",";a.FVLINESEPTOKEN="\u00a2";a.FVLINESEPTOKEN2="\\n";a.FVLINESEPTOKENCHAR="\u00a2";a.FVCOLSEPTOKEN="\u00a7";a.FVCOLSEPTOKEN2= "\\t";a.FVCOLSEPTOKENCHAR="\u00a7";a.FVINDEXESSEPTOKEN="+";a.FVINDEXESSEPCHAR="+";a.FVMUTLILINESTRSEPTOKEN="\\l";a.PainterType_FileViewer=function(g){function b(b,c,d,e,f,g,j,k,n){b=b.createElementNS(a.SvgNs,"polygon");b.setAttributeNS(null,"points",d+","+e+" "+f+","+g+" "+j+","+k);b.setAttributeNS(null,"fill",n);return c.appendChild(b)}function f(a,c,d,e){var f="rgb(0, 0, 0)";d===!0?(F+1>q.getTotalNrOfRows()-2&&(f="rgb(162, 162, 162)"),b(a,c,e,e+q.h-A,A-e,e+q.h-A,A/2,q.h-e,f)):(F-1<0&&(f="rgb(162, 162, 162)"), b(a,c,e,A-e,A-e,A-e,A/2,e,f))}function c(){var b=document.createElementNS(a.SvgNs,"svg");b!==null&&(a.setSvgAttrC(b,"x",q.x+q.w-A),a.setSvgAttrC(b,"y",q.y),a.setSvgAttrC(b,"width",A),a.setSvgAttrC(b,"height",q.h),A<0&&(A=0),q.h<0&&a.log_append_ln("that.h < 0"),b.setAttributeNS(null,"viewBox","0 0 "+A+" "+q.h),b.setAttributeNS(null,"version","1.1"),a.createSVGRect(document,b,0,0,A,q.h,"rgb(255,255,255)","rgb(0,0,0)",1),a.createSVGRect(document,b,0,0,A,A,"rgb(192,192,192)","rgb(0,0,0)",1),a.createSVGRect(document, b,0,q.h-A,A,A,"rgb(192,192,192)","rgb(0,0,0)",1),f(document,b,!1,4),f(document,b,!0,4),q.getMainGroupElement().appendChild(b));return b}function d(b){var c=null,d=c=null,c=b.substring(5);c!==null&&(c=c.split(","),c.length>2&&(c[2]=c[2].substr(0,c[2].length-1)),c.length>0&&isNaN(c[0])===!0&&(c[0]=0,a.log_append_ln("invalid #sbc;/#scf color syntax (column 1)")),c.length>1&&isNaN(c[1])===!0&&(c[1]=0,a.log_append_ln("invalid #sbc;/#scf color syntax (column 2)")),c.length>0&&isNaN(c[0])===!0&&(c[2]=0, a.log_append_ln("invalid #sbc;/#scf color syntax (column 3)")),d=c);return d}function e(b){var c=null;a.prefixicmp(a.FVCOLUMNBACKGROUNDCOLORSPECSTARTSTR,b)===!0&&(c=d(b));return c}function n(b){var c=null;a.prefixicmp(a.FVCOLUMNFOREGROUNDCOLORSPECSTARTSTR,b)===!0&&(c=d(b));return c}function r(){for(var a=0,b=0,c=100,d=q.w-q.getScrollerWidth(),a=0;a0&&z>=a*c+d&&z<=a*c+(c-1)+d&&z!=-1&&(b=!0);return b}function u(b,c,d,f){var g=null,h=null,p="",r="",u=null,g=0,t="",v=k(),c=function(c,d,e,f){var g=[],j=0,k="";if(!(d[c].w<=0)){var n=Math.floor(d[c].w-q.getOutlineWidth()*2),o=0;f==!0&&d[c].w>0&&(f=document.createElementNS(a.SvgNs,"rect"),f.setAttributeNS(null,"x",d[c].x),f.setAttributeNS(null,"y",s()*e),f.setAttributeNS(null,"height",v*s()),f.setAttributeNS(null,"width",Math.floor(d[c].w)), f.setAttributeNS(null,"fill","rgb(0,0,0)"),m.appendChild(f));if(typeof(t=x[b][c])==="undefined"||t==void 0||t==null)t="";g=v>1?t.split(" "):t.split("");for(j=0;j1?k+" "+g[j]:k+g[j],u.getComputedTextLength()1?" "+g[j]:g[j]; else if(u.textContent=k,o0&&o2&&a.log_append_ln("hmi-fileviewer isSelected: "+f)):(r=h!==null&&h.length===3?"rgb("+h[0]+","+h[1]+","+h[2]+")":"rgb("+q.getInteriorColor()+")",q.checkIfInterior()===!0&&h!==null&&h.length===3&&j(f,r),p=g!==null&&g.length===3?String(g[0])+","+g[1]+","+g[2]:q.getTextColor());if(y===0)t=x[b]===void 0?"":x[b],u=a.createSVGTextExt(document,m,3,s()*(f+1)-3, p,"start",q.getFontName(),q.getFontSize(),x[b],q.getSvgFontStyle(),q.getSvgFontWeight()),aClmnArray[aColumn].p<100&&u!==null&&u.setAttribute("clip-path","url(#"+aClmnArray[aColumn].clipId+")");else for(g=0;g= this.x+(this.w-this.getScrollerWidth())?this.execScrollerAction():this.executeActionMouseDown&&this.executeActionMouseDown(),c.actionExecutedFlag=!0}d=0}break;case a.MOUSE_UP:c.consumedFlag===!0&&(a.OB_checkMouseCoordinates(this,a.g_MouseDownEventInfo)===!0?this.instanceDisabled()===!1?a.g_MouseDownEventInfo.x=2&&a.log_append_ln("hmi-fileviewer Disabled while down case"):a.getDebugLevel()>= 2&&a.log_append_ln("hmi-fileviewer Undo case"),this.scheduleFullRedrawPainter());break;case a.ENTER:d=0;break;case a.ESCAPE:this.editModeFlag&&(this.leaveEditMode(!1),d=1);break;case a.REMOVE_SELECTION:this.editModeFlag&&(this.leaveEditMode(!0),d=1)}return d};this.resetScrollIndex=function(){F=0};this.execScrollerAction=function(){this.scheduleFullRedrawPainter();if(a.g_MouseDownEventInfo.y-this.y>this.h/2){var b=F;b++;b>q.getTotalNrOfRows()-2&&(b=q.getTotalNrOfRows()-2)}else b=F,b--,b<0&&(b=0);F= b};this.getTableCell=function(a,b){return x[a][b]};this.showFile=function(b,d){var e=null,f=e=1,g=this.getReloadFilePeriode();if(!(b===void 0||d===void 0||b===null||d===null)){if(g!=null&&g.value!=null&&!isNaN(g.value))f=g.value;f<0?this.lastListFilesloadIndex>=0&&(e=0):f>1&&a.SpecialCO.autoincr.value%f!==0&&(e=0);f="INDEX";if(b===a.INFO_T_CONTAINER&&a.prefixicmp("@MACROALRDEFONAlarmsList.",d)===!0){if(q.alarmObj===null)f=d.substring(25),q.alarmObj=new a.AlarmDefOnlineType(f,q.getNrOfRowDisplayed(), q);q.alarmObj.update()}else if(b===a.INFO_T_CONTAINER&&a.prefixicmp("@MACROALRHISONAlarmsList.",d)===!0){if(q.alarmObj===null)f=d.substring(25),q.alarmObj=new a.AlarmHisOnlineType(f,q.getNrOfRowDisplayed(),q);q.alarmObj.update()}else if(b===a.INFO_T_CONTAINER&&a.prefixicmp("@MACROALRHISOFFAlarmsList.",d)===!0){if(q.alarmObj===null)f=d.substring(26),q.alarmObj=new a.AlarmHisOfflineType(f,q.getNrOfRowDisplayed(),q);q.alarmObj.update()}if(b!==a.INFO_T_FILE||e===1){if(e=a.RW_readSource(b,d),b===a.INFO_T_FILE)this.lastListFilesloadContent= e,this.lastListFilesloadIndex=a.SpecialCO.autoincr.value}else e=this.lastListFilesloadContent;if(this.isFullPainterRedrawRequired()||e!=N)if(N=e,e.length>0){if(m!==null&&m.parentNode.removeChild(m),t!==null&&t.parentNode.removeChild(t),m=p(),m!==null){var f=e,e=0,e={hasColLayout:!1,containsColumns:!1,autowrap:!1,height:0,width:0,fontFamily:"Arial",fontSize:10,innerSVGElmnt:null,svgFontStyle:null,svgFontWeight:null},j=g=0,n=0;e.width=q.w-(q.getScrollerWidth()+q.getOutlineWidth()*2);e.height=q.h-q.getOutlineWidth()* 2;e.fontSize=q.getFontSize();e.fontFamily=q.getFontName();e.innerSVGElmnt=m;e.autowrap=q.getIsAutoAjust();e.svgFontStyle=q.getSvgFontStyle();e.svgFontWeight=q.getSvgFontWeight();x=L(f,e);w=x.length;C=[];if(x[0]!==void 0){if(e.hasColLayout===!0){y=x[0].length;f=0;g=null;for(f=0;f0){y=e.maxCol;var e=0,f=null,g=1,j=0,n=q.w-q.getScrollerWidth(),o=parseInt(n,10);y!=0&&(g=parseInt(100/y,10),o=parseInt(n/y,10));for(e=0;e0)for(e=e=0;eq.getNrOfRowDisplayed()&&(e=q.getNrOfRowDisplayed());n=B+F;for(j= 0,g=n;g-n1&&J===!0)for(e=0;e1&&M===!0&&q.getTotalNrOfRows()>1)for(e=0;eg&&(m=-1)):m=-1):d!=0?(m=c/d-c/d%1,m+=F*h,m>g*h&&(m=-1)):m=-1;g=m;q.changeSelection(g);b:{c= a.g_MouseDownEventInfo.x-q.x;if(!(C.length<=0))for(d=0;d<=C.length;d++)if(!(C[d].w<=0)&&c>C[d].x&&c0)){o=x[b][0];for(g=1;g0&&c.value!="0"&&(c=parseInt(c.value,10),isNaN(c)===!1&&c>0&&(b=Math.trunc(b/c)))}return b};this.getTotalNrOfRows=function(){return w};this.geNrOfColumns=function(){return y};this.showVScrollerM=function(b){this.useVScrollerM=b;A=a.DEFAULT_SCROLLER_WIDTH};this.showVScrollerT=function(b){this.useVScrollerT=b;A=a.DEFAULT_SCROLLER_WIDTH_TOUCH};this.getScrollerWidth=function(){return A}};a.PainterType_FileViewer.prototype=new a.PainterType_MPainter;return a}(_SCIntern|| {});_SCIntern=function(a){function h(a){a=a.replace("e","E");return a.indexOf("E")!==-1?!0:!1}a.TrendValueType=function(){this.t_s=this.y=0};a.TREND_LABEL_WIDTH=36;a.TREND_LABEL_HEIGHT=26;a.trendBaseInitSvgHandlesIfRequired=function(){if(this.TrendControl_eGroup===null)this.TrendControl_eGroup=this.getRepaintElement("sc_obj_trend_control_"+this.objId+"_group");if(this.TrendCurves_eGroup===null)this.TrendCurves_eGroup=this.getRepaintElement("trend_"+this.objId+"_curves_group");if(this.TrendCurves_eSvg=== null)this.TrendCurves_eSvg=this.getRepaintElement("trend_"+this.objId+"_curves_svg");if(this.TrendControl_eSvg===null)this.TrendControl_eSvg=this.getRepaintElement("trend_"+this.objId+"_control_svg");this.TrendControl_eGroup===null&&a.err_append_ln("ERROR: Failed to create Online Trend's TrendControl_eGroup!");this.TrendControl_eSvg===null&&a.err_append_ln("ERROR: Failed to create Online Trend's TrendControl_eSvg!");this.TrendCurves_eGroup===null&&a.err_append_ln("ERROR: Failed to create Online Trend's TrendCurves_eGroup!")}; a.trendBaseRectangle=function(){var g=0,b=0,f="",c="",d=0,e=0;this.checkIfInterior()===!0&&(g=1);this.checkIfOutline()===!0&&(b=1);this.getOutlineWidth();f="rgba("+this.getInteriorColor()+","+g+")";c="rgba("+this.getOutlineColor()+","+b+")";d=this.checkIfOutline()===!0?this.getOutlineWidth():this.getInnerFill()===!0?this.getOutlineWidth():0;e=this.getOutlineStyle();if(this.frmElmnt!==null)a.removeSVG(this.frmElmnt),this.frmElmnt=null;switch(e){case a.SOLID:this.frmElmnt=a.createSVGRect(this.svgDoc, this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,f,c,d);break;case a.DASHED:case a.DOTTED:this.frmElmnt=a.createSVGRectDashed(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,f,c,d,this.getInnerFill(),e);break;default:a.log_append_ln("ERROR sc.trendBaseRectangle Unknown outline style")}};a.trendBaseParseActiveTrends=function(){var g=0,g=0,b=null,f=null,c=null,d=0,e=!1,g=f=0,f=a.ReadContainer(this.macroPrefix+"ActiveTrends."+this.trendIndex);if(a.stringcmp(this.activePrevious, f)===!1){e=!0;for(g=0;g0)this.FileViewerColumns=b[0];if(b.length>1){for(g=1;g=5){var n=this.getActiveTrendCurve(c[1]),n=this.updateActiveList(n,c);d++;if(n!==null&&n!==void 0)n.activeFlag=!0}d=this.trendCurveListActive.length;for(g=1;g=5)if(c= this.getActiveTrendCurveIndex(c[1]),c!=null)if(n0&&(b+=a.TREND_LABEL_WIDTH);e0&&(e=1+this.relPosSvg.rX+this.relPosSvg.rW+(b-1)*a.TREND_LABEL_WIDTH);c=k;d=0;n=String(f);r=[];r=n.split("e");r.length>0&&(n= r[0]);r=n.split(".");if(r.length>1&&r[1])d=r[1].length;c.numDec=d;c=this.trendCurveListActive[b].yMax;k.isExponential=h(this.trendCurveListActive[b].yMin)||h(c)?!0:!1;for(c=0;c<11;c++)d=this.trendCurveListActive[b].yMax-f*c,k.isExponential===!0?(d=d.toExponential(k.numDec),d=d.replace("e","E"),d=d.replace("+","")):d=d.toFixed(k.numDec),n=a.TREND_LABEL_HEIGHT/2-this.getFontSize()/2+this.getFontSize()+j*c,r=this.trendCurveListActive[b].colorRGB,a.createSVGTextExt(document,this.trendCurveListActive[b].label_e, e,n,r,"start",this.getFontName(),this.getFontSize(),d,this.getSvgFontStyle(),this.getSvgFontWeight())}};a.trendBaseDrawGrid=function(g){var b=null,f=0;this.gridYSpacing=this.relPosSvg.rH/10;this.gridXSpacing=this.relPosSvg.rW/10;this.eGrpGrid!==null&&a.removeSVG(this.eGrpGrid);this.eGrpGrid=null;if(g===!0&&this.eGrpGrid===null)if(this.eGrpGrid=document.createElementNS(a.SvgNs,"g"),this.eGrpGrid!==null){this.eGrpGrid.setAttribute("visibility","visible");this.TrendControl_eSvg.appendChild(this.eGrpGrid); this.eGrpGrid.setAttributeNS(null,"id","grid_"+this.trendIndex);for(f=0;f<=10;f++)b=a.createSVGSimpleRect(document,this.relPosSvg.rX,this.relPosSvg.rY+this.gridYSpacing*f,this.relPosSvg.rW,1,"rgb("+this.getOutlineColor()+")"),this.eGrpGrid.appendChild(b);for(f=0;f<=10;f++)b=a.createSVGSimpleRect(document,this.relPosSvg.rX+this.gridXSpacing*f,this.relPosSvg.rY,1,this.relPosSvg.rH,"rgb("+this.getOutlineColor()+")"),this.eGrpGrid.appendChild(b)}else a.log_append_ln("ERROR drawGrid(), this.eGrpGrid === null"); else g===!0&&this.eGrpGrid!==null?this.eGrpGrid.setAttributeNS(null,"visibility",""):g===!1&&this.eGrpGrid!==null&&this.eGrpGrid.setAttributeNS(null,"visibility","hidden")};a.trendBaseDrawAllActiveCurves=function(){var g=0,b=0,f=0,c=this.trendCurveListActive.length,d=null,e="M 0 0",d=null,n=0,h=!1;if(this.emitter.stopLog===!1)for(g=0;g=2&&a.log_append_ln("this.config.FirstAutoSrollDraw: "+this.config.FirstAutoSrollDraw),h=!0,this.config.FirstAutoSrollDraw=!1;for(b=0;bthis.xMaxTime_s&&(this.config.xAutoScroll===!0&&b===f-1||h===!0)){var j=d.t_s-this.xMaxTime_s;this.setXTimeRange(this.xMinTime_s+ j,this.xMaxTime_s+j)}}d=this.computePointsInRange(this.trendCurveListActive[g].yMax,this.trendCurveListActive[g].yMin,this.trendCurveListActive[g].yProportionalityFactor,d.t_s,d.y);d.xPx<=this.relPosSvg.rX+this.relPosSvg.rW&&d.yPx<=this.relPosSvg.rY+this.relPosSvg.rH&&this.relPosSvg.rX<=d.xPx&&this.relPosSvg.rY<=d.yPx&&(n===0&&(e="M"+d.xPx+" "+d.yPx+" "),e+="L"+d.xPx+" "+d.yPx+" ",n++)}n===0&&(e="M0 0 ",e+="L0 0 ")}this.trendCurveListActive[g].activeFlag===!1?this.remove_ePath(g):(this.trendCurveListActive[g].curve_ePath=== null&&this.initialise_ePath(g),this.trendCurveListActive[g].curve_ePath!==null&&(this.trendCurveListActive[g].curve_ePath.setAttributeNS(null,"stroke","rgb("+this.trendCurveListActive[g].colorRGB+")"),this.trendCurveListActive[g].curve_ePath.setAttributeNS(null,"stroke-width",this.getOutlineWidth()),this.trendCurveListActive[g].curve_ePath.setAttributeNS(null,"fill","none")),this.trendCurveListActive[g].curve_ePath!==null&&this.trendCurveListActive[g].curve_ePath.setAttributeNS(null,"d",e))}};a.trendBaseUpdateScrollAction= function(){var a=0,b=this.config.scroll;Math.abs(b)>0&&Math.abs(b)<=100&&this.displayedTime_s>0&&(a=this.displayedTime_s<1E4?this.displayedTime_s*b/100:this.displayedTime_s/100*b,a===0&&(a=b>0?1:-1),this.xMaxTime_s+a<0?a-=this.xMaxTime_s:this.xMaxTime_s+a>2147483647&&(a=2147483647-this.xMaxTime_s),a!==0&&this.setXTimeRange(this.xMinTime_s+a,this.xMaxTime_s+a));this.config.scroll=0};a.trendBaseUpdateZoomAction=function(){var g=0,g=0,g=this.config.zoom;if(Math.abs(g)>0&&Math.abs(g)<=100)this.displayedTime_s> 0&&(g=this.displayedTime_s<1E4?this.displayedTime_s*g/200:this.displayedTime_s/200*g,g>0?this.displayedTime_s-2*g<10&&(a.MAX(0,(this.displayedTime_s-10)/2),g=2147483647-this.displayedTime_s,g/=2,g=a.MIN(0,-g)):g<0&&this.displayedTime>=2147483647+2*g&&(g=2147483647-this.displayedTime_s,g/=2,g=a.MIN(0,-g)),g!==0&&(this.xMinTime_s+g<0?this.setXTimeRange(this.xMaxTime_s-g):this.xMaxTime_s-g>2147483647?this.setXTimeRange(this.xMinTime_s+g,2147483647):this.setXTimeRange(this.xMinTime_s+g,this.xMaxTime_s- g))),this.config.zoom=0};a.trendBaseSetXTimeRange=function(a,b){if(b>a){this.xMinTime_s=a;this.xMaxTime_s=b;this.displayedTime_s=this.xMaxTime_s-this.xMinTime_s;this.xRange=this.xMaxTime_s-this.xMinTime_s;if(this.xRange!==0)this.xProportionalityFactor=this.relPosSvg.rW/this.xRange;if(this.xProportionalityFactor!=0)this.xPxRate=1/this.xProportionalityFactor;this.xStep_s=this.xRange/10;this.updateXTimeLabels()}};a.trendBaseUpdateYProp_AllCurves=function(){for(var a=0,a=0;aa?0:d>=0?a-d:n+b-d)*f);e.yPx+=this.relPosSvg.rY; e.xPx+=this.relPosSvg.rX;return e};a.trendBaseClear=function(){var g=0;this.clearActiveCurveRingBuffersOffline();for(var b=this.trendCurveListActive.length,g=0;g0){f=this.trendCurveListActive[g].valuesCBuffer.level;for(e=0;eb)break;d=c}a.getDebugLevel()>=2&&(a.log_append_ln("Trend get mouse click value point for click ts["+ b+"]= "+a.getAlarmDateTimeByIntMSec(1E3*b)+" "+a.FVLINESEPTOKEN2),d!==null&&a.log_append_ln("Trend get mouse click value point found nearestPoint ts["+d.t_s+"]= "+a.getAlarmDateTimeByIntMSec(1E3*d.t_s)+" "+a.FVLINESEPTOKEN2))}return d};a.trendBaseGetRgb=function(a){return this.trendCurveListActive[a].colorRGB};a.trendBaseGetFViewerClicked=function(){var g="",b=0,f=null,b=this.mouseDownHeader.split(a.FVLINESEPTOKEN2),c=this.trendCurveListActive.length;b.length>0&&(g+=b[0]);g+=a.FVLINESEPTOKEN2;g+= a.FVCOLUMNFOREGROUNDCOLORSPECSTARTSTR+"0,204,0#\\t";if(this.sClicked>=0){g+=this.ptId===a.JS_PT_ONLINE_TREND?a.getAlarmDateTimeByIntMSecUTC(1E3*this.sClicked):a.getAlarmDateTimeByIntMSec(1E3*this.sClicked);g+=a.FVCOLSEPTOKEN2;g+="USER !";g+=a.FVLINESEPTOKEN2;for(b=0;b4)g.PPOName=b[1],g.yMin=b[2],g.yMax=b[3],g.colorRGB=b[4];f=this.emitter.getAvailableCurve(g.PPOName)}else if(this.ptId===a.JS_PT_OFFLINE_TREND){if(g===null)g=new a.TrendOfflineCurveType,g.curveNr="0", g.colorRGB="0,0,0",g.yMin=0,g.yMax=0,g.firstPoint=0,g.lastPoint=0,g.beginDate="1970.01.01",g.beginTime="00:00:00 AM",g.endDate="1970.01.01",g.endTime="00:00:00 AM",this.trendCurveListActive.push(g);if(g!==null&&b!==null&&b.length>10)g.curveNr=b[1],g.yMin=b[2],g.yMax=b[3],g.colorRGB=b[4],g.firstPoint=b[5],g.lastPoint=b[6],g.beginDate=b[7],g.beginTime=b[8],g.endDate=b[9],g.endTime=b[10];f=this.emitter.getAvailableCurve(g.curveNr)}else if(this.ptId===a.JS_PT_SAVED_TREND){if(g===null)g=new a.TrendSavedCurveType, g.curveNr="0",g.colorRGB="0,0,0",g.yMin=0,g.yMax=0,g.firstPoint=0,g.lastPoint=0,g.beginDate="1970.01.01",g.beginTime="00:00:00 AM",g.endDate="1970.01.01",g.endTime="00:00:00 AM",this.trendCurveListActive.push(g);if(g!==null&&b!==null&&b.length>4)g.curveNr=b[1],g.yMin=b[2],g.yMax=b[3],g.colorRGB=b[4];f=this.emitter.getAvailableCurve(g.curveNr)}if(f!==null&&g!==null)g.valuesCBuffer=f.valuesCBuffer;if(g!==null)g.activeFlag=!0;return g};a.trendBaseDrawVerticalClicked=function(){if(a.stringcmp(this.mouseDownAction, "DISABLE")===!1&&this.sClicked>=0)this.eClicked!==null&&a.removeSVG(this.eClicked),this.xClicked=(this.sClicked-this.xMinTime_s)*this.xProportionalityFactor+this.relPosSvg.rX,this.eClicked=a.createSVGSimpleRect(document,this.xClicked,0,this.getOutlineWidth(),this.h,"rgb(0, 204, 0)"),this.TrendCurves_eGroup!==null&&this.TrendCurves_eGroup.appendChild(this.eClicked)};a.trendBaseMouseDownActionFunc=function(){a.stringcmp(this.mouseDownAction,"DISABLE")===!1&&this.xProportionalityFactor!=0?(this.sClicked= Math.round((a.g_MouseDownEventInfo.x-this.x-this.relPosSvg.rX)/this.xProportionalityFactor),this.sClicked+=this.xMinTime_s):this.sClicked=-1};a.trendBaseNotify=function(g,b){var f=0;switch(g){case a.DRAW_OBJECT:this.instanceDraw&&this.instanceDraw();break;case a.MOUSE_DOWN:a.OB_checkMouseCoordinates(this,b)===!0?(this.trendMouseDown(),f=1):f=0;break;case a.MOUSE_UP:a.OB_checkMouseCoordinates(this,a.g_MouseDownEventInfo)===!0?(f=1,this.isPressed=!1):f=0}return f};a.trendBaseUpdateXTimeLabels=function(){var g= 0,b="04.03.2013",b=0,f=this.macroPrefix,c=!0,d=new Date(0);if(d){c=this.ptId===a.JS_PT_ONLINE_TREND?!1:!a.SpecialCO.mbTmzEn.value;f=this.macroPrefix;d=new Date(0);d.setUTCSeconds(this.xMinTime_s);b=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.dateLocalNow.name,c,d,null,!0);a.RW_writeSource(a.INFO_T_CONTAINER,f+"XMinDate."+this.trendIndex,b);d=new Date(0);d.setUTCSeconds(this.xMaxTime_s);b=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.dateLocalNow.name,c,d,null,!0);a.RW_writeSource(a.INFO_T_CONTAINER, f+"XMaxDate."+this.trendIndex,b);d=new Date(0);d.setUTCSeconds(this.xMinTime_s);b=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,c,d,null,!0);a.RW_writeSource(a.INFO_T_CONTAINER,f+"XMinTime."+this.trendIndex,b);d=new Date(0);d.setUTCSeconds(this.xMaxTime_s);b=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,c,d,null,!0);a.RW_writeSource(a.INFO_T_CONTAINER,f+"XMaxTime."+this.trendIndex,b);this.ptId===a.JS_PT_ONLINE_TREND&&(f="@MACROONT");for(g=0;g<10;g++)b= g*(this.xMaxTime_s-this.xMinTime_s)/10,d=new Date(0),d.setUTCSeconds(this.xMinTime_s+b),b=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.dateLocalNow.name,c,d,null,!0),a.RW_writeSource(a.INFO_T_CONTAINER,f+"XDate["+g+"]."+this.trendIndex,b);for(g=0;g<10;g++)b=g*(this.xMaxTime_s-this.xMinTime_s)/10,d=new Date(0),d.setUTCSeconds(this.xMinTime_s+b),b=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,c,d,null,!0),a.RW_writeSource(a.INFO_T_CONTAINER,f+"XTime["+g+"]."+this.trendIndex, b)}};return a}(_SCIntern||{});_SCIntern=function(a){a.OnlineTrendEmitterType=function(h){this.trendIndex=h;this.lastLogged_s=0;this.trendCurveListAvailable=[];this.stopLog=!1;this.getAvailableCurve=function(a){for(var b=0,f=this.trendCurveListAvailable.length,b=0;b=2&&a.log_append_ln("this.config.FirstAutoSrollDraw: "+this.config.FirstAutoSrollDraw),a.WriteContainer("@MACROXAutoUpdate."+this.trendIndex,"1");b=="SETAUTO"||b=="1"?this.config.xAutoScroll=!0:b.length===0?this.config.xAutoScroll=!0:(this.config.xAutoScroll=!1,b= 0,b=a.ReadContainer("@MACROXMinTime."+this.trendIndex),b=a.ReadContainer("@MACROXMinDate."+this.trendIndex)+" "+b,b=parseInt(a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,!1,null,b,!0),10),isNaN(b)===!1&&this.setXTimeRange(b,b+this.displayedTime_s));this.config.AutoyAxisLegend=parseInt(a.ReadContainer(this.macroPrefix+"AutoYAxeDescr."+this.trendIndex),10);this.config.action=a.ReadContainer("@MACROAvailableTrendsAction."+this.trendIndex);if(this.config.action=="CLEARNSTOPLOGS")this.emitter.stopLog= !0,this.clear(),this.config.action="LOGSWAITING";else if(this.config.action=="STARTLOGGING")this.timeWindowInitialised=!1,this.emitter.stopLog=!1,this.config.action="0";else if(this.config.action=="SAVELOGSTOFILE")a.err_append_ln(a.SaveFileError),this.config.action="0";else if(this.config.action=="CLEARLOGS")this.clear(),this.config.action="0";a.WriteContainer("@MACROAvailableTrendsAction."+this.trendIndex,this.config.action);this.config.scroll=a.ReadContainer("@MACROScroll."+this.trendIndex);this.updateScrollAction(); a.WriteContainer("@MACROScroll."+this.trendIndex,this.config.scroll);this.config.zoom=parseInt(a.ReadContainer("@MACROZoom."+this.trendIndex),10);isNaN(this.config.zoom)?this.config.zoom=0:this.updateZoomAction();a.WriteContainer("@MACROZoom."+this.trendIndex,this.config.zoom);this.config.trendArrayUpdate=a.ReadContainer("@MACROActiveTrends[][]Update."+this.trendIndex);if(this.config.trendArrayUpdate=="UPDATE")this.readActiveTrendsContainerArray(),this.config.trendArrayUpdate="0",a.WriteContainer("@MACROActiveTrends[][]Update."+ this.trendIndex,this.config.trendArrayUpdate)};this.writeActiveTrendsContainerArray=function(){for(var b=0,f=this.trendCurveListActive.length,b=1;b<=f;b++)a.WriteContainer("@MACROActiveTrends["+b+"][0]."+this.trendIndex,this.trendCurveListActive[b-1].colorRGB),a.WriteContainer("@MACROActiveTrends["+b+"][1]."+this.trendIndex,this.trendCurveListActive[b-1].PPOName),a.WriteContainer("@MACROActiveTrends["+b+"][2]."+this.trendIndex,this.trendCurveListActive[b-1].yMin),a.WriteContainer("@MACROActiveTrends["+ b+"][3]."+this.trendIndex,this.trendCurveListActive[b-1].yMax),a.WriteContainer("@MACROActiveTrends["+b+"][4]."+this.trendIndex,this.trendCurveListActive[b-1].colorRGB)};this.readActiveTrendsContainerArray=function(){for(var b=0,f=this.trendCurveListActive.length,b=1;b<=f;b++)this.trendCurveListActive[b-1].colorRGB=a.ReadContainer("@MACROActiveTrends["+b+"][0]."+this.trendIndex),this.trendCurveListActive[b-1].curveNr=a.ReadContainer("@MACROActiveTrends["+b+"][1]."+this.trendIndex),this.trendCurveListActive[b- 1].yMin=a.ReadContainer("@MACROActiveTrends["+b+"][2]."+this.trendIndex),this.trendCurveListActive[b-1].yMax=a.ReadContainer("@MACROActiveTrends["+b+"][3]."+this.trendIndex),this.trendCurveListActive[b-1].colorRGB=a.ReadContainer("@MACROActiveTrends["+b+"][4]."+this.trendIndex)};this.calculateMaxPoints=function(){var b=(a.getRefreshPeriod()+999)/1E3,b=a.toFixedNotRound(b,0);b===0&&(b=1);this.maxPoints=1+this.config.storedTime_s/b;a.getDebugLevel()>=2&&(a.log_append_ln("OT getRefreshPeriod: "+a.getRefreshPeriod()), a.log_append_ln("OT storedTime_s: "+this.config.storedTime_s),a.log_append_ln("OT Max Points: "+this.maxPoints))};this.parseAvailableTrends=function(){var b=0,f=null,c=b=null,b=a.ReadContainer("@MACROAvailableTrends."+this.trendIndex),f=b.split(a.FVLINESEPTOKEN2);if(f.length>1)for(b=0;b3&&(d.PPOName=c[0],e=this.emitter.getAvailableCurve(d.PPOName),e===null))a.registerHMI_PPO(d.PPOName), d.yMin=c[1],d.yMax=c[2],d.colorRGB=c[3],d.valuesCBuffer=new a.CircularBuffer(this.maxPoints),this.emitter.trendCurveListAvailable.push(d)}}};a.PainterType_OnlineTrend.prototype=new a.PainterType_MPainter;return a}(_SCIntern||{});_SCIntern=function(a){a.OfflineTrendEmitterType=function(a){this.trendIndex=a||0;this.lastLogged_s=0;this.trendCurveListAvailable=[];this.stopLog=!1;this.getAvailableCurve=function(a){for(var b=0,f=this.trendCurveListAvailable.length,b=0;b=2&&a.log_append_ln("LOADINFONSTARTDATA/activePts: "+b),a.WriteContainer("@MACROOFTActiveTrendsTotalSamples."+this.trendIndex,b),this.loadActiveCurveData(),this.config.action="0";a.WriteContainer("@MACROOFTActiveTrendsLoadInfos."+this.trendIndex,this.config.action);this.clearBusyFlag();this.config.trendArrayUpdate=a.ReadContainer("@MACROOFTActiveTrends[][]Update."+this.trendIndex); if(this.config.trendArrayUpdate=="UPDATE")this.readActiveTrendsContainerArray(),this.config.trendArrayUpdate="0",a.WriteContainer("@MACROOFTActiveTrends[][]Update."+this.trendIndex,this.config.trendArrayUpdate)};this.clearBusyFlag=function(){a.WriteContainer("_TREND_BUSY","0")};this.parseAvailableTrends=function(){var b=0,c=null,f=b=null,b=a.ReadContainer("@MACROOFTAvailableTrendsColored."+this.trendIndex),c=b.split(a.FVLINESEPTOKEN2);if(c.length>1)for(b=0;b10&&(g.curveNr=f[1],j=this.emitter.getAvailableCurve(g.curveNr),j===null))g.curveNr=f[1],g.yMin=f[2],g.yMax=f[3],g.colorRGB=f[4],g.firstPoint=f[5],g.lastPoint=f[6],g.beginDate=f[7],g.beginTime=f[8],g.endDate=f[9],g.endTime=f[10],g.valuesCBuffer=new a.CircularBuffer(-1),this.emitter.trendCurveListAvailable.push(g)}}; this.writeActiveTrendsContainerArray=function(){for(var b=0,c=this.trendCurveListActive.length,b=1;b<=c;b++)a.WriteContainer("@MACROOFTActiveTrends["+b+"][0]."+this.trendIndex,this.trendCurveListActive[b-1].colorRGB),a.WriteContainer("@MACROOFTActiveTrends["+b+"][1]."+this.trendIndex,this.trendCurveListActive[b-1].curveNr),a.WriteContainer("@MACROOFTActiveTrends["+b+"][2]."+this.trendIndex,this.trendCurveListActive[b-1].yMin),a.WriteContainer("@MACROOFTActiveTrends["+b+"][3]."+this.trendIndex,this.trendCurveListActive[b- 1].yMax),a.WriteContainer("@MACROOFTActiveTrends["+b+"][4]."+this.trendIndex,this.trendCurveListActive[b-1].colorRGB),a.WriteContainer("@MACROOFTActiveTrends["+b+"][5]."+this.trendIndex,this.trendCurveListActive[b-1].firstPoint),a.WriteContainer("@MACROOFTActiveTrends["+b+"][6]."+this.trendIndex,this.trendCurveListActive[b-1].lastPoint),a.WriteContainer("@MACROOFTActiveTrends["+b+"][7]."+this.trendIndex,this.trendCurveListActive[b-1].beginDate),a.WriteContainer("@MACROOFTActiveTrends["+b+"][8]."+ this.trendIndex,this.trendCurveListActive[b-1].beginTime),a.WriteContainer("@MACROOFTActiveTrends["+b+"][9]."+this.trendIndex,this.trendCurveListActive[b-1].endDate),a.WriteContainer("@MACROOFTActiveTrends["+b+"][10]."+this.trendIndex,this.trendCurveListActive[b-1].endTime),a.WriteContainer("@MACROOFTActiveTrends["+b+"][11]."+this.trendIndex,this.trendCurveListActive[b-1].numPoints)};this.readActiveTrendsContainerArray=function(){for(var b=0,c=this.trendCurveListActive.length,b=1;b<=c;b++){this.trendCurveListActive[b- 1].colorRGB=a.ReadContainer("@MACROOFTActiveTrends["+b+"][0]."+this.trendIndex);this.trendCurveListActive[b-1].curveNr=a.ReadContainer("@MACROOFTActiveTrends["+b+"][1]."+this.trendIndex);this.trendCurveListActive[b-1].yMin=a.ReadContainer("@MACROOFTActiveTrends["+b+"][2]."+this.trendIndex);this.trendCurveListActive[b-1].yMax=a.ReadContainer("@MACROOFTActiveTrends["+b+"][3]."+this.trendIndex);this.trendCurveListActive[b-1].colorRGB=a.ReadContainer("@MACROOFTActiveTrends["+b+"][4]."+this.trendIndex); this.trendCurveListActive[b-1].firstPoint=a.ReadContainer("@MACROOFTActiveTrends["+b+"][5]."+this.trendIndex);this.trendCurveListActive[b-1].lastPoint=a.ReadContainer("@MACROOFTActiveTrends["+b+"][6]."+this.trendIndex);this.trendCurveListActive[b-1].beginDate=a.ReadContainer("@MACROOFTActiveTrends["+b+"][7]."+this.trendIndex);this.trendCurveListActive[b-1].beginTime=a.ReadContainer("@MACROOFTActiveTrends["+b+"][8]."+this.trendIndex);this.trendCurveListActive[b-1].endDate=a.ReadContainer("@MACROOFTActiveTrends["+ b+"][9]."+this.trendIndex);this.trendCurveListActive[b-1].endTime=a.ReadContainer("@MACROOFTActiveTrends["+b+"][10]."+this.trendIndex);var f=this.trendCurveListActive[b-1].beginDate+" "+this.trendCurveListActive[b-1].beginTime;this.trendCurveListActive[b-1].beginTs_ms=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,!a.SpecialCO.mbTmzEn.value,null,f,!0);this.trendCurveListActive[b-1].beginTs_ms*=1E3;f=this.trendCurveListActive[b-1].endDate+" "+this.trendCurveListActive[b-1].endTime; this.trendCurveListActive[b-1].endTs_ms=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,!a.SpecialCO.mbTmzEn.value,null,f,!0);this.trendCurveListActive[b-1].endTs_ms*=1E3}};this.loadTrendSrvConfig=function(){var b=a.loadGeneralCGI("trend"+a.getSrvExt()+"?trendsList=TrendsListName&action=config"),c=null,f=!1;b!==null?c=a.parseCGI_CSV_Content(b):a.log_append_ln("ERROR Offline Trend : Failed to load trend info from server!");if(c!==null&&c[0]!==null){if(c[0][0]!==null)this.config.version= c[0][0];if(c[0][1]!==null)this.config.listName=c[0][1];if(c[0][2]!==null)this.config.maxBlockSize=c[0][2];c[0][3]!==null?(this.config.numCurves=a.atoi(this.config.numCurves),isNaN(this.config.numCurves)===!1?f=!0:(a.log_append_ln("ERROR Offline Trend : Failed to parse trend info from server (syntax error: Number of curves)!"),this.config.numCurves=0)):a.log_append_ln("ERROR Offline Trend : Failed to parse trend info from server (syntax error)!")}return f};this.loadCurveInfos=function(){for(var b= 0,c=this.trendCurveListActive.length,f="",f=0,f=null,g=0,j=0,k=0,o=0,b=0;bo)o=this.trendCurveListActive[b].endTs_ms}}}else a.log_append_ln("Offline Trend Error: Failed to load trend info from server!");k/=1E3;o/=1E3;this.setXTimeRange(k,o);return g};this.parseTrendData=function(b,c,f){var g=0,j=0,k=0,o=null,h=!1;c.cnt=0;c.newesTs_s=0;c.oldesTs_s= 0;c.doneFlag=!1;var p=c.endFlag=!1;if(b.length>0){if(c!==null){o=a.parseCGI_CSV_Content(b);for(g=0;o[g]!==null&&o[g]!==void 0&&c.endFlag!==!0&&c.doneFlag!==!0;)if(a.prefixicmp("End",o[g][0])===!1&&a.prefixicmp("Done",o[g][0])===!1){var b=new a.TrendValueType,s=parseInt(o[g][0],16);if(isNaN(s)===!1&&(b.t_s=s,s=parseFloat(o[g][1],10),isNaN(s)===!1)){b.y=s;this.trendCurveListActive[f].valuesCBuffer.add(b);if(k===0||k>b.t_s)k=b.t_s;if(j=2&&a.log_append_ln("End");else if(a.prefixicmp("Done",o[g][0])===!0)c.doneFlag=!0,a.getDebugLevel()>=2&&a.log_append_ln("Done")}else a.log_append_ln("EROOR parseTrendData byRef === null"),h=!0;c.cnt=g;c.newesTs_s=j;c.oldesTs_s=k}else a.log_append_ln("ERROR Offline Trend parseTrendData error: no data"),h=!0;h!==!0&&(p=!0);return p};this.loadTrendData=function(b,c,f,g,j){return a.loadGeneralCGI("trend"+a.getSrvExt()+"?trendNr="+b+"&action=loadTrend&loadType=0&startTimestamp="+ c+"&endTimestamp="+f+"&nbrOfPoints="+this.config.maxBlockSize+"&lastLoadedTimestamp="+g,j)};this.loadActiveCurveData=function(){for(var b=0,c=this.trendCurveListActive.length,f="",g=0,j=!1,k=0,o=0,h={cnt:0,oldesTs_s:0,newesTs_s:0,doneFlag:!1,endFlag:!1},p=0,s=0,q=0,m=0,f=f=f=0,q=a.ReadContainer("@MACROOFTLoadStartTimestampSet."+this.trendIndex),m=a.ReadContainer("@MACROOFTLoadEndTimestampSet."+this.trendIndex),b=0;b=2&&(a.log_append_ln(k),a.log_append_ln(o),a.log_append_ln("Diff.: "+ (o-k)/60));if(this.trendCurveListActive[b].valuesCBuffer===null)this.trendCurveListActive[b].valuesCBuffer=new a.CircularBuffer(-1);if(this.trendCurveListActive[b].numPoints!==0)for(;h.endFlag===!1&&j===!1;)if(f=this.loadTrendData(g,k.toString(16),o.toString(16),h.newesTs_s.toString(16)),f!==null){this.parseTrendData(f,h,b);a.getDebugLevel()>=2&&a.log_append_ln("byRef.cnt: "+h.cnt);if(h.oldesTs_ss)s=h.newesTs_s}else j=!0,a.err_append_ln("ERROR Offline Trend : Failed to load trend data from server!")}this.setXTimeRange(p, s);a.getDebugLevel()>=2&&(a.log_append_ln("loadActiveCurveData activeSize: "+c),a.log_append_ln("loadActiveCurveData cnt (total): "+h.cnt))}};a.PainterType_OfflineTrend.prototype=new a.PainterType_MPainter;return a}(_SCIntern||{});_SCIntern=function(a){a.SavedTrendEmitterType=function(a){this.trendIndex=a||0;this.lastLogged_s=0;this.trendCurveListAvailable=[];this.stopLog=!1;this.getAvailableCurve=function(a){for(var b=0,f=this.trendCurveListAvailable.length,b=0;b0&&(b=this.config.availableTrendsHeaderStr.split(a.FVLINESEPTOKEN2),b.length>0))this.config.availableTrendsHeaderStr=b[0],!a.StrEndWith(this.config.availableTrendsHeaderStr,a.FVLINESEPTOKEN)&&!a.StrEndWith(this.config.availableTrendsHeaderStr,a.FVLINESEPTOKEN2)&&(this.config.availableTrendsHeaderStr+= a.FVLINESEPTOKEN2);if(this.config.activeTrendsHeaderStr.length<=0||!a.prefixicmp(a.FVLINESPECLINESTARTSTR,this.config.activeTrendsHeaderStr))this.config.activeTrendsHeaderStr="#sp;120,0,120,120,120,120,120"+a.FVLINESEPTOKEN2;if(this.config.availableTrendsHeaderStr.length<=0||!a.prefixicmp(a.FVLINESPECLINESTARTSTR,this.config.availableTrendsHeaderStr))this.config.activeTrendsHeaderStr="#sp;0,120,120,120,120"+a.FVLINESEPTOKEN2;this.config.loadDataState=a.ReadContainer(this.macroPrefix+"ActiveTrendsLoadDatas."+ this.trendIndex);if(this.config.loadDataState=="STARTLOADDATAS")this.config.loadIsRemote="",this.config.remoteFileName="",this.config.loadIsRemote=a.ReadContainer(this.macroPrefix+"ActiveTrendsLoadRemoteMode."+this.trendIndex),this.config.remoteFileName=a.ReadContainer(this.macroPrefix+"ActiveTrendsLoadRemoteFile."+this.trendIndex),this.config.loadIsRemote==="1"&&this.config.remoteFileName.length>0?(this.config.loadDataState="LOADINGDATAS",this.loadActiveCurvesDataNUpdateInfos(),this.config.loadDataState= "0",this.clearBusyFlag()):a.err_append_ln(a.LoadFileError),action="0",a.WriteContainer(this.macroPrefix+"ActiveTrendsLoadDatas."+this.trendIndex,"0");this.mouseDownAction=a.ReadContainer(this.macroPrefix+"ActiveTrendsMouseDownAction."+this.trendIndex);this.valuePickerName=this.macroPrefix+"ActiveTrendsMouseDownVal."+this.trendIndex;this.mouseDownHeader=a.ReadContainer(this.macroPrefix+"ActiveTrendsMouseDownHeader."+this.trendIndex);this.config.gridFlag=parseInt(a.ReadContainer(this.macroPrefix+"ShowGrid."+ this.trendIndex),10);this.config.displayedTime_s=parseInt(a.ReadContainer(this.macroPrefix+"DisplayedTime."+this.trendIndex),10);this.config.storedTime_s=parseInt(a.ReadContainer(this.macroPrefix+"MaxStoreTime."+this.trendIndex),10);b=a.ReadContainer(this.macroPrefix+"XAutoUpdate."+this.trendIndex);b=="SETAUTO"&&a.WriteContainer(this.macroPrefix+"XAutoUpdate."+this.trendIndex,"1");b=="SETAUTO"||b=="1"?this.config.xAutoScroll=!0:b.length===0?this.config.xAutoScroll=!0:(this.config.xAutoScroll=!1,b= 0,b=a.ReadContainer(this.macroPrefix+"XMinTime."+this.trendIndex),b=a.ReadContainer(this.macroPrefix+"XMinDate."+this.trendIndex)+" "+b,b=parseInt(a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,!a.SpecialCO.mbTmzEn.value,null,b,!0),10),this.setXTimeRange(b,b+this.displayedTime_s));this.config.AutoyAxisLegend=parseInt(a.ReadContainer(this.macroPrefix+"AutoYAxeDescr."+this.trendIndex),10);this.config.action=a.ReadContainer(this.macroPrefix+"AvailableTrendsAction."+this.trendIndex); if(this.config.action=="SAVELOGSTOFILE")a.err_append_ln(a.SaveFileError),this.config.action="0";else if(this.config.action=="CLEARLOGS")this.clear(),this.config.action="0";else if(this.config.action!=void 0&&this.config.action.length>0&&this.config.action!=="0")a.err_append_ln("offline Saved Trend Action ["+this.config.action+"] not supported in the HTML5 client !"),this.config.action="0";a.WriteContainer(this.macroPrefix+"AvailableTrendsAction."+this.trendIndex,this.config.action);this.config.scroll= a.ReadContainer(this.macroPrefix+"Scroll."+this.trendIndex);this.updateScrollAction();a.WriteContainer(this.macroPrefix+"Scroll."+this.trendIndex,this.config.scroll);this.config.zoom=parseInt(a.ReadContainer(this.macroPrefix+"Zoom."+this.trendIndex),10);isNaN(this.config.zoom)?this.config.zoom=0:this.updateZoomAction();a.WriteContainer(this.macroPrefix+"Zoom."+this.trendIndex,this.config.zoom);this.config.trendArrayUpdate=a.ReadContainer(this.macroPrefix+"ActiveTrends[][]Update."+this.trendIndex); if(this.config.trendArrayUpdate=="UPDATE")this.readActiveTrendsContainerArray(),this.config.trendArrayUpdate="0",a.WriteContainer(this.macroPrefix+"ActiveTrends[][]Update."+this.trendIndex,this.config.trendArrayUpdate)};this.loadActiveCurvesDataNUpdateInfos=function(){for(var b="",f=0,c=0,d=0,e=d=f=0,g=0,h=0,j="",k="",f=0;f0)){var o=this.trendCurveListActive[f].valuesCBuffer.get(0); if(o!==null){if(h===0||h>o.t_s)h=o.t_s;if(go.t_s)h=o.t_s;if(g0){a.getDebugLevel()>=2&&a.log_append_ln("SavedTrend loadActiveCurvesDataNUpdateInfos for file "+this.config.remoteFileName);b=a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC?a.loadFileSource("plc?"+this.config.remoteFileName):a.loadFileSource(this.config.remoteFileName); if(b!==null&&b.length>0&&b!==""){a.getDebugLevel()>=2&&a.log_append_ln("SavedTrend loadActiveCurvesDataNUpdateInfos for file "+this.config.remoteFileName+" returned "+b);for(var u=b.split("\n"),c=f=0;c0&&(d=parseInt(d[0],10),isNaN(d)===!1&&(e=d)));if(f==1&&e>0){if(e!=this.emitter.trendCurveListAvailable.length){if(this.emitter.trendCurveListAvailable.length>0)for(a.log_append_ln("while parsing header part of SavedTrend file "+ this.config.remoteFileName+" nbrOfCurves = "+e+" is defferent from this.trendCurveListAvailable.length [ "+this.emitter.trendCurveListAvailable.length+" ] so clear the trendCurveListAvailable current list and updates with file's one ");this.emitter.trendCurveListAvailable.length>0;)this.emitter.trendCurveListAvailable.pop();if(this.trendCurveListActive.length>0)for(a.log_append_ln("while parsing header part of SavedTrend file "+this.config.remoteFileName+" nbrOfCurves = "+e+" is defferent from this.trendCurveListAvailable.length [ "+ this.emitter.trendCurveListAvailable.length+" ] so clear the trendCurveListActive current list and updates with file's one ");this.trendCurveListActive.length>0;)this.trendCurveListActive.pop()}else{for(d=f=k=0;c+d0&& (p=p[0].split("\t"),p.length>0&&(s=p[0],s.length>0?(q=this.emitter.trendCurveListAvailable[d],q===null||q.curveNr!==s?(a.log_append_ln("ERROR while parsing header part of SavedTrend file "+this.config.remoteFileName+" could not find the available curve from list for curveNrStr "+s+" at the right index "+d),f=1):k++):f=1))}if(k!=e){if(this.emitter.trendCurveListAvailable.length>0)for(a.log_append_ln("while parsing header part of SavedTrend file "+this.config.remoteFileName+" foundAvailableCurves = "+ k+" is different nbrOfCurves to find [ "+e+" ] so clear the trendCurveListAvailable current list and updates with file's one ");this.emitter.trendCurveListAvailable.length>0;)this.emitter.trendCurveListAvailable.pop();if(this.trendCurveListActive.length>0)for(a.log_append_ln("while parsing header part of SavedTrend file "+this.config.remoteFileName+" foundAvailableCurves = "+k+" is different nbrOfCurves to find [ "+e+" ] so clear the trendCurveListActive current list and updates with file's one ");this.trendCurveListActive.length> 0;)this.trendCurveListActive.pop()}}for(d=f=0;c+d0&&(p=p[0].split("\t"),p.length>3&&(s=p[0],k=p[1],o=p[2],m=p[3],s.length>0))){q=this.emitter.getAvailableCurve(s);if(q===null)q=new a.TrendSavedCurveType,q.curveNr=s, q.yMin=0,q.yMax=0,q.colorRGB="0,0,0",q.firstPoint=0,q.lastPoint=0,q.beginDate="1970.01.01",q.beginTime="00:00:00 AM",q.endDate="1970.01.01",q.endTime="00:00:00 AM",q.valuesCBuffer=new a.CircularBuffer(-1),this.emitter.trendCurveListAvailable.push(q);q=this.emitter.getAvailableCurve(s);if(q!==null)q.curveNr=s,q.yMin=k,q.yMax=o,q.colorRGB=m}}k="";for(l=0;l0&&p.yMin.length>0&&p.yMax.length> 0&&p.colorRGB.length>0&&(k+=a.FVCOLUMNFOREGROUNDCOLORSPECSTARTSTR+p.colorRGB+a.FVCOLUMNCOLORSPECENDSTR+a.FVCOLSEPTOKEN2+p.curveNr+a.FVCOLSEPTOKEN2+p.yMin+a.FVCOLSEPTOKEN2+p.yMax+a.FVCOLSEPTOKEN2+p.colorRGB+a.FVLINESEPTOKEN2);a.WriteContainer(this.macroPrefix+"ActiveTrends."+this.trendIndex,this.config.activeTrendsHeaderStr+k);k="";for(this.parseActiveTrends();c+d=2&&a.log_append_ln("skips comment line while parsing curves points part of SavedTrend file "+ this.config.remoteFileName);else if(a.prefixicmp("End",u[c+d])===!1&&a.prefixicmp("Done",u[c+d])===!1&&u[c+d].length>0)if(p=u[c+d].split(";"),m=-1,p.length>3)if(m=parseInt(p[0],10),isNaN(m)===!1&&m>=0)for(f=0;f0&&(q=this.getActiveTrendCurve(s),q!==null&&q.valuesCBuffer.add(o));if(h===0||h> o.t_s)h=o.t_s;if(g0&&p.yMin.length>0&&p.yMax.length>0&&p.colorRGB.length>0&&(j+=p.curveNr+a.FVCOLSEPTOKEN2+p.yMin+a.FVCOLSEPTOKEN2+p.yMax+a.FVCOLSEPTOKEN2+p.colorRGB+a.FVLINESEPTOKEN2,k+=a.FVCOLUMNFOREGROUNDCOLORSPECSTARTSTR+p.colorRGB+a.FVCOLUMNCOLORSPECENDSTR+a.FVCOLSEPTOKEN2+p.curveNr+a.FVCOLSEPTOKEN2+p.yMin+a.FVCOLSEPTOKEN2+p.yMax+a.FVCOLSEPTOKEN2+p.colorRGB+a.FVLINESEPTOKEN2);a.WriteContainer(this.macroPrefix+"AvailableTrends."+this.trendIndex,j);a.WriteContainer(this.macroPrefix+"AvailableTrendsHeadered."+ this.trendIndex,this.config.availableTrendsHeaderStr+j);a.WriteContainer(this.macroPrefix+"ActiveTrends."+this.trendIndex,this.config.activeTrendsHeaderStr+k)}this.setXTimeRange(h,g);a.getDebugLevel()>=2&&a.log_append_ln("SavedTrend loadActiveCurvesDataNUpdateInfos nbrOfCurves: "+e)};this.clearBusyFlag=function(){a.WriteContainer("_TREND_BUSY","0")};this.writeActiveTrendsContainerArray=function(){for(var b=0,f=this.trendCurveListActive.length,b=1;b<=f;b++)a.WriteContainer(this.macroPrefix+"ActiveTrends["+ b+"][0]."+this.trendIndex,this.trendCurveListActive[b-1].colorRGB),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][1]."+this.trendIndex,this.trendCurveListActive[b-1].curveNr),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][2]."+this.trendIndex,this.trendCurveListActive[b-1].yMin),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][3]."+this.trendIndex,this.trendCurveListActive[b-1].yMax),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][4]."+this.trendIndex,this.trendCurveListActive[b- 1].colorRGB),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][5]."+this.trendIndex,this.trendCurveListActive[b-1].firstPoint),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][6]."+this.trendIndex,this.trendCurveListActive[b-1].lastPoint),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][7]."+this.trendIndex,this.trendCurveListActive[b-1].beginDate),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][8]."+this.trendIndex,this.trendCurveListActive[b-1].beginTime),a.WriteContainer(this.macroPrefix+ "ActiveTrends["+b+"][9]."+this.trendIndex,this.trendCurveListActive[b-1].endDate),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][10]."+this.trendIndex,this.trendCurveListActive[b-1].endTime),a.WriteContainer(this.macroPrefix+"ActiveTrends["+b+"][11]."+this.trendIndex,this.trendCurveListActive[b-1].numPoints)};this.readActiveTrendsContainerArray=function(){for(var b=0,f=this.trendCurveListActive.length,c="",b=1;b<=f;b++){this.trendCurveListActive[b-1].colorRGB=a.ReadContainer(this.macroPrefix+ "ActiveTrends["+b+"][0]."+this.trendIndex);this.trendCurveListActive[b-1].curveNr=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][1]."+this.trendIndex);this.trendCurveListActive[b-1].yMin=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][2]."+this.trendIndex);this.trendCurveListActive[b-1].yMax=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][3]."+this.trendIndex);this.trendCurveListActive[b-1].colorRGB=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][4]."+this.trendIndex);this.trendCurveListActive[b- 1].firstPoint=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][5]."+this.trendIndex);this.trendCurveListActive[b-1].lastPoint=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][6]."+this.trendIndex);this.trendCurveListActive[b-1].beginDate=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][7]."+this.trendIndex);this.trendCurveListActive[b-1].beginTime=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][8]."+this.trendIndex);this.trendCurveListActive[b-1].endDate=a.ReadContainer(this.macroPrefix+ "ActiveTrends["+b+"][9]."+this.trendIndex);this.trendCurveListActive[b-1].endTime=a.ReadContainer(this.macroPrefix+"ActiveTrends["+b+"][10]."+this.trendIndex);var d=this.trendCurveListActive[b-1].beginDate+" "+this.trendCurveListActive[b-1].beginTime;this.trendCurveListActive[b-1].beginTs_ms=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,!a.SpecialCO.mbTmzEn.value,null,d,!0);this.trendCurveListActive[b-1].beginTs_ms*=1E3;d=this.trendCurveListActive[b-1].endDate+" "+this.trendCurveListActive[b- 1].endTime;this.trendCurveListActive[b-1].endTs_ms=a.DateTime_ReadDT(a.readDateTimeFormat(),a.SpecialCO.timeLocalNow.name,!a.SpecialCO.mbTmzEn.value,null,d,!0);this.trendCurveListActive[b-1].endTs_ms*=1E3;c+=a.FVCOLUMNFOREGROUNDCOLORSPECSTARTSTR+this.trendCurveListActive[b-1].colorRGB+a.FVCOLUMNCOLORSPECENDSTR+a.FVCOLSEPTOKEN2+this.trendCurveListActive[b-1].curveNr+a.FVCOLSEPTOKEN2+this.trendCurveListActive[b-1].yMin+a.FVCOLSEPTOKEN2+this.trendCurveListActive[b-1].yMax+a.FVCOLSEPTOKEN2+this.trendCurveListActive[b- 1].colorRGB+a.FVLINESEPTOKEN2}a.WriteContainer(this.macroPrefix+"ActiveTrends."+this.trendIndex,this.config.activeTrendsHeaderStr+c)}};a.PainterType_SavedTrend.prototype=new a.PainterType_MPainter;return a}(_SCIntern||{});_SCIntern=function(a){function h(a,b,c,d,e){var f=-1,g=-1;e.content="";b=a.indexOf(c,b);if(b==-1)return-1;f=b+c.length;if(f>=a.length)return-1;g=a.indexOf(d,f);if(g==-1)return-1;e.content=a.substring(f,g);g+=d.length;return g>=a.length?-1:g}function g(b){a.getDebugLevel()>=3&&(n=a.getTimestamp_ms(),r=n-e,a.log_append_ln("ILRStop: "+r));if(b!==a.PreviousILR||a.FullRedraw===!0){var c={content:""},d="",f=0,g="",d="";do if(f=h(b,f,"","",c),c.content!==""&&(d=c.content,h(d,0,"","",c),c.content!== ""))g=c.content,h(d,0,"","",c),d=c.content,a.sl_updatePPOList(g,d);while(f!==-1);a.scheduleRepaint();a.scheduleOnlineTrendRefresh()}a.ViewList.doViewGainIfRequired();a.PreviousILR=b;a.RefreshCGIPending=!1;a.Link.cgiFailConsecutive=0}function b(b){var d="cgi-bin/ILRReadValues"+a.getSrvExt();a.cgiHost.length>0&&(d=a.cgiHost+"cgi-bin/ILRReadValues"+a.getSrvExt());a.RefreshCGIPending=!0;a.getDebugLevel()>=2&&a.log_append_ln(" send_AsynchILRReadValues url = "+d);$.ajax({url:d,beforeSend:function(b){a.Link.SrvInfo_UTF8Activ? b.overrideMimeType("text/csv;charset="+a.UNICODEFILE_UTF8_ENCODINGSTR):a.Link.cgiOverrideMimetypeFlag===!0&&a.Link.cgiOverrideMimeTypeFunction(b)},global:!1,cache:!1,type:"POST",contentType:"text/xml",data:b,dataType:"text",timeout:a.AjaxTimeout,async:!0,complete:f,success:g,error:c})}function f(){a.RefreshCGIPending=!1}function c(){a.scheduleRepaint();a.Link.cgiFailConsecutive++;if(a.Link.cgiFailConsecutive>=a.Link.cgiFailMax)a.err_append_ln("ERROR Failed to update PPOs!"),a.Link.cgiFailConsecutive= 0;a.RefreshCGIPending=!1}function d(b){var c="",d="",e=0,f=0,g=0;if(b.length>0){for(var n=b.split("\n"),g=0;g-1&&(c=n[g].substring(c,n[g].length).split(" = "),c.length>1&&(c=parseInt(c[1],10),!isNaN(c)&&c!==void 0&&(e=c)));else if(d=n[g].split("="),d.length==2&&(c=d[0],d=d[1].trim(),c!==""||d!==void 0))(a.sl_updatePPOListByName(c,d)||a.FullRedraw===!0)&&a.scheduleRepaint(),f++;(b!==a.PreviousILR||a.FullRedraw===!0)&&a.scheduleOnlineTrendRefresh()}e!= f&&a.err_append_ln("Shoud have "+e+" PPO's on server but found "+f+"!");a.ViewList.doViewGainIfRequired();a.PreviousILR=b}a.GETSRVINFO_CGISTR="cgi-bin/GetSrvInfo.exe";a.LSWEBSERVERINFONAMESTARTSTR="Server:";a.LSWEBSERVERINFOLSSRVACTIVSTARTSTR="LSWEBSERVER=1";a.LSWEBSERVERINFOCGIACTIVSTARTSTR="CGI=1";a.LSWEBSERVERINFOILRACTIVSTARTSTR="ILR=1";a.LSWEBSERVERINFOTRDACTIVSTARTSTR="TRD=1";a.LSWEBSERVERINFOALRACTIVSTARTSTR="ALR=1";a.LSWEBSERVERINFOALR2ACTIVSTARTSTR="ALR2=1";a.LSWEBSERVERINFOTRD2ACTIVSTARTSTR= "TRD2=1";a.LSWEBSERVERINFOSEPSTR=",";a.LSWEBSERVERINFOVERSIONSTARTSTR="V.";a.LSWEBSERVERINFOILR2ACTIVSTARTSTR="ILR2=1";a.LSWEBSERVERINFOILR3ACTIVSTARTSTR="ILR3=1";a.LSWEBSERVERINFOUTF8ACTIVSTARTSTR="charset=utf-8";a.RefreshCGIPending=!1;a.AjaxTimeout=1E4;a.PreviousILR=null;a.Link={xmlsrvinfo:!1,SrvInfo_Name:"",SrvInfo_LSSrvActiv:!1,SrvInfo_LSSrvVersion:0,SrvInfo_UTF8Activ:!1,SrvInfo_CGIActiv:!0,SrvInfo_CGIVersion:1,SrvInfo_ILRActiv:!1,SrvInfo_ILRVersion:0,SrvInfo_ILR2Activ:!1,SrvInfo_ILR2Version:0, SrvInfo_ILR3Activ:!1,SrvInfo_ILR3Version:0,SrvInfo_TRDActiv:!1,SrvInfo_TRDVersion:0,SrvInfo_ALRActiv:!1,SrvInfo_ALRVersion:0,SrvInfo_ALR2Activ:!1,SrvInfo_ALR2Version:0,SrvInfo_TRD2Activ:!1,SrvInfo_TRD2Version:0,cgibinsrvinfo:!1,cgiArr:null,cgiFailMax:1,cgiFailConsecutive:0,cgiOverrideMimetypeFlag:!0,cgiOverrideMimeTypeFunction:function(a){a.overrideMimeType("text/csv;charset=ISO-8859-1")}};var e=0,n=0,r=0;a.getSrvExt=function(){var b=".exe";a.Link.SrvInfo_ILR3Activ===!0&&(b=".cgi");return b};a.loadSrvXML= function(){$.ajax({type:"GET",global:!1,async:!1,cache:!0,beforeSend:function(b){a.Link.cgiOverrideMimetypeFlag===!0&&a.Link.cgiOverrideMimeTypeFunction(b)},url:"getsrvinfo.xml",dataType:"xml",timeout:a.AjaxTimeout,complete:function(){},success:function(b){a.Link.cgibinsrvinfo=!0;$(b).find("websrv > servicelist > service").each(function(){a.log_append_ln($(this).attr("name"));$(this).find("url").each(function(){a.log_append_ln($(this).text())})})},error:function(){a.Link.cgibinsrvinfo=!0}});return a.Link.xmlsrvinfo}; a.dontNeedEncoding=function(a){a=parseInt(a,10);return"a".charCodeAt(0)<=a&&a<="z".charCodeAt(0)?!0:"A".charCodeAt(0)<=a&&a<="Z".charCodeAt(0)?!0:"0".charCodeAt(0)<=a&&a<="9".charCodeAt(0)?!0:"-".charCodeAt(0)==a?!0:"_".charCodeAt(0)==a?!0:".".charCodeAt(0)==a?!0:"*".charCodeAt(0)==a?!0:!1};a.encode=function(b){var c="",b=String(b);a.Link.SrvInfo_UTF8Activ&&(b=unescape(encodeURIComponent(b)));return c=a.urlEncode(b)};a.urlEncode=function(b){for(var c="",d=0,e=0,f=!0,b=String(b),d=0;d0&&(e=a.cgiHost+b)):(e="cgi-bin/"+b,a.cgiHost.length>0&&(e=a.cgiHost+"cgi-bin/"+b));b!==null&&(a.getDebugLevel()>=2&&a.log_append_ln(" sc.loadData cgi call url = "+e),$.ajax({type:"GET",global:!1,beforeSend:function(b){a.Link.cgiOverrideMimetypeFlag===!0&&a.Link.cgiOverrideMimeTypeFunction(b)}, async:d,cache:!0,url:e,dataType:"text",timeout:a.AjaxTimeout,complete:function(){},success:function(a){c!==void 0&&c!==null&&c(a)},error:function(c,d,e){a.err_append_ln("HTTP CGI error (loadData, "+b+"): "+c.status+" "+d+" "+e)}}))};a.userCGIAction=function(b){var c=null,d=b;a.cgiHost.length>0&&(d=a.cgiHost+b);b!==null&&(a.getDebugLevel()>=2&&a.log_append_ln(" sc.userCGIAction cgi call url = "+d),$.ajax({type:"GET",global:!1,beforeSend:function(b){a.Link.SrvInfo_UTF8Activ?b.overrideMimeType("text/csv;charset="+ a.UNICODEFILE_UTF8_ENCODINGSTR):a.Link.cgiOverrideMimetypeFlag===!0&&a.Link.cgiOverrideMimeTypeFunction(b)},async:!1,cache:!0,url:d,dataType:"text",timeout:a.AjaxTimeout,complete:function(){},success:function(a){c=a},error:function(d,e,f){a.err_append_ln("HTTP CGI error (loadGeneralCGI, "+b+"): "+d.status+" "+e+" "+f);c=null}}));return c};a.loadGeneralCGI=function(b){var c="";a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC?(c=b,a.cgiHost.length>0&&(c=a.cgiHost+b)):(c="cgi-bin/"+b,a.cgiHost.length>0&&(c= a.cgiHost+"cgi-bin/"+b));var d=null;b!==null&&(a.getDebugLevel()>=2&&a.log_append_ln(" sc.loadGeneralCGI cgi call url = "+c),$.ajax({type:"GET",global:!1,beforeSend:function(b){a.Link.SrvInfo_UTF8Activ?b.overrideMimeType("text/csv;charset="+a.UNICODEFILE_UTF8_ENCODINGSTR):a.Link.cgiOverrideMimetypeFlag===!0&&a.Link.cgiOverrideMimeTypeFunction(b)},async:!1,cache:!0,url:c,dataType:"text",timeout:a.AjaxTimeout,complete:function(){},success:function(a){d=a},error:function(c,e,f){a.err_append_ln("HTTP CGI error (loadGeneralCGI, "+ b+"): "+c.status+" "+e+" "+f);d=null}}));return d};a.loadFileSource=function(b){var c=null;b!==null&&$.ajax({type:"GET",global:!1,beforeSend:function(b){a.Link.SrvInfo_UTF8Activ?b.overrideMimeType("text/csv;charset="+a.UNICODEFILE_UTF8_ENCODINGSTR):a.Link.cgiOverrideMimetypeFlag===!0&&a.Link.cgiOverrideMimeTypeFunction(b)},async:!1,cache:!0,url:b,dataType:"text",timeout:a.AjaxTimeout,complete:function(){},success:function(a){c=a},error:function(d){a.err_append_ln("File Not Found! '"+b+"' (HTTP Status Code: '"+ d.status+"')");c=null}});return c};a.loadSrvInfoCGI=function(){try{var b=a.GETSRVINFO_CGISTR;a.cgiHost.length>0&&(b=a.cgiHost+a.GETSRVINFO_CGISTR);a.getDebugLevel()>=2&&a.log_append_ln("sc.loadSrvInfoCGI cgi call url = "+b);$.ajax({type:"GET",global:!1,beforeSend:function(b){a.Link.cgiOverrideMimetypeFlag===!0&&a.Link.cgiOverrideMimeTypeFunction(b)},async:!1,cache:!0,url:b,dataType:"text",timeout:a.AjaxTimeout,complete:function(){},success:function(b){a.getDebugLevel()>=2&&a.log_append_ln("loadSrvInfoCGI() GetSrvInfo cgi returned = "+ b);a.Link.cgiArr=a.parseCGI_CSV_Content(b);var c=b=0,d="",e=0,f="";try{if(a.Link.cgiArr!==null){c=a.Link.cgiArr.length;for(b=0;b=0)try{a.Link.SrvInfo_Name=d.substring(a.LSWEBSERVERINFONAMESTARTSTR.length),a.Link.SrvInfo_Name=a.Link.SrvInfo_Name.trim()}catch(g){a.log_append_ln("Error in parseGetSrvInfo() while gets Server name Info : "+g)}else if(d.indexOf(a.LSWEBSERVERINFOLSSRVACTIVSTARTSTR)>=0){a.Link.SrvInfo_LSSrvActiv= !0;try{if(e=d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR,a.LSWEBSERVERINFOLSSRVACTIVSTARTSTR.length),e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length),f=f.trim(),f.length>0&&(a.Link.SrvInfo_LSSrvVersion=parseFloat(f),isNaN(a.Link.SrvInfo_LSSrvVersion))))a.Link.SrvInfo_LSSrvVersion=0}catch(j){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_LSSrvVersion Info : "+j)}}else if(d.indexOf(a.LSWEBSERVERINFOCGIACTIVSTARTSTR)>=0){a.Link.SrvInfo_CGIActiv=!0;try{if(e=d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR, a.LSWEBSERVERINFOCGIACTIVSTARTSTR.length),e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length),f=f.trim(),f.length>0&&(a.Link.SrvInfo_CGIVersion=parseFloat(f),isNaN(a.Link.SrvInfo_CGIVersion))))a.Link.SrvInfo_CGIVersion=0}catch(k){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_CGIVersion Info : "+k)}}else if(d.indexOf(a.LSWEBSERVERINFOILRACTIVSTARTSTR)>=0){a.Link.SrvInfo_ILRActiv=!0;if(d.indexOf(a.LSWEBSERVERINFOUTF8ACTIVSTARTSTR)>0)a.Link.SrvInfo_UTF8Activ=!0;try{if(e=d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR, a.LSWEBSERVERINFOILRACTIVSTARTSTR.length),e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length),f=f.trim(),f.length>0&&(a.Link.SrvInfo_ILRVersion=parseFloat(f),isNaN(a.Link.SrvInfo_ILRVersion))))a.Link.SrvInfo_ILRVersion=0}catch(n){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_ILRVersion Info : "+n)}}else if(d.indexOf(a.LSWEBSERVERINFOILR2ACTIVSTARTSTR)>=0){a.Link.SrvInfo_ILR2Activ=!0;if(d.indexOf(a.LSWEBSERVERINFOUTF8ACTIVSTARTSTR)>0)a.Link.SrvInfo_UTF8Activ=!0;try{if(e= d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR,a.LSWEBSERVERINFOILR2ACTIVSTARTSTR.length),e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length),f=f.trim(),f.length>0&&(a.Link.SrvInfo_ILR2Version=parseFloat(f),isNaN(a.Link.SrvInfo_ILR2Version))))a.Link.SrvInfo_ILR2Version=0}catch(h){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_ILR2Version Info : "+h)}}else if(d.indexOf(a.LSWEBSERVERINFOILR3ACTIVSTARTSTR)>=0){a.Link.SrvInfo_ILR3Activ=!0;if(d.indexOf(a.LSWEBSERVERINFOUTF8ACTIVSTARTSTR)> 0)a.Link.SrvInfo_UTF8Activ=!0;try{if(e=d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR,a.LSWEBSERVERINFOILR3ACTIVSTARTSTR.length),e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length),f=f.trim(),f.length>0&&(a.Link.SrvInfo_ILR3Version=parseFloat(f),isNaN(a.Link.SrvInfo_ILR3Version))))a.Link.SrvInfo_ILR3Version=0}catch(r){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_ILR3Version Info : "+r)}}else if(d.indexOf(a.LSWEBSERVERINFOALRACTIVSTARTSTR)>=0){a.Link.SrvInfo_ALRActiv=!0;try{if(e= d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR,a.LSWEBSERVERINFOALRACTIVSTARTSTR.length),e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length),f=f.trim(),f.length>0&&(a.Link.SrvInfo_ALRVersion=parseFloat(f),isNaN(a.Link.SrvInfo_ALRVersion))))a.Link.SrvInfo_ALRVersion=0}catch(z){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_ALRVersion Info : "+z)}}else if(d.indexOf(a.LSWEBSERVERINFOALR2ACTIVSTARTSTR)>=0){a.Link.SrvInfo_ALR2Activ=!0;try{if(e=d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR, a.LSWEBSERVERINFOALR2ACTIVSTARTSTR.length),e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length),f=f.trim(),f.length>0&&(a.Link.SrvInfo_ALR2Version=parseFloat(f),isNaN(a.Link.SrvInfo_ALR2Version))))a.Link.SrvInfo_ALR2Version=0}catch(I){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_ALR2Version Info : "+I)}}else if(d.indexOf(a.LSWEBSERVERINFOTRDACTIVSTARTSTR)>=0){a.Link.SrvInfo_TRDActiv=!0;try{if(e=d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR,a.LSWEBSERVERINFOTRDACTIVSTARTSTR.length), e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length),f=f.trim(),f.length>0&&(a.Link.SrvInfo_TRDVersion=parseFloat(f),isNaN(a.Link.SrvInfo_TRDVersion))))a.Link.SrvInfo_TRDVersion=0}catch(D){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_TRDVersion Info : "+D)}}else if(d.indexOf(a.LSWEBSERVERINFOTRD2ACTIVSTARTSTR)>=0){a.Link.SrvInfo_TRD2Activ=!0;try{if(e=d.indexOf(a.LSWEBSERVERINFOVERSIONSTARTSTR,a.LSWEBSERVERINFOTRD2ACTIVSTARTSTR.length),e>0&&(f=d.substring(e+a.LSWEBSERVERINFOVERSIONSTARTSTR.length), f=f.trim(),f.length>0&&(a.Link.SrvInfo_TRD2Version=parseFloat(f),isNaN(a.Link.SrvInfo_TRD2Version))))a.Link.SrvInfo_TRD2Version=0}catch(A){a.log_append_ln("Error in parseGetSrvInfo() while gets SrvInfo_TRD2Version Info : "+A)}}}}catch(F){a.log_append_ln("Error in parseGetSrvInfo() : "+F)}a.Link.cgibinsrvinfo=!0},error:function(){a.Link.cgibinsrvinfo=!1}})}catch(c){a.log_append_ln("Error in loadSrvInfoCGI(): "+c)}a.getDebugLevel()>=2&&(a.log_append_ln("After loadSrvInfoCGI(): sc.Link.xmlsrvinfo = "+ a.Link.xmlsrvinfo),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.cgibinsrvinfo = "+a.Link.cgibinsrvinfo),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_Name = "+a.Link.SrvInfo_Name),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_LSSrvActiv = "+a.Link.SrvInfo_LSSrvActiv),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_LSSrvVersion = "+a.Link.SrvInfo_LSSrvVersion),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_UTF8Activ = "+a.Link.SrvInfo_UTF8Activ),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_CGIActiv = "+ a.Link.SrvInfo_CGIActiv),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_CGIVersion = "+a.Link.SrvInfo_CGIVersion),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ILRActiv = "+a.Link.SrvInfo_ILRActiv),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ILRVersion = "+a.Link.SrvInfo_ILRVersion),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ILR2Activ = "+a.Link.SrvInfo_ILR2Activ),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ILR2Version = "+a.Link.SrvInfo_ILR2Version), a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ILR3Activ = "+a.Link.SrvInfo_ILR3Activ),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ILR3Version = "+a.Link.SrvInfo_ILR3Version),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_TRDActiv = "+a.Link.SrvInfo_TRDActiv),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_TRDVersion = "+a.Link.SrvInfo_TRDVersion),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ALRActiv = "+a.Link.SrvInfo_ALRActiv),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ALRVersion = "+ a.Link.SrvInfo_ALRVersion),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ALR2Activ = "+a.Link.SrvInfo_ALR2Activ),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_ALR2Version = "+a.Link.SrvInfo_ALR2Version),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_TRD2Activ = "+a.Link.SrvInfo_TRD2Activ),a.log_append_ln("After loadSrvInfoCGI(): sc.Link.SrvInfo_TRD2Version = "+a.Link.SrvInfo_TRD2Version));return a.Link.cgibinsrvinfo};a.getServerInfo=function(){a.TARGET_TYPE_NR!==a.TARGET_TYPE_PANASONIC&& (a.Link.xmlsrvinfo===!1?(a.loadSrvInfoCGI(),a.Link.cgibinsrvinfo===!1?a.log_append_ln("ERROR getServerInfo CGI failed."):a.log_append_ln("getServerInfo CGI made.")):a.log_append_ln("getServerInfo XML OK."))};a.initSpiderLink=function(){var b="",c="",d=-1,e=-1;location?(a.host=location.origin,b=location.pathname):a.log_append_ln(" location urlOrigin is not supported by this browser.");c=b;a.cgiHost=a.host;d=c.lastIndexOf("/");c=d>0?c.substring(0,d):"";a.host+=c;a.TARGET_TYPE_NR===a.TARGET_TYPE_WAGO|| a.TARGET_TYPE_NR===a.TARGET_TYPE_SAIA||a.HMI_CGI_RELATIVTOROOT===a.CGI_RELATIVTOROOT_DOCBASE?a.cgiHost=a.host:(c=b,d=c.indexOf("/remote/",0),d>=0&&(d=c.indexOf("/",d+8)),e=d>0?c.indexOf("relay/",d):c.indexOf("relay/",0),e>0&&(e=c.indexOf("/",e+6)),e>d?a.cgiHost+=c.substring(0,e):d>0?a.cgiHost+=c.substring(0,d):e>0&&(a.cgiHost+=c.substring(0,e)));a.HMI_CGI_RELATIVTOROOT&&a.HMI_CGI_RELATIVTOROOT!=void 0&&a.HMI_CGI_RELATIVTOROOT.length>0&&a.HMI_CGI_RELATIVTOROOT!=a.CGI_RELATIVTOROOT_WEBROOT&&a.HMI_CGI_RELATIVTOROOT!= a.CGI_RELATIVTOROOT_DOCBASE&&a.HMI_CGI_RELATIVTOROOT!=a.CGI_RELATIVTOROOT_WEBROOT&&(a.cgiHost.lastIndexOf("/",a.cgiHost.length-1)!=a.cgiHost.length-1&&a.cgiHost.lastIndexOf("\\",a.cgiHost.length-1)!=a.cgiHost.length-1&&(a.cgiHost+="/"),a.cgiHost+=a.HMI_CGI_RELATIVTOROOT);a.cgiHost.lastIndexOf("/",a.cgiHost.length-1)!=a.cgiHost.length-1&&a.cgiHost.lastIndexOf("\\",a.cgiHost.length-1)!=a.cgiHost.length-1&&(a.cgiHost+="/");a.getDebugLevel()>=2&&(a.log_append_ln("sc.initSpiderLink docBaseFile = "+b), a.log_append_ln("sc.initSpiderLink sc.HMI_CGI_RELATIVTOROOT = "+a.HMI_CGI_RELATIVTOROOT),a.log_append_ln("sc.initSpiderLink sc.cgiHost = "+a.cgiHost));a.getServerInfo();if(a.g_WriteValWorker===null&&typeof Worker!=="undefined")b=new XMLHttpRequest,c="hmi_worker.js",a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC&&(c="archivereader?hmi_worker.js"),b.open("HEAD",c,!1),b.send(),b.status!=404?a.g_WriteValWorker=new Worker(c):a.log_append_ln(" sc.g_WriteValWorker null since hmi_worker.js not found ");a.g_WriteValWorker!== null&&a.g_WriteValWorker!==void 0?(a.g_WriteValWorker.onerror=function(b){a.log_append_ln(" sc.g_WriteValWorker on error in ["+b.filename+"] line ["+b.lineno+"] error: [ "+b.message+" ]")},a.g_WriteValWorker.onmessage=function(b){b=b.data;if(b.cmd==="isInit"){var c=b.value,c=parseInt(c,10);if(isNaN(c)===!1)a.g_WriteValWorkerIsInit=c}if(b.cmd==="writeVal")c=b.ret,c.indexOf("Done")>=0&&a.g_WriteValWorkerPendingWriteValsListSize>0&&a.g_WriteValWorkerPendingWriteValsListSize--;a.getDebugLevel()>=2&&a.log_append_ln(" sc.g_WriteValWorker onmessage [ "+ b.cmd+" , "+b.value+" ] sc.g_WriteValWorkerPendingWriteValsListSize = ["+a.g_WriteValWorkerPendingWriteValsListSize+"]")},a.getDebugLevel()>=2&&a.log_append_ln("sc.initSpiderLink sc.g_WriteValWorker = "+a.g_WriteValWorker)):a.log_append_ln(" Browser does not supports the Worker api so the write val requests will be done in a Blocking way in GUI thread ")};a.sl_psc_writeValue=function(b,c){var d=a.sl_getPPOWriteAddress(b),e=-1,e=0,e="",e=d.indexOf("_4109_%s");if(e>=-1)e=c.length,d=d.replace("_4109_%s", "_"+(4096+e)+"_%s");$.ajax({type:"POST",url:"plcpost",contentType:"text/xml",dataType:"text/xml",data:d+"="+c})};a.sl_writeValue=function(b,c){var d="",f="";a.getDebugLevel()>=2&&(e=a.getTimestamp_ms());if(a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC)a.sl_psc_writeValue(b,c);else if(a.Link.SrvInfo_ILR3Activ===!0?(d="cgi-bin/writeVal.cgi?"+a.encode(b)+"="+a.encode(c),a.cgiHost.length>0&&(d=a.cgiHost+"cgi-bin/writeVal.cgi?"+a.encode(b)+"="+a.encode(c))):(d="cgi-bin/writeVal.exe?"+a.encode(b)+"+"+a.encode(c), a.cgiHost.length>0&&(d=a.cgiHost+"cgi-bin/writeVal.exe?"+a.encode(b)+"+"+a.encode(c))),a.Link.SrvInfo_UTF8Activ&&(f="text/csv;charset="+a.UNICODEFILE_UTF8_ENCODINGSTR),a.getDebugLevel()>=2&&a.log_append_ln("sc.sl_writeValue( "+b+" , "+c+" ) \nrequestURLWriteVal = "+d),a.g_WriteValWorker!==null)try{a.g_WriteValWorkerIsInit!==1&&(a.g_WriteValWorker.postMessage({cmd:"init",ajaxTimeout:a.AjaxTimeout.toString()}),a.g_WriteValWorker.postMessage({cmd:"isInit"})),a.g_WriteValWorker.postMessage({cmd:"writeVal", requestURLWriteVal:d}),a.g_WriteValWorkerPendingWriteValsListSize++}catch(g){a.log_append_ln("Exception in sc.sl_writeValue( "+b+" , "+c+" ) \nerr = "+g)}else a.getDebugLevel()>=2&&a.log_append_ln(" sc.g_WriteValWorker null so the write val requests will be done in a Blocking way in GUI thread "),$.ajax({type:"GET",global:!1,beforeSend:function(b){a.Link.SrvInfo_UTF8Activ?b.overrideMimeType(f):a.Link.cgiOverrideMimetypeFlag===!0&&a.Link.cgiOverrideMimeTypeFunction(b)},async:!1,timeout:a.AjaxTimeout, cache:!0,url:d,dataType:"text",complete:function(){},success:function(d){a.getDebugLevel()>=2&&a.log_append_ln("Ajax succes for sc.sl_writeValue( "+b+" , "+c+" ) \ncgi returned = "+d)},error:function(){a.log_append_ln("Ajax Error for sc.sl_writeValue( "+b+" , "+c+" ) ")}})};a.SL_refreshPPO=function(){var e=0,e="";if(a.co_readSkipRefreshCO()===1||a.RefreshCGIPending===!0)a.FullRedraw===!0&&a.scheduleRepaint();else if(a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC){var g=!1;a.RefreshCGIPending=!0;for(e= 0;e0&&a.stringcmp(a.ViewList.getViewByIndex(e).ViewName,a.MsgBox)===!1){var g=a.ViewList.getViewByIndex(e).ViewName,n="/plc?"+g;a.TARGET_TYPE_NR===a.TARGET_TYPE_PANASONIC&&a.cgiHost.length>0&&(n=a.cgiHost+"plc?"+g);$.ajax({url:n,type:"GET",cache:!0,global:!1,contentType:"text",dataType:"text",timeout:a.AjaxTimeout,async:!0,complete:f,success:d,error:c});g=!0}if(!g)a.RefreshCGIPending=!1, a.FullRedraw===!0&&a.scheduleRepaint()}else{var h=g=e="",g=""+a.g_PPOList[h].resolved+"",n++;n>0&&(h=""+a.ILR_VERSION+"",h+=""+a.CLIENT+""+a.HMI_VERSION+"",h+="vRhz1",h+="Read",h+=""+n+"", e=h,e+=g,e+="")}e===""?a.FullRedraw===!0&&a.scheduleRepaint():b(e)}};return a}(_SCIntern||{});_SCIntern=function(a){a.Sha256_hash=function(h){var h=h.utf8Encode(),g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037, 2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],b=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];h+=String.fromCharCode(128);for(var f=Math.ceil((h.length/4+2)/16),c=Array(f),d=0;d>>a|g<<32-a};a.Sha256_Sigma0=function(h){var g=a.Sha256_ROTR(2,h),b=a.Sha256_ROTR(13,h),h=a.Sha256_ROTR(22,h);return g^b^h};a.Sha256_Sigma1=function(h){var g=a.Sha256_ROTR(6,h),b=a.Sha256_ROTR(11,h),h=a.Sha256_ROTR(25,h);return g^b^h};a.Sha256_sigma0=function(h){var g=a.Sha256_ROTR(7,h),b=a.Sha256_ROTR(18,h);return g^b^h>>>3};a.Sha256_sigma1=function(h){var g=a.Sha256_ROTR(17,h),b=a.Sha256_ROTR(19,h);return g^b^h>>>10};a.Sha256_Ch=function(a, g,b){return a&g^~a&b};a.Sha256_Maj=function(a,g,b){return a&g^a&b^g&b};a.Sha256_toHexStr=function(a){for(var g="",b,f=7;f>=0;f--)b=a>>>f*4&15,g+=b.toString(16);return g=g.toUpperCase()};if(typeof String.prototype.utf8Encode=="undefined")String.prototype.utf8Encode=function(){return unescape(encodeURIComponent(this))};if(typeof String.prototype.utf8Decode=="undefined")String.prototype.utf8Decode=function(){try{return decodeURIComponent(escape(this))}catch(a){return this}};a.ACT_executeAction=function(h, g,b,f,c){var d=0,d=0,e="",n="",r=0;g!==null&&b!==null&&(d=a.RW_readSource(g,b));switch(h){case 14:r=function(a){for(var b=0;a%1;)a*=10,b++;return b};d=parseFloat(d);isNaN(d)===!0&&(d=0);f!==null&&c!==null&&(n=a.RW_readSource(f,c),n=parseFloat(n));isNaN(n)===!0&&(n=0);e=r(n);r=r(d);e=(n+d).toFixed(e>r?e:r);a.RW_writeSource(f,c,e.toString());break;case 17:a.log_append_ln("todo REMOVESOURCEFROMDEST");break;case 18:d=parseInt(d,10);if(isNaN(d)!==!0){n=String(a.RW_readSource(f,c));n=n.split(/\\n/);for(r= 0;r>>0<<(o>>>0),p>>>=0;else if(a.stringcmp("LSR",u)&&k!==null&&o!==null)a.log_append_ln("ERROR LSR Operation not implemented in HTML5 !"); else if(a.stringcmp("ASR",u)&&k!==null&&o!==null)p=k>>(o>>>0);else if(a.stringcmp(u,"STRLEN")&&k!==null)p=k.length;else if(a.stringcmp(u,"GETCHAR2STR")&&k!==null&&o!==null)p=k[parseInt(o,10)];else if(a.stringcmp(u,"GETCHAR2INT")&&k!==null&&o!==null)s=!0,p=k[parseInt(o,10)].charCodeAt(0);else if(a.stringcmp(u,"GETINDEXOF")&&k!==null&&o!==null)s=!0,p=k.indexOf(o);else if(a.stringcmp(u,"SIN")&&k!==null)p=Math.sin(k);else if(a.stringcmp(u,"COS")&&k!==null)p=Math.cos(k);else if(a.stringcmp(u,"TAN")&&k!== null)p=Math.tan(k);else if(a.stringcmp(u,"ASIN")&&k!==null)p=Math.asin(k);else if(a.stringcmp(u,"ACOS")&&k!==null)p=Math.acos(k);else if(a.stringcmp(u,"ATAN")&&k!==null)p=Math.atan(k);else if(a.stringcmp(u,"SINH")&&k!==null)p=Math.sinh(k);else if(a.stringcmp(u,"COSH")&&k!==null)p=Math.cosh(k);else if(a.stringcmp(u,"TANH")&&k!==null)p=Math.tanh(k);else if(a.stringcmp(u,"ASINH")&&k!==null)p=Math.asinh(k);else if(a.stringcmp(u,"ACOSH")&&k!==null)p=Math.acosh(k);else if(a.stringcmp(u,"ATANH")&&k!==null)p= Math.atanh(k);else if(a.stringcmp(u,"SQRT")&&k!==null)p=Math.sqrt(k);else if(a.stringcmp(u,"EXP")&&k!==null)p=Math.exp(k);else if(a.stringcmp(u,"LOG")&&k!==null)p=Math.log(k);else if(a.stringcmp(u,"LOG10")&&k!==null)p=Math.log10(k);else if(a.stringcmp("POW",u)&&k!==null&&o!==null)p=Math.pow(k,o);else if(a.stringcmp("CONVERT_UTS2TXT",u)&&o!==null)p="";else if(a.stringcmp("CONVERT_TXT2UTS",u)&&o!==null)p="";else if(a.stringcmp("UTS2TXT",u)&&k!==null){o===null&&(o=a.readDateTimeFormat());var v=parseInt(k, 10);isNaN(v)===!1&&(v*=1E3,p=a.DateTime_ReadDT(o,a.SpecialCO.dateTimeLocalNow.name,!a.SpecialCO.mbTmzEn.value,new Date(v),null,!0))}else a.stringcmp("TXT2UTS",u)&&k!==null?(o===null&&(o=a.readDateTimeFormat()),p=a.DateTime_ReadDT(o,a.SpecialCO.dateTimeLocalNow.name,!a.SpecialCO.mbTmzEn.value,null,k,!0)):a.stringcmp("SHA256",u)&&k!==null?p=a.Sha256_hash(k):a.stringcmp("BASE64ENC",u)&&k!==null?p=a.Base64.encode(k):a.stringcmp("BASE64HENC",u)&&k!==null?(h={buffer:"",nByte:0,buffer:"",nByte:0},a.str_ascii2byte(k, h),h.nByte>0&&(p=a.Base64.encode(h.Buffer))):a.stringcmp("BASE64DEC",u)&&k!==null?p=a.Base64.decode(k):a.stringcmp("BSET",u)&&k!==null?(p="",m=a.parseNumber(k),q=a.RW_readSource(b,f),q=parseInt(q,10),p=a.BIT_setBit(q,m)):a.stringcmp("BCLR",u)&&k!==null&&(p="",m=a.parseNumber(k),q=a.RW_readSource(b,f),q=parseInt(q,10),p=a.BIT_clearBit(q,m));p!==null&&isNaN(p)===!1?s===!0?(p=parseInt(p,10),a.RW_writeSource(b,f,p)):isNaN(p)===!1&&(t=parseFloat(p),isNaN(t)||(p=a.toFixed(t,6)),a.RW_writeSource(b,f,p)): p!==null&&isNaN(p)===!0&&a.RW_writeSource(b,f,p)}}catch(x){b="hmi.js/sc.ACT_executeOperation",b+="There was an error on this page.\n\n",b+="Error description: "+x.message+"\n\n",b+="Click OK to continue.\n\n",a.getDebugLevel()>=1&&window.alert(b)}};return a}(_SCIntern||{});_SCIntern=function(a){function h(b,f){var c=new XMLHttpRequest;c.open("GET",b,!0);c.responseType="arraybuffer";c.onreadystatechange=function(){c.readyState==c.DONE&&(c.status==200&&c.response?(a.getDebugLevel()>=2&&a.log_append_ln(" getServerTCRFileToArrayBuffer downloaded : "+b+"\n xhr.status "+c.status+"\n xhr.statusText "+c.statusText),f(c.response)):(a.log_append_ln(" getServerTCRFileToArrayBuffer Failed to download: "+b+"\n xhr.status "+c.status+"\n xhr.statusText "+c.statusText),f(null)))}; c.send()}function g(b){var f="";h(b,function(c){if(c==null||c==void 0)f="text/csv;charset="+a.UNICODEFILE_ISO8859_ENCODINGSTR,a.g_FileEncodeStrList[b]=f;else{a.getDebugLevel()>=2&&a.log_append_ln("after getSrvTCRFileBOMEncodeStr2 "+b+" m.byteLength = "+c.byteLength);var d=new Uint8Array(c);for(i=0;i=2&&a.log_append_ln("sc.getSrvTCRFileBOMEncodeStr2 bufView ["+i+"] = "+d[i]);c.byteLength>=2&&((d[0]&255)==a.UNICODEFILE_UTF16LE_BOM0&&(d[1]&255)==a.UNICODEFILE_UTF16LE_BOM1? (f="text/csv;charset="+a.UNICODEFILE_UTF16LE_ENCODINGSTR,a.g_FileEncodeStrList[b]=f):(d[0]&255)==a.UNICODEFILE_UTF16BE_BOM0&&(d[1]&255)==a.UNICODEFILE_UTF16BE_BOM1&&(f="text/csv;charset="+a.UNICODEFILE_UTF16BE_ENCODINGSTR,a.g_FileEncodeStrList[b]=f));c.byteLength>=3&&(d[0]&255)==a.UNICODEFILE_UTF8_BOM0&&(d[1]&255)==a.UNICODEFILE_UTF8_BOM1&&(d[2]&255)==a.UNICODEFILE_UTF8_BOM2&&(f="text/csv;charset="+a.UNICODEFILE_UTF8_ENCODINGSTR,a.g_FileEncodeStrList[b]=f);f.length<=0&&(f="text/csv;charset="+a.UNICODEFILE_ISO8859_ENCODINGSTR, a.g_FileEncodeStrList[b]=f);a.loadAndParseTCRFile(b)}});return f}a.MsgBoxErrorFlag=!1;a.MsgBoxScheduled=!1;a.TCR_outOfRange=function(b,f,c){a.MsgBoxErrorFlag=!0;a.err_append_ln("Value is out of Range!\n- Value: "+b+"\n- Min: "+f+"\n- Max: "+c)};a.VM_getAndResetMsgBoxErrorFlag=function(){var b=!1;if(a.MsgBoxErrorFlag===!0)a.scheduleMsgBoxOpen(),a.MsgBoxErrorFlag=!1,b=!0;return b};a.scheduleMsgBoxOpen=function(){a.MsgBoxScheduled=!0};a.isMsgBoxScheduled=function(){return a.MsgBoxScheduled};a.resetMsgBoxScheduled= function(){a.MsgBoxScheduled=!1};a.openMsgBox=function(){a.hideInputField();if(a.MsgBox.length<=0){var b="",b=a.RW_readSource(a.INFO_T_CONTAINER,a.SpecialCO.mbMsgBox.name);window.alert(b);a.initMsgBoxVars()}else $("#SC_MsgBox").css("z-index","1"),a.unlockInstance("#SC_MsgBox"),a.lockInstance("#SC_View_001"),a.doInstanceRepaint("#SC_MsgBox")};a.initMsgBoxVars=function(){a.RW_writeSource(a.INFO_T_CONTAINER,a.SpecialCO.mbMsgBox.name,"");a.RW_writeSource(a.INFO_T_CONTAINER,a.SpecialCO.mbMsgBoxNr.name, "0")};a.closeMsgBox=function(){a.initMsgBoxVars();a.MsgBox.length>0&&($("#SC_MsgBox").css("z-index","-1"),a.lockInstance("#SC_MsgBox"),a.unlockInstance("#SC_View_001"),a.doInstanceRepaint("#SC_View_001"))};a.err_append_ln=function(b){var f="",f="",f=0;a.log_append_ln(b+"\n");f=a.RW_readSource(a.INFO_T_CONTAINER,a.SpecialCO.mbMsgBox.name);f.length>0||f.length>100?f+=a.FVLINESEPTOKEN2+b:f=b;a.RW_writeSource(a.INFO_T_CONTAINER,a.SpecialCO.mbMsgBox.name,f);f=a.RW_readSource(a.INFO_T_CONTAINER,a.SpecialCO.mbMsgBoxNr.name); f=parseInt(f,10);isNaN(f)===!0?(a.log_append_ln("ERROR in sc.err_append_ln invalid read sc.SpecialCO.mbMsgBoxNr.value = "+f),f=1):f++;f=f.toString();a.RW_writeSource(a.INFO_T_CONTAINER,a.SpecialCO.mbMsgBoxNr.name,f)};a.getSrvTCRFileBOMEncodeStr=function(b){var f="";b!==null&&b!==void 0&&(a.g_FileEncodeStrList[b]===void 0&&g(b),a.g_FileEncodeStrList[b]!==void 0&&(f=a.g_FileEncodeStrList[b]));return f};a.loadTCRFileBlocking=function(b){var f=null,c="";a.getDebugLevel()>=2&&a.log_append_ln("Start loadTCRFileBlocking "+ b);f=a.getSrvTCRFileBOMEncodeStr(b);f==void 0||f==null||f.length==0?a.getDebugLevel()>=1&&a.log_append_ln("loadTCRFileBlocking waits for encoding check ... for "+b):(a.getDebugLevel()>=1&&a.log_append_ln("loadTCRFileBlocking encoding found : "+f+" for "+b),$.ajax({type:"GET",global:!1,beforeSend:function(a){a.overrideMimeType(f)},async:!1,cache:!0,url:b,complete:function(){},success:function(a){c=a},error:function(){c=""}}));return c};a.parse_TCR_CSV_File=function(b){for(var b=b.split(/\n/),f=0,c= null,d=0,e=!1,g=!1,h=0,j=0,k=0,o=0,f=b.length,d=0;d=99&&a.TARGET_TYPE_NR<200){if(j< h&&c[0].length>0){k=new a.PPOListItemType;if(k!==null){k.regView=0;k.regHMI=!1;k.resolved="";k.value="";if(c[0])k.name=c[0];if(c[1])k.address=c[1];if(c[2])k.min=c[2];if(c[3])k.max=c[3];if(c[4])k.format=c[4];if(c[5])k.unit=c[5];if(c[6])k.writeAddr=c[6];if(c[7])k.scale_Fact=c[7];if(c[8])k.scale_Offset=c[8];if(c[9])k.scale_Min=c[9];if(c[10])k.scale_Max=c[10];a.g_PPOList[k.name]=k}j++}}else{a.showCriticalErrorScreen(3,"Unsupported *.tcr file type (PPO Initialisation File)
Unbekannter *.tcr Dateityp (PPO Initialisierung)"); break}}};a.loadAndParseTCRFile=function(b){var f="",f=a.loadTCRFileBlocking(b);f.length>0?a.parse_TCR_CSV_File(f):a.getDebugLevel()>=2&&a.log_append_ln("Warning Empty or missing or to reload(due to encoding) TCR file")};a.PPOListItemType=function(){this.offset=this.gain=this.maxvalue=this.minvalue=this.unit=this.scale_Max=this.scale_Min=this.scale_Offset=this.scale_Fact=this.writeAddr=this.format=this.max=this.min=this.address=this.resolved=this.name=this.value="";this.regView=0;this.regHMI=!1};a.TCR_convertToValueFormat= function(b,f){var c=0,d=0,e=0,g=-1,g=0,e=!1,g=0,c=null,d=c=g=0;if(a.prefixicmp("dec.",b)){f.rValue=f.rValue.toString();g=f.rValue.indexOf(".");if(g!=-1)f.rValue=f.rValue.substring(0,g);g=parseInt(b.substring(4,b.len),10);if(g>0){if(f.rValue[0]=="-"||f.rValue[0]=="+")f.rValue[0]=="-"&&(e=!0),f.rValue=f.rValue.substring(1,f.rValue.len);c=a.strlen(f.rValue);if(c<=g){d=g-c+1;for(c=g+1;d--;)a.util_insertChar("0",f)}a.insertStr(c-g,".",f);e===!0&&a.insertStr(0,"-",f)}}else if(a.prefixicmp("flt2dec",b)){g= parseInt(b.substring(7,b.len),10);if(e=isNaN(g)===!1){e=g;g=0;g="";c=!1;g=parseFloat(f.rValue);if(e<7&&isNaN(g)===!1){var c=1,d=0,c="",h=d=d=0;if(e<0||e>7)g=g.toString();else{c=Math.pow(10,e);c==0&&(c=1);d=Math.floor(g*c);d/=c;c=d.toString();d=c.indexOf(".");if(e!==0&&d===-1){c+=".";for(d=0;d=0&&(h=e-(c.length-(d+1)),h>0))for(d=0;d32767&&(e-=65536),f.rValue=e}else if(a.prefixicmp("M_DINT",b)){if(e=a.atoi(f.rValue),isNaN(e)===!1)isNaN(e)===!1&&e>2147483647&&(e-=4294967296),f.rValue=e}else if(a.prefixicmp("time_",b)){if(g=b.substring(5,b.length),g=a.atoi(g),isNaN(g)===!1)f.rValue=a.getTimeFormatInt(f.rValue,g,!1)}else if(a.prefixicmp("date_",b)){if(g=b.substring(5,b.length),g=a.atoi(g),isNaN(g)===!1)f.rValue= a.getTimeFormatInt(f.rValue,g,!0)}else if(a.prefixicmp("ADD",b)&&(c=/^ADD(\d*):GAIN(\d*)/.exec(b),c!==null&&(g=parseFloat(c[1]),c=parseFloat(c[2]),d=parseFloat(f.rValue),isNaN(g)===!1&&isNaN(c)===!1&&isNaN(d)===!1)))f.rValue=d*c+g};a.TCR_convertToRawValueByFormat=function(b,f){a.TCR_getUnFormatedValueAndCheckMinMax(f,b,"","",0)};a.TCR_readFormatedPPO=function(b,f){var c=b.format,d=1,e=0,g=0;b.scale_Fact!==" "&&isNaN(a.atof(b.scale_Fact))===!1&&(d=a.atof(b.scale_Fact));b.scale_Offset!==" "&&isNaN(a.atof(b.scale_Offset))=== !1&&(e=a.atof(b.scale_Offset));if(d!=1||e!==0)if(g=parseFloat(f.rValue),isNaN(g)===!1)f.rValue=g*d+e;a.TCR_convertToValueFormat(c,f)};a.TCR_readFormatedPPOValue=function(b,f,c){a.TCR_readFormatedPPO(c,f)};a.TCR_invalidEntry=function(){a.MsgBoxErrorFlag=!0;a.err_append_ln("Invalid entry ! ")};a.TCR_getPPOStruct=function(b){return a.g_PPOList[b]};a.TCR_getUnformatedValue=function(b,f,c){var d=0,e=d=0,d=0;if(f&&b.rValue)if(a.prefixicmp("dec.",f)){if(d=a.atoi(f.substring(4,f.length)),d>0&&d<10&&(e=a.atof(b.rValue), isNaN(e)===!1)){for(;d-- >0;)e*=10;b.rValue=e.toString()}}else if(c&&(a.prefixicmp("int2hex",f)||a.prefixicmp("hex",f)))d=0,a.prefixicmp("h ",b.rValue)&&(d=2),b.rValue=b.rValue.substring(d,d.len),d=a.ahextoi(b.rValue),isNaN(d)===!0?a.TCR_invalidEntry():b.rValue=d};a.TCR_getUnFormatedValueAndCheckMinMax=function(b,f,c,d,e){var g=0,h=0,j=0,g=g=j=j=j=g=0,j=null,k=j=g=0;if(a.prefixicmp("string",f)){if(g=parseInt(c,10),h=a.atoi(d),g>=0&&h>=g&&(e=a.strlen(b.rValue),e>h?(a.TCR_outOfRange(b.rValue,c,d),b.rValue= b.rValue.substring(0,h)):e0&&j<10)if(g=a.atof(b.rValue),isNaN(g)===!1){for(;j-- >0;)g*=10;b.rValue=g.toString()}else a.TCR_invalidEntry()}else if(a.prefixicmp("int2hex",f))g=0,a.prefixicmp("h ",b.rValue)&&(g=2),b.rValue=b.rValue.substring(g,g.len),j=a.ahextoi(b.rValue),isNaN(j)=== !0?a.TCR_invalidEntry():b.rValue=j;else if(a.prefixicmp("hex2int",f))for(h=0;hh&&a.TCR_outOfRange(b.rValue,c,d)):a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag()))return!1}else if(a.prefixicmp("int",f)|| a.prefixicmp("unsignedint",f)||a.prefixicmp("UDINT",f)||a.prefixicmp("DWORD",f)||a.prefixicmp("short",f)||a.prefixicmp("unsignedshort",f)||a.prefixicmp("UINT",f)||a.prefixicmp("WORD",f)||a.prefixicmp("byte",f)){if(j=a.atof(b.rValue),isNaN(j)===!1?(g=a.atof(c),isNaN(g)===!1&&jh&&a.TCR_outOfRange(b.rValue,c,d)):a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag())return!1}else if(a.prefixicmp("long",f)){if(j=a.atof(b.rValue),isNaN(j)=== !1?(g=a.atof(c),isNaN(g)===!1&&jh&&a.TCR_outOfRange(b.rValue,c,d)):a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag())return!1}else if(a.prefixicmp("unsignedlong",f)){if(j=a.atof(b.rValue),isNaN(j)===!1?(g=a.atof(c),isNaN(g)===!1&&jh&&a.TCR_outOfRange(b.rValue,c,d)):a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag())return!1}else if(a.prefixicmp("float",f)||a.prefixicmp("double", f)||a.prefixicmp("flt2dec",f)){if(g=a.atof(b.rValue),isNaN(g)===!1?(j=a.atof(c),isNaN(j)===!1&&gj&&a.TCR_outOfRange(b.rValue,c,d)):a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag())return!1}else if(a.prefixicmp("M_DINT",f))if(j=a.atoi(b.rValue),isNaN(j)===!1)c=j,isNaN(c)===!1&&c<0&&(c+=4294967296),b.rValue=c;else{if(a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag())return!1}else if(a.prefixicmp("M_INT",f))if(j=a.atoi(b.rValue), isNaN(j)===!1)c=j,isNaN(c)===!1&&c<0&&(c+=65536),b.rValue=c;else{if(a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag())return!1}else if(a.prefixicmp("time_",f))if(g=f.substring(5,f.length),g=a.atoi(g),isNaN(g)===!1)b.rValue=a.DateTime_ReadDT(g,a.SpecialCO.dateTimeLocalNow.name,!0,null,b.rValue,!1);else{if(a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag())return!1}else if(a.prefixicmp("date_",f))if(g=f.substring(5,f.length),g=a.atoi(g),isNaN(g)===!1)b.rValue=a.DateTime_ReadDT(g,a.SpecialCO.dateTimeLocalNow.name, !0,null,b.rValue,!0);else{if(a.TCR_invalidEntry(),a.VM_getAndResetMsgBoxErrorFlag())return!1}else if(a.prefixicmp("ADD",f)&&(j=/^ADD(\d*):GAIN(\d*)/.exec(f),j!==null&&(g=parseFloat(j[1]),j=parseFloat(j[2]),k=parseFloat(b.rValue),isNaN(g)===!1&&isNaN(j)===!1&&isNaN(k)===!1)))k-=g,j!=0&&(k/=j),b.rValue=k;return!0};a.TCR_writeFormatedPPOValue=function(b,f){var c=0,d=1,e=0,g=c=0,h=0,j=0,k=null;f.writeEnabled=!0;if(b!==null){if(j=b.scale_Min)c=parseFloat(j),isNaN(c)&&(j=null);if(h=b.scale_Max)g=parseFloat(h), isNaN(g)&&(h=null);if(j!==null||h!==null)if(j.length>0||h.length>0)if(a.TCR_getUnformatedValue(f,b.format,1),k=parseFloat(f.rValue),isNaN(k)===!1){if(j&&kg)a.TCR_outOfRange(f.rValue,j,h),f.writeEnabled=!1}else f.writeEnabled=!1,a.TCR_invalidEntry();if(f.writeEnabled===!1)return a.VM_getAndResetMsgBoxErrorFlag(),1;b.scale_Fact!==" "&&isNaN(a.atof(b.scale_Fact))===!1&&(d=a.atof(b.scale_Fact));b.scale_Offset!==" "&&isNaN(a.atof(b.scale_Offset))=== !1&&(e=a.atof(b.scale_Offset));if(d!==1||e!==0)if(c=parseFloat(f.rValue),isNaN(0)===!1)c-=e,d!==0&&(c/=d),f.rValue=c;if(b.format)j=b.min,j!==" "&&(c=parseFloat(j),isNaN(c)&&(j=null)),h=b.max,h!==" "&&(g=parseFloat(h),isNaN(g)&&(h=null)),f.writeEnabled=a.TCR_getUnFormatedValueAndCheckMinMax(f,b.format,j,h,0);return 1}return 0};return a}(_SCIntern||{});lKeepAspectRatio=!0;lMsgBoxframe=lViewFrame=null;doFluid=!1; window.onload=function(){_SCIntern.ZoomMode!=""&&(_SCIntern.ZoomMode=="No Auto Zoom"?doFluid=!1:_SCIntern.ZoomMode=="Auto Zoom & No Keep Ratio"?(doFluid=!0,lKeepAspectRatio=!1):_SCIntern.ZoomMode=="Auto Zoom & Keep Ratio"?lKeepAspectRatio=doFluid=!0:doFluid=!1,doFluid==!0&&(lViewFrame==null&&(lViewFrame=new FluidFrame("#SC_View_001",_SCIntern.getHmiOriginalWidth(),_SCIntern.getHmiOriginalHeight(),lKeepAspectRatio)),lMsgBoxframe==null&&(lMsgBoxframe=new FluidFrame("#SC_MsgBox",_SCIntern.getHmiOriginalWidth(), _SCIntern.getHmiOriginalHeight(),lKeepAspectRatio)),lViewFrame.doOnLoad(),lMsgBoxframe.doOnLoad()))};window.onresize=function(){doFluid==!0&&($("body").css("overflow","hidden"),lViewFrame.doOnResize(),lMsgBoxframe.doOnResize())}; function FluidFrame(a,h,g,b,f){this.frameRef=null;this.scalingRatio=this.yRatio=this.xRatio=0;this.cpySvgTag=this.svgTopTag=this.currentDoc=this.cpySvgTag=this.ifrmTag=this.svgTopTag=this.lLowerRight=this.lClickable=null;this.divId=a.slice(1);this.divClickId=this.divId+this.clickablDivStr;this.divTag=$(a).get(0);this.lWidth=h;this.lHeight=g;this.lViewName="";this.PObjArray=null;this.lNoIframe=f!=null&&f==!0?!0:!1;this.lKeepAspectRatio=b==null||b==!0?!0:!1;this.updateSize=function(a,b){this.lWidth= a;this.lHeight=b};this.isFluidInjected=function(){var a=null,a=a=null;if(this.lNoIframe==!1){a=$("#"+this.divId).children("iframe")[0];if(a==null)return!1;a=a.contentWindow.document;if(a==null)return!1;a=a.getElementsByTagNameNS(this.NS,"svg")[0]}else a=$("#"+this.divId).children("svg")[0];return a!=null&&this.topTagStr==a.getAttribute("id")?!0:!1};this.injectFluid=function(){if(this.isFluidInjected()==!0)return!0;this.ifrmTag=$("#"+this.divId).children("iframe")[0];return typeof this.ifrmTag!=="undefined"&& this.ifrmTag!=void 0&&this.ifrmTag!=null&&(this.ifrmTag.setAttribute("style",this.lIfrmStyleString+this.lWidth+"px; height: "+this.lHeight+"px;"),this.ifrmTag.removeAttribute("width"),this.ifrmTag.removeAttribute("height"),this.currentDoc=this.ifrmTag.contentWindow.document,this.svgTopTag=this.currentDoc.getElementsByTagNameNS(this.NS,"svg")[0],typeof this.svgTopTag!=="undefined"&&this.svgTopTag!=void 0&&this.svgTopTag!=null&&this.svgTopTag.getAttribute("id")!=this.topTagStr)?(this.svgTopTag.setAttribute("width", this.lWidth.toString()),this.svgTopTag.setAttribute("height",this.lHeight.toString()),this.svgTopTag.removeAttribute("viewBox"),this.cpySvgTag=this.svgTopTag.cloneNode(!1),this.cpySvgTag.setAttribute("id",this.topTagStr),this.cpySvgTag.setAttribute("xmlns",this.svgTopTag.getAttribute("xmlns")),this.parentTag=this.svgTopTag.parentNode,this.frameRef=this.currentDoc.createElementNS(this.NS,"g"),this.frameRef.setAttribute("id",this.scalingTagStr),this.frameRef.setAttribute("x","0"),this.frameRef.setAttribute("y", "0"),this.frameRef.setAttribute("width",this.lWidth.toString()),this.frameRef.setAttribute("height",this.lHeight.toString()),this.frameRef.appendChild(this.svgTopTag),this.cpySvgTag.appendChild(this.frameRef),this.parentTag.appendChild(this.cpySvgTag),this.lNoIframe==!0&&this.ridIframe(),!0):!1};this.ridIframe=function(){this.divTag.appendChild(this.cpySvgTag);(this.divClickTag=$("#"+this.divClickId).get(0))&&this.divTag.appendChild(this.divClickTag);this.divTag.removeChild(this.ifrmTag)};this.doFluid= function(){var a=null,b=null,e=0;if(this.isFluidInjected()!=!1&&typeof this.frameRef!=="undefined"&&this.frameRef!=void 0&&this.frameRef!=null)this.xRatio=window.innerWidth/this.lWidth,this.yRatio=window.innerHeight/this.lHeight,this.lKeepAspectRatio==!0?(this.scalingRatio=this.xRatio0;)a-=360;a===0&&(a=-360)}else{for(;a<0;)a+=360;a===0&&(a=360)}return a}function b(a,b,c){if(b>=c)a=e.baseValue;ac&&(a=c);if(b>e.baseValue)e.baseValue=b;if(c0?(n=k+o,e.invertScalePos===!0&&(n=g+k+o+1),g=e.h-g-(k+o)*2):(n=0,g=e.h),r=(e.w-k*2)/j,j=(e.baseValue-h)*r,h=Math.abs((d-h)*r),h=Math.min(h,j),p=Math.abs((d-e.baseValue)*r),h+=k):(e.w-g-(k+o)*2>0?(h=k+o,e.invertScalePos===!0&&(h=g+k+o+1),p=e.w-g-(k+o)*2):(h=0,p=e.w),r=(e.h-k*2)/j,j=(n-e.baseValue)*r,n=Math.abs((n- d)*r),n=Math.min(n,j),g=Math.abs((d-e.baseValue)*r),n+=k),d=Math.round(p),g=Math.round(g),d>0&&g>0&&a.createSVGRect(document,c,Math.round(h),Math.round(n),d,g,"rgb("+f+")",null,0,!1)}function d(b,c,d,f,g,j,k,h){b=a.createSVGText(document,b,d,f,"rgb("+h+")",k===1?"middle":k===2?"end":"start",e.getFontName(),e.getFontSize(),e.getSvgFontStyle(),e.getSvgFontWeight());a.createSVGTSpan(document,b,null,"0.9em",c)}this.base=a.PainterType_MPainter;this.base(h);this.minValue=0;this.rangeValue=this.maxValue= 100;this.stopAngle=this.startAngle=this.baseValue=0;this.maxValue=100;this.showScale=this.isGauge=this.invertGrowing=this.horizontal=!1;this.spacement=10;this.nScaleText=0;this.invertScalePos=!1;var e=this,n=null,r=!1,j=null,k=0;this.getUseBarColor=function(){return j};this.setUseBarColor=function(a){a===null?(r===!0&&this.scheduleFullRedrawPainter(),r=!1):(j!==a&&this.scheduleFullRedrawPainter(),r=!0);j=a};this.typeDraw=function(){if(this.isFullPainterRedrawRequired()){var a=this.getEditSource(); a!==null&&this.updateBar(a)}};this.notify=function(b){switch(b){case a.DRAW_OBJECT:this.instanceDraw&&this.instanceDraw(),this.genericDraw()}return 0};this.updateMinMaxRangeBase=function(){if(this.minValue>this.maxValue){var a=this.maxValue;this.maxValue=this.minValue;this.minValue=a}this.rangeValue=this.maxValue-this.minValue};this.changeMin=function(b){var c=parseFloat(b);if(isNaN(c))a.log_append_ln("Bargraph min. value not valid:'"+b+"' (Object ID: '"+this.objId+"')");else if(this.minValue!==c)this.minValue= c,this.updateMinMaxRangeBase(),this.scheduleFullRedrawPainter()};this.changeMax=function(b){var c=parseFloat(b);if(isNaN(c))a.log_append_ln("Bargraph max. value not valid:'"+b+"' (Object ID: '"+this.objId+"')");else if(this.maxValue!==c)this.maxValue=c,this.updateMinMaxRangeBase(),this.scheduleFullRedrawPainter()};this.setStartAngle=function(a){a=parseFloat(a);if(!isNaN(a)&&this.startAngle!==a)this.startAngle=a,this.scheduleFullRedrawPainter()};this.setStopAngle=function(a){a=parseFloat(a);if(!isNaN(a)&& this.stopAngle!==a)this.stopAngle=a,this.scheduleFullRedrawPainter()};this.setSpacement=function(a){a=parseFloat(a);if(!isNaN(a)&&this.spacement!==a)this.spacement=a,this.scheduleFullRedrawPainter()};this.setInvertGrowing=function(a){if(this.invertGrowing!==a)this.invertGrowing=a,this.scheduleFullRedrawPainter()};this.setInvertScalePos=function(a){if(this.invertScalePos!==a)this.invertScalePos=a,this.scheduleFullRedrawPainter()};this.setPaintHorizontal=function(a){if(this.horizontal!==a)this.horizontal= a,this.scheduleFullRedrawPainter()};this.setShowScale=function(a){if(this.showScale!==a)this.showScale=a,this.scheduleFullRedrawPainter()};this.setScaleText=function(a){a=parseInt(a,10);if(!isNaN(a)&&this.nScaleText!==a)this.nScaleText=a,this.scheduleFullRedrawPainter()};var o=0,u=0,p=0;this.updateBar=function(h){if(!(h.type===void 0||h.name===void 0))if(!(h.type===null||h.name===null)){var q=h.value;n!==null&&(n.parentNode.removeChild(n),n=null);if(e.w>0&&e.h>0){var m,h=document.createElementNS(a.SvgNs, "svg");if(h!==null){m="";m="0 0 "+e.w+" "+e.h;h.setAttributeNS(null,"x",e.x);h.setAttributeNS(null,"y",e.y);h.setAttributeNS(null,"width",e.w);h.setAttributeNS(null,"height",e.h);h.setAttributeNS(null,"viewBox",m);h.setAttributeNS(null,"version","1.1");e.getMainGroupElement().appendChild(h);q=parseFloat(q);if(isNaN(q)===!0)q=e.baseValue;if(e.minValue>e.maxValue)m=e.minValue,e.minValue=e.maxValue,e.maxValue=m;k=e.getOutlineWidth();if(e.isGauge===!0){var t=q,v=e.minValue,x=e.maxValue;if(x!=v){(e.stopAngle- e.startAngle)%360!=0&&(t=b(t,v,x));q=e.w/2;m=e.h/2;var w=Math.min(q,m),y=w+(q-w),z=w+(m-w),t=e.startAngle+(t-v)*g()/(x-v);e.checkIfInterior()===!0&&a.createSVGPie(document,h,y,z,q,m,e.startAngle,t,e.invertGrowing,null,0,"rgb("+e.getInteriorColor()+")");if(e.showScale){var v=e.getOutlineColor(),x=e.minValue,I=e.maxValue;if(I!=x&&e.spacement>0)for(var D=e.w/2,A=e.h/2,F=Math.min(e.w/2,e.h/2),H=Math.min(e.w/2,e.h/2)/10,N=g(),L=e.minValue,H=Math.max(H,2);L<=I;){var J=(e.startAngle+(L-e.minValue)*N/(I- x))*Math.PI/180,M=D+(F-H)*Math.cos(J),B=A-(F-H)*Math.sin(J),C=D+F*Math.cos(J),J=A-F*Math.sin(J);a.createSVGLine(document,h,C,J,M,B,"rgb("+v+")",1).setAttributeNS(null,"shape-rendering","geometricPrecision");L+=e.spacement}}e.checkIfOutline()===!0&&(v=e.getOutlineWidth()/2,a.createSVGEllipse(document,h,y,z,q-v,m-v,"rgb("+e.getOutlineColor()+")",e.getOutlineWidth(),null).setAttributeNS(null,"shape-rendering","geometricPrecision"));e.getOutlineWidth()>0&&(e.checkIfInterior()===!0&&f(h,e.startAngle,y, z,w,e.getOutlineColor(),e.getOutlineWidth()),f(h,t,y,z,w,e.getOutlineColor(),e.getOutlineWidth()))}}else{m=q;w=e.showScale;q=e.nScaleText;y=e.w;z=e.h;k=e.getOutlineWidth();e.horizontal===!0?(z<2*(k+o)+1&&(k=0),w===!0&&z<=2*(k+o)+9&&(w=!1)):(y<2*(k+o)+1&&(k=0),w&&y<=2*(k+o)+9&&(w=!1));w===!1&&(q=0);u=w===!0?8:0;q>0&&(e.horizontal===!0?(p=16,p>=z-u-(k+o)*2-1&&(p=0)):(p=30,p>=y-u-(k+o)*2-1&&(p=0)),p<3&&(q=p=0),u+=p);r===!0?(e.checkIfInterior()===!0&&(e.innerFillRect===!0?(t=e.getOutlineWidth(),e.horizontal=== !0?e.invertScalePos===!0?a.createSVGRect(document,h,t,t+u+1,y-t*2,z-t*2-u-1,"rgb("+e.getInteriorColor()+")",null,0):a.createSVGRect(document,h,t,t,y-t*2,z-t*2-u-1,"rgb("+e.getInteriorColor()+")",null,0):e.invertScalePos===!0?a.createSVGRect(document,h,t+u+1,t,y-t*2-u-1,z-t*2,"rgb("+e.getInteriorColor()+")",null,0):a.createSVGRect(document,h,t,t,y-t*2-u-1,z-t*2,"rgb("+e.getInteriorColor()+")",null,0)):a.createSVGRect(document,h,0,0,y,z,"rgb("+e.getInteriorColor()+")",null,0)),c(h,m,j,u)):c(h,m,e.getInteriorColor(), u);if(w===!0){m=e.getOutlineColor();w=u;z=t=v=z=t=y=y=0;if(e.spacement>0&&(y=e.maxValue-e.minValue,y!=0))if(z=e.minValue,e.horizontal===!0){y=(e.w-k*2)/y;t=(z-e.minValue)*y;t+=k;e.invertScalePos===!0?a.createSVGRect(document,h,k,w,e.w-k*2,2,"rgb("+m+")",null,0,!1):a.createSVGRect(document,h,k,e.h-w-2,e.w-k*2,2,"rgb("+m+")",null,0,!1);e.invertScalePos===!0?t>0&&t0&&t=0;)z%5===0?e.invertScalePos===!0?v>0&&v0&&v0&&v0&&v0&&t0&&t=0;)z%5===0?e.invertScalePos===!0?t>0&&t0&&t0&&(q=e.getOutlineColor(),w=m=v=0,z=e.minValue,v=e.maxValue,t=e.nScaleText,x=0,y=v-z,y!==0&&t>0))if(w=16,e.horizontal===!0){m=0;t>=2&&(x=z.toString(),e.invertGrowing=== !0?e.invertScalePos===!0?d(h,x,e.w,0,m,w,2,q):d(h,x,e.w,e.h-w,m,w,2,q):e.invertScalePos===!0?d(h,x,0,0,m,w,0,q):d(h,x,0,e.h-w,m,w,0,q),x=v.toString(),e.invertGrowing===!0?e.invertScalePos===!0?d(h,x,0,0,m,w,0,q):d(h,x,0,e.h-w,m,w,0,q):e.invertScalePos===!0?d(h,x,e.w,0,m,w,2,q):d(h,x,e.w,e.h-w,m,w,2,q));t==3&&(x=(z+y/2).toString(),e.invertScalePos===!0?d(h,x,e.w/2,0,m,w,1,q):d(h,x,e.w/2,e.h-w,m,w,1,q));if(t==6)for(v=2;v<10;v+=2)x=z+v*y/10,x=x.toString(),e.invertGrowing===!0?e.invertScalePos===!0?d(h, x,e.w-v*e.w/10,0,m,w,1,q):d(h,x,e.w-v*e.w/10,e.h-w,m,w,1,q):e.invertScalePos===!0?d(h,x,v*e.w/10,0,m,w,1,q):d(h,x,v*e.w/10,e.h-w,m,w,1,q);if(t==11)for(v=1;v<10;v++)x=z+v*y/10,x=x.toString(),e.invertGrowing===!0?e.invertScalePos===!0?d(h,x,e.w-v*e.w/10,0,m,w,1,q):d(h,x,e.w-v*e.w/10,e.h-w,m,w,1,q):e.invertScalePos===!0?d(h,x,v*e.w/10,0,m,w,1,q):d(h,x,v*e.w/10,e.h-w,m,w,1,q)}else{t>=2&&(x=z.toString(),e.invertGrowing===!0?e.invertScalePos===!0?d(h,x,p,0,m,w,2,q):d(h,x,e.w-p,0,m,w,0,q):e.invertScalePos=== !0?d(h,x,p,e.h-w,m,w,2,q):d(h,x,e.w-p,e.h-w,m,w,0,q),x=v.toString(),e.invertGrowing===!0?e.invertScalePos===!0?d(h,x,p,e.h-w,m,w,2,q):d(h,x,e.w-p,e.h-w,m,w,0,q):e.invertScalePos===!0?d(h,x,p,0,m,w,2,q):d(h,x,e.w-p,0,m,w,0,q));t==3&&(x=(z+y/2).toString(),e.invertScalePos===!0?d(h,x,p,e.h/2-w/2,m,w,2,q):d(h,x,e.w-p,e.h/2-w/2,m,w,0,q));if(t==6)for(v=2;v<10;v+=2)x=z+v*y/10,x=x.toString(),e.invertGrowing===!0?e.invertScalePos===!0?d(h,x,p,v*e.h/10-w/2,m,w,2,q):d(h,x,e.w-p,v*e.h/10-w/2,m,w,0,q):e.invertScalePos=== !0?d(h,x,p,e.h-v*e.h/10-w/2,m,w,2,q):d(h,x,e.w-p,e.h-v*e.h/10-w/2,m,w,0,q);if(t==11)for(v=1;v<10;v++)x=z+v*y/10,x=x.toString(),e.invertGrowing===!0?e.invertScalePos===!0?d(h,x,p,v*e.h/10-w/2,m,w,2,q):d(h,x,e.w-p,v*e.h/10-w/2,m,w,0,q):e.invertScalePos===!0?d(h,x,p,e.h-v*e.h/10-w/2,m,w,2,q):d(h,x,e.w-p,e.h-v*e.h/10-w/2,m,w,0,q)}}e.checkIfOutline()===!0&&e.getOutlineWidth()>0&&(q=e.getOutlineColor(),m=u,w=m!=0?1:0,e.getOutlineWidth()>0&&(e.horizontal===!0?e.invertScalePos===!0?a.createSVGRect(document, h,0,m+w,e.w,e.h-m-w,null,"rgb("+q+")",e.getOutlineWidth()):a.createSVGRect(document,h,0,0,e.w,e.h-m-w,null,"rgb("+q+")",e.getOutlineWidth()):e.invertScalePos===!0?a.createSVGRect(document,h,m+w,0,e.w-m-w,e.h,null,"rgb("+q+")",e.getOutlineWidth()):a.createSVGRect(document,h,0,0,e.w-m-w,e.h,null,"rgb("+q+")",e.getOutlineWidth())))}}n=h}}}};a.PainterType_Bargraph.prototype=new a.PainterType_MPainter;return a}(_SCIntern||{});_SCIntern=function(a){a.PainterType_IGraphic=function(h){this.base=a.PainterType_MPainter;this.base(h);var g=this,b=null,f=null,c=0,d=0,e=0,n=0,r=0,j=0,k=0,o=0;this.typeDraw=function(){if(this.isFullPainterRedrawRequired()===!0){var h=0,p=0,s="",q="",m=0,t=0;g.checkIfInterior()===!0&&(h=1);g.checkIfOutline()===!0&&(p=1);g.getOutlineWidth();s="rgba("+g.getInteriorColor()+","+h+")";q="rgba("+g.getOutlineColor()+","+p+")";m=g.checkIfOutline()===!0?g.getOutlineWidth():g.getInnerFill()===!0?g.getOutlineWidth(): 0;t=g.getOutlineStyle();if(g.frmElmnt!==null)a.removeSVG(g.frmElmnt),g.frmElmnt=null;switch(t){case a.SOLID:g.frmElmnt=a.createSVGRect(g.svgDoc,g.getMainGroupElement(),g.x,g.y,g.w,g.h,s,q,m);break;case a.DASHED:case a.DOTTED:g.frmElmnt=a.createSVGRectDashed(g.svgDoc,g.getMainGroupElement(),g.x,g.y,g.w,g.h,s,q,m,g.getInnerFill(),t);break;default:a.log_append_ln("Unknown outline style")}m=this.getEditSource();if(m.name!==null){var q=0,h="",p=0,q=null,s=[],m=m.value,v=t=t=0,x=0,w=[],m=m.replace(/\n/gi, a.FVLINESEPTOKEN2),m=m.replace(/\t/gi,a.FVCOLSEPTOKEN2),m=a.parseCSV(m);if(m.length===1){t=m[0].length;for(v=x=0;v0&&isNaN(w[0])===!0&&(w[0]=0),w.length>1&&isNaN(w[1])===!0&&(w[1]=0),s.push(w))}}if(x===4){for(v=0;v0){f!==null&&a.removeSVG(f);m=0;g.checkIfOutline()===!0&&(m=g.getOutlineWidth());t=document.createElementNS(a.SvgNs,"svg");t!==null&&(t.setAttributeNS(null,"x",g.xOrg+m),t.setAttributeNS(null,"y",g.yOrg+m),c=g.wOrg-2*m,t.setAttributeNS(null,"width",c),d=g.hOrg-2*m,t.setAttributeNS(null,"height",d),t.setAttributeNS(null,"viewbox","0 0 "+c+" "+d),t.setAttributeNS(null,"version","1.1"), g.getMainGroupElement().appendChild(t));f=t;b!==null&&a.removeSVG(b);r=q[0];j=q[1];k=q[2];o=q[3];j!=r&&(e=c/(j-r));o!=k&&(n=d/(o-k));b=document.createElementNS(a.SvgNs,"path");for(q=0;q=3&&a.log_append_ln("documentHandle.onkeydown keyCode: "+c);c==13?a.g_MouseDownEventInfo.ViewItem.NotifyFunc&&a.g_MouseDownEventInfo.ViewItem.NotifyFunc(a.ENTER,null):c==27?a.g_MouseDownEventInfo.ViewItem.NotifyFunc&& a.g_MouseDownEventInfo.ViewItem.NotifyFunc(a.ESCAPE,null):a.g_MouseDownEventInfo.ViewItem.NotifyFunc&&a.g_MouseDownEventInfo.ViewItem.NotifyFunc(c,null);a.scheduleRepaint()}}};a.ME_destroyViewKeyEventListener=function(a){if(a!==null)a.onkeydown=null};a.ME_teq2screenCoord=function(b,c,d){if(typeof d==="undefined"||d==void 0||d==null)d=a.g_MouseDownEventInfo.ViewItem.SVGDocument.rootElement.createSVGPoint();d.x=b;d.y=c;a.inverseCTM&&(d=d.matrixTransform(a.inverseCTM));return d};a.ME_mouseEventDispatcher= function(r){var j=null,k=!1;if(!(this.locked===!0||this.unloadedFlag===!0||this.mouseDisabled===!0))if(r.stopPropagation(),this.NotifyFunc!==null){if(j=n===!0){j=!1;if(r.type==="mousedown"||r.type==="mouseup"||r.type==="mousemove"||r.type==="mouseout"||r.type==="mouseover"||r.type=="dblclick")j=!0;j=j===!0}if(!j){if(j=n===!1)if(j=!1,r.type==="touchstart"||r.type==="touchend"||r.type==="touchmove")j=!0;j&&(n=!0);j=null;k=!1;j=new f;j.x=0;j.y=0;j.ViewItem=this;j.consumedFlag=!1;j.consumedPainter=null; j.actionExecutedFlag=!1;j.jqEvent=r;if(n===!0)switch(r.type){case "touchstart":j.typeStr=a.MOUSE_DOWN_STR;j.type=a.MOUSE_DOWN;break;case "touchend":j.typeStr=a.MOUSE_UP_STR;j.type=a.MOUSE_UP;break;case "touchmove":j.typeStr=a.MOUSE_MOVE_STR;j.type=a.MOUSE_MOVE;break;case "touchleave":j.typeStr=a.MOUSE_OUT_STR;a.type=a.MOUSE_OUT;break;default:j.typeStr=r.type,a.log_append_ln("Unknown event case 1: "+r.type),k=!0}else switch(r.type){case "mousedown":j.typeStr=a.MOUSE_DOWN_STR;j.type=a.MOUSE_DOWN;break; case "mouseup":j.typeStr=a.MOUSE_UP_STR;j.type=a.MOUSE_UP;break;case "mousemove":j.typeStr=a.MOUSE_MOVE_STR;j.type=a.MOUSE_MOVE;break;case "mouseout":j.typeStr=a.MOUSE_OUT_STR;j.type=a.MOUSE_OUT;break;case "mouseover":j.typeStr=a.MOUSE_OVER_STR;j.type=a.MOUSE_OVER;break;default:j.typeStr=r.type,a.log_append_ln("Unknown event case 2: "+r.type),k=!0}if(k!==!0&&!(n===!1&&j.jqEvent.which!==1&&(j.type===a.MOUSE_DOWN||j.type===a.MOUSE_UP))){var k=j,o=!1;if(n===!0)switch(r.type){case "touchstart":h===0? (k.x=r.originalEvent.touches[0].pageX,k.y=r.originalEvent.touches[0].pageY,g.pageX=k.x,g.pageY=k.y,h=1,a.getDebugLevel()>=2&&a.log_append_ln("phase: 0, y: "+k.y)):o=!0;break;case "touchmove":h>0?(k.x=r.originalEvent.touches[0].pageX,k.y=r.originalEvent.touches[0].pageY,b.pageX=k.x,b.pageY=k.y,h=2,a.getDebugLevel()>=2&&a.log_append_ln("phase: 1 (touchmove), y: "+k.y)):o=!0;break;case "touchend":h===1?(k.x=g.pageX,k.y=g.pageY,h=0,a.getDebugLevel()>=2&&a.log_append_ln("phase: 1 (touchend), y: "+k.y)): h===2?(k.x=b.pageX,k.y=b.pageY,h=0,a.getDebugLevel()>=2&&a.log_append_ln("phase: 2, y: "+k.y)):o=!0}else k.x=r.pageX,k.y=r.pageY;k.x-=a.getLeftPos(this.ClickableDiv.handle);k.y-=a.getTopPos(this.ClickableDiv.handle);if(o!==!0){a.resetInactivity();lPoint=a.ME_teq2screenCoord(j.x,j.y);j.x=lPoint.x;j.y=lPoint.y;if(a.getDebugLevel()>=1){if(a.g_MouseDownEventInfo.ViewItem.SVGRootElmnt.id=="ScalingTag")a.g_MouseDownEventInfo.ViewItem.SVGRootElmnt=a.g_MouseDownEventInfo.ViewItem.SVGRootElmnt.firstElementChild; a.showMouseCirlce(this,j.x,j.y)}e===a.MOUSE_MOVE&&j.type===a.MOUSE_MOVE||a.getDebugLevel()>=2&&a.log_append_ln(j.typeStr);a.g_MouseDownEventInfo.ViewItem=this;switch(j.type){case a.MOUSE_OUT:if(a.g_MouseDownEventInfo.type===a.MOUSE_DOWN)a.getDebugLevel()>=2&&a.log_append_ln("sc.ME_mouseEventDispatcher Mouse Out with Pressed Button -> Simulate Mouse Up"),j.type=a.MOUSE_UP,j.typeStr=a.MOUSE_UP_STR,d(j);break;case a.MOUSE_OVER:c(j,a.g_MouseDownEventInfo);break;case a.MOUSE_DOWN:r=null;r=document.activeElement; document.hasFocus()&&(a.g_HTMLControlDropDownElmnt!==null&&a.g_HTMLControlDropDownElmnt===r?(a.g_HTMLControlDropDownElmnt.blur(),a.getDebugLevel()>=3&&a.log_append_ln(" sc.ME_mouseEventDispatcher sc.g_HTMLControlDropDownElmnt has focus so send him the blur()")):a.g_HTMLControlInputElmnt!==null&&a.g_HTMLControlInputElmnt===r?(a.g_HTMLControlInputElmnt.blur(),a.getDebugLevel()>=3&&a.log_append_ln(" sc.ME_mouseEventDispatcher sc.g_HTMLControlInputElmnt has focus so send him the blur()")):a.g_HTMLControlPwInputElement!== null&&a.g_HTMLControlPwInputElement===r?(a.g_HTMLControlPwInputElement.blur(),a.getDebugLevel()>=3&&a.log_append_ln(" sc.ME_mouseEventDispatcher sc.g_HTMLControlPwInputElement has focus so send him the blur()")):a.g_HTMLControlTextareaElmnt!==null&&a.g_HTMLControlTextareaElmnt===r?(a.g_HTMLControlTextareaElmnt.blur(),a.getDebugLevel()>=3&&a.log_append_ln(" sc.ME_mouseEventDispatcher sc.g_HTMLControlTextareaElmnt has focus so send him the blur()")):a.getDebugLevel()>=3&&(a.g_HTMLControlDropDownElmnt!== null?a.log_append_ln(" sc.ME_mouseEventDispatcher sc.g_HTMLControlDropDownElmnt not found!"):a.g_HTMLControlInputElmnt!==null?a.log_append_ln(" sc.ME_mouseEventDispatcher sc.g_HTMLControlInputElmnt not found!"):a.g_HTMLControlPwInputElement!==null?a.log_append_ln(" sc.ME_mouseEventDispatcher sc.g_HTMLControlPwInputElement not found!"):a.g_HTMLControlTextareaElmnt!==null&&a.log_append_ln(" sc.ME_mouseEventDispatcher sc.g_HTMLControlTextareaElmnt not found!")));c(j,a.g_MouseDownEventInfo);this.NotifyFunc(j.type, a.g_MouseDownEventInfo);a.scheduleRepaint();a.getDebugLevel()>=2&&console.log("Ready: MOUSE_DOWN");break;case a.MOUSE_UP:d(j);break;case a.MOUSE_MOVE:var k=0,k=a.g_MouseMoveNotificationList.length,o=0,o=j.x,u=j.y;a.getDebugLevel()>=2&&$("#SC_MouseMove").text(o+" "+u);c(j,a.g_MouseMoveEventInfo);for(o=k-1;o>=0;o--)if(a.g_MouseMoveNotificationList[o]!==void 0&&a.g_MouseMoveNotificationList[o].notify!==void 0&&(k=a.g_MouseMoveNotificationList[o].notify(j.type,a.g_MouseMoveEventInfo),k==1))break;a.g_MouseDragObject!== null&&a.g_MouseDragObject.onDrag!==null&&(r.preventDefault(),a.g_MouseDragObject.onDrag(a.g_MouseMoveEventInfo))}e=j.type}}}}};return a}(_SCIntern||{});_SCIntern=function(a){a.PainterType_Rectangle=function(h){this.base=a.PainterType_MPainter;this.base(h);this.typeDraw=function(){if(this.isFullPainterRedrawRequired()===!0){var g=0,b=0,f="",c="",d=0,e=0;this.checkIfInterior()===!0&&(g=1);this.checkIfOutline()===!0&&(b=1);this.getOutlineWidth();f="rgba("+this.getInteriorColor()+","+g+")";c="rgba("+this.getOutlineColor()+","+b+")";d=this.checkIfOutline()===!0?this.getOutlineWidth():this.getInnerFill()===!0?this.getOutlineWidth():0;e=this.getOutlineStyle(); if(this.frmElmnt!==null)a.removeSVG(this.frmElmnt),this.frmElmnt=null;switch(e){case a.SOLID:this.frmElmnt=a.createSVGRect(this.svgDoc,this.getMainGroupElement(),this.x,this.y,this.w,this.h,f,c,d);break;case a.DASHED:case a.DOTTED:this.frmElmnt=a.createSVGRectDashed(this.svgDoc,this.getMainGroupElement(),this.x,this.y,this.w,this.h,f,c,d,this.getInnerFill(),e);break;default:a.log_append_ln("ERROR PainterType_Rectangle Unknown outline style")}}}};a.PainterType_Rectangle.prototype=new a.PainterType_MPainter; return a}(_SCIntern||{});_SCIntern=function(a){a.sprintf=function(){function h(a,b,c,d){b=a.length>=b?"":Array(1+b-a.length>>>0).join(c);return d?a+b:b+a}function g(a,b,c,d,f){var g=d-a.length;g>0&&(a=c||!f?h(a,d," ",c):a.slice(0,b.length)+h("",g,"0",!0)+a.slice(b.length));return a}function b(a,b,c,d,f,o,u){a>>>=0;c=c&&a&&{2:"0b",8:"0",16:"0x"}[b]||"";a=c+h(a.toString(b),o||0,"0",!1);return g(a,c,d,f,u)}function f(a,b,c,d,f){d!==null&&(a=a.slice(0,d));return g(a,"",b,c,f)}var c=arguments,d=0;return c[d++].replace(a.sprintf.regex, function(a,n,r,j,k,o,u){k="";if(a=="%%")return"%";for(var p=!1,s="",q=!1,m=!1,t=0;r&&t-1?6:u=="d"?0:void 0;n=n?c[n.slice(0,-1)]:c[d++];switch(u){case "s":return f(String(n), p,j,o,q);case "c":return f(String.fromCharCode(+n),p,j,o,q);case "b":return b(n,2,m,p,j,o,q);case "o":return b(n,8,m,p,j,o,q);case "x":return b(n,16,m,p,j,o,q);case "X":return b(n,16,m,p,j,o,q).toUpperCase();case "u":return b(n,10,m,p,j,o,q);case "i":case "d":return a=parseInt(n,10),isNaN(a)!==!0&&(k=a<0?"-":s,n=k+h(String(Math.abs(a)),o,"0",!1)),g(n,k,p,j,q);case "e":case "E":case "f":case "F":case "g":case "G":return a=+n,k=a<0?"-":s,s=["toExponential","toFixed","toPrecision"]["efg".indexOf(u.toLowerCase())], u=["toString","toUpperCase"]["eEfFgG".indexOf(u)%2],n=k+Math.abs(a)[s](o),g(n,k,p,j,q)[u]();default:return a}})};a.sprintf.regex=/%%|%(\d+\$)?([-+#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;return a}(_SCIntern||{});_SCIntern=function(a){Date.ext={};Date.ext.util={};Date.prototype.strftimeUTCMode=!1;Date.ext.util.xPad=function(a,g,b){for(typeof b=="undefined"&&(b=10);parseInt(a,10)1;b/=10)a=g.toString()+a;return a.toString()};Date.prototype.locale="de-DE";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang)Date.prototype.locale=document.getElementsByTagName("html")[0].lang;Date.ext.locales={};Date.ext.locales.en={a:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),A:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","), b:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),B:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats= {a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(a){var g=a.getFullYear(), b=parseInt(Date.ext.formats.V(a),10),a=parseInt(Date.ext.formats.W(a),10);a>b?g++:a===0&&b>=52&&g--;return g},H:["getHours","0"],I:function(a){a=a.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(a){var g=a-new Date(""+a.getFullYear()+"/1/1 GMT");g+=a.getTimezoneOffset()*6E4;a=parseInt(g/6E4/60/24,10)+1;return Date.ext.util.xPad(a,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>= 12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){a=a.getDay();return a===0?7:a},U:function(a){var g=parseInt(Date.ext.formats.j(a),10),a=6-a.getDay(),g=parseInt((g+a)/7,10);return Date.ext.util.xPad(g,0)},V:function(a){var g=parseInt(Date.ext.formats.W(a),10),b=(new Date(""+a.getFullYear()+"/1/1")).getDay();g+=b>4||b<=1?0:1;g==53&&(new Date(""+a.getFullYear()+"/12/31")).getDay()<4?g=1:g===0&&(g=Date.ext.formats.V(new Date(""+(a.getFullYear()- 1)+"/12/31")));return Date.ext.util.xPad(g,0)},w:"getDay",W:function(a){var g=parseInt(Date.ext.formats.j(a),10),a=7-Date.ext.formats.u(a),g=parseInt((g+a)/7,10);return Date.ext.util.xPad(g,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(a){var a=a.getTimezoneOffset(),g=Date.ext.util.xPad(parseInt(Math.abs(a/60),10),0),b=Date.ext.util.xPad(a%60,0);return(a>0?"-":"+")+g+b},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(){return"%"}}; Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date);Date.ext.aggregates.Z=Date.ext.formats.Z(new Date);Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales))this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")in Date.ext.locales?this.locale.replace(/-[a-zA-Z]+$/,""):"en-GB";for(var g=this;a.match(/%[cDhnrRtTxXzZ]/);)a=a.replace(/%([cDhnrRtTxXzZ])/g, function(a,f){var c=Date.ext.aggregates[f];return c=="locale"?Date.ext.locales[g.locale][f]:c});a=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(a,f){var c=Date.ext.formats[f];return typeof c=="string"?g[c]():typeof c=="function"?c.call(g,g):typeof c=="object"&&typeof c[0]=="string"?Date.ext.util.xPad(g[c[0]](),c[1]):f});g=null;return a};return a}(_SCIntern||{});_SCIntern=function(a){a.PainterType_TextField=function(h){this.base=a.PainterType_MPainter;this.base(h);this.drawShape=a.drawRectShape;this.clearText=a.clearText;this.drawSourceText=a.drawSourceText;this.frmElmntOut=this.frmElmntInt=null;this.updateTextFieldSourceElement=function(g){var b=this.getOutlineWidth();this.getU3d()===!0&&(b+=2);(this.w<0||this.h<0)&&a.log_append_ln(" ERROR hmi_textfield this.w < 0 || this.h < 0");a.setSvgAttrC(g.e,"x",this.x+b);a.setSvgAttrC(g.e,"y",this.y+b);a.setSvgAttrC(g.e, "width",this.w-2*b);a.setSvgAttrC(g.e,"height",this.h-2*b);this.clearText(g);this.drawSourceText(g)};this.notify=function(g,b){var f=0;switch(g){case a.DRAW_OBJECT:this.editModeFlag===!1&&(this.instanceDraw&&this.instanceDraw(),this.genericDraw());break;case a.MOUSE_DOWN:if(a.OB_checkMouseCoordinates(this,b)===!0)if(this.instanceDisabled()===!1){var c=this.instanceValidDownAction(),d=this.instanceValidUpAction();if(c===!0||d===!0){b.consumedFlag=!0;b.consumedPainter=this;this.scheduleFullRedrawPainter(); if(c===!0)this.executeActionMouseDown(),b.actionExecutedFlag=!0;f=1}}else f=0;else f=0;break;case a.MOUSE_UP:b.consumedFlag===!0&&(a.OB_checkMouseCoordinates(this,a.g_MouseDownEventInfo)===!0?this.instanceDisabled()===!1?this.executeActionMouseUp&&this.executeActionMouseUp():a.getDebugLevel()>=2&&a.log_append_ln("hmi_textfield Disabled while down case"):a.getDebugLevel()>=2&&a.log_append_ln("hmi_textfield Undo case"),this.scheduleFullRedrawPainter());break;case a.ENTER:this.editModeFlag&&(this.leaveEditMode(!0), f=1);break;case a.ESCAPE:this.editModeFlag&&(this.leaveEditMode(!1),f=1);break;case a.REMOVE_SELECTION:this.editModeFlag&&(this.leaveEditMode(!0),f=1);break;case a.VIEW_LOST_FOCUS:this.editModeFlag&&(this.leaveEditMode(!1),f=1)}return f};this.drawRectShapeInterior=function(){var g=0,b=g="",f=this.getOutlineWidth(),c=this.getRepaintElement(this.frmOuterGroup),d=this.getRepaintElement(this.frmInnerGroup);if(this.checkIfInterior()===!0){for(g=1;c!=null&&c.hasChildNodes();)c.removeChild(c.firstChild); for(;d&&d.hasChildNodes();)d.removeChild(d.firstChild);g="rgba("+this.getInteriorColor()+","+g+")";b="rgba("+this.getOutlineColor()+",0)";this.bgElmnt=a.createSVGInOutRect(this.svgDoc,d,c,this.x,this.y,this.w,this.h,g,b,f,this.getInnerFill())}};this.drawRectShapeOutline=function(){var g=1,g="",b=this.getOutlineWidth(),f=0,g=this.checkIfOutline()===!0?1:0,g="rgba("+this.getOutlineColor()+","+g+")",f=this.getOutlineStyle();if(this.frmElmntOut!==null)a.removeSVG(this.frmElmntOut),this.frmElmntOut=null; this.frmElmntOut=null;switch(f){case a.SOLID:this.frmElmntOut=a.createSVGRect(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,null,g,b,this.getInnerFill());break;case a.DASHED:case a.DOTTED:this.frmElmntOut=a.createSVGRectDashed(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,null,g,b,this.getInnerFill(),f);break;default:a.log_append_ln("ERROR hmi_textfield Unknown outline style")}};this.typeDraw=function(){var g=null,g=0;if(this.isFullPainterRedrawRequired()=== !0){this.drawRectShapeInterior();if(this.frm3dElmnt!==null)a.removeSVG(this.frm3dElmnt),this.frm3dElmnt=null;if(this.getU3d()===!0)g=this.getOutlineWidth(),this.frm3dElmnt=a.createSVGRect_3dFrame_TextField(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,g);this.drawRectShapeOutline();g=this.getEditSource();g.name!==null?this.updateTextFieldSourceElement(g):this.clearText(g)}}};a.PainterType_TextField.prototype=new a.PainterType_MPainter;return a}(_SCIntern||{});_SCIntern=function(a){a.PainterType_Oval=function(h){function g(f){var c=a.getMPainterScreenCrd(b),d=c.w/2,e=c.h/2,g=c.x+d,h=c.y+e,e=Math.sqrt(d*d-e*e),d=g-e;g+=e;c=d+g-2*c.x;d=Math.sqrt(Math.pow(f.x-d,2)+Math.pow(f.y-h,2));d+=Math.sqrt(Math.pow(f.x-g,2)+Math.pow(f.y-h,2));return c>=d?!0:!1}var b=this;this.base=a.PainterType_MPainter;this.base(h);this.notify=function(b,c){var d=0;switch(b){case a.VIEW_GAIN_FOCUS:if(this.instanceDisabled()===!1&&this.onGainActionFunc)this.onGainActionFunc();break; case a.VIEW_LOST_FOCUS:if(this.instanceDisabled()===!1&&this.onLostActionFunc)this.onLostActionFunc();break;case a.DRAW_OBJECT:this.instanceDraw&&this.instanceDraw();this.genericDraw();break;case a.MOUSE_DOWN:if(a.OB_checkMouseCoordinates(this,c)===!0&&g(c)===!0&&this.instanceDisabled()===!1){var e=this.anyMouseDownExternalEventListener(),h=this.anyMouseUpExternalEventListener(),r=this.instanceValidDownAction(),j=this.instanceValidUpAction();if(r===!0||j===!0||e===!0||h===!0){c.consumedFlag=!0;c.consumedPainter= this;this.scheduleFullRedrawPainter();if(r===!0)this.executeActionMouseDown(),c.actionExecutedFlag=!0;if(e===!0)this.callExternalListener(b,c),c.actionExecutedFlag=!0;d=1}}break;case a.MOUSE_UP:c.consumedFlag===!0&&(a.OB_checkMouseCoordinates(this,c)===!0?g(c)===!0&&(this.instanceDisabled()===!1?(this.executeActionMouseUp&&this.executeActionMouseUp(),this.anyMouseUpExternalEventListener()&&this.callExternalListener(b,c)):a.getDebugLevel()>=2&&a.log_append_ln("hmi_circle Disabled while down case"), this.scheduleFullRedrawPainter()):(a.getDebugLevel()>=2&&a.log_append_ln("hmi_circle Undo case"),this.scheduleFullRedrawPainter()))}return d};this.typeDraw=function(){var b=0,c=1,d="",c="",e=this.getOutlineWidth(),g=0,d=d=0;if(this.isFullPainterRedrawRequired()===!0)this.checkIfInterior()===!0&&(b=1),c=this.checkIfOutline()===!0?1:0,d="rgba("+this.getInteriorColor()+","+b+")",c="rgba("+this.getOutlineColor()+","+c+")",g=this.getOutlineStyle(),this.frmElmnt!==null&&a.removeSVG(this.frmElmnt),this.frmElmnt= a.createSVGEllipseExt(this.svgDoc,this.getRepaintElement(this.frmGroup),this.x,this.y,this.w,this.h,d,c,e,this.getInnerFill()),g===a.DASHED?a.setSVGAttr(this.frmElmnt,"stroke-dasharray",e+" "+e):g===a.DOTTED&&(d=e*a.DASHRECT_LENGTH_MULT,a.setSVGAttr(this.frmElmnt,"stroke-dasharray",d+" "+e))}};a.PainterType_Oval.prototype=new a.PainterType_MPainter;return a}(_SCIntern||{});_SCIntern=function(a){a.OB_checkMousePolygonCoordinates=function(h,g){var b=!1;if(h&&g)if(h.x!==null&&h.y!==null&&h.w!==null&&h.h!==null&&h.svgDoc!==null){var f=a.getMPainterScreenCrd(h);g.x>=f.x&&g.y>=f.y&&g.xb&&(b=this.arrXOrg[f]);if(this.arrLen=== 2&&this.arrXOrg[0]===this.arrXOrg[1])this.arrX[1]=this.arrXOrg[1]+h.wOff,isNaN(this.arrX[1])===!0&&(a.log_append_ln("WARNING sc.applyPolyWOffset arrX[1] isNan so set to 0"),this.arrX[1]=0);else if(b!=g)for(f=0;fb&&(b=this.arrYOrg[f]);if(this.arrLen===2&&this.arrYOrg[0]===this.arrYOrg[1])this.arrY[1]=this.arrYOrg[1]+h.hOff,isNaN(this.arrY[1])===!0&&(a.log_append_ln("WARNING sc.applyPolyHOffset arrY[1] isNan so set to 0"),this.arrY[1]=0);else for(f=0;f=3){for(;c===0;){c=-1;for(g=0;gp)var s=k,q=o,k=u,o=p,u=s,p=q;if(!(j==o&&e==k)&&!(j<=o||j>p))if(e=(k-e)*(p-j)-(o-j)*(u- e),e=e>0?-1:e<0?1:0,c*=e,c===0)break}}d++}c==1&&(h=!0)}return h}var b=this;this.base=a.PainterType_MPainter;this.base(h);this.arrLen=0;this.arrX=[];this.arrY=[];this.arrXOrg=[];this.arrYOrg=[];this.applyPolyOffset=a.applyPolyOffset;this.applyPolyWOffset=a.applyPolyWOffset;this.applyPolyHOffset=a.applyPolyHOffset;this.applyXYOffset=a.applyXYOffset;this.notify=function(b,c){var d=0;switch(b){case a.VIEW_GAIN_FOCUS:if(this.instanceDisabled()===!1&&this.onGainActionFunc)this.onGainActionFunc();break; case a.VIEW_LOST_FOCUS:if(this.instanceDisabled()===!1&&this.onLostActionFunc)this.onLostActionFunc();break;case a.DRAW_OBJECT:this.instanceDraw&&this.instanceDraw();this.genericDraw();break;case a.MOUSE_DOWN:if(a.OB_checkMouseCoordinates(this,c)===!0&&g(c)===!0&&this.instanceDisabled()===!1){var e=this.anyMouseDownExternalEventListener(),h=this.anyMouseUpExternalEventListener(),r=this.instanceValidDownAction(),j=this.instanceValidUpAction();if(r===!0||j===!0||e===!0||h===!0){c.consumedFlag=!0;c.consumedPainter= this;this.scheduleFullRedrawPainter();if(r===!0)this.executeActionMouseDown(),c.actionExecutedFlag=!0;if(e===!0)this.callExternalListener(b,c),c.actionExecutedFlag=!0;d=1}}break;case a.MOUSE_UP:c.consumedFlag===!0&&a.OB_checkMouseCoordinates(this,c)===!0&&(g(c)===!0?this.instanceDisabled()===!1?(this.executeActionMouseUp&&this.executeActionMouseUp(),this.anyMouseUpExternalEventListener()&&this.callExternalListener(b,c)):a.getDebugLevel()>=2&&a.log_append_ln("hmi_polygon Disabled while down case"): a.getDebugLevel()>=2&&a.log_append_ln("hmi_polygon Undo case"),this.scheduleFullRedrawPainter())}return d};if(h.arrLen)this.arrLen=h.arrLen;if(h.arrX)this.arrXOrg=a.cloneArray(h.arrX),this.arrX=a.cloneArray(h.arrX);if(h.arrY)this.arrYOrg=a.cloneArray(h.arrY),this.arrY=a.cloneArray(h.arrY);this.typeDraw=function(){var b=0,c=1,d="",c="",e=this.getOutlineWidth(),g=0,d=d=0;if(this.isFullPainterRedrawRequired()===!0)this.applyPolyOffset(),this.checkIfInterior()===!0&&(b=1),c=this.checkIfOutline()===!0? 1:0,d="rgba("+this.getInteriorColor()+","+b+")",c="rgba("+this.getOutlineColor()+","+c+")",g=this.getOutlineStyle(),this.frmElmnt!==null&&a.removeSVG(this.frmElmnt),this.frmElmnt=a.createSVGPolygon(this.svgDoc,this.getRepaintElement(this.frmGroup),this.arrX,this.arrY,c,e,d),g===a.DASHED?a.setSVGAttr(this.frmElmnt,"stroke-dasharray",e+" "+e):g===a.DOTTED&&(d=e*a.DASHRECT_LENGTH_MULT,a.setSVGAttr(this.frmElmnt,"stroke-dasharray",d+" "+e))}};a.PainterType_Polygon.prototype=new a.PainterType_MPainter; return a}(_SCIntern||{});_SCIntern=function(a){function h(a){a=a.trim();a=parseInt(a,0).toString(16);a=a.trim();return a.length==1?"0"+a:a}var g=function(){var a=1;return function(){return a++}}();a.PainterType_Polyline=function(b){this.base=a.PainterType_MPainter;this.base(b);var f=new a.InfoType;this.arrLen=0;this.arrX=[];this.arrY=[];this.arrXOrg=[];this.arrYOrg=[];this.applyPolyOffset=a.applyPolyOffset;this.applyPolyWOffset=a.applyPolyWOffset;this.applyPolyHOffset=a.applyPolyHOffset;this.applyXYOffset=a.applyXYOffset; this.setEnd=function(a){if(a!==void 0&&(this.updateSrcExt(f,a,{ppo:null}),f.value!==f.valuePrev))f.valuePrev=f.value,this.scheduleFullRedrawPainter()};if(b.arrLen)this.arrLen=b.arrLen;if(b.arrX)this.arrXOrg=a.cloneArray(b.arrX),this.arrX=a.cloneArray(b.arrX);if(b.arrY)this.arrYOrg=a.cloneArray(b.arrY),this.arrY=a.cloneArray(b.arrY);this.typeDraw=function(){var b=0,d=1,e="",n="",r=this.getOutlineWidth(),j=d=0,j=0,j="polyline_",d=g(),k="ArrowL_",o="ArrowR_",u,p,s,q="0,0,",m=1;u=p=0;j+=d.toString(); k+=j;o+=j;if(this.isFullPainterRedrawRequired()===!0){this.applyPolyOffset();this.checkIfInterior()===!0&&(b=1);d=this.checkIfOutline()===!0?1:0;e="rgba("+this.getInteriorColor()+","+b+")";n="rgba("+this.getOutlineColor()+","+d+")";d=this.getOutlineStyle();if(this.frmElmnt!==null)a.removeSVG(this.frmElmnt),this.frmElmnt=null;m=this.getOutlineColor().split(",");m.length>2&&(s="#"+h(m[0])+h(m[1])+h(m[2]));b=this.svgDoc.getElementsByTagName("defs");r>4?(m=(r+6)/5,u=11*m,q+=parseInt(15*m,0)+","+parseInt(u, 0),p=this.svgDoc.createElementNS(a.SvgNs,"path"),p.setAttribute("d","M0,5 L14,10 L14,0 Z"),p.setAttribute("style","fill:"+s+";"),u=this.svgDoc.createElementNS(a.SvgNs,"marker"),u.setAttribute("id",k),u.setAttribute("preserveAspectRatio","xMinYMin meet"),u.setAttribute("viewBox",q),u.setAttribute("markerWidth","15"),u.setAttribute("markerHeight","11"),u.setAttribute("refX","14"),u.setAttribute("refY","5"),u.setAttribute("orient","auto"),u.appendChild(p),b[0].appendChild(u),arrowRpath=this.svgDoc.createElementNS(a.SvgNs, "path"),arrowRpath.setAttribute("d","M0,0 L0,10 L14,5 Z"),arrowRpath.setAttribute("style","fill:"+s+";"),s=this.svgDoc.createElementNS(a.SvgNs,"marker"),s.setAttribute("id",o),s.setAttribute("preserveAspectRatio","xMinYMin meet"),s.setAttribute("viewBox",q),s.setAttribute("markerWidth","15"),s.setAttribute("markerHeight","11"),s.setAttribute("refX","0"),s.setAttribute("refY","5"),s.setAttribute("orient","auto")):(m=1,u=11*m,q+=parseInt(15*m,0)+","+parseInt(u,0),p=this.svgDoc.createElementNS(a.SvgNs, "path"),p.setAttribute("d","M0,5 L14,10 L14,0 Z"),p.setAttribute("style","fill:"+s+";"),u=this.svgDoc.createElementNS(a.SvgNs,"marker"),u.setAttribute("id",k),u.setAttribute("preserveAspectRatio","xMinYMin meet"),u.setAttribute("viewBox",q),u.setAttribute("markerWidth","15"),u.setAttribute("markerHeight","11"),u.setAttribute("refX","14"),u.setAttribute("refY","5"),u.setAttribute("orient","auto"),u.setAttribute("markerUnits","userSpaceOnUse"),u.appendChild(p),b[0].appendChild(u),arrowRpath=this.svgDoc.createElementNS(a.SvgNs, "path"),arrowRpath.setAttribute("d","M0,0 L0,10 L14,5 Z"),arrowRpath.setAttribute("style","fill:"+s+";"),s=this.svgDoc.createElementNS(a.SvgNs,"marker"),s.setAttribute("id",o),s.setAttribute("preserveAspectRatio","xMinYMin meet"),s.setAttribute("viewBox",q),s.setAttribute("markerWidth","15"),s.setAttribute("markerHeight","11"),s.setAttribute("refX","0"),s.setAttribute("refY","5"),s.setAttribute("orient","auto"),s.setAttribute("markerUnits","userSpaceOnUse"));s.appendChild(arrowRpath);b[0].appendChild(s); p=Math.atan2(this.arrX[1]-this.arrX[0],this.arrY[1]-this.arrY[0]);u=Math.atan2(this.arrX[this.arrLen-1]-this.arrX[this.arrLen-2],this.arrY[this.arrLen-1]-this.arrY[this.arrLen-2]);s=Math.sin(p)*15*m;q=Math.cos(p)*11*m;b=Math.sin(u)*15*m;m*=Math.cos(u)*11;switch(a.atoi(f.value)){case 1:this.arrX[0]+=s;this.arrY[0]+=q;break;case 2:this.arrX[this.arrLen-1]-=b;this.arrY[this.arrLen-1]-=m;break;case 3:this.arrX[0]+=s,this.arrY[0]+=q,this.arrX[this.arrLen-1]-=b,this.arrY[this.arrLen-1]-=m}this.frmElmnt= a.createSVGPolyline(this.svgDoc,this.getRepaintElement(this.frmGroup),this.arrX,this.arrY,this.arrLen,e,n,r);k="url(#"+k+")";o="url(#"+o+")";a.setSVGAttr(this.frmElmnt,"id",j);switch(a.atoi(f.value)){case 1:a.setSVGAttr(this.frmElmnt,"marker-start",k);break;case 2:a.setSVGAttr(this.frmElmnt,"marker-end",o);break;case 3:a.setSVGAttr(this.frmElmnt,"marker-start",k),a.setSVGAttr(this.frmElmnt,"marker-end",o)}d===a.DOTTED?a.setSVGAttr(this.frmElmnt,"stroke-dasharray",r+" "+r):d===a.DASHED&&(j=r*a.DASHRECT_LENGTH_MULT, a.setSVGAttr(this.frmElmnt,"stroke-dasharray",j+" "+j))}}};a.PainterType_Polyline.prototype=new a.PainterType_MPainter;return a}(_SCIntern||{});_SCIntern=function(a){function h(a,b){var d=0;return d=(new Date(a,b,1)).getDay()}function g(f){return b(18,f,!a.SpecialCO.mbTmzEn,"MB_LocalDateTime",!0)}function b(b,c,d,e){var g=1970,h=70,j=1,k=1,o=0,u=0,p=0,s=0,q="",m=0,t="";d===!0?(g=c.getUTCFullYear(),h=g-2E3,j=c.getUTCMonth()+1,k=c.getUTCDate(),o=c.getUTCHours(),u=c.getUTCMinutes(),p=c.getUTCSeconds(),s=c.getUTCMilliseconds()):(g=c.getFullYear(),h=g-2E3,j=c.getMonth()+1,k=c.getDate(),o=c.getHours(),u=c.getMinutes(),p=c.getSeconds(),s=c.getMilliseconds()); q=o>=12?"PM":"AM";m=o;m%=12;b!==24&&(j<10&&(j="0"+j),k<10&&(k="0"+k),o<10&&(o="0"+o),u<10&&(u="0"+u),p<10&&(p="0"+p));if(a.stringcmp("MB_LocalDateTime",e))switch(b){case 0:t=k+"."+j+"."+g+" "+o+":"+u+":"+p;break;case 1:t=g+"."+j+"."+k+" "+m+":"+u+":"+p+" "+q;break;case 2:t=k+"."+j+"."+h+" "+o+":"+u+":"+p;break;case 3:t=h+"."+j+"."+k+" "+m+":"+u+":"+p+" "+q;break;case 4:t=k+"-"+j+"-"+g+" "+o+":"+u+":"+p;break;case 5:t=g+"-"+j+"-"+k+" "+o+":"+u+":"+p;break;case 6:t=k+"-"+j+"-"+h+" "+o+":"+u+":"+p;break; case 7:t=h+"-"+j+"-"+k+" "+o+":"+u+":"+p;break;case 8:t=k+"/"+j+"/"+g+" "+o+":"+u+":"+p;break;case 9:t=g+"/"+j+"/"+k+" "+o+":"+u+":"+p;break;case 10:t=k+"/"+j+"/"+h+" "+o+":"+u+":"+p;break;case 11:t=h+"/"+j+"/"+k+" "+o+":"+u+":"+p;break;case 12:t=j+"/"+k+"/"+g+" "+m+":"+u+":"+p+" "+q;break;case 13:t=j+"/"+k+"/"+h+" "+m+":"+u+":"+p+" "+q;break;case 14:t=k+"."+j+"."+g+" "+o+":"+u;break;case 15:t=k+"."+j+"."+g;break;case 16:t=k+"."+j+"."+g+" "+o+":"+u;break;case 17:t=k+"."+j+"."+h;break;case 18:t=o+ ":"+u+":"+p;break;case 19:t=m+":"+u+":"+p+" "+q;break;case 20:t=o+":"+u;break;case 21:t=m+":"+u+" "+q;break;case 22:s>0&&(t=a.pad(s,3),t="."+t);t=o+":"+u+":"+p+t;break;case 23:s>0&&(t=a.pad(s,3),t="."+t);t="TOD#"+o+":"+u+":"+p+t;break;case 24:t="T#";u+=o*60;u>0&&(t+=u+"m");t+=p+"s";t+=s+"ms";break;case 25:t=k+"-"+j+"-"+g;break;case 26:t="D#"+g+"-"+j+"-"+k;break;case 27:t="D#"+g+"-"+j+"-"+k+" "+o+":"+u+":"+p;break;default:t=""}else if(a.stringcmp(a.SpecialCO.dateLocalNow.name,e))switch(b){case 0:t= k+"."+j+"."+g;break;case 1:t=g+"."+j+"."+k;break;case 2:t=k+"."+j+"."+h;break;case 3:t=h+"."+j+"."+k;break;case 4:t=k+"-"+j+"-"+g;break;case 5:t=g+"-"+j+"-"+k;break;case 6:t=k+"-"+j+"-"+h;break;case 7:t=h+"-"+j+"-"+k;break;case 8:t=k+"/"+j+"/"+g;break;case 9:t=g+"/"+j+"/"+k;break;case 10:t=k+"/"+j+"/"+h;break;case 11:t=h+"/"+j+"/"+k;break;case 12:t=j+"/"+k+"/"+g;break;case 13:t=j+"/"+k+"/"+h;break;case 14:t=k+"."+j+"."+g;break;case 15:t=k+"."+j+"."+g;break;case 16:t=k+"."+j+"."+g;break;case 17:t= k+"."+j+"."+h;break;case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:t="";break;default:t=""}else if(a.stringcmp(a.SpecialCO.timeLocalNow.name,e))switch(b){case 0:t=o+":"+u+":"+p;break;case 1:t=m+":"+u+":"+p+" "+q;break;case 2:t=o+":"+u+":"+p;break;case 3:t=m+":"+u+":"+p+" "+q;break;case 4:t=o+":"+u+":"+p;break;case 5:t=o+":"+u+":"+p;break;case 6:t=o+":"+u+":"+p;break;case 7:t=o+":"+u+":"+p;break;case 8:t=o+":"+u+":"+p;break;case 9:t=o+":"+u+":"+p;break;case 10:t=o+ ":"+u+":"+p;break;case 11:t=o+":"+u+":"+p;break;case 12:t=m+":"+u+":"+p+" "+q;break;case 13:t=m+":"+u+":"+p+" "+q;break;case 14:t=o+":"+u;break;case 15:t="";break;case 16:t=o+":"+u;break;case 17:t="";break;case 18:t=o+":"+u+":"+p;break;case 19:t=m+":"+u+":"+p+" "+q;break;case 20:t=o+":"+u;break;case 21:t=m+":"+u+" "+q;break;case 22:case 23:case 24:case 25:case 26:case 27:t="";break;default:t=""}return t}a.mb_calendarReadVal=function(b,c){var d=0,d=a.strstr(b,"_INDCO."),e="",g="",r=0,j=1970;d?a.prefixcmp("daysInMonth", b)||a.prefixcmp("Wday1InMonth",b)?(a.strlen(d)<18&&(g=a.sprintf("MB_Calendar.month%s",d),e=a.directReadContainer(g),e!==a.CONTAINER_INITIAL_VALUE&&(r=a.atoi(e)),g=a.sprintf("MB_Calendar.year%s",d),e=a.directReadContainer(g),e!==a.CONTAINER_INITIAL_VALUE&&(j=a.atoi(e))),a.prefixcmp("daysInMonth",b)?e=a.sprintf("%d",(new Date(j,r,0)).getDate()):a.prefixcmp("Wday1InMonth",b)&&(e="0",j>=1970&&j<=2100&&(e=a.sprintf("%d",h(j,r)))),d=1):d=0:d=0;d===0&&(e=a.directReadContainer(c));return e};a.mb_calendarWriteVal= function(b,c){var d=0,e=a.strstr(b,"_INDCO."),h=0,r=null,j=null,k=r=h=0,o=j="",u=0,p,s=0,j=null;if(e)if(a.prefixcmp("timestamp",b)&&a.strlen(e)<18&&a.getDebugLevel()>=2&&a.log_append_ln("calendar timetamp: '"+c+"'"),a.prefixcmp("action",b)&&a.strlen(e)<18){if(a.stringcmp(c,"SET_TS"))j=a.sprintf("MB_Calendar.time%s",e),o=a.directReadContainer(j),o!==a.CONTAINER_INITIAL_VALUE&&(j=/^(\d*):(\d*):(\d*)/.exec(o),j!==null&&(s=parseInt(j[1],10),p=parseInt(j[2],10),u=parseInt(j[3],10))),j=a.sprintf("MB_Calendar.day%s", e),o=a.directReadContainer(j),o!==a.CONTAINER_INITIAL_VALUE&&(k=a.atoi(o)),j=a.sprintf("MB_Calendar.month%s",e),o=a.directReadContainer(j),o!==a.CONTAINER_INITIAL_VALUE&&(r=a.atoi(o)),j=a.sprintf("MB_Calendar.year%s",e),o=a.directReadContainer(j),o!==a.CONTAINER_INITIAL_VALUE&&(h=a.atoi(o)),a.SpecialCO.mbTmzEn.value===1?(j=new Date(h,r,k,s,p,u,0),h=j.getTime()/1E3):h=Date.UTC(h,r,k,s,p,u,0)/1E3,j=a.sprintf("MB_Calendar.timestamp%s",e),o=a.sprintf("%i",h),a.directWriteContainer(j,o);else if(a.stringcmp(c, "GET_TS"))h=0,j=a.sprintf("MB_Calendar.timestamp%s",e),o=a.directReadContainer(j),o!==a.CONTAINER_INITIAL_VALUE&&(h=a.atoi(o)),r=new Date(0),a.SpecialCO.mbTmzEn.value===1?r.setUTCSeconds(h):r.setSeconds(h),r&&(j=a.sprintf("MB_Calendar.day%s",e),o=a.sprintf("%d",r.getDate()),a.directWriteContainer(j,o),j=a.sprintf("MB_Calendar.month%s",e),o=a.sprintf("%d",r.getMonth()),a.directWriteContainer(j,o),j=a.sprintf("MB_Calendar.year%s",e),o=a.sprintf("%d",r.getFullYear()),a.directWriteContainer(j,o),j=a.sprintf("MB_Calendar.time%s", e),o=g(r),a.directWriteContainer(j,o));else if(a.stringcmp(c,"GET_DATETIME")&&(r=new Date))j=a.sprintf("MB_Calendar.day%s",e),o=a.sprintf("%d",r.getDate()),a.directWriteContainer(j,o),j=a.sprintf("MB_Calendar.month%s",e),o=a.sprintf("%d",r.getMonth()),a.directWriteContainer(j,o),j=a.sprintf("MB_Calendar.year%s",e),o=a.sprintf("%d",r.getFullYear()),a.directWriteContainer(j,o),j=a.sprintf("MB_Calendar.time%s",e),o=g(r),a.directWriteContainer(j,o);d=1}else d=0,(a.prefixcmp("day_",b)||a.prefixcmp("month_", b)||a.prefixcmp("year_",b)||a.prefixcmp("time_",b)||a.prefixcmp("timestamp_",b))&&a.scheduleRepaint();d==1&&a.scheduleRepaint();return d};a.executeCalendarAction=function(b,c){a.getDebugLevel()>=2&&a.log_append_ln("executeCalendarAction name: "+b+"value: "+c)};a.DateTime_ReadDT=function(f,c,d,e,g,h){var j=0,k="";if(f===null||c===null)return k;j=parseInt(f,10);if(isNaN(j)===!0)return k;if(g!==null){var f="",f=1970,o=70,e=c=1,u=0,p=0,s=0,q=0,k="",m=null,t=o=o=0,v=0,x,w=null;switch(j){case 0:m=/^(\d*)\.(\d*)\.(\d*)\s(\d*):(\d*):(\d*)/.exec(g); m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),f=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10));break;case 1:m=/^(\d*)\.(\d*)\.(\d*)\s(\d*):(\d*):(\d*)\s(\w*)/.exec(g);m!==null&&(f=parseInt(m[1],10),c=parseInt(m[2],10),e=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10),k=m[7]);break;case 2:m=/^(\d*)\.(\d*)\.(\d*)\s(\d*):(\d*):(\d*)/.exec(g);m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),o=parseInt(m[3],10),u=parseInt(m[4],10),p= parseInt(m[5],10),s=parseInt(m[6],10),f=o+2E3);break;case 3:m=/^(\d*)\.(\d*)\.(\d*)\s(\d*):(\d*):(\d*)\s(\w*)/.exec(g);m!==null&&(o=parseInt(m[1],10),c=parseInt(m[2],10),e=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10),k=m[7],f=o+2E3);break;case 4:m=/^(\d*)-(\d*)-(\d*)\s(\d*):(\d*):(\d*)/.exec(g);m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),f=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10));break;case 5:m=/^(\d*)-(\d*)-(\d*)\s(\d*):(\d*):(\d*)/.exec(g); m!==null&&(f=parseInt(m[1],10),c=parseInt(m[2],10),e=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10));break;case 6:m=/^(\d*)-(\d*)-(\d*)\s(\d*):(\d*):(\d*)/.exec(g);m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),o=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10),f=o+2E3);break;case 7:m=/^(\d*)-(\d*)-(\d*)\s(\d*):(\d*):(\d*)/.exec(g);m!==null&&(o=parseInt(m[1],10),c=parseInt(m[2],10),e=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5], 10),s=parseInt(m[6],10),f=o+2E3);break;case 8:m=/^(\d*)\/(\d*)\/(\d*)\s(\d*):(\d*):(\d*)/.exec(g);m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),f=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10));break;case 9:m=/^(\d*)\/(\d*)\/(\d*)\s(\d*):(\d*):(\d*)/.exec(g);m!==null&&(f=parseInt(m[1],10),c=parseInt(m[2],10),e=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10));break;case 10:m=/^(\d*)\/(\d*)\/(\d*)\s(\d*):(\d*):(\d*)/.exec(g);m!==null&& (e=parseInt(m[1],10),c=parseInt(m[2],10),o=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10),f=o+2E3);break;case 11:m=/^(\d*)\/(\d*)\/(\d*)\s(\d*):(\d*):(\d*)/.exec(g);m!==null&&(o=parseInt(m[1],10),c=parseInt(m[2],10),e=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10),f=o+2E3);break;case 12:m=/^(\d*)\/(\d*)\/(\d*)\s(\d*):(\d*):(\d*)\s(\w*)/.exec(g);m!==null&&(c=parseInt(m[1],10),e=parseInt(m[2],10),f=parseInt(m[3],10),u=parseInt(m[4],10),p= parseInt(m[5],10),s=parseInt(m[6],10),k=m[7]);break;case 13:m=/^(\d*)\/(\d*)\/(\d*)\s(\d*):(\d*):(\d*)\s(\w*)/.exec(g);m!==null&&(c=parseInt(m[1],10),e=parseInt(m[2],10),o=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10),k=m[7],f=o+2E3);break;case 14:m=/^(\d*)\.(\d*)\.(\d*)\s(\d*):(\d*)/.exec(g);m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),f=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10));break;case 15:m=/^(\d*)\.(\d*)\.(\d*)/.exec(g);m!==null&&(e=parseInt(m[1], 10),c=parseInt(m[2],10),f=parseInt(m[3],10));break;case 16:m=/^(\d*)\.(\d*)\.(\d*)\s(\d*):(\d*)/.exec(g);m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),o=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),f=o+2E3);break;case 17:m=/^(\d*)\.(\d*)\.(\d*)/.exec(g);m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),o=parseInt(m[3],10),f=o+2E3);break;case 18:m=/^(\d*):(\d*):(\d*)/.exec(g);m!==null&&(u=parseInt(m[1],10),p=parseInt(m[2],10),s=parseInt(m[3],10));break;case 19:m=/^(\d*):(\d*):(\d*)\s(\w*)/.exec(g); m!==null&&(u=parseInt(m[1],10),p=parseInt(m[2],10),s=parseInt(m[3],10),k=m[4]);break;case 20:m=/^(\d*):(\d*)/.exec(g);m!==null&&(u=parseInt(m[1],10),p=parseInt(m[2],10));break;case 21:m=/^(\d*):(\d*)\s(\w*)/.exec(g);m!==null&&(u=parseInt(m[1],10),p=parseInt(m[2],10),k=m[3]);break;case 22:m=/^(\d*):(\d*):(\d*)\.?(\d*)?/.exec(g);if(m!==null&&(u=parseInt(m[1],10),p=parseInt(m[2],10),s=parseInt(m[3],10),m.length>3&&m[4]!==void 0)){for(;m[4].length<3;)m[4]+="0";q=parseInt(m[4],10)}break;case 23:m=/^TOD#(\d*):(\d*):(\d*)\.?(\d*)?/.exec(g); if(m!==null&&(u=parseInt(m[1],10),p=parseInt(m[2],10),s=parseInt(m[3],10),m.length>3&&m[4]!==void 0)){for(;m[4].length<3;)m[4]+="0";q=parseInt(m[4],10)}break;case 24:g=m=g;j=0;u=g.length;for(p=0;j<=u;){if(isNaN(g[j])===!1){for(p=a.atoi(g.substring(j,u));isNaN(g[j])===!1;)j++;g[j]=="s"?o=p:g[j]=="m"&&g[j+1]!="s"?t=p:g[j]=="m"&&g[j+1]=="s"?(x=p,j++):g[j]=="h"&&(v=p)}j++}u=v;p=t;s=o;q=x;break;case 25:m=/^(\d*)-(\d*)-(\d*)/.exec(g);m!==null&&(e=parseInt(m[1],10),c=parseInt(m[2],10),f=parseInt(m[3],10)); break;case 26:m=/^D#(\d*)-(\d*)-(\d*)/.exec(g);m!==null&&(f=parseInt(m[1],10),c=parseInt(m[2],10),e=parseInt(m[3],10));break;case 27:m=/^D#(\d*)-(\d*)-(\d*) (\d*):(\d*):(\d*)/.exec(g),m!==null&&(f=parseInt(m[1],10),c=parseInt(m[2],10),e=parseInt(m[3],10),u=parseInt(m[4],10),p=parseInt(m[5],10),s=parseInt(m[6],10))}m!==null?(a.stringcmp(k,"PM")&&(u+=12),d===!0?o=Date.UTC(f,c-1,e,u,p,s,q):(w=new Date(f,c-1,e,u,p,s,q),o=w.getTime()),h&&(o/=1E3),f=a.toFixed(o,0)):f="";k=f}else{if(c==a.SpecialCO.dateTimeLocalNow.name|| c==a.SpecialCO.dateLocalNow.name||c==a.SpecialCO.timeLocalNow.name)e===null&&(e=new Date);if(e===null)return a.err_append_ln("No date obj given!"),"";k=b(j,e,d,c,h)}return k};return a}(_SCIntern||{});_SCIntern=function(a){var h,g,b;a.BACnet_Alarming=function(b){this.TextFlags={id:!1,instance:!1,type:!1,from:!1,to:!1};this.readTextFlags=function(){var c="",c=parseInt(a.ReadContainer(b.co.AlarmTextExtraParam10.name),10);if(isNaN(c)===!1)this.TextFlags.id=c>0?!0:!1;c=parseInt(a.ReadContainer(b.co.AlarmTextExtraParam20.name),10);if(isNaN(c)===!1)this.TextFlags.instance=c>0?!0:!1;c=parseInt(a.ReadContainer(b.co.AlarmTextExtraParam30.name),10);if(isNaN(c)===!1)this.TextFlags.type=c>0?!0:!1;c=parseInt(a.ReadContainer(b.co.AlarmTextExtraParam40.name), 10);if(isNaN(c)===!1)this.TextFlags.from=c>0?!0:!1;c=parseInt(a.ReadContainer(b.co.AlarmTextExtraParam50.name),10);if(isNaN(c)===!1)this.TextFlags.to=c>0?!0:!1};this.readTextFlags();a.getDebugLevel()>=2&&a.log_append_ln("BACnet instance created")};a.BACnet_HisLineType=function(b,c,d){var e=!1,g=parseInt(d.Version.value,10);isNaN(g)===!0&&(g=1);var h=parseInt(d.ColorMode.value,10);isNaN(h)===!0&&(h=0);this.setStateColor=function(b){if(b===void 0||b.length<=0)b="255,255,255";this.color=a.FVCOLUMNBACKGROUNDCOLORSPECSTARTSTR+ b+"#"};this.setStateColor(d.StateNoStateColor.value);this.itemId=parseInt(b[0],10);if(isNaN(this.itemId)===!0)this.itemId=b[0];this.typeId=parseInt(b[1],10);if(isNaN(this.typeId)===!0)this.typeId=b[1];this.TID_HtmlTag=c+"_"+this.typeId;if(g>=20&&a.Link.SrvInfo_ALR2Activ){this.Grp1=parseInt(b[2],10);if(isNaN(this.Grp1)===!0)this.Grp1=b[2];this.Grp1_HtmlTag=c+"_GRP1_"+this.Grp1;this.Grp2=parseInt(b[3],10);if(isNaN(this.Grp2)===!0)this.Grp2=b[3];this.Grp2_HtmlTag=c+"_GRP2_"+this.Grp2;this.Grp3=parseInt(b[4], 10);if(isNaN(this.Grp3)===!0)this.Grp3=b[4];this.Grp3_HtmlTag=c+"_GRP3_"+this.Grp3;this.Prio=parseInt(b[5],10);if(isNaN(this.Prio)===!0)this.Prio=b[5];this.Prio_HtmlTag=c+"_PRIO_"+this.Prio;var j=parseInt(b[6],16);isNaN(j)===!0&&(j=0);var k=parseInt(b[7],16);isNaN(k)===!0&&(k=0);this.on=1E3*j+k;j=parseInt(b[8],16);isNaN(j)===!0&&(j=0);k=parseInt(b[9],16);isNaN(k)===!0&&(k=0);this.off=1E3*j+k;this.on>0&&this.off<=0&&(e=!0);this.state=parseInt(b[10],10);if(isNaN(this.state))this.state=b[10];if(this.state=== 0)this.state="NAK",h===0&&(e===!0?this.setStateColor(d.StateOnNackedColor.value):this.setStateColor(d.StateOffNackedColor.value));else if(this.state==1)this.state="ACK",h===0&&(e===!0?this.setStateColor(d.StateOnAckedColor.value):this.setStateColor(d.StateOffAckedColor.value));if(g>=22&&a.Link.SrvInfo_ALR2Activ&&a.Link.SrvInfo_ALR2Version>=2.01){this.Grp4=parseInt(b[11],10);if(isNaN(this.Grp4)===!0)this.Grp4=b[11];this.Grp4_HtmlTag=c+"_GRP4_"+this.Grp4;this.Grp5=parseInt(b[12],10);if(isNaN(this.Grp5)=== !0)this.Grp5=b[12];this.Grp5_HtmlTag=c+"_GRP5_"+this.Grp5;this.Grp6=parseInt(b[13],10);if(isNaN(this.Grp6)===!0)this.Grp6=b[13];this.Grp6_HtmlTag=c+"_GRP6_"+this.Grp6;this.Grp7=parseInt(b[14],10);if(isNaN(this.Grp7)===!0)this.Grp7=b[14];this.Grp7_HtmlTag=c+"_GRP7_"+this.Grp7;this.Grp8=parseInt(b[15],10);if(isNaN(this.Grp8)===!0)this.Grp8=b[15];this.Grp8_HtmlTag=c+"_GRP8_"+this.Grp8;this.Grp9=parseInt(b[16],10);if(isNaN(this.Grp9)===!0)this.Grp9=b[16];this.Grp9_HtmlTag=c+"_GRP9_"+this.Grp9;this.Grp10= parseInt(b[17],10);if(isNaN(this.Grp10)===!0)this.Grp10=b[17];this.Grp10_HtmlTag=c+"_GRP10_"+this.Grp10;this.AlrTxt=b[18]}c="";h==1&&this.Grp1>=0?(c=d.AlrCoPrefix.name+"Grp1Color["+this.Grp1+"]."+d.AlrCoIndex.name,this.setStateColor(a.RW_readSource(a.INFO_T_CONTAINER,c))):h==2&&this.Grp2>=0?(c=d.AlrCoPrefix.name+"Grp2Color["+this.Grp2+"]."+d.AlrCoIndex.name,this.setStateColor(a.RW_readSource(a.INFO_T_CONTAINER,c))):h==3&&this.Grp3>=0?(c=d.AlrCoPrefix.name+"Grp3Color["+this.Grp3+"]."+d.AlrCoIndex.name, this.setStateColor(a.RW_readSource(a.INFO_T_CONTAINER,c))):h==4&&this.Prio>=0&&(c=d.AlrCoPrefix.name+"PrioColor["+this.Prio+"]."+d.AlrCoIndex.name,this.setStateColor(a.RW_readSource(a.INFO_T_CONTAINER,c)))}else{this.on=parseInt(b[2],16);this.off=parseInt(b[3],16);this.on!==0&&this.off===0&&(e=!0);this.state=parseInt(b[4],10);if(isNaN(this.state))this.state=b[4];if(this.state===0)this.state="NAK",e===!0?this.setStateColor(d.StateOnNackedColor.value):this.setStateColor(d.StateOffNackedColor.value); else if(this.state==1)this.state="ACK",e===!0?this.setStateColor(d.StateOnAckedColor.value):this.setStateColor(d.StateOffAckedColor.value)}this.BACnetEvent={typeId:0,instance:0,type:0,from:0,to:0,description:""};this.BACnetEvent.typeId=parseInt(b[6],10);this.BACnetEvent.instance=parseInt(b[7],10);this.BACnetEvent.type=parseInt(b[8],10);this.BACnetEvent.from=parseInt(b[9],10);this.BACnetEvent.to=parseInt(b[10],10);this.BACnetEvent.description=b[11];(isNaN(this.BACnetEvent.typeId)===!0||isNaN(this.BACnetEvent.instance)=== !0||isNaN(this.BACnetEvent.type)===!0||isNaN(this.BACnetEvent.from)===!0||isNaN(this.BACnetEvent.to)===!0)&&a.err_append_ln("BACnet_HisLineType error invalid IDs");if(this.state===0)this.state="NAK",e===!0?this.setStateColor(d.StateOnNackedColor.value):this.setStateColor(d.StateOffNackedColor.value);else if(this.state==1)this.state="ACK",e===!0?this.setStateColor(d.StateOnAckedColor.value):this.setStateColor(d.StateOffAckedColor.value)};h="Analog Input,Analog Output,Analog Value,Binary Input,Binary Output,Binary Value,Calendar,Command,Device,Event Enrollment,File,Group,Loop,Multi State Input,Multi State Output,Notification Class,Program,Schedule,Averaging,Multi State Value,Trend Log,Life Safety Point,Life Safety Zone,Accumulator,Pulse Converter,Event Log,Global Group,Trendlog Multiple,Load Control,Structured View".split(","); g="Change Of Bit String,Change Of State,Change Of Value,Command Failure,Floating Limit,Out Of Range,Complex Event Type,Deprecated,Change Of Life Safety,Enumeration,Buffer Ready,Unsigned Range".split(",");b="State Normal,Fault,Off Normal,High Limit,Low Limit,Life Safety Alarm".split(",");a.BACnet_generateHistoryAlarmContainerValue=function(f,c){var d=0,e="";if(f.rArrayHistory===null)return"";for(d=0;d0)r=n.BACnetEvent.description,r+=" ; ";c.id===!0&&(r+=n.BACnetEvent.typeId<30&&n.BACnetEvent.typeId>=0?h[n.BACnetEvent.typeId]:n.BACnetEvent.typeId,r+=" ; ");c.instance===!0&&(r+=n.BACnetEvent.instance,r+=" ; ");c.type===!0&&(r+=n.BACnetEvent.type<6&&n.BACnetEvent.type>=0?g[n.BACnetEvent.type]:n.BACnetEvent.instance,r+=" ; ");c.from===!0&&(r+=n.BACnetEvent.from<6&& n.BACnetEvent.from>=0?b[n.BACnetEvent.from]:n.BACnetEvent.from,r+=" ; ");c.to===!0&&(r+=n.BACnetEvent.to<6&&n.BACnetEvent.to>=0?b[n.BACnetEvent.to]:n.BACnetEvent.to,r+=" ; ");e+=r;e+=a.FVCOLSEPTOKEN2;e+=a.getAlarmDateTimeByIntMSec(1E3*f.rArrayHistory[d].on);e+=a.FVCOLSEPTOKEN2;e+=a.getAlarmDateTimeByIntMSec(1E3*f.rArrayHistory[d].off);e+=a.FVCOLSEPTOKEN2;e+=f.rArrayHistory[d].state;e+=a.FVLINESEPTOKEN2}return e};return a}(_SCIntern||{});