/*
 * Isomorphic SmartClient
 * Version v9.1p_2021-05-18 (2021-05-18)
 * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
 * "SmartClient" is a trademark of Isomorphic Software, Inc.
 *
 * licensing@smartclient.com
 *
 * http://smartclient.com/license
 */

if(window.isc&&window.isc.module_Core&&!window.isc.module_Drawing){isc.module_Drawing=1;isc._moduleStart=isc._Drawing_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log&&isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={message:'Drawing load/parse time: '+(isc._moduleStart-isc._moduleEnd)+'ms',category:'loadTime'};if(isc.Log&&isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime');else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTM;else isc._preLog=[isc._pTM]}isc.definingFramework=true;if(window.isc&&isc.version!="v9.1p_2021-05-18/LGPL Deployment"){isc.logWarn("SmartClient module version mismatch detected: This application is loading the core module from SmartClient version '"+isc.version+"' and additional modules from 'v9.1p_2021-05-18/LGPL Deployment'. Mixing resources from different SmartClient packages is not supported and may lead to unpredictable behavior. If you are deploying resources from a single package you may need to clear your browser cache, or restart your browser."+(isc.Browser.isSGWT?" SmartGWT developers may also need to clear the gwt-unitCache and run a GWT Compile.":""))}
isc.Browser.hasCANVAS=isc.Browser.geckoVersion>=20051107||isc.Browser.safariVersion>=181||isc.Browser.isIE9||(!isc.Browser.isIE&&typeof(document.createElement("canvas").getContext)==="function");isc.Browser.hasSVG=isc.Browser.geckoVersion>=20051107;isc.Browser.hasVML=isc.Browser.isIE&&isc.Browser.version>=5;isc.Browser.defaultDrawingType=isc.Browser.hasCANVAS?"bitmap":isc.Browser.hasVML?"vml":"none";isc.$100f="http://www.w3.org/1999/xlink";isc.$100g="http://www.w3.org/2000/svg";isc.defineClass("SVGStringConversionContext").addClassProperties({$99a:"xlink"});isc.A=isc.SVGStringConversionContext.getPrototype();isc.A.$99b=1;isc.A.printForExport=true;isc.A.xlinkPrefix=isc.SVGStringConversionContext.$99a;isc.A=isc.SVGStringConversionContext.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_SVGStringConversionContext_init(){this.Super("init",arguments);this.svgDefStrings={}},isc.A.getNextSvgDefNumber=function isc_SVGStringConversionContext_getNextSvgDefNumber(){return this.$99b++});isc.B._maxIndex=isc.C+2;isc.defineClass("VMLStringConversionContext").addMethods({init:function(){this.Super("init");this.drawLabelsAccumulator=[]}});isc.defineClass("DrawPane","Canvas");isc.A=isc.DrawPane.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$125w=isc.Math.$125w;isc.A.overflow="hidden";isc.A.drawingType=isc.Browser.defaultDrawingType;isc.A.drawingWidth=1000;isc.A.drawingHeight=1000;isc.A.precision=3;isc.A.canDragScroll=false;isc.A.dragAppearance="none";isc.A.dragScrollCursor="all-scroll";isc.A.isMouseTransparent=true;isc.A.rotation=0;isc.A.zoomLevel=1;isc.A.translate=null;isc.A.$148p=0;isc.A.measureLabelCacheMaxSize=100;isc.A.$163d={"borderTopStyle":"border-top-style","borderRightStyle":"border-right-style","borderBottomStyle":"border-bottom-style","borderLeftStyle":"border-left-style","borderTopColor":"border-top-color","borderRightColor":"border-right-color","borderBottomColor":"border-bottom-color","borderLeftColor":"border-left-color"};isc.A.$163e={top:0,right:0,bottom:0,left:0};isc.B.push(isc.A.supportsFractionalCoordinates=function isc_DrawPane_supportsFractionalCoordinates(){var _1=this.drawingType;if(_1=="bitmap")return true;if(_1=="vml")return true;return false},isc.A.createQuadTree=function isc_DrawPane_createQuadTree(){this.quadTree=isc.QuadTree.create({depth:0,maxDepth:50,maxChildren:1});this.quadTree.bounds={x:0,y:0,width:this.$163f(),height:this.$163g()};this.quadTree.root=isc.QuadTreeNode.create({depth:0,maxDepth:8,maxChildren:4});this.quadTree.root.bounds=this.quadTree.bounds},isc.A.initWidget=function isc_DrawPane_initWidget(){var _1=this.precision=Math.max(0,this.precision<<0);this.$1259=Math.pow(10,_1);this.$135k();if(this.drawingType=="svg")this.$l=false;if(this.drawItems==null){this.drawItems=[]}else{var _2=this.drawItems.duplicate();this.drawItems=[];for(var i=0;i<_2.length;++i){this.addDrawItem(_2[i])}}
this.createQuadTree();if(this.canvasItems==null){this.canvasItems=[]}else{var _4=this.canvasItems.duplicate();this.canvasItems=[];for(var i=0;i<_4.length;++i){this.addCanvasItem(_4[i])}}
this.simpleGradients=this.simpleGradients||[];this.linearGradients=this.linearGradients||[];this.radialGradients=this.radialGradients||[];for(var i=0;i<this.simpleGradients.length;i++){this.createSimpleGradient(this.simpleGradients[i].id,this.simpleGradients[i])}
for(var i=0;i<this.linearGradients.length;i++){this.createLinearGradient(this.linearGradients[i].id,this.linearGradients[i])}
for(var i=0;i<this.radialGradients.length;i++){this.createRadialGradient(this.radialGradients[i].id,this.radialGradients[i])}
this.redrawOnResize=(this.drawingType=="bitmap");this.$43z=this.$163f();this.$430=this.$163g();this.$431=this.translate==null?0:this.translate[0];this.$432=this.translate==null?0:this.translate[1];this.$433=this.$43z/this.zoomLevel;this.$434=this.$430/this.zoomLevel;if(isc.Browser.isIE&&this.drawingType=="vml"){if(!isc.DrawPane.$150u){var _5=this.getDocument(),_6;try{_6=_5.createStyleSheet()}catch(e){var _7=_5.createElement("style");_5.documentElement.appendChild(_7);_6=_7.sheet||_7.styleSheet}
_6.addRule(".rvml","behavior:url(#default#VML)");isc.DrawPane.$150u=true}
try{if(!document.namespaces.rvml)document.namespaces.add("rvml","urn:schemas-microsoft-com:vml");this.startTagVML=function(_8){return'<rvml:'+_8+' class="rvml" '};this.endTagVML=function(_8){return'</rvml:'+_8+'>'}}catch(e){this.startTagVML=function(_8){return'<'+_8+' xmlns="urn:schemas-microsoft.com:vml" class="rvml" '};this.endTagVML=function(_8){return'</rvml:'+_8+'>'}}}},isc.A.$135k=function isc_DrawPane__initGradients(){this.$135l={};if(!this.gradients)return;if(!isc.isAn.Array(this.gradients))this.gradients=[this.gradients];for(var i=0;i<this.gradients.length;i++){var _2=this.gradients[i];if(!_2.id){isc.logWarn("Gradient provided in DrawPane.gradients does not have an ID - ignored");continue}
if(!_2._constructor)_2._constructor=isc.DrawItem.$135m(_2);if(this.$135l[_2.id]!=null){isc.logWarn("Duplicate gradient with ID "+_2.id+" - replacing previous gradient")}
this.$135l[_2.id]=_2}},isc.A.$136x=function isc_DrawPane__toVMLCoord(_1){return(_1*this.$1259)<<0},isc.A.normalize=function isc_DrawPane_normalize(_1,_2){var _3=this.$1346,_4=this.$1338();if(_3==null||_4!=this.$1347){_3=this.$1346=_4.getInverse();this.$1347=_4}
return _3.transform(_1,_2)},isc.A.getDrawItem=function isc_DrawPane_getDrawItem(_1,_2,_3){var _4=this.getPageOffsets();var x=_1-(_4.left+this.getLeftMargin()+this.getLeftBorderSize()+this.getLeftPadding());var y=_2-(_4.top+this.getTopMargin()+this.getTopBorderSize()+this.getTopPadding());var _7=this.normalize(x,y);x=_7.v0;y=_7.v1;var _8=this.quadTree.retrieve({x:x,y:y});if(_8==null)return null;var _9=_8.length;for(var i=0;i<_9;++i){if(_8[i].item!=null){_8[i]=_8[i].item}}
_8.sort(isc.QuadTree.$148q);var _11=null;for(var i=_9;i--;){var _12=_8[i],_13=_12.shape;if((_3&&(_13.canHover===false||(_13.canHover==null&&_13.prompt==null)))||_13.hidden)
{continue}
var _14=_13.isPointInPath(x,y,_1,_2);var _15=false;for(var _16=_13.drawGroup;!_15&&_16!=null;_16=_16.drawGroup){if(_16.useGroupRect&&_16.isInBounds(x,y)){_15=true;_11=_16}}
if(_15){continue}
if(_14){return _13}}
return _11},isc.A.getEventTarget=function isc_DrawPane_getEventTarget(_1){var _2=this.ns.EH,_3=_1.eventType;if(_2.isMouseEvent(_3)||_3===_2.POINTER_DOWN||_3===_2.POINTER_MOVE||_3===_2.POINTER_UP||_3===_2.POINTER_CANCEL||_3===_2.TOUCH_START||_3===_2.TOUCH_MOVE||_3===_2.TOUCH_END||_3===_2.TOUCH_CANCEL)
{var _4=this.getDrawItem(_1.x,_1.y);if(_4!=null)return _4}
return this},isc.A.getHoverTarget=function isc_DrawPane_getHoverTarget(_1){var _2=this.getDrawItem(_1.x,_1.y,true);if(_2!=null)return _2;return this.Super("getHoverTarget",arguments)},isc.A.$k2=function isc_DrawPane__updateCursor(_1){var _2=null;if(_1!=null){_2=_1.getCurrentCursor()}
if(_2==null)_2=this.canDragScroll?this.dragScrollCursor:this.getCurrentCursor();this.$v8(_2)},isc.A.prepareForDragging=function isc_DrawPane_prepareForDragging(){if(!isc.EH.dragTarget){var _1=this.getDrawItem(isc.EH.lastEvent.x,isc.EH.lastEvent.y);if(_1!=null&&_1.canDrag){isc.EH.dragTarget=_1;isc.EH.dragOperation="drag";return true}else if(this.canDragScroll){isc.EH.dragTarget=this;isc.EH.dragOperation=isc.EH.DRAG_SCROLL;return true}}
return this.Super("prepareForDragging",arguments)},isc.A.clear=function isc_DrawPane_clear(){this.Super("clear",arguments);if(this.drawItems!=null){for(var i=0,_2=this.drawItems.length;i<_2;++i){var _3=this.drawItems[i];_3.$113c();_3.$if=false}}
if(this.drawingType=="bitmap"){this.$437=null}},isc.A.drawBounds=function isc_DrawPane_drawBounds(_1){isc.DrawRect.create({autoDraw:true,drawPane:this,left:Math.round(_1.bounds.x),top:Math.round(_1.bounds.y-_1.bounds.height),width:Math.round(_1.bounds.width),height:Math.round(_1.bounds.height)},{lineColor:"#FF0000",lineOpacity:0.1,lineWidth:1,linePattern:"solid"});if(_1.nodes&&_1.nodes.length){for(var i=0;i<_1.nodes.length;++i){this.drawBounds(_1.nodes[i])}}},isc.A.erase=function isc_DrawPane_erase(_1,_2){if(_2==undefined){_2=true;this.$992()}
if(_1){isc.Log.logDebug("Destroying drawItems for DrawPane "+this.ID,"drawing");var _3=this.drawItems,_4=(_3==null?0:_3.length);for(var i=0;i<_4;++i){_3[i].destroy(true,_2)}}else if(this.isDrawn()){var _3=this.drawItems,_4=(_3==null?0:_3.length);for(var i=0;i<_4;++i){_3[i].erase(true,_2)}}
if(_2)this.$100h=this.$135l;this.gradients=null;this.$135l={};if(_2)this.$993=this.drawItems;this.drawItems=[];this.$1262=null;delete this.$63q;this.canvasItems=[];this.createQuadTree();if(this.drawingType=="bitmap")this.redrawBitmap()},isc.A.destroyItems=function isc_DrawPane_destroyItems(){this.erase(true,false)},isc.A.destroy=function isc_DrawPane_destroy(){this.Super("destroy",arguments);var _1=this.drawItems;if(_1!=null){for(var i=0;i<_1.length;++i){_1[i].destroy()}}},isc.A.addDrawItem=function isc_DrawPane_addDrawItem(_1,_2,_3){if(!_3){if(_1.drawGroup!=null){_1.drawGroup.removeDrawItem(_1)}else if(_1.drawPane!=null){if(_1.item!=null){_1.drawPane.quadTree.remove(_1.item);_1.item=null}
if(_1.drawPane===this){_1.erase();_3=true}else{if(_1.knobs!=null&&!_1.knobs.isEmpty()){_1.knobs.map(_1.$635,_1)}
_1.drawPane.removeDrawItem(_1)}}}
_1.drawPane=this;_1.$148r=this.$148p++;if(isc.isA.DrawGroup(_1)){_1.$148s(this)}
if(_2==null)_2=true;if(!this.isDrawn()){if(_3||!this.drawItems.contains(_1)){this.drawItems.add(_1);_1.$99y()}
this.shouldDeferDrawing(_1)}else if(_2&&!_1.$if){_1.draw()}},isc.A.$1263=function isc_DrawPane__addEventOnlyDrawItem(_1){_1.drawPane=this;_1.$148r=this.$148p++;if(this.$1262==null)this.$1262=[_1];else this.$1262.add(_1)},isc.A.removeDrawItem=function isc_DrawPane_removeDrawItem(_1){if(_1.drawPane!==this){this.logWarn("Attempt to remove item:"+isc.echoLeaf(_1)+" from a DrawPane that does not contain it");return}
if(_1.$if){_1.erase()}else if(_1.drawGroup!=null){_1.drawGroup.removeDrawItem(_1)}else{this.drawItems.remove(_1);if(_1.item!=null){this.quadTree.remove(_1.item);delete _1.item}}
delete _1.drawPane},isc.A.getTransformCSS=function isc_DrawPane_getTransformCSS(){return null},isc.A.getInnerHTML=function isc_DrawPane_getInnerHTML(){var _1=this.drawingType;if(_1==="vml"){return(this.startTagVML('RECT')+" ID='"+this.getID()+"$139l' style='position:absolute;top:0px;left:0px;width:100%;height:100%;' stroked='false' fillcolor='#ff00ff'>"+this.startTagVML('FILL')+" on='true' opacity='0' />"+this.endTagVML('RECT')+this.startTagVML('GROUP')+" ID='"+this.getID()+"$435' STYLE='position:absolute;left:"+(this.$431-this.scrollLeft+this.getLeftPadding())+"px;top:"+(this.$432-this.scrollTop+this.getTopPadding())+"px;width:"+this.$43z+"px;height:"+this.$430+"px;rotation:"+(this.rotation)+";' coordsize='"+this.$433+", "+this.$434+"' coordorig='0 0'>"+this.endTagVML('GROUP'))}else if(_1==="bitmap"){return isc.SB.concat("<CANVAS ID='",this.getID(),"$436' ","WIDTH='",this.$43z,"' ","HEIGHT='",this.$430,"' ","STYLE='display:block' dir='ltr'>","</CANVAS>")}else if(_1==="svg"){this.$l=false;return"<IFRAME HEIGHT='100%' WIDTH='100%' SCROLLING='NO' FRAMEBORDER='0' SRC='"+isc.Page.getHelperDir()+"DrawPane.svg?isc_dp_id="+this.getID()+"'></IFRAME>"}else{this.logWarn("DrawPane getInnerHTML: '"+_1+"' is not a supported drawingType");return this.Super("getInnerHTML",arguments)}},isc.A.$ub=function isc_DrawPane__handleResized(){this.$136s()},isc.A.innerSizeChanged=function isc_DrawPane_innerSizeChanged(_1){this.Super("innerSizeChanged",arguments);this.$136s()},isc.A.getDataURL=function isc_DrawPane_getDataURL(_1){if(this.$994())this.refreshNow();if(this.drawingType=="bitmap"){var _2=document.getElementById(this.getID()+"$436");if(_2!=null&&!!_2.toDataURL){var _3;try{_3=_2.toDataURL()}catch(e){this.logWarn("HTMLCanvasElement.toDataURL() threw an exception: "+e);_3=null}
if(_3!=null&&_3.startsWith("data:image/png")&&(_3.charAt(14)===","||_3.charAt(14)===";"))
{if(_1)this.fireCallback(_1,"dataURL",[_3]);return _3}}}
if(_1){var _4={exportDisplay:"return"};var _5=this;isc.RPCManager.exportImage(this.getSvgString(),_4,function(_6){_5.fireCallback(_1,"dataURL",["data:image/png;base64,"+_6])})}
return null},isc.A.setMeasureLabelCacheMaxSize=function isc_DrawPane_setMeasureLabelCacheMaxSize(_1){this.measureLabelCacheMaxSize=_1;var _2=this.$100n;if(_2!=null){var _3=Math.max(1,_1);this.$148e(_2,_3)}},isc.A.measureLabel=function isc_DrawPane_measureLabel(_1,_2){if(_1==null)_1="";else _1=String(_1);if(!_2)_2={};var _3=_2.fontFamily||isc.DrawLabel.getInstanceProperty("fontFamily"),_4=_2.fontWeight||isc.DrawLabel.getInstanceProperty("fontWeight"),_5=_2.fontSize||isc.DrawLabel.getInstanceProperty("fontSize"),_6=_2.fontStyle||isc.DrawLabel.getInstanceProperty("fontStyle"),_7=_5+":"+_4+":"+_6+":"+_3+":"+_1;var _8=this.$100n;if(_8==null){var _9=Math.max(1,this.measureLabelCacheMaxSize);_8=this.$100n=new this.$148f(_9)}
if(this.$148g(_8,_7)){return this.$148h(_8,_7)}
var _10=isc.DrawPane.$104v(),_11=isc.DrawPane.$167b(_3),_12=isc.SB.concat("<span style=",_11,"font-weight:",_4,";font-size:",_5,"px;font-style:",_6,";white-space:pre;font-family:",_3,_11,">",_1.replace(isc.DrawPane.$156w,"\u0020").asHTML(),"</span>");_10.setContents(_12);_10.redraw("label measurement: "+_1);var _13=_10.getHandle().firstChild;var _14={width:_13.offsetWidth,height:_13.offsetHeight};this.$148i(_8,_7,_14);return _14},isc.A.$148j=function isc_DrawPane__lruCacheEntry(_1,_2,_3,_4){this.key=_1;this.value=_2;this.younger=_3;this.older=_4},isc.A.$148f=function isc_DrawPane__lruCache(_1){this.maxSize=_1;this.size=0;this.cache={};this.youngest=null;this.oldest=null},isc.A.$148g=function isc_DrawPane__lruCacheContains(_1,_2){return _1.cache.hasOwnProperty(_2)},isc.A.$148h=function isc_DrawPane__lruCacheGet(_1,_2){var _3=_1.cache[_2];if(_3!=_1.youngest){_3.younger.older=_3.older;if(_3.older==null){_1.oldest=_3.younger}else{_3.older.younger=_3.younger}
_1.youngest.younger=_3;_3.younger=null;_3.older=_1.youngest;_1.youngest=_3}
return _3.value},isc.A.$148i=function isc_DrawPane__lruCachePut(_1,_2,_3){var _4=new this.$148j(_2,_3,null,_1.youngest);_1.cache[_2]=_4;++_1.size;if(_1.size==1){_1.youngest=_1.oldest=_4}else{_1.youngest.younger=_4;_1.youngest=_4;if(_1.size>_1.maxSize){var _5=_1.oldest,_6=_5.younger;_1.oldest=_6;_6.older=null;delete _1.cache[_5.key];--_1.size}}},isc.A.$148e=function isc_DrawPane__lruCacheSetMaxSize(_1,_2){if(_1.size>_2){var _3=_1.size-_2,_4=_1.cache;if(_2<_3){var _5={},_6=_1.youngest;for(var i=_2;i--;_6=_6.older){_5[_6.key]=_4[_6.key]}
_1.cache=_5;_1.oldest=_6.younger}else{var _6=_1.oldest;for(var i=_3;i--;_6=_6.younger){delete _4[_6.key]}
_1.oldest=_6}
_1.oldest.older=null;_1.size=_2}
_1.maxSize=_2},isc.A.getSvgString=function isc_DrawPane_getSvgString(_1){var _2=this.getInnerContentWidth(),_3=this.getInnerContentHeight(),_4,_5,_6,_7;_6=_2;_7=_3;if(this.rotation&&(_5=this.getCenter())&&_5.length==2){_4=((this.rotation%360)+360)%360;var _8=_4*this.$125w,s=Math.abs(Math.sin(_8)),c=Math.abs(Math.cos(_8));_6=_2*c+_3*s;_7=_2*s+_3*c}
_1=_1||isc.SVGStringConversionContext.create();_1.xlinkPrefix=_1.xlinkPrefix||isc.SVGStringConversionContext.$99a;var _11=this.$163h(_1.printForExport);var _12=this.$tj(),_13=this.$tq();var _14=(_12.left+_13.left+_6+_13.right+_12.right-
_11.right-_11.left),_15=(_12.top+_13.top+_7+_13.bottom+_12.bottom-
_11.top-_11.bottom);var _16=isc.StringBuffer.create();_16.append("<svg xmlns='",isc.$100g,"' xmlns:",_1.xlinkPrefix,"='",isc.$100f,"' width='",_14,"px","' height='",_15,"px","' viewBox='0 0 ",_14," ",_15,"' version='1.1'><metadata><!-- Generated by SmartClient ",isc.version," --></metadata>");if(this.backgroundColor!=null){_16.append("<rect x='0' y='0' width='",_14,"' height='",_15,"' stroke='none' fill='",this.backgroundColor,"'/>")}
_16.append("<g transform='translate(",((_6-_2)/2+_13.left+_12.left)," ",((_7-_3)/2+_13.top+_12.top),") scale(",this.zoomLevel,")");if(_4){_16.append(" rotate(",_4," ",_5[0]," ",_5[1],")")}
_16.append("'><svg width='",_2,"' height='",_3,"'>");if(this.drawItems&&this.drawItems.length){_16.append("<g>");for(var i=0;i<this.drawItems.length;++i){_16.append(this.drawItems[i].getSvgString(_1))}
_16.append("</g>");if(_1.svgDefStrings){_16.append("<defs>");for(var _18 in _1.svgDefStrings){if(_1.svgDefStrings.hasOwnProperty(_18)){_16.append(_1.svgDefStrings[_18])}}
_16.append("</defs>")}}
_16.append("</svg>",(_1.printForExport?this.$163i(_1):null),"</g>");var _19=isc.Element.getComputedStyle(this.getClipHandle(),this.$163d);var _20,_21,_22;if(_12.top==_12.right&&_12.right==_12.bottom&&_12.bottom==_12.left&&_19.borderTopStyle==_19.borderRightStyle&&_19.borderRightStyle==_19.borderBottomStyle&&_19.borderBottomStyle==_19.borderLeftStyle&&_19.borderTopColor==_19.borderRightColor&&_19.borderRightColor==_19.borderBottomColor&&_19.borderBottomColor==_19.borderLeftColor)
{if(_12.top){_20=null;if(_19.borderTopStyle=="solid")_20="";else if(_19.borderTopStyle=="dashed")_20=" stroke-dasharray='5,5'";else if(_19.borderTopStyle=="dotted")_20=" stroke-dasharray='1.5,2'";if(_20!=null&&_19.borderTopColor){_22=_21=_12.top/2;_16.append("<rect x='",_21,"' y='",_22,"' width='",(_14-_12.top),"' height='",(_15-_12.top),"' stroke='",_19.borderTopColor,"' stroke-width='",_12.top,"px'",_20," fill='none'/>")}}}else{var _23=["Left","Bottom","Right","Top"],_24,_25,_26,x,y;for(var i=0;i<_23.length;++i){var _29=_23[i];_24=_12[_29];if(_24){_25=_19["border"+_29+"Style"];_20=null;if(_25=="solid")_20="";else if(_25=="dashed")_20=" stroke-dasharray='5,5'";else if(_25=="dotted")_20=" stroke-dasharray='1.5,2'";if(_20!=null){_26=_19["border"+_29+"Color"];if(_26){if(_29=="Left"){x=_24/2;_22=_24/2;_16.append("<line x1='",x,"' y1='",_22,"' x2='",x,"' y2='",(_15-_22))}else if(_29=="Bottom"){_21=_24/2;y=_15-_24/2;_16.append("<line x1='",_21,"' y1='",y,"' x2='",(_14-_21),"' y2='",y)}else if(_29=="Right"){x=_14-_24/2;_22=_24/2;_16.append("<line x1='",x,"' y1='",_22,"' x2='",x,"' y2='",(_15-_22))}else{_21=_24/2;y=_24/2;_16.append("<line x1='",_21,"' y1='",y,"' x2='",(_14-_21),"' y2='",y)}
_16.append("' stroke='",_26,"' stroke-width='",_24,"px'",_20,"/>")}}}}}
_16.append("</svg>");return _16.release(false)},isc.A.$163i=function isc_DrawPane__getChildrenSvgString(_1){return null},isc.A.getPrintHTML=function isc_DrawPane_getPrintHTML(_1,_2){var _3,_4=(_1!=null&&_1.printForExport);if(this.$994())this.refreshNow();if(this.drawingType==="bitmap"&&!(isc.isA.FacetChart&&isc.isA.FacetChart(this)&&this.printZoomChart&&this.$106d()&&_4))
{var _5=this.getDataURL();if(_5==null){if(_2!=null){var _6=this;this.getDataURL(function(_5){var _3="<img src='"+_5+"' style='border:0px";if(_4)_3+=";max-width:100%";_3+="'/>";_6.fireCallback(_2,"HTML,callback",[_3,_2])})}
_3=null}else{_3="<img src='"+_5+"' style='border:0px";if(_4)_3+=";max-width:100%";_3+="'/>"}}else if(this.drawingType==="vml"&&!_4){var _7=document.getElementById(this.getID()+"$435");_3=("<div style='position:relative;width:"+this.$163f()+";height:"+this.$163g()+";'>"+_7.parentElement.innerHTML+"</div>")}else{_3=this.getSvgString()}
if(_2!=null){this.fireCallback(_2,"HTML,callback",[_3,_2]);return null}else{return _3}},isc.A.$99x=function isc_DrawPane__batchDraw(_1){if(_1==null)_1=[];else if(!isc.isAn.Array(_1))_1=[_1];if(this.drawingType=="svg"){if(!this.$44m)return;var _2=isc.SVGStringConversionContext.create({printForExport:false});var _3="",_4="";for(var i=0;i<_1.length;i++){var _6=_1[i];if(_6.$44z)_6.$44z.parentNode.removeChild(_6.$44z);var _7=_6.getSvgString(_2);if(_6.drawToBack)_3+=_7;else _4+=_7}
var _8="";for(var _9 in _2.svgDefStrings){if(_2.svgDefStrings.hasOwnProperty(_9)&&!this.$44m.getElementById(_9)){var _10=_2.svgDefStrings[_9];_8+=_10}}
var _11=this.$44m.getElementById("isc_svg_box");if(!isc.Browser.isWebKit){var _12=this.$44m.createRange();_12.setStart(this.$44o,0);this.$44o.appendChild(_12.createContextualFragment(_8));_12.setStart(_11,0);_11.insertBefore(_12.createContextualFragment(_3),_11.firstChild);_11.appendChild(_12.createContextualFragment(_4))}else{var _13=new DOMParser();var _14=_13.parseFromString("<svg xmlns='"+isc.$100g+"' xmlns:"+_2.xlinkPrefix+"='"+isc.$100f+"'><defs>"+_8+"</defs><g>"+_3+"</g><g>"+_4+"</g></svg>","image/svg+xml");var _15=_14.documentElement;var _16=this.$44m.importNode(_15.childNodes.item(1),true);var _17=this.$44m.importNode(_15.childNodes.item(2),true);var _18=this.$44m.importNode(_15.childNodes.item(0),true);_15=null;_14=null;var _19;while(_19=_18.firstChild){this.$44o.appendChild(_19)}
var _20=_11.firstChild;while(_19=_16.firstChild){_11.insertBefore(_19,_20)}
while(_19=_17.firstChild){_11.appendChild(_19)}}
for(var i=0;i<_1.length;i++){var _6=_1[i];_6.drawPane=this;_6.drawingSVG=true;_6.$44m=this.$44m;_6.$44y=_11;_6.$44z=this.$44m.getElementById("isc_DrawItem_"+_6.drawItemID);_6.$113d();_6.$if=true}}else if(this.drawingType=="bitmap"){this.redrawBitmapNow(true)}else{var _21="",_22="",_2=isc.VMLStringConversionContext.create();for(var i=0;i<_1.length;++i){var _6=_1[i];if(_6.$44u!=null){if(_6.$44u.parentNode!=null)_6.$44u.parentNode.removeChild(_6.$44u);_6.$44t=null;_6.$44u=null;_6.$44w=null;_6.$44x=null;_6.$44j=null}
var _23=_6.$44v("isc_DrawItem_"+_6.drawItemID,_2);if(_6.drawToBack)_21=_23+_21;else _22+=_23}
var _24=isc.Element.get(this.getID()+"$435");_24.insertAdjacentHTML("afterbegin",_21);_24.insertAdjacentHTML("beforeend",_22);var _25=_2.drawLabelsAccumulator;if(_25!=null&&_25.length>0){_21="";_22="";for(var i=0;i<_25.length;++i){var _26=_25[i];var _23=_26.$44v("isc_DrawItem_"+_26.drawItemID);if(_26.drawToBack)_21=_23+_21;else _22+=_23}
_24=this.getHandle();_24.insertAdjacentHTML("afterbegin",_21);_24.insertAdjacentHTML("beforeend",_22)}
for(var i=0;i<_1.length;++i){var _6=_1[i];_6.drawPane=this;_6.drawingVML=true;_6.$113d();_6.$if=true}}
this.$1264()},isc.A.$1264=function isc_DrawPane__setupEventOnlyDrawItems(){var _1=this.$1262;if(_1!=null){for(var i=0,l=_1.length;i<l;++i){_1[i].$113d()}}},isc.A.isBatchDrawing=function isc_DrawPane_isBatchDrawing(){return this.$99w>0},isc.A.$994=function isc_DrawPane__isBatchDrawing(){return(this.$99w>0||this.$995()||this.$l===false)&&this.$99z!==true},isc.A.beginBatchDrawing=function isc_DrawPane_beginBatchDrawing(){this.$99w=(this.$99w||0)+1},isc.A.endBatchDrawing=function isc_DrawPane_endBatchDrawing(_1){if(!this.isBatchDrawing())this.logWarn("Not in batch drawing mode. Exiting.");this.$100i(_1)},isc.A.$100i=function isc_DrawPane__endBatchDrawing(_1){if(!this.$994()||(this.$99w>0&&--this.$99w>0))return;if(_1==true&&!this.$994()){this.refreshNow()}else this.$992()},isc.A.refreshNow=function isc_DrawPane_refreshNow(){this.$99z=true;this.$99x(this.$63q);delete this.$63q;this.$99z=false},isc.A.drawChildren=function isc_DrawPane_drawChildren(){this.Super("drawChildren",arguments);if(!this.$994()){for(var i=0;i<this.drawItems.length;i++){var _2=this.drawItems[i];_2.draw()}}},isc.A.getBitmapContext=function isc_DrawPane_getBitmapContext(){var _1=this.$437;if(_1==null){var _2=this.getDocument().getElementById(this.getID()+"$436");if(!_2){this.logWarn("DrawPane failed to get CANVAS element handle");return}
_1=this.$437=_2.getContext("2d");if(!_1){this.logWarn("DrawPane failed to get CANVAS 2d bitmap context");return}}else{_1.setTransform(1,0,0,1,0,0)}
return _1},isc.A.redraw=function isc_DrawPane_redraw(_1){if(this.drawingType=="bitmap"){this.Super("redraw",arguments);this.$437=null;if(!this.$995())this.redrawBitmapNow()}},isc.A.$995=function isc_DrawPane__isRedrawTEAScheduled(){return this.$996==true||(this.drawingType=="bitmap"&&this.$439)},isc.A.$992=function isc_DrawPane__maybeScheduleRedrawTEA(){if(!this.$995()){if(this.drawingType=="bitmap")this.redrawBitmap();else{var _1=this;isc.EH.$ms(function(){_1.$997()});this.$996=true;this.$998=false}}},isc.A.$997=function isc_DrawPane__redrawTEA(){if(this.$998!==false)return;this.$998=true;if(this.$993){for(var i=0;i<this.$993.length;++i){var _2=this.$993[i];if(_2.$999){_2.$999.parentNode.removeChild(_2.$999);delete _2.$999}}
delete this.$993}
if(this.$100h){if(this.drawingType=="svg"&&this.$44m){for(var _3 in this.$100h){if(!this.$100h.hasOwnProperty(_3))continue;var _4=this.$100h[_3].$982;if(!_4)_4=this.$44m.getElementById(_3);if(_4){_4.parentNode.removeChild(_4);_3=_4.getAttributeNS(isc.$100f,"href");if(_3&&_3.charAt(0)=='#')_3=_3.substring(1);if(_3){_4=this.$44m.getElementById(_3);if(_4)_4.parentNode.removeChild(_4)}}}}
delete this.$100h}
this.$99z=true;this.$99x(this.drawItems);this.$99z=false;this.$996=false},isc.A.redrawBitmap=function isc_DrawPane_redrawBitmap(){if(this.$439)return;this.$439=true;var _1=this;isc.EH.$ms(function(){if(!_1.$439)return;_1.redrawBitmapNow()})},isc.A.$1338=function isc_DrawPane__getGlobalTransform(){var t=this.$1348;if(t!=null)return t;t=isc.AffineTransform.create();if(this.translate){t.translate(this.translate[0]-this.scrollLeft,this.translate[1]-this.scrollTop)}else{t.translate(-this.scrollLeft,-this.scrollTop)}
t.scale(this.zoomLevel,this.zoomLevel);if(this.rotation){t.rotate(this.rotation,this.$43z/2,this.$430/2)}
return(this.$1348=t)},isc.A.redrawBitmapNow=function isc_DrawPane_redrawBitmapNow(_1){this.$439=false;var _2=this.$63q;if(_2!=null){for(var i=_2.length;i--;){var _4=_2[i];if(!this.shouldDeferDrawing(_4)){_2.remove(_4)}
_4.draw()}}
if(!this.isDrawn())return;var _5=this.getBitmapContext();if(!_5)return;_5.clearRect(0,0,this.$43z,this.$430);var t=this.$1338();_5.setTransform(t.m00,t.m10,t.m01,t.m11,t.m02,t.m12);for(var i=0;i<this.drawItems.length;i++){var _7=this.drawItems[i];_7.drawingBitmap=true;if(!_7.hidden){_7.drawBitmap(_5);_7.$113d();_7.$if=true}}
if(!_1)this.$1264()},isc.A.drawing2screen=function isc_DrawPane_drawing2screen(_1){return[Math.round(_1[0]*this.zoomLevel+this.$431-this.scrollLeft+this.getLeftPadding()),Math.round(_1[1]*this.zoomLevel+this.$432-this.scrollTop+this.getTopPadding()),Math.round(_1[2]*this.zoomLevel),Math.round(_1[3]*this.zoomLevel)]},isc.A.screen2drawing=function(screenRect){return[(screenRect[0]-this.getLeftPadding()+this.scrollLeft-this.$431)/this.zoomLevel,(screenRect[1]-this.getTopPadding()+this.scrollTop-this.$432)/this.zoomLevel,screenRect[2]/this.zoomLevel,screenRect[3]/this.zoomLevel]},isc.A.$136t=function isc_DrawPane__viewBoxUpdated(){this.$431=this.translate==null?0:this.translate[0];this.$432=this.translate==null?0:this.translate[1];this.$433=this.$43z/this.zoomLevel;this.$434=this.$430/this.zoomLevel;if(!this.isDrawn())return;this.$44b();var _1=this.drawingType;if(_1==="vml"){var _2=this.$44c;if(this.vmlBox==null){_2=this.$44c=this.getDocument().getElementById(this.getID()+"$435")}
if(_2!=null){_2.style.left=(this.$431-this.scrollLeft)+this.getLeftPadding()+this.$ph;_2.style.top=(this.$432-this.scrollTop)+this.getTopPadding()+this.$ph;_2.coordsize.x=this.$433;_2.coordsize.y=this.$434;_2.style.rotation=this.rotation==null?"":this.rotation}}else if(_1==="svg"){if(this.$44n!=null){var t=this.$1338();this.$44n.setAttributeNS(null,"transform","matrix("+t.m00+" "+t.m10+" "+t.m01+" "+t.m11+" "+t.m02+" "+t.m12+")")}}else{this.redrawBitmap()}},isc.A.$163h=function isc_DrawPane__getViewPortEdgeOffsets(_1){return this.$163e},isc.A.$163f=function isc_DrawPane__getViewPortWidth(){var _1=this.$163h();return this.getInnerContentWidth()-_1.right-_1.left},isc.A.$163g=function isc_DrawPane__getViewPortHeight(){var _1=this.$163h();return this.getInnerContentHeight()-_1.top-_1.bottom},isc.A.$136s=function isc_DrawPane__updateViewPort(){var _1=this.$163f(),_2=this.$163g();this.$43z=_1;this.$430=_2;this.scrollLeft=Math.max(0,Math.min(this.scrollLeft,this.getScrollRight()));this.scrollTop=Math.max(0,Math.min(this.scrollTop,this.getScrollBottom()));this.$433=_1/this.zoomLevel;this.$434=_2/this.zoomLevel;if(!this.isDrawn())return;this.$44b();var _3=this.drawingType;if(_3==="vml"){var _4=this.$44c;if(this.vmlBox==null){_4=this.$44c=this.getDocument().getElementById(this.getID()+"$435")}
if(_4!=null){_4.style.width=_1+this.$ph;_4.style.height=_2+this.$ph;_4.coordsize.x=this.$433;_4.coordsize.y=this.$434}}else if(_3==="svg"){if(this.$44d!=null){this.$44d.setAttributeNS(null,"viewBox","0 0 "+_1+" "+_2)}}else{var _5=this.getDocument().getElementById(this.getID()+"$436");if(_5!=null){_5.width=_1;_5.height=_2}
this.redrawBitmap()}});isc.evalBoundary;isc.B.push(isc.A.addCanvasItem=function isc_DrawPane_addCanvasItem(_1){this.canvasItems.add(_1);_1.drawPane=this;_1.$44e=_1.left;_1.$44f=_1.top;_1.$44g=_1.width;_1.$44h=_1.height;this.addChild(_1);this.$44i(_1);return _1},isc.A.$99c=function isc_DrawPane__getSimpleGradientSvgString(_1,_2,_3,_4){return this.$99d(_1,{id:_2.id,x1:_2.x1,y1:_2.y1,x2:_2.x2,y2:_2.y2,colorStops:[{color:_2.startColor,offset:0.0},{color:_2.endColor,offset:0.0}]},_3,_4)},isc.A.$99d=function isc_DrawPane__getLinearGradientSvgString(_1,_2,_3,_4){var _5=_3.svgDefStrings||(_3.svgDefStrings={}),_6=_1,_7;if(!_5[_6]){_7="<linearGradient id='"+_6+"'>";for(var i=0;i<_2.colorStops.length;++i){var _9=_2.colorStops[i],_10=_9.opacity||"1";_7+="<stop stop-color='"+_9.color+"' offset='"+_9.offset+"' stop-opacity='"+_10+"'/>"}
_7+="</linearGradient>";_5[_6]=_7}
_1="gradient"+_3.getNextSvgDefNumber();_4.$1139=_1;var _11=_4.$830(_2);_7="<linearGradient id='"+_1+"' "+(_3.xlinkPrefix||isc.SVGStringConversionContext.$99a)+":href='#"+_6+"' x1='"+_11[0]+"' y1='"+_11[1]+"' x2='"+_11[2]+"' y2='"+_11[3]+"' gradientUnits='userSpaceOnUse'/>";return _7},isc.A.$99e=function isc_DrawPane__getRadialGradientSvgString(_1,_2,_3,_4){var _5=_3.svgDefStrings||(_3.svgDefStrings={}),_6=_1,_7,_8=_3.xlinkPrefix||isc.SVGStringConversionContext.$99a;if(!_5[_6]){_7="<radialGradient id='"+_6;if(_2.$981!=null){var _9,_10;if(isc.isA.String(_2.$981)){_9=_2.$981;_10=this.$135l[_9]}else{_10=_2.$981;_9=_10.id}
if(!_5[_9]){_5[_9]=this.$99e(_9,_10,_3)}
_7+="' "+_8+":href='#"+_9}
_7+="'>";if(_2.colorStops!=null){for(var i=0;i<_2.colorStops.length;++i){var _12=_2.colorStops[i],_13=_12.opacity||"1";_7+="<stop stop-color='"+_12.color+"' offset='"+_12.offset+"' stop-opacity='"+_13+"'/>"}}
_7+="</radialGradient>";_5[_6]=_7}
if(_4!=null){_1="gradient"+_3.getNextSvgDefNumber();_4.$1139=_1;var _14=_4.$831(_2);_7="<radialGradient id='"+_1+"' "+_8+":href='#"+_6;if(_2.cx!=null)_7+="' cx='"+_14[0];if(_2.cy!=null)_7+="' cy='"+_14[1];if(_2.fx!=null)_7+="' fx='"+_14[3];if(_2.fy!=null)_7+="' fy='"+_14[4];if(_2.r!=null)_7+="' r='"+_14[5];_7+="' gradientUnits='userSpaceOnUse'/>"}
return _7},isc.A.$99f=function isc_DrawPane__getFilterSvgString(_1){if(_1=="isc_ds1"){return"<filter id='isc_ds1'><feOffset result='offOut' in='SourceAlpha' dx='2.4' dy='2.4'/><feGaussianBlur result='blurOut' in='offOut' stdDeviation='1.8'/><feColorMatrix result='cmatOut' in='blurOut' type='matrix' values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.8 0'/><feBlend in='SourceGraphic' in2='cmatOut' mode='normal'/></filter>"}
return null},isc.A.$44i=function isc_DrawPane__updateCanvasItemToViewBox(_1){_1.synchingToPane=true;_1.setRect(this.drawing2screen([_1.$44e,_1.$44f,_1.$44g,_1.$44h]));if(_1.drawBorderSize){_1.getStyleHandle().borderWidth=Math.max(1,_1.drawBorderSize*this.zoomLevel)+"px"}
delete _1.synchingToPane},isc.A.$44b=function isc_DrawPane__updateItemsToViewBox(){for(var i=0,_2;i<this.canvasItems.length;i++){this.$44i(this.canvasItems[i])}
var _3;var _4=this.$1363=this.zoomLevel;var _5=_3!=_4;if(this.drawingType==="vml"){for(var i=0;i<this.drawItems.length;++i){var _6=this.drawItems[i];if(!_6.drawingVML)continue;if(isc.isA.DrawLabel(_6)){if(_5)_6.$125u().fontSize=(_6.fontSize*this.zoomLevel)+"px";if(!_6.synchTextMove){var _7=this.drawing2screen([_6.left,_6.top,0,0]);var _8=_6.$125f().style;_8.left=_7[0]+isc.px;_8.top=_7[1]+isc.px}}else if(_5){_6.$44l(_6.lineWidth*this.zoomLevel)}}}else if(this.drawingType==="bitmap"){for(var i=0;i<this.drawItems.length;++i){var _6=this.drawItems[i];if(isc.isA.DrawLabel(_6)&&_6.$45c!=null){isc.Element.$136r(_6.$45c,_6.$45c.$136u())}}}},isc.A.getScrollLeft=function isc_DrawPane_getScrollLeft(){return this.scrollLeft},isc.A.getScrollRight=function isc_DrawPane_getScrollRight(){return Math.max(0,this.drawingWidth*this.zoomLevel-this.$43z)<<0},isc.A.getScrollTop=function isc_DrawPane_getScrollTop(){return this.scrollTop},isc.A.getScrollBottom=function isc_DrawPane_getScrollBottom(){return Math.max(0,this.drawingHeight*this.zoomLevel-this.$430)<<0},isc.A.scrollTo=function isc_DrawPane_scrollTo(_1,_2,_3){if(_1==null)_1=this.scrollLeft;if(_2==null)_2=this.scrollTop;_1=Math.max(0,Math.min(_1,this.getScrollRight()));_2=Math.max(0,Math.min(_2,this.getScrollBottom()));if(this.scrollLeft!=_1||this.scrollTop!=_2){this.scrollLeft=_1;this.scrollTop=_2;delete this.$1348;this.$136t()}},isc.A.pan=function isc_DrawPane_pan(_1,_2){var _3=this.translate;if(_3==null)_3=this.translate=[0,0];_3[0]-=_1;_3[1]-=_2;delete this.$1348;this.$136t()},isc.A.setZoomLevel=function isc_DrawPane_setZoomLevel(_1){if(!(_1>0)){this.logWarn("The requested zoomLevel:"+_1+" is not greater than 0.");return}
this.zoomLevel=_1;this.scrollLeft=Math.max(0,Math.min(this.scrollLeft,this.getScrollRight()));this.scrollTop=Math.max(0,Math.min(this.scrollTop,this.getScrollBottom()));delete this.$1348;this.$136t()},isc.A.zoom=function isc_DrawPane_zoom(_1){this.setZoomLevel(_1)},isc.A.setRotation=function isc_DrawPane_setRotation(_1){this.rotation=_1;delete this.$1348;this.$136t()},isc.A.rotate=function isc_DrawPane_rotate(_1){this.setRotation(_1)},isc.A.addGradient=function isc_DrawPane_addGradient(_1){var _2=_1.id;if(!_2){if(!this.$135n)this.$135n=0;_2=this.getID()+"_gradient_"+this.$135n++;_1.id=_2}
if(!_1._constructor)_1._constructor=isc.DrawItem.$135m(_1);if(this.$135l[_1.id]!=null){isc.logWarn("Duplicate gradient with ID "+_1.id+" - replacing previous gradient")}
if(!this.gradients){this.gradients=[];this.$135l={}}
this.gradients.add(_1);this.$135l[_2]=_1;return _2},isc.A.getGradient=function isc_DrawPane_getGradient(_1){return(this.gradients?this.$135l[_1]:null)},isc.A.removeGradient=function isc_DrawPane_removeGradient(_1){if(this.gradients){var _2=this.$135l[_1];if(_2){delete this.$135l[_1];this.gradients.remove(_2)}}},isc.A.createSimpleGradient=function isc_DrawPane_createSimpleGradient(_1,_2){_2.id=_1;this.addGradient(_2);return _1},isc.A.createLinearGradient=function isc_DrawPane_createLinearGradient(_1,_2){_2.id=_1;this.addGradient(_2);return _1},isc.A.createRadialGradient=function isc_DrawPane_createRadialGradient(_1,_2){_2.id=_1;this.addGradient(_2);return _1},isc.A.shouldDeferDrawing=function isc_DrawPane_shouldDeferDrawing(_1){if(this.$994()||(this.drawingType=="svg"&&!this.$44m)||(this.drawingType=="vml"&&!this.getHandle()))
{if(!this.$63q){this.$63q=[_1]}else{if(!this.$63q.contains(_1))this.$63q.add(_1)}
return true}
return false},isc.A.cancelDeferredDraw=function isc_DrawPane_cancelDeferredDraw(_1){if(this.$63q){return this.$63q.remove(_1)}
return false},isc.A.svgLoaded=function isc_DrawPane_svgLoaded(){this.$44m=this.getHandle().firstChild.contentDocument;this.$44d=this.$44m.getElementById("isc_svg_body");this.$44n=this.$44m.getElementById("isc_svg_box");this.$44o=this.$44m.getElementById("isc_svg_defs");this.$136s();if(this.$63q){if(!this.$995())this.$100i(true)}
this.$l=true});isc.B._maxIndex=isc.C+85;isc.A=isc.DrawPane;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.defaultDrawingType=isc.Browser.defaultDrawingType;isc.A.$44p=[];isc.A.$156w=/[\u0009\u000C\u000D]/g;isc.B.push(isc.A.getDefaultDrawPane=function isc_c_DrawPane_getDefaultDrawPane(_1){if(!_1)_1=this.defaultDrawingType;if(this.$44p[_1])return this.$44p[_1];var _2=this.$44p[_1]=this.create({drawingType:_1,width:isc.Page.getScrollWidth(),height:isc.Page.getScrollHeight(),autoDraw:true});_2.sendToBack();return _2},isc.A.$167b=function isc_c_DrawPane__getEnclosingQuote(_1){return(isc.isA.String(_1)&&_1.contains("\"")?"'":"\"")},isc.A.$104v=function isc_c_DrawPane__getMeasureCanvas(){var _1=this.$78l;if(_1==null){_1=this.$78l=isc.Canvas.create({top:-1000,overflow:"visible",autoDraw:false,height:1,width:1,ariaState:{hidden:true},markForRedraw:isc.Class.NO_OP});_1.draw()}
return _1},isc.A.addrgb=function isc_c_DrawPane_addrgb(_1,_2){var _3=Array(parseInt('0x'+_1.substring(1,3),16),parseInt('0x'+_1.substring(3,5),16),parseInt('0x'+_1.substring(5,7),16));var _4=Array(parseInt('0x'+_2.substring(1,3),16),parseInt('0x'+_2.substring(3,5),16),parseInt('0x'+_2.substring(5,7),16));var _5=_3[0]+_4[0];_5=Math.round(_5>0xff?0xff:_5).toString(16);_5=_5.length===1?"0"+_5:_5;var _6=_3[1]+_4[1];_6=Math.round(_6>0xff?0xff:_6).toString(16);_6=_6.length===1?"0"+_6:_6;var _7=_3[2]+_4[2];_7=Math.round(_7>0xff?0xff:_7).toString(16);_7=_7.length===1?"0"+_7:_7;return'#'+_5+_6+_7},isc.A.subtractrgb=function isc_c_DrawPane_subtractrgb(_1,_2){var _3=Array(parseInt('0x'+_1.substring(1,3),16),parseInt('0x'+_1.substring(3,5),16),parseInt('0x'+_1.substring(5,7),16));var _4=Array(parseInt('0x'+_2.substring(1,3),16),parseInt('0x'+_2.substring(3,5),16),parseInt('0x'+_2.substring(5,7),16));var _5=_3[0]-_4[0];_5=Math.round(_5<0x0?0x0:_5).toString(16);_5=_5.length===1?"0"+_5:_5;var _6=_3[1]-_4[1];_6=Math.round(_6<0x0?0x0:_6).toString(16);_6=_6.length===1?"0"+_6:_6;var _7=_3[2]-_4[2];_7=Math.round(_7<0x0?0x0:_7).toString(16);_7=_7.length===1?"0"+_7:_7;return'#'+_5+_6+_7},isc.A.mixrgb=function isc_c_DrawPane_mixrgb(_1,_2){return _2.charAt(0)==='+'?isc.DrawPane.addrgb(_1,_2.substring(1)):_2.charAt(0)==='-'?isc.DrawPane.subtractrgb(_1,_2.substring(1)):_2},isc.A.$105t=function isc_c_DrawPane__mutergb(_1,_2){var _3=parseInt('0x'+_2.substring(1,3),16)/255,_4=parseInt('0x'+_2.substring(3,5),16)/255,_5=parseInt('0x'+_2.substring(5,7),16)/255,_6=Math.min(_3,_4,_5),_7=Math.max(_3,_4,_5),h,s,l=(_6+_7)/2;if(_6==_7){h=s=0}else{var c=_7-_6;s=c/(2*(l<0.5?l:1-l));if(_7==_3){h=(_4-_5)/c;if(_4<_5){h+=6}}else if(_7==_4){h=(_5-_3)/c+2}else{h=(_3-_4)/c+4}
h/=6}
if(_1<=0){l*=(100+_1)/100}else{l+=(_1/100)*(1-l)}
var _12,_13,_14;if(s==0){_12=_13=_14=Math.round(255*l).toString(16)}else{var _15=l+s*(l<0.5?l:1.0-l),_16=2*l-_15,_17=(3*h-Math.floor(3*h))/3,_18=_15-6*(_15-_16)*Math.abs(_17-1/6),r,g,b;switch(Math.floor(h*6)){case 0:case 6:r=_15;g=_18;b=_16;break;case 1:r=_18;g=_15;b=_16;break;case 2:r=_16;g=_15;b=_18;break;case 3:r=_16;g=_18;b=_15;break;case 4:r=_18;g=_16;b=_15;break;case 5:r=_15;g=_16;b=_18;break}
_12=Math.round(255.0*r).toString(16);_13=Math.round(255.0*g).toString(16);_14=Math.round(255.0*b).toString(16)}
_12=_12.length===1?"0"+_12:_12;_13=_13.length===1?"0"+_13:_13;_14=_14.length===1?"0"+_14:_14;return'#'+_12+_13+_14},isc.A.hex2rgb=function isc_c_DrawPane_hex2rgb(_1,_2){var _3=_1.split('#')[1];var _4=_3.length/3;var _5=_3.substring(0,_4);var _6=_3.substring(_4,_4*2);var _7=_3.substring(_4*2,_4*3);var _8=parseInt(_5.toUpperCase(),16);var _9=parseInt(_6.toUpperCase(),16);var _10=parseInt(_7.toUpperCase(),16);var _11=(typeof(_2)!=='undefined')?'rgba('+_8+','+_9+','+_10+','+_2+')':'rgb('+_8+','+_9+','+_10+')';return _11},isc.A.rgb2hex=function isc_c_DrawPane_rgb2hex(_1){var _2="",v,i;var _5=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=_5.exec(_1);for(i=1;i<4;i++){v=parseInt(h[i],10).toString(16);if(v.length==1){_2+="0"+v}else{_2+=v}}
return("#"+_2)});isc.B._maxIndex=isc.C+9;isc.defineClass("DrawItem");isc.A=isc.DrawItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$1846=[];isc.A.$1847=[1,10];isc.A.$1848=[10,10];isc.A.$1849=[20,10];isc.A.$185a=[1,5];isc.A.$185b=[10,5];isc.A.$125w=isc.Math.$125w;isc.B.push(isc.A.computeAngle=function isc_c_DrawItem_computeAngle(_1,_2,_3,_4){var a=Math.atan2(_4-_2,_3-_1);if(a<0)a+=2*Math.PI;return a/this.$125w},isc.A.$135h=function isc_c_DrawItem__isSimpleGradient(_1){return(_1.direction!=null)},isc.A.$135i=function isc_c_DrawItem__isLinearGradient(_1){return(_1.x1!=null)},isc.A.$135j=function isc_c_DrawItem__isRadialGradient(_1){return(!isc.DrawItem.$135h(_1)&&!isc.DrawItem.$135i(_1))},isc.A.$135m=function isc_c_DrawItem__getGradientConstructor(_1){return(isc.DrawItem.$135h(_1)?"SimpleGradient":(isc.DrawItem.$135i(_1)?"LinearGradient":"RadialGradient"))});isc.B._maxIndex=isc.C+5;isc.A=isc.DrawItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$125w=isc.Math.$125w;isc.A.dragRepositionCursor="move";isc.A.showHover=true;isc.A.hoverDelay=300;isc.A.lineWidth=3;isc.A.lineColor="#808080";isc.A.lineOpacity=1.0;isc.A.linePattern="solid";isc.A.lineCap="round";isc.A.fillGradient=null;isc.A.fillOpacity=1.0;isc.A.shadow=null;isc.A.rotation=0;isc.A.scale=null;isc.A.svgFilter=null;isc.A.autoOffset=true;isc.A.canDrag=false;isc.A.$126i=[0,0,0,0];isc.A.computeAngle=isc.DrawItem.computeAngle;isc.A.dragStartDistance=1;isc.A.startHover=isc.Canvas.getInstanceProperty("startHover");isc.A.stopHover=isc.Canvas.getInstanceProperty("stopHover");isc.A.$80l=isc.Class.NO_OP;isc.A.eventOpaque=true;isc.A.moveKnobPoint="TL";isc.A.moveKnobOffset=[0,0];isc.A.moveKnobDefaults={_constructor:"DrawKnob",cursor:"move",knobShapeProperties:{fillColor:"#00ff00"}};isc.A.resizeKnobPoints=["TL","TR","BL","BR"];isc.A.$125g="solid";isc.A.$1364=" stroked='false'";isc.A.$1365=" filled='false'";isc.A.$125j="STROKE";isc.A.$125o="butt";isc.A.$125p="flat";isc.A.$27r="none";isc.A.$125q=[," OPACITY='",,"' DASHSTYLE='",,"' ENDCAP='",,"' STARTARROW='",,"' STARTARROWWIDTH='wide' ENDARROW='",,"' ENDARROWWIDTH='wide'/>"];isc.A.$125m="FILL";isc.A.$125n="SHADOW";isc.A.$44r={shortdot:1,dot:1,shortdash:3,dash:4,longdash:8};isc.A.$44s={shortdot:1,dot:3,shortdash:1,dash:3,longdash:3};isc.B.push(isc.A.setCursor=function isc_DrawItem_setCursor(_1){this.cursor=_1},isc.A.setDragRepositionCursor=function isc_DrawItem_setDragRepositionCursor(_1){this.dragRepositionCursor=_1},isc.A.getCurrentCursor=function isc_DrawItem_getCurrentCursor(){if(this.canDrag)return this.dragRepositionCursor;return this.cursor},isc.A.$136v=function isc_DrawItem__updateQuadTreeItem(){var _1=this.item;if(_1!=null){var _2=this.$1349(true,true);this.drawPane.quadTree.update(_1,_2[0],_2[1],(_2[2]-_2[0]),(_2[3]-_2[1]))}},isc.A.getBoundingBox=function isc_DrawItem_getBoundingBox(_1){return this.$126i},isc.A.$141a=function isc_DrawItem__adjustBoundingBoxForStroke(_1){if(this.$125h()){var _2=this.lineWidth/2;if(_1[0]<=_1[2]){_1[0]-=_2;_1[2]+=_2}else{_1[2]-=_2;_1[0]+=_2}
if(_1[1]<=_1[3]){_1[1]-=_2;_1[3]+=_2}else{_1[3]-=_2;_1[1]+=_2}}
return _1},isc.A.$1349=function isc_DrawItem__getTransformedBoundingBox(_1,_2){var t;if(_2||this.drawPane==null){t=this.$1339()}else{t=this.drawPane.$1338().duplicate().rightMultiply(this.$1339())}
var _4=this.getBoundingBox(_1);var _5=t.transform(_4[0],_4[1]),_6=t.transform(_4[2],_4[1]),_7=t.transform(_4[2],_4[3]),_8=t.transform(_4[0],_4[3]);return[Math.min(_5.v0,_6.v0,_7.v0,_8.v0),Math.min(_5.v1,_6.v1,_7.v1,_8.v1),Math.max(_5.v0,_6.v0,_7.v0,_8.v0),Math.max(_5.v1,_6.v1,_7.v1,_8.v1)]},isc.A.isInBounds=function isc_DrawItem_isInBounds(_1,_2){var _3=this.$136i(_1,_2);var b=this.getBoundingBox(true);return(((b[0]<=_3.v0&&_3.v0<=b[2])||(b[2]<=_3.v0&&_3.v0<=b[0]))&&((b[1]<=_3.v1&&_3.v1<=b[3])||(b[3]<=_3.v1&&_3.v1<=b[1])))},isc.A.$1339=function isc_DrawItem__getLocalTransform(){var t=this.$1348;if(t!=null)return t;t=isc.AffineTransform.create();if(this.translate){t.translate(this.translate[0],this.translate[1])}
if(this.scale&&this.scale.length===2){t.scale(this.scale[0],this.scale[1])}
if(this.rotation&&!isc.isA.DrawSector(this)){if(isc.isA.DrawLabel(this)){t.rotate(this.rotation,this.left,this.top+this.$104w())}else{var _2=this.getCenter&&this.getCenter();if(_2&&_2.length===2){t.rotate(this.rotation,_2[0],_2[1])}}}
return(this.$1348=t)},isc.A.$136i=function isc_DrawItem__normalize(_1,_2){var _3=this.$1346,_4=this.$1339();if(_3==null||_4!=this.$1347){_3=this.$1346=_4.getInverse();this.$1347=_4}
return _3.transform(_1,_2)},isc.A.isPointInPath=function isc_DrawItem_isPointInPath(_1,_2,_3,_4){if(!this.isInBounds(_1,_2)){return false}
if(this.drawPane.drawingType=='bitmap'){var _5=this.drawPane.getBitmapContext(),_6=this.lineColor,_7=this.lineOpacity,_8=this.linePattern;_5.save();this.lineColor="#000000";this.lineOpacity=0.0;this.linePattern="solid";try{this.drawStroke(_5);var _9=this.$136i(_1,_2);return _5.isPointInPath(_9.v0,_9.v1)}finally{this.linePattern=_8;this.lineOpacity=_7;this.lineColor=_6;_5.restore()}}else if(this.drawingVML){var _10=this.$125f();return _10.ownerDocument.elementFromPoint(_3,_4)===_10}
return true},isc.A.getHoverTarget=function isc_DrawItem_getHoverTarget(_1,_2){return(this.drawPane?this.drawPane.getHoverTarget(_1,_2):null)},isc.A.$kr=function isc_DrawItem__allowNativeTextSelection(_1){return false},isc.A.$k2=function isc_DrawItem__updateCursor(){if(this.drawPane)this.drawPane.$k2(this)},isc.A.focus=function isc_DrawItem_focus(_1){},isc.A.visibleAtPoint=function isc_DrawItem_visibleAtPoint(_1,_2){return true},isc.A.$120u=function isc_DrawItem__getUseNativeDrag(){return false},isc.A.getDragAppearance=function isc_DrawItem_getDragAppearance(_1){return"none"},isc.A.bringToFront=function isc_DrawItem_bringToFront(){},isc.A.moveToEvent=function isc_DrawItem_moveToEvent(_1,_2){this.moveTo(_1,_2)},isc.A.getRect=function isc_DrawItem_getRect(){var _1=this.getBoundingBox();return[_1[0],_1[1],_1[2]-_1[0],_1[3]-_1[1]]},isc.A.getPageOffsets=function isc_DrawItem_getPageOffsets(){var _1=this.$1349(true);var _2={left:_1[0]<<0,top:_1[1]<<0};if(this.drawPane!=null){var _3=this.drawPane.getPageOffsets(),_4=this.drawPane.$sd();_2.left+=_3.left+_4.left;_2.top+=_3.top+_4.top}
return _2},isc.A.getPageLeft=function isc_DrawItem_getPageLeft(){return this.getPageOffsets().left},isc.A.getPageTop=function isc_DrawItem_getPageTop(){return this.getPageOffsets().top},isc.A.getVisibleDimensions=function isc_DrawItem_getVisibleDimensions(){var _1=this.$1349(true);return{width:Math.ceil(_1[2]-_1[0]),height:Math.ceil(_1[3]-_1[1])}},isc.A.getVisibleWidth=function isc_DrawItem_getVisibleWidth(){return this.getVisibleDimensions().width},isc.A.getVisibleHeight=function isc_DrawItem_getVisibleHeight(){return this.getVisibleDimensions().height},isc.A.setCanDrag=function isc_DrawItem_setCanDrag(_1){this.canDrag=_1},isc.A.dragStart=function isc_DrawItem_dragStart(_1,_2){if(this.logIsInfoEnabled("drawEvents")){this.logInfo("DragStart on item:"+this.getID(),"drawEvents")}
var _3=this.getBoundingBox(),_4=_3[0],_5=_3[1],_6=this.drawPane.normalize(_1.x,_1.y),_7=(this.drawPane.showEdges&&this.drawPane.edgeSize)||0;this.lastDragX=_6.v0-this.drawPane.getPageLeft()-_7;this.lastDragY=_6.v1-this.drawPane.getPageTop()-_7;this.dragOffsetX=this.lastDragX-_4;this.dragOffsetY=this.lastDragY-_5;if(this.onDragStart(this.lastDragX,this.lastDragY)==false){return false}
return true},isc.A.onDragStart=function isc_DrawItem_onDragStart(_1,_2){},isc.A.dragMove=function isc_DrawItem_dragMove(_1,_2,_3){var _4=this.drawPane.normalize(_1.x,_1.y),_5=(this.drawPane.showEdges&&this.drawPane.edgeSize)||0,x=_4.v0-this.drawPane.getPageLeft()-_5,y=_4.v1-this.drawPane.getPageTop()-_5;if(this.keepInParentRect){var _8=this.$113u(),_9=this.getBoundingBox(),_10=_9[2]-_9[0],_11=_9[3]-_9[1];x=Math.max(_8[0]+this.dragOffsetX,Math.min(_8[2]-(_10-this.dragOffsetX),x));y=Math.max(_8[1]+this.dragOffsetY,Math.min(_8[3]-(_11-this.dragOffsetY),y))}
if(this.onDragMove(x,y)==false)return false;if(!isc.isA.DrawGroup(this)||_3==null){this.moveBy(x-this.lastDragX,y-this.lastDragY);this.lastDragX=x;this.lastDragY=y}
return true},isc.A.onDragMove=function isc_DrawItem_onDragMove(_1,_2){},isc.A.dragStop=function isc_DrawItem_dragStop(_1,_2){var _3=this.drawPane.normalize(_1.x,_1.y),_4=(this.drawPane.showEdges&&this.drawPane.edgeSize)||0,x=_3.v0-this.drawPane.getPageLeft()-_4-this.dragOffsetX,y=_3.v1-this.drawPane.getPageTop()-_4-this.dragOffsetY;this.onDragStop(x,y);return true},isc.A.onDragStop=function isc_DrawItem_onDragStop(_1,_2){},isc.A.mouseDown=function isc_DrawItem_mouseDown(){return true},isc.A.mouseUp=function isc_DrawItem_mouseUp(){return true},isc.A.click=function isc_DrawItem_click(){return true},isc.A.mouseOver=function isc_DrawItem_mouseOver(){return true},isc.A.mouseMove=function isc_DrawItem_mouseMove(){return true},isc.A.mouseOut=function isc_DrawItem_mouseOut(){return true},isc.A.showContextMenu=function isc_DrawItem_showContextMenu(){var _1=this.contextMenu;if(_1){_1.target=this;if(!isc.isA.Canvas(_1)){_1.autoDraw=false;this.contextMenu=_1=this.getMenuConstructor().create(_1)}
_1.showContextMenu()}
return(_1==null)},isc.A.getMenuConstructor=function isc_DrawItem_getMenuConstructor(){var _1=isc.ClassFactory.getClass(this.menuConstructor);if(!_1){isc.logWarn("Class not found for menuConstructor:"+this.menuConstructor+". Defaulting to isc.Menu class");_1=isc.ClassFactory.getClass("Menu")}
return _1},isc.A.$wb=function isc_DrawItem__handleHover(){var _1=isc.EH,_2=_1.lastMoveTarget,_3=_1.lastEvent;if(!_2||_2.getHoverTarget(_3)!=this||this.drawPane==null||this.drawPane.getDrawItem(_3.x,_3.y)!=this)
{return}
this.handleHover()},isc.A.$wc=function isc_DrawItem__getHoverProperties(){return this.drawPane.$wc()},isc.A.handleHover=function isc_DrawItem_handleHover(){if(this.hover&&this.hover()==false)return;if(this.showHover){var _1=this.getHoverHTML();if(_1!=null&&!isc.isAn.emptyString(_1)){isc.Hover.show(_1,this.$wc(),null,this)}}},isc.A.getHoverHTML=function isc_DrawItem_getHoverHTML(){return this.prompt},isc.A.init=function isc_DrawItem_init(){this.Super("init");if(this.ID!==false&&(this.ID==null||window[this.ID]!=this)){isc.ClassFactory.addGlobalID(this)}
this.drawItemID=isc.DrawItem.$44q++;if(this.vmlLineEventsOnly==null)this.vmlLineEventsOnly=!this.eventOpaque;var _1=this.drawGroup,_2;if(_1!=null){this.drawPane=null;if((_2=_1.drawPane)!=null){_2.addDrawItem(this,this.autoDraw,true)}else{var _3=_1.drawItems;if(_3==null)_3=_1.drawItems=[];_3.add(this)}}else if((_2=this.drawPane)!=null){_2.addDrawItem(this,this.autoDraw,true)}},isc.A.draw=function isc_DrawItem_draw(){if(this.$if){this.logDebug("DrawItem already drawn - exiting draw(). Note that this DrawItem may have been auto-drawn if setDrawPane() was called on it, or if DrawPane.addDrawItem() was called to add this DrawItem to a DrawPane.","drawing");return}
if(isc.isA.DrawGroup(this)&&this.drawItems!=null){for(var i=0;i<this.drawItems.length;i++){if(this.drawItems[i]==null){this.logInfo("drawGroup included empty entry in drawItems:"+this.echo(this.drawItems));continue}
this.drawItems[i].drawGroup=this;this.drawItems[i].drawPane=this.drawPane}
this.drawItems.removeEmpty()}
if(this.drawGroup){this.drawPane=this.drawGroup.drawPane}else{if(!this.drawPane)this.drawPane=isc.DrawPane.getDefaultDrawPane(this.drawingType)}
if(this.drawGroup){this.$148r=this.drawGroup.$148r;if(!this.drawGroup.drawItems.contains(this)){this.drawGroup.drawItems.add(this);this.$99y()}}else{if(this.$148r==null){this.$148r=this.drawPane.$148p++}
if(!this.drawPane.drawItems.contains(this)){this.drawPane.drawItems.add(this);this.$99y()}}
var _2=this.drawPane;if(_2.shouldDeferDrawing(this)){return}
if(!_2.isDrawn()&&_2.getDrawnState()!=isc.Canvas.HANDLE_DRAWN){return}
if(this.drawGroup){if(!this.drawGroup.$if){this.logWarn("Attempted draw into an undrawn group - calling draw() on the group now");this.drawGroup.draw();if(!this.drawGroup.$if){return}}}
this.drawHandle();this.$113d();this.$if=true},isc.A.$141b=function isc_DrawItem__getQuadTreeItem(){var _1=this.$1349(true,true);return{x:_1[0],y:_1[1],width:(_1[2]-_1[0]),height:(_1[3]-_1[1]),shape:this,addOrder:this.$148r}},isc.A.$113d=function isc_DrawItem__setupEventParent(){if(this.eventParent!=null)return;this.eventParent=(this.drawGroup||this.drawPane);var _1=(this.item==null&&!this.excludeFromQuadTree&&(!isc.isA.DrawGroup(this)||this.useGroupRect));for(var _2=this.drawGroup;_1&&_2!=null;_2=_2.drawGroup){if(_2.useGroupRect){_1=false}}
if(_1){var _3=this.item=this.$141b();this.drawPane.quadTree.insert(_3)}},isc.A.$113c=function isc_DrawItem__clearEventParent(){delete this.eventParent;if(this.item!=null){this.drawPane.quadTree.remove(this.item);delete this.item}},isc.A.$99y=function isc_DrawItem__drawKnobs(){if(this.knobs){for(var i=0;i<this.knobs.length;i++)this.$634(this.knobs[i])}},isc.A.drawHandle=function isc_DrawItem_drawHandle(){var _1=this.drawPane,_2=this.drawingType=_1.drawingType;if(_2=="vml"){this.drawingVML=true}else if(_2=="svg"){this.drawingSVG=true}else if(_2=="bitmap"){this.drawingBitmap=true}
if(this.drawingVML||this.drawingSVG){_1.$99x(this)}else if(this.drawingBitmap){_1.redrawBitmap()}else{this.logWarn("DrawItem: '"+_2+"' is not a supported drawingType");return}},isc.A.isDrawn=function isc_DrawItem_isDrawn(){return!!this.$if},isc.A.moved=function isc_DrawItem_moved(_1,_2){},isc.A.$105u=function isc_DrawItem__moved(_1,_2){delete this.$1348;this.moved(_1,_2);this.updateControlKnobs();this.$136v()},isc.A.resized=function isc_DrawItem_resized(){},isc.A.$5y=function isc_DrawItem__resized(){delete this.$1348;this.resized();this.updateControlKnobs();this.$136v()},isc.A.rotated=function isc_DrawItem_rotated(){},isc.A.$1071=function isc_DrawItem__rotated(){delete this.$1348;this.rotated();this.updateControlKnobs();this.$136v()},isc.A.scaled=function isc_DrawItem_scaled(){},isc.A.$136y=function isc_DrawItem__scaled(){delete this.$1348;this.scaled();this.updateControlKnobs();this.$136v()},isc.A.$634=function isc_DrawItem__showKnobs(_1){var _2=isc.DrawItem.$632(_1)
if(this[_2]==null||this[_2]==isc.Class.NO_OP){this.logWarn("DrawItem specfied with knobType:"+_1+" but no "+_2+" function exists to show the knobs. Ignoring");return false}else{this[_2]()}},isc.A.$635=function isc_DrawItem__hideKnobs(_1){var _2=isc.DrawItem.$632(_1,true)
if(this[_2]==null||this[_2]==isc.Class.NO_OP){this.logWarn("DrawItem specfied with knobType:"+_1+" but no "+_2+" function exists to hide the knobs.");return false}else{this[_2]()}},isc.A.showKnobs=function isc_DrawItem_showKnobs(_1){if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){this.showKnobs(_1[i])}
return}
if(!this.knobs)this.knobs=[];if(this.knobs.contains(_1))return;if(this.$634(_1)!==false){this.knobs.add(_1)}},isc.A.hideKnobs=function isc_DrawItem_hideKnobs(_1){if(!this.knobs)return;if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){this.hideKnobs(_1[i])}
return}
if(this.knobs.contains(_1))this.knobs.remove(_1);this.$635(_1)},isc.A.setMoveKnobOffset=function isc_DrawItem_setMoveKnobOffset(_1){var _2=this.moveKnobOffset;if(_1==null)_1=[0,0];this.moveKnobOffset=_1;if(this.$637!=null&&!this.$637.destroyed){this.$637.moveBy(_1[0]-_2[0],_1[1]-_2[1])}},isc.A.$636=function isc_DrawItem__getKnobPosition(_1){var x,y;x=_1.contains("L")?this.left:(_1.contains("R")?(this.left+this.width):(this.left+Math.round(this.width/2)));y=_1.contains("T")?this.top:(_1.contains("B")?(this.top+this.height):(this.top+Math.round(this.height/2)));return[x,y]},isc.A.showMoveKnobs=function isc_DrawItem_showMoveKnobs(){if(this.$637!=null&&!this.$637.destroyed)return;var _1=this.$636(this.moveKnobPoint);if(_1==null)return;var x=_1[0],y=_1[1];if(window.isNaN(x)||window.isNaN(y))return;if(this.moveKnobOffset){x+=this.moveKnobOffset[0];y+=this.moveKnobOffset[1]}
this.$637=this.createAutoChild("moveKnob",{x:x,y:y,drawPane:this.drawPane,$113v:this,updatePoints:function(x,y,_11,_12,_13){var _4=this.$113v,_5=(_13=="start"),_6=(_13=="move"),_7=(_13=="stop");if(_5){var _8=_4.getBoundingBox(),_9=x-_11,_10=y-_12;_4.$113w=_9-_8[0];_4.$113x=_8[2]-_9;_4.$113y=_10-_8[1];_4.$113z=_8[3]-_10}
if(_4.keepInParentRect){var _8=_4.$113u(),_9=x-_11,_10=y-_12;x=Math.max(_8[0]+_4.$113w,Math.min(_8[2]-_4.$113x,x));y=Math.max(_8[1]+_4.$113y,Math.min(_8[3]-_4.$113z,y));_11=x-_9;_12=y-_10}
if(_7){delete _4.$113w;delete _4.$113x;delete _4.$113y;delete _4.$113z}
_4.moveBy(_11,_12)}})},isc.A.hideMoveKnobs=function isc_DrawItem_hideMoveKnobs(){if(this.$637){this.$637.destroy();delete this.$637}},isc.A.getResizeKnobProperties=function isc_DrawItem_getResizeKnobProperties(_1){},isc.A.showResizeKnobs=function isc_DrawItem_showResizeKnobs(){var _1=this.$638;if(_1!=null&&!_1.isEmpty())return;_1=this.$638=[];var _2=this.resizeKnobPoints;for(var i=0;i<_2.length;i++){var _4=_2[i],_5=this.$636(_4);if(_5==null)continue;var x=_5[0],y=_5[1];if(window.isNaN(x)||window.isNaN(y))continue;var _8=isc.addProperties({},this.getResizeKnobProperties(_4),{_constructor:"DrawKnob",targetShape:this,point:_4,x:x,y:y,drawPane:this.drawPane});var _9=this.createAutoChild("resizeKnob",_8);_9.addProperties({updatePoints:function(_10,_11,_12,_13,_14){return this.targetShape.dragResizeMove(this.point,_10,_11,_12,_13,_14)}});_1.add(_9)}},isc.A.$113u=function isc_DrawItem__getParentRect(){var _1=this.keepInParentRect,_2=isc.isAn.Array(_1),_3=(_2&&_1[0]!=null?_1[0]:this.drawPane.$431),_4=(_2&&_1[1]!=null?_1[1]:this.drawPane.$432),_5=(_2&&_1[2]!=null?_1[2]:(this.drawPane.$431+this.drawPane.$433)),_6=(_2&&_1[3]!=null?_1[3]:(this.drawPane.$432+this.drawPane.$434));if(this.knobs.contains("move")&&this.moveKnobOffset!=null&&(this.moveKnobOffset[0]!=0||this.moveKnobOffset[1]!=0))
{var _7=this.$636(this.moveKnobPoint);if(_7!=null&&!window.isNaN(_7[0])&&!window.isNaN(_7[1]))
{var _8=[_7[0]+this.moveKnobOffset[0],_7[1]+this.moveKnobOffset[1]],_9,_10;var _11=this.getBoundingBox(true);if((_10=_11[1]-_8[1])>0){_4+=_10}
if((_9=_11[0]-_8[0])>0){_3+=_9}
if((_10=_8[1]-_11[3])>0){_6-=_10}
if((_9=_8[0]-_11[2])>0){_5-=_9}}}
return[_3,_4,_5,_6]},isc.A.dragResizeMove=function isc_DrawItem_dragResizeMove(_1,_2,_3,_4,_5,_6){var _7=(_6=="start"),_8=(_6=="move"),_9=(_6=="stop");var _10;if(_7){var _11=_1.contains("L"),_12=_1.contains("R"),_13=_1.contains("T"),_14=_1.contains("B"),_15=(_13?"B":"T")+(_11?"R":"L");_10=this.$1130=this.$636(_15)}else{_10=this.$1130}
var _16=Math.min(_10[0],_2),_17=Math.min(_10[1],_3),_18=Math.max(_10[0],_2),_19=Math.max(_10[1],_3),_20=(_18-_16),_21=(_19-_17),_22=(_17!=this.top||_16!=this.left);if(_9){delete this.$1130}
if(this.keepInParentRect){var _23=this.$113u();_16=Math.max(_16,_23[0]);_17=Math.max(_17,_23[1]);_18=Math.min(_18,_23[2]);_19=Math.min(_19,_23[3]);_20=_18-_16;_21=_19-_17}
var _24=(Math.abs(_20)<1||Math.abs(_21)<1);if(!_9&&!_24){this.$1131=_16;this.$1132=_17;this.$1133=_20;this.$1134=_21}
if(_9&&_24){if(this.$1131!=null){_16=this.$1131;_17=this.$1132;_20=this.$1133;_21=this.$1134}else{return false}}
if(_9){delete this.$1131;delete this.$1132;delete this.$1133;delete this.$1134}
if(this.onDragResizeMove(_16,_17,_20,_21)===false){return false}
this.resizeTo(_20,_21);if(_22)this.moveTo(_16,_17);return true},isc.A.onDragResizeMove=function isc_DrawItem_onDragResizeMove(_1,_2,_3,_4){},isc.A.hideResizeKnobs=function isc_DrawItem_hideResizeKnobs(){if(this.$638){this.$638.map("destroy");delete this.$638}},isc.A.updateControlKnobs=function isc_DrawItem_updateControlKnobs(){if(this.$637){var _1=this.$636(this.moveKnobPoint);if(this.moveKnobOffset){_1[0]+=this.moveKnobOffset[0];_1[1]+=this.moveKnobOffset[1]}
var _2=this.drawPane.drawing2screen(_1);this.$637.setCenterPoint(_2[0],_2[1])}
if(this.$638){for(var i=0;i<this.$638.length;i++){var _4=this.$638[i],_1=this.$636(_4.point);var _2=this.drawPane.drawing2screen(_1);_4.setCenterPoint(_2[0],_2[1])}}},isc.A.setDrawPane=function isc_DrawItem_setDrawPane(_1){if(_1==this.drawPane)return;if(_1==null){this.erase();this.drawPane=null;return}
_1.addDrawItem(this)},isc.A.$63r=function isc_DrawItem__drawLineStartArrow(){return false},isc.A.$63s=function isc_DrawItem__drawLineEndArrow(){return false},isc.A.erase=function isc_DrawItem_erase(_1,_2){if(!_1){if(_2){if(!this.drawPane.$993)this.drawPane.$993=[this];else this.drawPane.$993.add(this)}
if(this.drawGroup){this.drawGroup.drawItems.remove(this)}else if(this.drawPane){if(this.drawPane.drawItems)this.drawPane.drawItems.remove(this);if(this.item!=null){this.drawPane.quadTree.remove(this.item);delete this.item}}}
try{if(!this.$if){if(this.drawPane&&this.drawPane.cancelDeferredDraw(this))return;this.logInfo("DrawItem not yet drawn - exiting erase()");return}
if(this.drawingVML){var _3=this.$125f();if(isc.Page.isLoaded()){isc.Log.logDebug("Page is loaded when erasing vml drawItem "+this.ID+" - clearing outerHTML (drawPane is "+this.drawPane.ID+")","drawing");_3.outerHTML=""}else{var _4;if(isc.isA.DrawLabel(this)&&!this.synchTextMove){_4=this.drawPane.getHandle()}else if(this.drawGroup&&this.drawGroup.renderGroupElement){_4=this.drawGroup.$125f()}else{_4=isc.Element.get(this.drawPane.getID()+"$435")}
isc.Log.logDebug("Page is not loaded when eraseing vml drawItem "+this.ID+" - removing vmlHandle from vmlContainer  (drawPane is "+this.drawPane.ID+")","drawing");_4.removeChild(_3)}
this.$44t=null;this.$44u=null;this.$44w=null;this.$44x=null;this.$44j=null;this.drawingVML=false}else if(this.drawingSVG){if(_2)this.$999=this.$44z
else{if(this.$44y)this.$44y.removeChild(this.$44z)}
this.$44m=null;this.$44y=null;this.$44z=null;this.drawingSVG=false}else if(this.drawingBitmap){if(!_1){this.drawPane.redrawBitmap()}else{}
this.drawingBitmap=false}
if(this.knobs){for(var i=0;i<this.knobs.length;i++){this.$635(this.knobs[i])}}
this.$113c();this.$if=false}finally{this.drawGroup=null;this.drawPane=null}},isc.A.destroy=function isc_DrawItem_destroy(_1){this.Super("destroy",arguments);if(this.destroyed)return;this.destroying=true;this.erase(_1);isc.ClassFactory.dereferenceGlobalID(this);this.destroyed=true},isc.A.$44v=function isc_DrawItem__getElementVML(_1){var _2=[this.drawPane.startTagVML(this.vmlElementName)," ID='",_1,"' ",this.getAttributesVML()];var _3=this.$125h(),_4=this.$125k();if(_3){_2.push(" strokecolor='",this.lineColor,"' strokeweight='",this.lineWidth*this.drawPane.zoomLevel,"px'")}else{_2.push(this.$1364)}
if(!this.vmlLineEventsOnly||_4){var _5=!this.fillColor?"white":this.fillColor;_2.push(" fillcolor='",this.fillColor,"'")}else{_2.push(this.$1365)}
_2.push(">");if(_3){if(this.lineOpacity!=1||this.linePattern!=this.$125g||this.startArrow||this.endArrow){_2.push(this.$125i())}}
if(!this.vmlLineEventsOnly||(_4&&(this.fillOpacity!=1||this.fillGradient!=null)))
{_2.push(this.$125l())}
if(this.shadow){_2.push(this.drawPane.startTagVML(this.$125n)," COLOR='",this.shadow.color,"' OFFSET='",this.shadow.offset[0],"pt,",this.shadow.offset[1],"pt'/>")}
_2.push(this.drawPane.endTagVML(this.vmlElementName));return _2.join(isc.$ad)},isc.A.$125h=function isc_DrawItem__hasStroke(){return this.lineOpacity!=0&&!!this.lineColor},isc.A.$125k=function isc_DrawItem__hasFill(){return this.fillOpacity!=0&&(this.fillGradient!=null||this.fillColor!=null)},isc.A.$125f=function isc_DrawItem__getVMLHandle(){if(this.$44u!=null)return this.$44u;return(this.$44u=isc.Element.get("isc_DrawItem_"+this.drawItemID))},isc.A.$125i=function isc_DrawItem__getElementStrokeVML(){if(!this.$125h()){return this.drawPane.startTagVML(this.$125j)+" ON='false'/>"}else{var _1=this.$125q;_1[0]=this.drawPane.startTagVML(this.$125j);_1[2]=this.lineOpacity;_1[4]=this.linePattern;var _2=this.lineCap;_1[6]=_2==this.$125o?this.$125p:this.lineCap;_1[8]=this.startArrow?this.startArrow:this.$27r;_1[10]=this.endArrow?this.endArrow:this.$27r;return _1.join(isc.emptyString)}},isc.A.$125r=function isc_DrawItem__getVMLStrokeHandle(){var _1=this.$44w;if(_1!=null)return _1;var _2=this.$125f();if(_2==null)return null;var _3=_2.firstChild;if(_3!=null&&_3.tagName==this.$125j){_1=_3}else{_1=isc.Element.insertAdjacentHTML(_2,"afterbegin",this.$125i(),true)}
return(this.$44w=_1)},isc.A.$125l=function isc_DrawItem__getElementFillVML(){var _1=this.drawPane.startTagVML(this.$125m);var _2=this.$125k();if(this.vmlLineEventsOnly&&!_2){_1+=" ON='false'/>"}else{var _3=(isc.isA.String(this.fillGradient)?this.drawPane.getGradient(this.fillGradient):this.fillGradient);if(_3!=null){var _4,_5;if(isc.DrawItem.$135h(_3)||isc.DrawItem.$135i(_3)){var _6=this.$830(_3);var _7=_3.direction||180*Math.atan2((_6[3]-_6[1]),(_6[2]-_6[0]))/Math.PI;_7=(270-_7)%360;_4="' COLORS='";if(_3.startColor&&_3.endColor){_4+='0% '+_3.startColor+', 100% '+_3.endColor}else if(_3.colorStops&&_3.colorStops.length){for(var i=0;i<_3.colorStops.length;++i){var _9=_3.colorStops[i];if(isc.isA.String(_9.offset)&&String(_9.offset).endsWith('%')){_5=_9.offset}else{_5=_9.offset}
_4+=_5+' '+_9.color;if(i<_3.colorStops.length-1){_4+=", "}}}
_1+=" TYPE='gradient' ANGLE='"+_7+_4}else{_4="' COLORS='";for(var i=0;i<_3.colorStops.length;++i){var _9=_3.colorStops[i];if(isc.isA.String(_9.offset)&&String(_9.offset).endsWith('%')){_5=_9.offset}else{_5=parseFloat(_9.offset)*100+'%'}
_4+=_5+' '+_9.color;if(i<_3.colorStops.length-1){_4+=", "}}
_1+=" TYPE='gradienttitle' OPACITY='1.0' FOCUS='100%' FOCUSSIZE='0,0' FOCUSPOSITION='0.5,0.5' METHOD='linear"+_4}}else{_1+=" ON='true"}
var _10=!this.vmlLineEventsOnly&&!_2?0:this.fillOpacity;_1+="' OPACITY='"+Math.round(65536*_10)+"f'/>"}
return _1},isc.A.$125s=function isc_DrawItem__getVMLFillHandle(){var _1=this.$44x;if(_1!=null)return _1;var _2=this.$125f();if(_2==null)return null;var _3=_2.firstChild;if(_3==null||_3.tagName==this.$125n){_1=isc.Element.insertAdjacentHTML(_2,"afterbegin",this.$125l(),true)}else{if(_3.tagName==this.$125m){_1=_3}else{var _4=_3.nextSibling;if(_4!=null&&_4.tagName==this.$125m){_1=_4}else{_1=isc.Element.insertAdjacentHTML(_3,"afterend",this.$125l(),true)}}}
return(this.$44x=_1)},isc.A.getAttributesVML=function isc_DrawItem_getAttributesVML(){return""},isc.A.getSvgString=function isc_DrawItem_getSvgString(_1){_1=_1||isc.SVGStringConversionContext.create();var _2=_1.svgDefStrings||(_1.svgDefStrings={});var _3="none",_4,_5;var _6=this.svgFillGradient||this.fillGradient;if(_6!=null){if(isc.isA.String(_6))_6=this.drawPane.getGradient(_6);if(_6){if(_6.id==undefined){_6.id="gradient"+_1.getNextSvgDefNumber()}
var _7=_6.id;this.$1139=_7;var _8;if(_6.direction!=null){_8=this.drawPane.$99c(_7,_6,_1,this)}else if(_6.x1!=null){_8=this.drawPane.$99d(_7,_6,_1,this)}else{_8=this.drawPane.$99e(_7,_6,_1,this)}
_7=this.$1139;_2[_7]=_8;if(_1.printForExport===false){this.drawPane.addGradient(_6)}
_3="url(#"+_7+")"}}else if(this.fillColor){_3=this.fillColor}
var _9="<"+this.svgElementName+" id='isc_DrawItem_"+this.drawItemID+"' stroke-width='"+this.lineWidth+"px' stroke-opacity='"+this.lineOpacity+"' stroke-dasharray='"+this.$441()+"' stroke-linecap='"+this.lineCap+"' stroke='"+((this.lineColor&&this.lineColor!="")?this.lineColor:"none")+"' fill='"+_3+"' fill-opacity='"+this.fillOpacity;if(this.svgFilter!=null&&this.drawPane){var _10=_2[this.svgFilter]||(_2[this.svgFilter]=this.drawPane.$99f(this.svgFilter));if(_10){_9+="' filter='url(#"+this.svgFilter+")"}}
if(this.rotation&&(_5=this.getCenter())&&_5.length===2){_9+="' transform='rotate("+this.rotation+" "+_5[0]+" "+_5[1]+")"}
if(this.startArrow&&this.$63r()){var _11=this.$442();if(!_2[_11]){_2[_11]=this.$99g(_11,this.lineColor,this.lineOpacity,true)}
_9+="' marker-start='url(#"+_11+")"}
if(this.endArrow&&this.$63s()){var _12=this.$443();if(!_2[_12]){_2[_12]=this.$99g(_12,this.lineColor,this.lineOpacity,false)}
_9+="' marker-end='url(#"+_12+")"}
_9+="' "+this.getAttributesSVG();if(this.contents){_9+=">"+isc.makeXMLSafe(this.contents)+"</"+this.svgElementName+">"}else{_9+="/>"}
return _9},isc.A.getAttributesSVG=function isc_DrawItem_getAttributesSVG(){return""},isc.A.$830=function isc_DrawItem__normalizeLinearGradient(_1){return isc.DrawItem.$830(_1,this.getBoundingBox())},isc.A.$831=function isc_DrawItem__normalizeRadialGradient(_1){return isc.DrawItem.$831(_1,this.getBoundingBox(),this.getCenter())},isc.A.$85x=function isc_DrawItem__drawLinePattern(_1,_2,_3,_4,_5){var _6=this.$185c(),_7=_6.length,_8=(_3-_1),_9=(_4-_2),_10=isc.Math.$101k(_8,_9),_11=_10,_12=0,_13=true;this.bmMoveTo(_1,_2,_5);while(_11>=0.1){var _14=Math.min(_6[_12++%_7],_11);_1+=_8*_14/_10;_2+=_9*_14/_10;this[_13?'bmLineTo':'bmMoveTo'](_1,_2,_5);_11-=_14;_13=!_13}});isc.evalBoundary;isc.B.push(isc.A.$185c=function isc_DrawItem__getDashArray(){switch(this.linePattern.toLowerCase()){case"solid":return isc.DrawItem.$1846;case"dot":return isc.DrawItem.$1847;case"dash":return isc.DrawItem.$1848;case"longdash":return isc.DrawItem.$1849;case"shortdot":return isc.DrawItem.$185a;default:case"shortdash":return isc.DrawItem.$185b}},isc.A.drawStroke=function isc_DrawItem_drawStroke(_1){_1.lineWidth=this.lineWidth;_1.lineCap=this.lineCap;_1.strokeStyle=this.lineColor;_1.globalAlpha=this.lineOpacity;if(_1.setLineDash)_1.setLineDash(this.$185c());_1.beginPath();this.drawBitmapPath(_1);_1.stroke()},isc.A.drawBitmap=function isc_DrawItem_drawBitmap(_1){_1.save();try{var t=this.$1339();_1.transform(t.m00,t.m10,t.m01,t.m11,t.m02,t.m12);if(this.shadow){_1.shadowColor=this.shadow.color;_1.shadowBlur=this.shadow.blur;_1.shadowOffsetX=this.shadow.offset[0];_1.shadowOffsetY=this.shadow.offset[1]}
if(this.$125k()){var _3=this.fillColor,_4=(typeof(this.fillGradient)==='string'?this.drawPane.getGradient(this.fillGradient):this.fillGradient);if(_4!=null){var _5,_6;if(isc.DrawItem.$135h(_4)||isc.DrawItem.$135i(_4)){_5=this.$830(_4);_3=_1.createLinearGradient(_5[0],_5[1],_5[2],_5[3])}else{_5=this.$831(_4);_3=_1.createRadialGradient(_5[0],_5[1],_5[2],_5[3],_5[4],_5[5])}
if(_4.startColor&&_4.endColor){_3.addColorStop(0.0,_4.startColor);_3.addColorStop(1.0,_4.endColor)}else if(_4.colorStops&&_4.colorStops.length){for(var i=0;i<_4.colorStops.length;++i){_6=_4.colorStops[i].offset;if(typeof(_6)==='string'&&_6.endsWith('%')){_6=parseFloat(_6.substring(0,_6.length-1))/100.0}
_3.addColorStop(_6,_4.colorStops[i].color)}}}
_1.fillStyle=_3;_1.globalAlpha=this.fillOpacity;_1.beginPath();var _8=this.linePattern;this.linePattern="solid";try{this.drawBitmapPath(_1)}finally{this.linePattern=_8}
_1.fill()}
if(this.$125h()){if(this.shadow&&_3){_1.shadowColor=null;_1.shadowBlur=null;_1.shadowOffsetX=0;_1.shadowOffsetY=0}
this.drawStroke(_1)}}catch(e){if(!isc.Log.supportsOnError)this.$am(e);else this.logWarn("exception during drawBitmap(): "+e)}finally{_1.restore()}},isc.A.$442=function isc_DrawItem__getSVGStartArrowID(){if(!this.$444){if(this.startArrow&&this.$44m&&this.$44m.getElementById(this.startArrow)&&(this.startArrow!="open"&&this.startArrow!="closed")){this.$444=this.startArrow}else{this.$444="isc_DrawItem_"+this.drawItemID+"$446"}}
return this.$444},isc.A.$443=function isc_DrawItem__getSVGEndArrowID(){if(!this.$448){if(this.endArrow&&this.$44m&&this.$44m.getElementById(this.endArrow)&&(this.endArrow!="open"&&this.endArrow!="closed")){this.$448=this.endArrow}else{this.$448="isc_DrawItem_"+this.drawItemID+"$45a"}}
return this.$448},isc.A.$99g=function isc_DrawItem__getArrowMarkerSvgString(_1,_2,_3,_4){return"<marker id='"+_1+"' viewBox='0 0 10 10' refY='5' refX='"+(_4?"10":"0")+"' orient='auto' markerUnits='strokeWidth' markerWidth='4' markerHeight='3'><path d='"+(_4?"M 10 0 L 0 5 L 10 10 z":"M 0 0 L 10 5 L 0 10 z")+"' fill='"+((_2&&_2!="")?_2:"none")+"' fill-opacity='"+_3+"'/></marker>"},isc.A.show=function isc_DrawItem_show(){if(!this.hidden)return;this.hidden=false;if(this.drawingVML){this.$125f().style.visibility="visible"}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"visibility","visible")}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.hide=function isc_DrawItem_hide(){if(this.hidden)return;this.hidden=true;if(this.drawingVML){this.$125f().style.visibility="hidden"}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"visibility","hidden")}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.setLineWidth=function isc_DrawItem_setLineWidth(_1){if(_1!=null)this.lineWidth=_1;if(this.drawingVML){this.$44l(this.lineWidth*this.drawPane.zoomLevel)}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"stroke-width",this.lineWidth+"px");this.$44z.setAttributeNS(null,"stroke-dasharray",this.$441())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.$44l=function isc_DrawItem__setLineWidthVML(_1){var _2=this.$125f();if(_2!=null)_2.strokeweight=_1+"px"},isc.A.setLineColor=function isc_DrawItem_setLineColor(_1){this.lineColor=_1;if(this.drawingVML){if(this.$125h()){var _2=this.$125r();if(_1){_2.on=true;this.$44u.strokecolor=_1}else{_2.on=false}}}else if(this.drawingSVG){var _1=this.lineColor?this.lineColor:"none";this.$44z.setAttributeNS(null,"stroke",_1);if(this.$445){this.$445.setAttributeNS(null,"stroke",_1);this.$445.setAttributeNS(null,"fill",_1)}
if(this.$449){this.$449.setAttributeNS(null,"stroke",_1);this.$449.setAttributeNS(null,"fill",_1)}}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.setLineOpacity=function isc_DrawItem_setLineOpacity(_1){if(_1!=null)this.lineOpacity=_1;if(this.drawingVML){this.$125r().opacity=_1}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"stroke-opacity",this.lineOpacity);if(this.$445){this.$445.setAttributeNS(null,"stroke-opacity",this.lineOpacity);this.$445.setAttributeNS(null,"fill-opacity",this.lineOpacity)}
if(this.$449){this.$449.setAttributeNS(null,"stroke-opacity",this.lineOpacity);this.$449.setAttributeNS(null,"fill-opacity",this.lineOpacity)}}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.setLinePattern=function isc_DrawItem_setLinePattern(_1){this.linePattern=_1;if(this.drawingVML){this.$125r().dashstyle=this.linePattern}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"stroke-dasharray",this.$441())}else if(this.drawingBitmap){}},isc.A.$441=function isc_DrawItem__getSVGDashArray(){var _1=this.linePattern;if(!_1||_1=="solid"||_1=="")return"none";if(isc.isAn.Array(_1))return _1.join("px,")+"px";var _2=this.$44r[_1];var _3=this.$44s[_1];if(this.lineCap!="butt"){_2=Math.max(0.1,_2-1);_3++}
return(_2*this.lineWidth)+"px,"+(_3*this.lineWidth)+"px"},isc.A.setLineCap=function isc_DrawItem_setLineCap(_1){if(_1!=null)this.lineCap=_1;if(this.drawingVML){this.$125r().endcap=this.lineCap==this.$125o?this.$125p:this.lineCap}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"stroke-linecap",this.lineCap);this.$44z.setAttributeNS(null,"stroke-dasharray",this.$441())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.setShadow=function isc_DrawItem_setShadow(_1){if(_1!=null){this.shadow=_1}
if(this.drawingVML){}else if(this.drawingSVG){}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.supportsStartArrow=function isc_DrawItem_supportsStartArrow(){return this.getClass().isMethodSupported("setStartArrow")},isc.A.setStartArrow=function isc_DrawItem_setStartArrow(_1){var _2=this.$63r();var _3;if(_1!==_3)this.startArrow=_1;else _1=this.startArrow;var _4=this.$63r();if(_2!=_4){this.setStartPoint()}
if(_4)_1=null;if(this.drawingVML){this.$125r().startarrow=_1?_1:this.$27r}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"marker-start",(_1?"url(#"+this.$442()+")":"none"))}else if(this.drawingBitmap){}},isc.A.supportsEndArrow=function isc_DrawItem_supportsEndArrow(){return this.getClass().isMethodSupported("setEndArrow")},isc.A.setEndArrow=function isc_DrawItem_setEndArrow(_1){var _2=this.$63s();var _3;if(_1!==_3)this.endArrow=_1;else _1=this.endArrow;var _4=this.$63s();if(_2!=_4){this.setEndPoint()}
if(_4)_1=null;if(this.drawingVML){this.$125r().endarrow=_1?_1:this.$27r}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"marker-end",(_1?"url(#"+this.$443()+")":"none"))}else if(this.drawingBitmap){}},isc.A.moveBy=function isc_DrawItem_moveBy(_1,_2){this.$105u(_1,_2)},isc.A.resizeBy=function isc_DrawItem_resizeBy(_1,_2){this.$5y()},isc.A.resizeTo=function isc_DrawItem_resizeTo(_1,_2){var _3=0,_4=0;if(this.item){if(_1!=null)_3=_1-this.item.width;if(_2!=null)_4=_2-this.item.height}
this.resizeBy(_3,_4)},isc.A.rotateBy=function isc_DrawItem_rotateBy(_1){this.rotation+=_1;delete this.$1348;if(this.drawingVML){this.$125f().style.rotation=this.rotation}else if(this.drawingSVG){var _2=this.getCenter();this.$44z.setAttributeNS(null,"transform","translate("+_2[0]+","+_2[1]+") rotate("+this.rotation+") translate("+-_2[0]+","+-_2[1]+")")}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.$1071()},isc.A.rotateTo=function isc_DrawItem_rotateTo(_1){this.rotateBy(_1-this.rotation)},isc.A.scaleBy=function isc_DrawItem_scaleBy(_1,_2){var _3=this.scale;if(_3==null){_3=this.scale=[]}
_3[0]=_1;_3[1]=_2;delete this.$1348;if(this.drawingVML){}else if(this.drawingSVG){}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.$136y()},isc.A.scaleTo=function isc_DrawItem_scaleTo(_1,_2){this.scaleBy(_1,_2)},isc.A.setFillColor=function isc_DrawItem_setFillColor(_1){this.fillColor=_1;if(this.drawingVML){var _2=this.$125k();if(!this.vmlLineEventsOnly||_2){var _3=this.$125s();_3.on=true;var _4=!_1?"white":_1;this.$44u.fillcolor=_4;var _5=!this.vmlLineEventsOnly&&!_2?0:this.fillOpacity;_3.opacity=Math.round(65536*_5)+"f"}else if(this.$44x!=null){this.$44x.on=false}}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"fill",(this.fillColor&&this.fillColor!="")?this.fillColor:"none")}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.setFillGradient=function isc_DrawItem_setFillGradient(_1){this.fillGradient=_1;if(this.drawingVML){}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"fill",(this.fillColor&&this.fillColor!="")?this.fillColor:"none")}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.setFillOpacity=function isc_DrawItem_setFillOpacity(_1){if(_1!=null)this.fillOpacity=_1;if(this.drawingVML){var _2=this.$125k();if(!this.vmlLineEventsOnly||_2){var _3=this.$125s();_3.on=true;var _4=!this.vmlLineEventsOnly&&!_2?0:this.fillOpacity;_3.opacity=Math.round(65536*_4)+"f"}else if(this.$44x!=null){this.$44x.on=false}}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"fill-opacity",this.fillOpacity)}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.bmMoveTo=function isc_DrawItem_bmMoveTo(_1,_2,_3){var _4=(this.autoOffset&&(this.lineWidth==0||parseInt(this.lineWidth)%2)==1?0.5:0);try{_3.moveTo(_1+_4,_2+_4)}catch(e){this.logWarn("error on moveTo(): left: "+_1+", top: "+_2+(this.logIsInfoEnabled()?this.getStackTrace():""))}},isc.A.bmArc=function isc_DrawItem_bmArc(_1,_2,_3,_4,_5,_6){var _7=(this.autoOffset&&(this.lineWidth==0||parseInt(this.lineWidth)%2)==1?0.5:0);try{_6.arc(_1+_7,_2+_7,_3,_4,_5,false)}catch(e){this.logWarn("error on arc(): centerPointX: "+_1+", centerPointY: , radius: "+_3+", startRadian: "+_4+", endRadian: "+_5+(this.logIsInfoEnabled()?this.getStackTrace():""))}},isc.A.bmLineTo=function isc_DrawItem_bmLineTo(_1,_2,_3){var _4=(this.autoOffset&&(this.lineWidth==0||parseInt(this.lineWidth)%2)==1?0.5:0);try{_3.lineTo(_1+_4,_2+_4)}catch(e){this.logWarn("error on lineTo(): left: "+_1+", top: "+_2+(this.logIsInfoEnabled()?this.getStackTrace():""))}},isc.A.bmQuadraticCurveTo=function isc_DrawItem_bmQuadraticCurveTo(_1,_2,_3,_4,_5){var _6=(this.autoOffset&&(this.lineWidth==0||parseInt(this.lineWidth)%2)==1?0.5:0);try{_5.quadraticCurveTo(_1+_6,_2+_6,_3+_6,_4+_6)}catch(e){this.logWarn("error on quadraticCurveTo(): x1: "+_1+", y1: "+_2+", x2: "+_3+", y2: "+_4+(this.logIsInfoEnabled()?this.getStackTrace():""))}},isc.A.bmFillText=function isc_DrawItem_bmFillText(_1,_2,_3,_4){try{_4.fillText(_1,_2,_3)}catch(e){this.logWarn("error on fillText(): text: "+_1+", left: "+_2+", top: "+_3+(this.logIsInfoEnabled()?this.getStackTrace():""))}},isc.A.bmStrokeText=function isc_DrawItem_bmStrokeText(_1,_2,_3,_4){try{_4.strokeText(_1,_2,_3)}catch(e){this.logWarn("error on fillText(): text: "+_1+", left: "+_2+", top: "+_3+(this.logIsInfoEnabled()?this.getStackTrace():""))}});isc.B._maxIndex=isc.C+132;isc.A=isc.DrawItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$44q=0;isc.A.$630=["show",,"Knobs"];isc.A.$631=["hide",,"Knobs"];isc.B.push(isc.A.$632=function isc_c_DrawItem__getShowKnobsFunctionName(_1,_2){if(!this.$633){this.$633={}}
if(this.$633[_1]==null){_1=_1.substring(0,1).toUpperCase()+_1.substring(1);this.$630[1]=_1;this.$631[1]=_1;this.$633[_1]=[this.$630.join(isc.emptyString),this.$631.join(isc.emptyString)]}
return _2?this.$633[_1][1]:this.$633[_1][0]},isc.A.registerEventStringMethods=function isc_c_DrawItem_registerEventStringMethods(){var _1=isc.EH;for(var _2 in _1.eventTypes){this.registerStringMethods(_1.eventTypes[_2],_1.$i3)}},isc.A.$830=function isc_c_DrawItem__normalizeLinearGradient(_1,_2){var _3=new Array(4),_4=Math.abs(_2[2]-_2[0]),_5=Math.abs(_2[3]-_2[1]);if(typeof(_1.direction)==='number'){var _6=Math.round(isc.Math.$101k(_4,_5)),_7=_1.direction*isc.Math.$125w;_3[0]=_2[0];_3[2]=_2[0]+_6*Math.cos(_7);_3[1]=_2[1];_3[3]=_2[1]+_6*Math.sin(_7)}else{if(typeof(_1.x1)==='string'&&_1.x1.endsWith('%')){_3[0]=(_2[0]+parseFloat(_1.x1)*_4/100.0)}else if(isc.isA.Number(_1.x1)){_3[0]=_1.x1}
if(typeof(_1.y1)==='string'&&_1.y1.endsWith('%')){_3[1]=(_2[1]+parseFloat(_1.y1)*_5/100.0)}else if(isc.isA.Number(_1.y1)){_3[1]=_1.y1}
if(typeof(_1.x2)==='string'&&_1.x2.endsWith('%')){_3[2]=(_2[0]+parseFloat(_1.x2)*_4/100.0)}else if(isc.isA.Number(_1.x2)){_3[2]=_1.x2}
if(typeof(_1.y2)==='string'&&_1.y2.endsWith('%')){_3[3]=(_2[1]+parseFloat(_1.y2)*_5/100.0)}else if(isc.isA.Number(_1.y2)){_3[3]=_1.y2}}
return _3},isc.A.$831=function isc_c_DrawItem__normalizeRadialGradient(_1,_2,_3){var _4=new Array(6);if(typeof(_1.fx)==='string'){if(_1.fx.endsWith('%')){_4[0]=(_3[0]+(parseFloat(_1.fx)/100.0))}else{_4[0]=(_3[0]+parseFloat(_1.fx))}}else if(_1.fx!=undefined){_4[0]=(_3[0]+_1.fx)}else{_4[0]=_3[0]}
if(typeof(_1.fy)==='string'){if(_1.fy.endsWith('%')){_4[1]=(_3[1]+(parseFloat(_1.fy)/100.0))}else{_4[1]=(_3[1]+parseFloat(_1.fy))}}else if(_1.fy!=undefined){_4[1]=(_3[1]+_1.fy)}else{_4[1]=_3[1]}
_4[2]=0;if(typeof(_1.cx)==='string'&&isc.isA.Number(_2[0])){if(_1.cx.endsWith('%')){_4[3]=(_2[0]-Math.round(_2[0]*parseInt(_1.cx)/100.0))}else{_4[3]=(_3[0]+parseInt(_1.cx))}}else{_4[3]=(_3[0]+_1.cx)}
if(typeof(_1.cy)==='string'&&isc.isA.Number(_2[1])){if(_1.cx.endsWith('%')){_4[4]=(_2[1]-Math.round(_2[1]*parseInt(_1.cy)/100.0))}else{_4[4]=(_3[1]+parseInt(_1.cy))}}else{_4[4]=(_3[1]+_1.cy)}
if(typeof(_1.r)==='string'&&isc.isA.Number(_2[0])&&isc.isA.Number(_2[1])){var _5=_2[2]-_2[0],_6=_2[3]-_2[1],r=isc.Math.$101k(_5,_6);if(_1.r.endsWith('%')){_4[5]=(r*parseFloat(_1.r)/100.0)}else{_4[5]=(r*parseFloat(_1.r))}}else{_4[5]=_1.r}
return _4});isc.B._maxIndex=isc.C+4;isc.DrawItem.registerEventStringMethods();isc.defineClass("DrawGroup","DrawItem");isc.A=isc.DrawGroup.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.renderGroupElement=false;isc.A.useGroupRect=false;isc.A.left=0;isc.A.top=0;isc.A.width=1;isc.A.height=1;isc.A.showResizeKnobs=isc.Class.NO_OP;isc.A.hideResizeKnobs=isc.Class.NO_OP;isc.A.showMoveKnobs=isc.Class.NO_OP;isc.A.hideMoveKnobs=isc.Class.NO_OP;isc.A.vmlElementName="GROUP";isc.A.$44l=isc.Class.NO_OP;isc.A.isPointInPath=isc.DrawItem.getInstanceProperty("isInBounds");isc.B.push(isc.A.init=function isc_DrawGroup_init(){if(this.drawItems==null){this.drawItems=[]}else{for(var i=0;i<this.drawItems.length;i++){var _2=this.drawItems[i];if(_2.drawPane!=null){_2.drawPane.removeDrawItem(_2)}
_2.drawGroup=this}}
this.Super("init")},isc.A.$148s=function isc_DrawGroup__addedToDrawPane(_1){var _2=this.drawItems;for(var i=0,_4=(_2==null?0:_2.length);i<_4;++i){var _5=_2[i];_5.drawPane=_1;_5.$148r=this.$148r;if(isc.isA.DrawGroup(_5)){_5.$148s(_1)}}},isc.A.$148t=function isc_DrawGroup__removedFromDrawPane(_1){var _2=this.drawItems;for(var i=0,_4=(_2==null?0:_2.length);i<_4;++i){var _5=_2[i];delete _5.drawPane;if(_5.item!=null){_1.quadTree.remove(_5.item);delete _5.item}
if(isc.isA.DrawGroup(_5)){_5.$148t(_1)}}},isc.A.erase=function isc_DrawGroup_erase(_1,_2){for(var i=0;i<this.drawItems.length;i++){this.drawItems[i].erase(true,_2)}
this.drawItems=[];this.Super("erase",arguments)},isc.A.removeDrawItem=function isc_DrawGroup_removeDrawItem(_1){if(_1.$if){_1.erase()}else{var _2=this.drawItems.remove(_1);if(!_2&&this.$1262!=null){_2=this.$1262.remove(_1)}
if(isc.isA.DrawGroup(_1)){_1.$148t(this)}}
delete _1.drawGroup;delete _1.drawPane},isc.A.$44v=function isc_DrawGroup__getElementVML(_1,_2){var _3=[this.drawPane.startTagVML(this.vmlElementName)," ID='",_1,"' "," onmousedown='return ",this.drawPane.getID(),".mouseDown();' ",this.getAttributesVML(),">"];var _4=this.drawItems;if(_4!=null&&_4.length>0){for(var i=0;i<_4.length;++i){var _6=_4[i];_3.push(_6.$44v("isc_DrawItem_"+_6.drawItemID,_2))}}
_3.push(this.drawPane.endTagVML(this.vmlElementName));return _3.join(isc.emptyString)},isc.A.getSvgString=function isc_DrawGroup_getSvgString(_1){_1=_1||isc.SVGStringConversionContext.create();var _2="<g id='isc_DrawItem_"+this.drawItemID+"'";var _3=this.getAttributesSVG();if(_3)_2+=" "+_3;if(this.drawItems&&this.drawItems.length){_2+=">";for(var i=0;i<this.drawItems.length;++i){_2+=this.drawItems[i].getSvgString(_1)}
_2+="</g>"}else _2+="/>";return _2},isc.A.draw=function isc_DrawGroup_draw(){if(this.drawItems==null)this.drawItems=[];this.Super("draw",arguments);for(var i=0;i<this.drawItems.length;i++){this.drawItems[i].drawGroup=this;this.drawItems[i].draw()}},isc.A.drawHandle=function isc_DrawGroup_drawHandle(){if(!this.renderGroupElement)return;return this.Super("drawHandle",arguments)},isc.A.drawBitmap=function isc_DrawGroup_drawBitmap(_1){for(var i=0,_3=this.drawItems.length;i<_3;++i){var _4=this.drawItems[i];if(!_4.hidden){_4.drawBitmap(_1);_4.$113d();_4.$if=true}}},isc.A.setLeft=function isc_DrawGroup_setLeft(_1){this.moveTo(_1,this.top)},isc.A.setTop=function isc_DrawGroup_setTop(_1){this.moveTo(this.left,_1)},isc.A.setWidth=function isc_DrawGroup_setWidth(_1){this.width=_1;this.$5y()},isc.A.setHeight=function isc_DrawGroup_setHeight(_1){this.height=_1;this.$5y()},isc.A.getGroupRect=function isc_DrawGroup_getGroupRect(){return[this.left,this.top,this.width,this.height]},isc.A.moveTo=function isc_DrawGroup_moveTo(_1,_2){this.moveBy(_1-this.left,_2-this.top)},isc.A.moveBy=function isc_DrawGroup_moveBy(_1,_2){this.left+=_1;this.top+=_2;this.Super("moveBy",arguments)},isc.A.rotateTo=function isc_DrawGroup_rotateTo(_1){for(var i=0;i<this.drawItems.length;i++){var _3=this.drawItems[i];_3.rotateTo(_1)}},isc.A.rotateBy=function isc_DrawGroup_rotateBy(_1){for(var i=0;i<this.drawItems.length;++i){var _3=this.drawItems[i];_3.rotateBy(_1)}},isc.A.scaleBy=function isc_DrawGroup_scaleBy(_1,_2){for(var i=0;i<this.drawItems.length;++i){var _4=this.drawItems[i];_4.scaleBy(_1,_2)}},isc.A.getCenter=function isc_DrawGroup_getCenter(){return[this.left+Math.round(this.width/2),this.top+Math.round(this.height/2)]},isc.A.getBoundingBox=function isc_DrawGroup_getBoundingBox(_1){return[this.left,this.top,this.left+this.width,this.top+this.height]},isc.A.scaleTo=function isc_DrawGroup_scaleTo(_1,_2){this.scale=this.scale||[];this.scale[0]+=(this.scale[0]||0)+_1;this.scale[1]+=(this.scale[1]||0)+_2;delete this.$1348;this.scaleBy(_1,_2)});isc.B._maxIndex=isc.C+23;isc.DrawGroup.markUnsupportedMethods("$class does not support knobs.",["showKnobs","setMoveKnobOffset"]);isc.DrawGroup.markUnsupportedMethods(null,["setLineWidth","setLineColor","setLineOpacity","setLinePattern","setLineCap","setShadow","setFillColor","setFillGradient","setFillOpacity"]);isc.DrawGroup.markUnsupportedMethods(null,["setStartArrow","setEndArrow"]);isc.defineClass("DrawLine","DrawItem");isc.A=isc.DrawLine.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.startPoint=[0,0];isc.A.endPoint=[100,100];isc.A.svgElementName="line";isc.A.vmlElementName="LINE";isc.A.eventOpaque=false;isc.A.showResizeKnobs=isc.Class.NO_OP;isc.A.hideResizeKnobs=isc.Class.NO_OP;isc.A.showMoveKnobs=isc.Class.NO_OP;isc.A.hideMoveKnobs=isc.Class.NO_OP;isc.B.push(isc.A.init=function isc_DrawLine_init(){this.startPoint=this.startPoint.duplicate();this.endPoint=this.endPoint.duplicate();this.startPoint[0]=this.startLeft=(this.startLeft==0?0:(this.startLeft||this.startPoint[0]));this.startPoint[1]=this.startTop=(this.startTop==0?0:(this.startTop||this.startPoint[1]));this.endPoint[0]=this.endLeft=(this.endLeft==0?0:(this.endLeft||this.endPoint[0]));this.endPoint[1]=this.endTop=(this.endTop==0?0:(this.endTop||this.endPoint[1]));this.Super("init")},isc.A.$45b=function isc_DrawLine__getArrowAdjustedPoints(){if(this.startArrow||this.endArrow){return isc.GraphMath.trimLineEnds(this.startLeft,this.startTop,this.endLeft,this.endTop,this.startArrow?this.lineWidth*3:0,this.endArrow?this.lineWidth*3:0)}else{return[this.startLeft,this.startTop,this.endLeft,this.endTop]}},isc.A.setLineWidth=function isc_DrawLine_setLineWidth(_1){this.Super("setLineWidth",arguments);if(this.drawingSVG)this.setStartPoint()},isc.A.setStartArrow=function isc_DrawLine_setStartArrow(_1){this.Super("setStartArrow",arguments);if(this.drawingSVG)this.setStartPoint()},isc.A.setEndArrow=function isc_DrawLine_setEndArrow(_1){this.Super("setEndArrow",arguments);if(this.drawingSVG)this.setEndPoint()},isc.A.getAttributesVML=function isc_DrawLine_getAttributesVML(){return isc.SB.concat("FROM='",this.startLeft," ",this.startTop,"' TO='",this.endLeft," ",this.endTop,"'")},isc.A.getAttributesSVG=function isc_DrawLine_getAttributesSVG(){var _1=this.$45b();return"x1='"+_1[0]+"' y1='"+_1[1]+"' x2='"+_1[2]+"' y2='"+_1[3]+"'"},isc.A.drawBitmapPath=function isc_DrawLine_drawBitmapPath(_1){var _2=(this.lineWidth==0||parseInt(this.lineWidth)%2)==1?0.5:0,_3=parseFloat(this.startLeft)+_2,_4=parseFloat(this.startTop)+_2,_5=parseFloat(this.endLeft)+_2,_6=parseFloat(this.endTop)+_2,_7,_8=10,_9,_10;if(this.startArrow=="open"){_1.save();_1.beginPath();_1.strokeStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_7=this.computeAngle(_3,_4,_5,_6);_9=_3;_10=_4;_1.scale(1,1);_1.translate(_9,_10);_1.rotate(_7*this.$125w);this.bmMoveTo(_8,-_8,_1);this.bmLineTo(0,0,_1);this.bmLineTo(_8,_8,_1);_1.stroke();_1.restore()}else if(this.startArrow=="block"){_1.save();_1.beginPath();_1.fillStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_7=this.computeAngle(_3,_4,_5,_6);_9=_3;_10=_4;_1.translate(_9,_10);_1.rotate(_7*this.$125w);this.bmMoveTo(_8,-_8,_1);this.bmLineTo(0,0,_1);this.bmLineTo(_8,_8,_1);_1.closePath();_1.fill();_1.stroke();_1.restore()}
if(this.endArrow=="open"){_1.save();_1.beginPath();_1.strokeStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_7=this.computeAngle(_3,_4,_5,_6);_9=_5;_10=_6;_1.translate(_9,_10);_1.rotate(_7*this.$125w);this.bmMoveTo(-_8,_8,_1);this.bmLineTo(0,0,_1);this.bmLineTo(-_8,-_8,_1);_1.stroke();_1.restore()}else if(this.endArrow=="block"){_1.save();_1.beginPath();_1.fillStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_7=this.computeAngle(_3,_4,_5,_6);_9=_5;_10=_6;_1.translate(_9,_10);_1.rotate(_7*this.$125w);this.bmMoveTo(-_8,_8,_1);this.bmLineTo(0,0,_1);this.bmLineTo(-_8,-_8,_1);_1.closePath();_1.fill();_1.restore()}
if(!_1.setLineDash&&this.linePattern.toLowerCase()!=="solid"){this.$85x(_3,_4,_5,_6,_1)}else{this.bmMoveTo(this.startLeft,this.startTop,_1);this.bmLineTo(this.endLeft,this.endTop,_1)}},isc.A.setStartPoint=function isc_DrawLine_setStartPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null){this.startLeft=_1;if(this.startPoint)this.startPoint[0]=_1}
if(_2!=null){this.startTop=_2;if(this.startPoint)this.startPoint[1]=_2}
if(this.drawingVML){this.$125f().from=this.startLeft+" "+this.startTop}else if(this.drawingSVG){var _3=this.$45b();this.$44z.setAttributeNS(null,"x1",_3[0]);this.$44z.setAttributeNS(null,"y1",_3[1]);if(this.endArrow){this.$44z.setAttributeNS(null,"x2",_3[2]);this.$44z.setAttributeNS(null,"y2",_3[3])}}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.updateControlKnobs()},isc.A.setEndPoint=function isc_DrawLine_setEndPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null){this.endLeft=_1;if(this.endPoint)this.endPoint[0]=_1}
if(_2!=null){this.endTop=_2;if(this.endPoint)this.endPoint[1]=_2}
if(this.drawingVML){this.$125f().to=this.endLeft+" "+this.endTop}else if(this.drawingSVG){var _3=this.$45b();this.$44z.setAttributeNS(null,"x2",_3[2]);this.$44z.setAttributeNS(null,"y2",_3[3]);if(this.startArrow){this.$44z.setAttributeNS(null,"x1",_3[0]);this.$44z.setAttributeNS(null,"y1",_3[1])}}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.updateControlKnobs()},isc.A.getBoundingBox=function isc_DrawLine_getBoundingBox(_1){var _2=this.startPoint[0],_3=this.startPoint[1],_4=this.endPoint[0],_5=this.endPoint[1],_6=_5-_3,_7=_4-_2;var a=Math.atan2(_6,_7)/isc.Math.$125w,l=isc.Math.$101k(_7,_6);var _10;if(_1!=true||!this.$125h()){_10=[0,0,l,0]}else{var _11=this.lineWidth/2;_10=[-_11,-_11,l+_11,_11]}
var t=isc.AffineTransform.getTranslateTransform(_2,_3).rotate(a,0,0);var _13=t.transform(_10[0],_10[1]),_14=t.transform(_10[2],_10[1]),_15=t.transform(_10[2],_10[3]),_16=t.transform(_10[0],_10[3]);return[Math.min(_13.v0,_14.v0,_15.v0,_16.v0),Math.min(_13.v1,_14.v1,_15.v1,_16.v1),Math.max(_13.v0,_14.v0,_15.v0,_16.v0),Math.max(_13.v1,_14.v1,_15.v1,_16.v1)]},isc.A.getCenter=function isc_DrawLine_getCenter(){return[this.startPoint[0]+Math.round((this.endPoint[0]-this.startPoint[0])/2),this.startPoint[1]+Math.round((this.endPoint[1]-this.startPoint[1])/2)]},isc.A.isPointInPath=function isc_DrawLine_isPointInPath(_1,_2){var _3=Math.max(this.lineWidth/2,2);var _4=this.$136i(_1,_2);return isc.Math.euclideanDistanceToLine(this.startLeft,this.startTop,this.endLeft,this.endTop,_4.v0,_4.v1)<_3},isc.A.showStartPointKnobs=function isc_DrawLine_showStartPointKnobs(){if(this.$639!=null&&!this.$639.destroyed)return;this.$639=this.createAutoChild("startKnob",{_constructor:"DrawKnob",x:this.startLeft,y:this.startTop,drawPane:this.drawPane,$113v:this,updatePoints:function(_8,_9,_10,_11,_12){var _1=this.$113v;var _2=(_12=="start"),_3=(_12=="move"),_4=(_12=="stop");var _5;if(_2){_5=_1.$1135=_1.endPoint.duplicate()}else{_5=_1.$1135}
if(_1.keepInParentRect){var _6=_1.$113u(),_7=_1.$1136(_5,[_8,_9],_6);if(_7==null){if(_4){delete _1.$1135}
return false}else{_8=_7[0];_9=_7[1]}}else if(_4){delete _1.$1135}
_1.setStartPoint(_8,_9)}})},isc.A.$1136=function isc_DrawLine__intersectLineSegmentBox(_1,_2,_3){var _4=new Array(2);_4[0]=1/(_4[1]=(_2[1]-_1[1])/(_2[0]-_1[0]));for(var m=0;m<4;++m){var k=m%2,l=(k+1)%2,s=(m<2?-1:1),_9=_3[s+1+k];var _10=!(s*_1[k]>s*_9),_11=!(s*_2[k]>s*_9);if(!_11&&_10){_2[k]=_9;_2[l]=_1[l]+(_9-_1[k])*_4[l]}else if(!(_11||_10)){return null}}
return _2},isc.A.hideStartPointKnobs=function isc_DrawLine_hideStartPointKnobs(){if(this.$639){this.$639.destroy();delete this.$639}},isc.A.showEndPointKnobs=function isc_DrawLine_showEndPointKnobs(){if(this.$64a!=null&&!this.$64a.destroyed)return;this.$64a=this.createAutoChild("endKnob",{_constructor:"DrawKnob",x:this.endLeft,y:this.endTop,drawPane:this.drawPane,$113v:this,updatePoints:function(_8,_9,_10,_11,_12){var _1=this.$113v,_2=(_12=="start"),_3=(_12=="move"),_4=(_12=="stop"),_5;if(_2){_5=_1.$1137=_1.startPoint.duplicate()}else{_5=_1.$1137}
if(_1.keepInParentRect){var _6=_1.$113u(),_7=_1.$1136(_5,[_8,_9],_6);if(_7==null){if(_4){delete _1.$1137}
return false}else{_8=_7[0];_9=_7[1]}}else if(_4){delete _1.$1137}
_1.setEndPoint(_8,_9)}})},isc.A.hideEndPointKnobs=function isc_DrawLine_hideEndPointKnobs(){if(this.$64a){this.$64a.destroy();delete this.$64a}},isc.A.moveBy=function isc_DrawLine_moveBy(_1,_2){this.startLeft+=_1;this.startTop+=_2;this.endLeft+=_1;this.endTop+=_2;this.startPoint[0]=this.startLeft;this.startPoint[1]=this.startTop;this.endPoint[0]=this.endLeft;this.endPoint[1]=this.endTop;if(this.drawingVML){var _3=this.$125f();_3.from=this.startLeft+" "+this.startTop;_3.to=this.endLeft+" "+this.endTop}else if(this.drawingSVG){var _4=this.$45b();this.$44z.setAttributeNS(null,"x1",_4[0]);this.$44z.setAttributeNS(null,"y1",_4[1]);this.$44z.setAttributeNS(null,"x2",_4[2]);this.$44z.setAttributeNS(null,"y2",_4[3])}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.Super("moveBy",arguments)},isc.A.moveTo=function isc_DrawLine_moveTo(_1,_2){this.moveBy(_1-this.startLeft,_2-this.startTop)},isc.A.updateControlKnobs=function isc_DrawLine_updateControlKnobs(){this.Super("updateControlKnobs",arguments);if(this.$639){var _1=this.startLeft,_2=this.startTop,_3=this.drawPane.drawing2screen([_1,_2,0,0]);this.$639.setCenterPoint(_3[0],_3[1])}
if(this.$64a){var _1=this.endLeft,_2=this.endTop,_3=this.drawPane.drawing2screen([_1,_2,0,0]);this.$64a.setCenterPoint(_3[0],_3[1])}});isc.B._maxIndex=isc.C+21;isc.defineClass("DrawRect","DrawItem");isc.A=isc.DrawRect.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.left=0;isc.A.top=0;isc.A.width=100;isc.A.height=100;isc.A.rounding=0;isc.A.lineCap="butt";isc.A.svgElementName="rect";isc.A.vmlElementName="ROUNDRECT";isc.A.isPointInPath=isc.DrawItem.getInstanceProperty("isInBounds");isc.B.push(isc.A.getAttributesVML=function isc_DrawRect_getAttributesVML(){var _1=this.left,_2=this.top,_3=this.width,_4=this.height;if(_3<0){_1+=_3;_3=-_3}
if(_4<0){_2+=_4;_4=-_4}
return isc.SB.concat("STYLE='position:absolute; left:",_1,"px; top:",_2,"px; width:",_3,"px; height:",_4,"px;'"," ARCSIZE='"+this.rounding/2+"'")},isc.A.getAttributesSVG=function isc_DrawRect_getAttributesSVG(){var _1=this.left,_2=this.top,_3=this.width,_4=this.height;if(_3<0){_1+=_3;_3=-_3}
if(_4<0){_2+=_4;_4=-_4}
return isc.SB.concat("x='",_1,"' y='",_2,"' width='",_3,"' height='",_4,"'",(this.rounding?(" rx='"+(this.rounding*Math.min(_3,_4)/2)+"'"):""))},isc.A.drawBitmapPath=function isc_DrawRect_drawBitmapPath(_1){var _2=this.left,_3=this.top,_4=this.width,_5=this.height;if(_4<0){_2+=_4;_4=-_4}
if(_5<0){_3+=_5;_5=-_5}
var _6=_2+_4,_7=_3+_5;if(this.rounding==0){this.bmMoveTo(_2,_3,_1);if(!_1.setLineDash&&this.linePattern.toLowerCase()!=="solid"){this.$85x(_2,_3,_6,_3,_1);this.$85x(_6,_3,_6,_7,_1);this.$85x(_6,_7,_2,_7,_1);this.$85x(_2,_7,_2,_3,_1)}else{this.bmLineTo(_6,_3,_1);this.bmLineTo(_6,_7,_1);this.bmLineTo(_2,_7,_1);this.bmLineTo(_2,_3,_1)}}else{var r=(this.rounding*Math.min(_4,_5)/2);this.bmMoveTo(_2+r,_3,_1);this.bmLineTo(_6-r,_3,_1);this.bmQuadraticCurveTo(_6,_3,_6,_3+r,_1);this.bmLineTo(_6,_7-r,_1);this.bmQuadraticCurveTo(_6,_7,_6-r,_7,_1);this.bmLineTo(_2+r,_7,_1);this.bmQuadraticCurveTo(_2,_7,_2,_7-r,_1);this.bmLineTo(_2,_3+r,_1);this.bmQuadraticCurveTo(_2,_3,_2+r,_3,_1)}
_1.closePath()},isc.A.setCenter=function isc_DrawRect_setCenter(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null)_1=_1-Math.round(this.width/2);if(_2!=null)_2=_2-Math.round(this.height/2);this.moveTo(_1,_2)},isc.A.getCenter=function isc_DrawRect_getCenter(){return[this.left+Math.round(this.width/2),this.top+Math.round(this.height/2)]},isc.A.getBoundingBox=function isc_DrawRect_getBoundingBox(_1){var _2=[this.left,this.top,this.left+this.width,this.top+this.height];return _1!=true?_2:this.$141a(_2)},isc.A.moveBy=function isc_DrawRect_moveBy(_1,_2){this.left+=_1;this.top+=_2;if(this.drawingVML){var _3=this.$125f().style;_3.left=this.left;_3.top=this.top}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"x",this.left);this.$44z.setAttributeNS(null,"y",this.top)}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.Super("moveBy",arguments)},isc.A.moveTo=function isc_DrawRect_moveTo(_1,_2){this.moveBy(_1-this.left,_2-this.top)},isc.A.setLeft=function isc_DrawRect_setLeft(_1){this.moveTo(_1,this.top)},isc.A.setTop=function isc_DrawRect_setTop(_1){this.moveTo(this.left,_1)},isc.A.resizeTo=function isc_DrawRect_resizeTo(_1,_2){var _3=0,_4=0;if(_1!=null)_3=_1-this.width;if(_2!=null)_4=_2-this.height;this.resizeBy(_3,_4)},isc.A.resizeBy=function isc_DrawRect_resizeBy(_1,_2){if(_1!=null)this.width+=_1;if(_2!=null)this.height+=_2;if(this.drawingVML){var _3=this.$125f().style;_3.width=this.width;_3.height=this.height}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"width",this.width);this.$44z.setAttributeNS(null,"height",this.height)}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.Super("resizeBy",arguments)},isc.A.setWidth=function isc_DrawRect_setWidth(_1){this.resizeTo(_1)},isc.A.setHeight=function isc_DrawRect_setHeight(_1){this.resizeTo(null,_1)},isc.A.setRect=function isc_DrawRect_setRect(_1,_2,_3,_4){this.moveTo(_1,_2);this.resizeTo(_3,_4)},isc.A.setRounding=function isc_DrawRect_setRounding(_1){this.rounding=_1;if(this.drawingVML){this.erase();this.draw()}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"rx",(this.rounding?(this.rounding*Math.min(Math.abs(this.width),Math.abs(this.height))/2):null))}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}});isc.B._maxIndex=isc.C+16;isc.DrawRect.markUnsupportedMethods(null,["setStartArrow","setEndArrow"]);isc.defineClass("DrawOval","DrawItem");isc.A=isc.DrawOval.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.left=0;isc.A.top=0;isc.A.width=100;isc.A.height=100;isc.A.svgElementName="ellipse";isc.A.vmlElementName="OVAL";isc.B.push(isc.A.init=function isc_DrawOval_init(){if(!this.radius)this.$63t();else this.$78s();this.Super("init")},isc.A.$78s=function isc_DrawOval__deriveRectFromRadius(){if(this.rx==null)this.rx=this.radius;if(this.ry==null)this.ry=this.radius;this.width=this.rx*2;this.height=this.ry*2;if(this.centerPoint!=null){this.left=this.centerPoint[0]-this.width/2;this.top=this.centerPoint[1]-this.height/2}else{this.centerPoint=[];this.centerPoint[0]=this.left+this.width/2;this.centerPoint[1]=this.top+this.height/2}},isc.A.$63t=function isc_DrawOval__deriveCenterPointFromRect(){this.centerPoint=[];var _1=(this.width/2)<<0,_2=(this.height/2)<<0;this.centerPoint[0]=this.left+_1;this.centerPoint[1]=this.top+_2;this.rx=_1;this.ry=_2},isc.A.getAttributesVML=function isc_DrawOval_getAttributesVML(){return isc.SB.concat("STYLE='position:absolute;left:",this.left,"px;top:",this.top,"px;width:",this.width,"px;height:",this.height,"px;'")},isc.A.getAttributesSVG=function isc_DrawOval_getAttributesSVG(){return"cx='"+this.centerPoint[0]+"' cy='"+this.centerPoint[1]+"' rx='"+this.rx+"' ry='"+this.ry+"'"},isc.A.getBoundingBox=function isc_DrawOval_getBoundingBox(_1){var _2=[this.left,this.top,this.left+this.width,this.top+this.height];return _1!=true?_2:this.$141a(_2)},isc.A.drawBitmapPath=function isc_DrawOval_drawBitmapPath(_1){var _2=0.552284749831;var _3=this.rx;var _4=this.ry;var _5=this.centerPoint[0];var _6=this.centerPoint[1];_1.moveTo(_5,_6-_4);_1.bezierCurveTo(_5+(_2*_3),_6-_4,_5+_3,_6-(_2*_4),_5+_3,_6);_1.bezierCurveTo(_5+_3,_6+(_2*_4),_5+(_2*_3),_6+_4,_5,_6+_4);_1.bezierCurveTo(_5-(_2*_3),_6+_4,_5-_3,_6+(_2*_4),_5-_3,_6);_1.bezierCurveTo(_5-_3,_6-(_2*_4),_5-(_2*_3),_6-_4,_5,_6-_4);_1.closePath()},isc.A.setCenterPoint=function isc_DrawOval_setCenterPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
var _3=0,_4=0;if(_1!=null)_3=_1-this.centerPoint[0];if(_2!=null)_4=_2-this.centerPoint[1];this.moveBy(_3,_4)},isc.A.moveBy=function isc_DrawOval_moveBy(_1,_2){if(_1!=null)this.centerPoint[0]+=_1;if(_2!=null)this.centerPoint[1]+=_2;this.$78s();if(this.drawingVML){var _3=this.$125f().style;_3.left=this.centerPoint[0]-this.rx;_3.top=this.centerPoint[1]-this.ry}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"cx",this.centerPoint[0]);this.$44z.setAttributeNS(null,"cy",this.centerPoint[1])}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.Super("moveBy",arguments)},isc.A.moveTo=function isc_DrawOval_moveTo(_1,_2){this.moveBy(_1-this.left,_2-this.top)},isc.A.setLeft=function isc_DrawOval_setLeft(_1){this.moveTo(_1)},isc.A.setTop=function isc_DrawOval_setTop(_1){this.moveTo(null,_1)},isc.A.resizeBy=function isc_DrawOval_resizeBy(_1,_2,_3){if(_1!=null)this.width+=_1;if(_2!=null)this.height+=_2;if(_3){if(_1!=null)this.left-=Math.round(_1/2);if(_2!=null)this.top-=Math.round(_2/2)}
this.$63t();if(this.drawingVML){var _4=this.$125f().style;_4.width=this.width;_4.height=this.height;if(_3){_4.left=this.left;_4.top=this.top}}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"rx",this.rx);this.$44z.setAttributeNS(null,"ry",this.ry);if(!_3){this.$44z.setAttributeNS(null,"cx",this.centerPoint[0]);this.$44z.setAttributeNS(null,"cy",this.centerPoint[1])}}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.Super("resizeBy",arguments);if(_3)this.$105u(_1/2,_2/2)},isc.A.resizeTo=function isc_DrawOval_resizeTo(_1,_2,_3){var _4=0,_5=0;if(_1!=null)_4=_1-this.width;if(_2!=null)_5=_2-this.height;this.resizeBy(_4,_5,_3)},isc.A.setWidth=function isc_DrawOval_setWidth(_1){this.resizeTo(_1)},isc.A.setHeight=function isc_DrawOval_setHeight(_1){this.resizeTo(null,_1)},isc.A.setRect=function isc_DrawOval_setRect(_1,_2,_3,_4){this.moveTo(_1,_2);this.resizeTo(_3,_4)},isc.A.getRadiusX=function isc_DrawOval_getRadiusX(){return this.rx},isc.A.getRadiusY=function isc_DrawOval_getRadiusY(){return this.ry},isc.A.setRadii=function isc_DrawOval_setRadii(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
var _3,_4;if(_1!=null)_3=2*_1;if(_2!=null)_4=2*_2;this.resizeTo(_3,_4,true)},isc.A.setRadius=function isc_DrawOval_setRadius(_1){this.setRadii(_1,_1)},isc.A.setOval=function isc_DrawOval_setOval(_1,_2,_3,_4){this.setCenterPoint(_1,_2);this.setRadii(_3,_4)},isc.A.getCenter=function isc_DrawOval_getCenter(){return this.centerPoint.duplicate()});isc.B._maxIndex=isc.C+23;isc.DrawOval.markUnsupportedMethods(null,["setStartArrow","setEndArrow"]);isc.defineClass("DrawSector","DrawItem");isc.A=isc.DrawSector;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getArcMidpoint=function isc_c_DrawSector_getArcMidpoint(_1,_2,_3,_4,_5){var _6=(_3+_4)/2;return[_1+_5*isc.Math.cosdeg(_6),_2+_5*isc.Math.sindeg(_6)]});isc.B._maxIndex=isc.C+1;isc.A=isc.DrawSector.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.centerPoint=[0,0];isc.A.startAngle=0.0;isc.A.endAngle=20.0;isc.A.radius=100;isc.A.$150e=false;isc.A.svgElementName="path";isc.A.vmlElementName="SHAPE";isc.A.showResizeKnobs=isc.Class.NO_OP;isc.A.hideResizeKnobs=isc.Class.NO_OP;isc.A.showMoveKnobs=isc.Class.NO_OP;isc.A.hideMoveKnobs=isc.Class.NO_OP;isc.A.$143t={coordsizeX:0,coordsizeY:0,left:0,top:0,width:0,height:0,path:""};isc.B.push(isc.A.init=function isc_DrawSector_init(){this.Super("init");this.centerPoint=this.centerPoint.duplicate()},isc.A.getBoundingBox=function isc_DrawSector_getBoundingBox(_1){var _2=this.$125w,_3=this.centerPoint,_4=this.radius,_5=this.startAngle,_6=this.endAngle,_7=(_6-_5),_8=(_7>=360||(_7!=0&&Math.round(_7)%360==0)),_9=0,_10=0,_11=0,_12=0;if(_8){_9=_11=-1;_10=_12=1}else{_5+=this.rotation;_6+=this.rotation;if(!(0<=_5&&_5<360)){_5=(360+(_5%360))%360}
if(!(0<=_6&&_6<360)){_6=(360+(_6%360))%360}
var _13=(_5>_6);if(_13?(_5<270||270<_6):(_5<270&&270<_6)){_9=-1}else{_9=Math.min(0,Math.sin(_2*_5),Math.sin(_2*_6))}
if(_13?(_5<90||90<_6):(_5<90&&90<_6)){_10=1}else{_10=Math.max(0,Math.sin(_2*_5),Math.sin(_2*_6))}
if(_13?(_5<180||180<_6):(_5<180&&180<_6)){_11=-1}else{_11=Math.min(0,Math.cos(_2*_5),Math.cos(_2*_6))}
if(_13){_12=1}else{_12=Math.max(0,Math.cos(_2*_5),Math.cos(_2*_6))}}
var _14=[_3[0]+_4*_11,_3[1]+_4*_9,_3[0]+_4*_12,_3[1]+_4*_10];return _1!=true?_14:this.$141a(_14)},isc.A.$830=function isc_DrawSector__normalizeLinearGradient(_1){var _2=this.centerPoint,_3=this.radius,_4=[_2[0],_2[1],_2[0]+_3,_2[1]+_3];return isc.DrawItem.$830(_1,_4)},isc.A.$831=function isc_DrawSector__normalizeRadialGradient(_1){var _2=this.getCenter(),_3=this.radius,_4=[_2[0],_2[1],_2[0]+_3,_2[1]+_3];return isc.DrawItem.$831(_1,_4,_2)},isc.A.getCenter=function isc_DrawSector_getCenter(){return this.centerPoint.duplicate()},isc.A.getArcMidpoint=function isc_DrawSector_getArcMidpoint(){return isc.DrawSector.getArcMidpoint(this.centerPoint[0],this.centerPoint[1],this.startAngle,this.endAngle,this.radius)},isc.A.getAttributesVML=function isc_DrawSector_getAttributesVML(){var _1=this.$143u();return isc.SB.concat("coordsize='",_1.coordsizeX," ",_1.coordsizeY,"' style='position:absolute",";left:",_1.left,"px;top:",_1.top,"px;width:",_1.width,"px;height:",_1.height,"px'"," path='",_1.path,"'")},isc.A.$143u=function isc_DrawSector__getAttributesVML(){var _1=this.centerPoint,_2=this.getBoundingBox(),_3=_2[0],_4=_2[1],_5=_2[2]-_3,_6=_2[3]-_4;var _7=this.drawPane.$136x(_1[0]-_3),_8=this.drawPane.$136x(_1[1]-_4),r=this.drawPane.$136x(this.radius);var _10=this.startAngle+this.rotation,_11=(this.endAngle-this.startAngle),_12=(_11>=360||(_11!=0&&Math.round(_11)%360==0));if(_12){_11=360}else{_11=(360+(_11%360))%360;if(_11<0){_10=-_10;_11=360-_11}}
var _13=this.$143t;_13.coordsizeX=_5*this.drawPane.$1259;_13.coordsizeY=_6*this.drawPane.$1259;_13.left=_3;_13.top=_4;_13.width=_5;_13.height=_6;if(_12&&this.$150e){_13.path=isc.SB.concat("al",_7," ",_8," ",r," ",r," 0 23592960")}else{_13.path=isc.SB.concat("m",_7," ",_8," ae",_7," ",_8," ",r," ",r," ",Math.floor(_10*-65536)," ",Math.ceil(_11*-65536)," x")}
return _13},isc.A.$136z=function isc_DrawSector__updateVMLHandle(){var _1=this.$143u(),_2=this.$125f(),_3=_2.style;_2.coordsize.x=_1.coordsizeX;_2.coordsize.y=_1.coordsizeY;_3.left=_1.left+isc.px;_3.top=_1.top+isc.px;_3.width=_1.width+isc.px;_3.height=_1.height+isc.px;_2.path=_1.path},isc.A.getAttributesSVG=function isc_DrawSector_getAttributesSVG(){return"d='"+this.getPathSVG()+"'"},isc.A.getPathSVG=function isc_DrawSector_getPathSVG(){var _1=(this.startAngle+this.rotation)*this.$125w,_2=(this.endAngle+this.rotation)*this.$125w,_3=(this.endAngle-this.startAngle),_4=this.radius,_5=this.centerPoint[0],_6=this.centerPoint[1],_7=((360+(_3%360))%360>180?"1":"0"),_8=(_3>=360||(_3!=0&&Math.round(_3)%360==0)),c=Math.cos(_1),s=Math.sin(_1),_11=_5+_4*c,_12=_6+_4*s;if(_8){var _13=_5-_4*c,_14=_6-_4*s,_15=isc.StringBuffer.create();if(this.$150e){_15.append("M",_11," ",_12)}else{_15.append("M",_5," ",_6," L",_11," ",_12)}
_15.append(" A",_4," ",_4," 0 ",_7," 1 ",_13," ",_14," A",_4," ",_4," 0 ",_7," 1 ",_11," ",_12," Z");return _15.release(false)}else{var _13=_5+_4*Math.cos(_2),_14=_6+_4*Math.sin(_2);return isc.SB.concat("M",_5," ",_6," L",_11," ",_12," A",_4," ",_4," 0 ",_7," 1 ",_13," ",_14," Z")}},isc.A.drawBitmapPath=function isc_DrawSector_drawBitmapPath(_1){var _2=(this.startAngle+this.rotation)*this.$125w,_3=(this.endAngle+this.rotation)*this.$125w,_4=this.radius,x=this.centerPoint[0],y=this.centerPoint[1];var _7=this.$150e;if(_7){var _8=(this.endAngle-this.startAngle);_7=(_8>=360||(_8!=0&&Math.round(_8)%360==0))}
if(_7){this.bmMoveTo(x+_4,y,_1);this.bmArc(x,y,_4,0,Math.PI,_1);this.bmArc(x,y,_4,Math.PI,2*Math.PI,_1)}else{this.bmMoveTo(x,y,_1);this.bmArc(x,y,_4,_2,_3,_1)}
_1.closePath()},isc.A.setCenterPoint=function isc_DrawSector_setCenterPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
var _3=0,_4=0;if(_1!=null)_3=_1-this.centerPoint[0];if(_2!=null)_4=_2-this.centerPoint[1];this.moveBy(_3,_4)},isc.A.moveTo=function isc_DrawSector_moveTo(_1,_2){this.moveBy(_1-this.centerPoint[0],_2-this.centerPoint[1])},isc.A.moveBy=function isc_DrawSector_moveBy(_1,_2){this.centerPoint[0]+=_1;this.centerPoint[1]+=_2;if(this.drawingVML){this.$136z()}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"transform","translate("+_1+","+_2+")")}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.Super("moveBy",arguments)});isc.B._maxIndex=isc.C+15;isc.DrawSector.markUnsupportedMethods("$class does not support knobs.",["showKnobs","setMoveKnobOffset"]);isc.DrawSector.markUnsupportedMethods(null,["setStartArrow","setEndArrow"]);isc.defineClass("DrawLabel","DrawItem");isc.A=isc.DrawLabel;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.suppressArbitraryRotationWarning=false;isc.B.push(isc.A.$140f=function isc_c_DrawLabel__checkRotation(_1){if(!this.suppressArbitraryRotationWarning&&_1){_1=((_1%360)+360)%360;if(_1!=0&&_1!=90){this.logWarn("Arbitrary rotation is not supported in IE8 and earlier. Only rotation by 0 or 90 degrees is supported.");this.suppressArbitraryRotationWarning=true}}});isc.B._maxIndex=isc.C+1;isc.A=isc.DrawLabel.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.left=0;isc.A.top=0;isc.A.alignment='start';isc.A.fontFamily="Tahoma";isc.A.fontSize=18;isc.A.fontWeight="bold";isc.A.fontStyle="normal";isc.A.eventOpaque=false;isc.A.isPointInPath=isc.DrawItem.getInstanceProperty("isInBounds");isc.A.showResizeKnobs=isc.Class.NO_OP;isc.A.hideResizeKnobs=isc.Class.NO_OP;isc.A.showMoveKnobs=isc.Class.NO_OP;isc.A.hideMoveKnobs=isc.Class.NO_OP;isc.A.$95="NOBR";isc.A.$44l=isc.Class.NO_OP;isc.B.push(isc.A.init=function isc_DrawLabel_init(){this.Super("init",arguments);if(this.suppressArbitraryRotationWarning!=true)isc.DrawLabel.$140f(this.rotation)},isc.A.setCursor=function isc_DrawLabel_setCursor(_1){this.Super("setCursor",arguments);if(this.$45c!=null){this.$45c.setCursor(_1)}},isc.A.setCanDrag=function isc_DrawLabel_setCanDrag(_1){this.Super("setCanDrag",arguments);if(this.$45c!=null){this.$45c.setProperty("canDragReposition",_1)}},isc.A.setDragRepositionCursor=function isc_DrawLabel_setDragRepositionCursor(_1){this.Super("setDragRepositionCursor",arguments);if(this.$45c!=null){this.$45c.setProperty("dragRepositionCursor",_1)}},isc.A.$44v=function isc_DrawLabel__getElementVML(_1,_2){if(this.synchTextMove){var _3=isc.DrawPane.$167b(this.fontFamily);return isc.SB.concat(this.drawPane.startTagVML("RECT")," ID='",_1,"' STYLE='position:absolute;left:",this.left,"px; top:",this.top,(this.alignment?"px; text-align:"+(this.alignment=="start"?"left":"right"):"px"),";'>",this.drawPane.startTagVML("TEXTBOX")," INSET='0px, 0px, 0px, 0px' STYLE=",_3,"overflow:visible","; font-size:",this.fontSize*this.drawPane.zoomLevel,"px; font-weight:",this.fontWeight,"; font-style:",this.fontStyle,"; font-family:",this.fontFamily,";",_3,"><NOBR style='color:",this.lineColor,"'>",this.contents==null?null:String(this.contents).asHTML(),"</NOBR>",this.drawPane.endTagVML("TEXTBOX"),this.drawPane.endTagVML("RECT"))}else if(_2==null){var _4=this.drawPane.drawing2screen([this.left,this.top,0,0]),_5=_4[0],_6=_4[1],_7=this.drawPane.measureLabel(this.contents,this),_8=(((this.rotation==null?0:this.rotation)%360)+360)%360,_9=_8!=0;if(_9){if(isc.Browser.isIE&&isc.Browser.version>=7&&isc.Browser.isStrict){if(_8>180)_5+=_7.height}else{if(_8<=180)_5-=_7.height}
if(_8>180){_6-=_7.width}}
var _3=isc.DrawPane.$167b(this.fontFamily);return isc.SB.concat("<DIV ID='",_1,"' STYLE=",_3,"position:absolute; overflow:visible; width:1px; height:1px","; left:",_5,"px; top:",_6,"px",(_9?";writing-mode: tb-rl":""),"; font-size:",(this.fontSize*this.drawPane.zoomLevel),"px; font-weight:",this.fontWeight,"; font-style:",this.fontStyle,"; font-family:",this.fontFamily,";",_3,"><NOBR style='color:",this.lineColor,"'>",this.contents==null?null:String(this.contents).asHTML(),"</NOBR></DIV>")}else{_2.drawLabelsAccumulator.add(this);return isc.emptyString}},isc.A.$125u=function isc_DrawLabel__getVMLTextHandle(){var _1=this.$44j;if(_1!=null)return _1;var _2=this.$125f();if(_2==null)return null;if(this.synchTextMove){_1=_2.firstChild.style}else{_1=_2.style}
return(this.$44j=_1)},isc.A.getSvgString=function isc_DrawLabel_getSvgString(_1){_1=_1||isc.SVGStringConversionContext.create();var _2,_3=this.left,_4=this.top,_5=this.rotation,_6;var _7=isc.DrawPane.$167b(this.fontFamily);var _8="<text id='isc_DrawItem_"+this.drawItemID+"' x='"+_3+"' y='"+(_1.printForExport!==false?_4+this.fontSize:_4)+"' dominant-baseline='text-before-edge' font-family="+_7+this.fontFamily+_7+" font-size='"+this.fontSize+"px' font-weight='"+this.fontWeight+"' font-style='"+this.fontStyle+"' fill='"+this.lineColor;if(_5&&(_6=this.getCenter())&&_6.length===2){_8+="' transform='rotate("+_5+" "+_3+" "+_4+")"}
_8+="'";_2=this.getAttributesSVG();if(_2)_8+=" "+_2;if(this.contents!=null){_8+=">"+isc.makeXMLSafe(String(this.contents))+"</text>"}else _8+="/>";return _8},isc.A.moveBy=function isc_DrawLabel_moveBy(_1,_2){this.top+=_2;this.left+=_1;if(this.drawingVML){var _3=this.$125f().style;if(this.synchTextMove){_3.left=this.left;_3.top=this.top}else{_3.left=this.left+isc.px;_3.top=this.top+isc.px}}else if(this.drawingSVG){if(this.$44z){this.$44z.setAttributeNS(null,"x",this.left);this.$44z.setAttributeNS(null,"y",this.top)}}else if(this.drawingBitmap){if(this.$129x()){delete this.$1348;if(this.$45c!=null){isc.Element.$136r(this.$45c,this.$45c.$136u())}}else{this.drawPane.redrawBitmap()}}
this.Super("moveBy",arguments)},isc.A.moveTo=function isc_DrawLabel_moveTo(_1,_2){this.moveBy(_1-this.left,_2-this.top)},isc.A.rotateBy=function isc_DrawLabel_rotateBy(_1){isc.DrawLabel.$140f(+this.rotation+_1);this.Super("rotateBy",arguments)},isc.A.getCenter=function isc_DrawLabel_getCenter(){var _1,_2;if(this.drawingSVG&&!this.$44z){var _3=this.drawPane.measureLabel(this.contents,this);_1=_3.width;_2=_3.height}else{_1=this.getTextWidth();_2=this.getTextHeight()}
return[this.left+Math.round(_1/2),this.top+Math.round(_2/2)]},isc.A.getBoundingBox=function isc_DrawLabel_getBoundingBox(_1){var _2,_3;if(this.drawingSVG&&!this.$44z){var _4=this.drawPane.measureLabel(this.contents,this);_2=_4.width;_3=_4.height}else{_2=this.getTextWidth();_3=this.getTextHeight()}
return[this.left,this.top,this.left+_2,this.top+_3]},isc.A.$129y=function isc_DrawLabel__getHtmlTextContents(){var _1;if(this.contents!=null){_1=String(this.contents).replace(isc.DrawPane.$156w,"\u0020").asHTML()}
var _2=isc.DrawPane.$167b(this.fontFamily);return isc.SB.concat("<span style=",_2,"font-weight:",this.fontWeight,";font-size:",this.fontSize,"px;font-style:",this.fontStyle,";white-space:pre;font-family:",this.fontFamily,_2,">",_1,"</span>")},isc.A.makeHTMLText=function isc_DrawLabel_makeHTMLText(){var _1=this.$45c=isc.HTMLFlow.create({creator:this,left:0,top:0,width:1,height:1,cursor:this.cursor,canDragReposition:this.canDrag,dragAppearance:"target",dragRepositionCursor:this.dragRepositionCursor,contents:this.$129y(),canSelectText:false,textColor:this.lineColor,autoDraw:false,$136u:function(){var _2=this.creator,_3=_2.drawPane;var _4=" translate("+_2.left+"px, "+_2.top+"px)";var t=_2.$1339();var _6=(_3==null?3:_3.precision);_4=" matrix("+t.m00.toFixed(_6)+", "+t.m10.toFixed(_6)+", "+t.m01.toFixed(_6)+", "+t.m11.toFixed(_6)+", "+t.m02.toFixed(_6)+", "+t.m12.toFixed(_6)+")"+_4;t=_3.$1338();_4=" matrix("+t.m00.toFixed(_6)+", "+t.m10.toFixed(_6)+", "+t.m01.toFixed(_6)+", "+t.m11.toFixed(_6)+", "+t.m02.toFixed(_6)+", "+t.m12.toFixed(_6)+")"+_4;_4="translate("+_3.getLeftPadding()+"px, "+_3.getTopPadding()+"px)"+_4;return _4},getTransformCSS:function(){var _4=this.$136u();return(";"+isc.Element.$159t+":"+_4+";"+isc.Element.$1388+":0 0;")},dragRepositionStop:function(){var _2=this.creator,_3=_2.drawPane;var t=(_3.$1338()).getInverse().translate(this.getLeft(),this.getTop()).rightMultiply(_3.$1338());_2.moveBy(t.m02,t.m12);this.moveTo(0,0)}});this.drawPane.addChild(_1)},isc.A.$129x=function isc_DrawLabel__useHTML(){return this.drawingBitmap&&(this.useHTML!=null?this.useHTML:isc.Browser.isIPhone)},isc.A.drawBitmap=function isc_DrawLabel_drawBitmap(_1){if(this.$129x()){if(this.$45c==null){this.makeHTMLText()}else{isc.Element.$136r(this.$45c,this.$45c.$136u())}}else{this.Super("drawBitmap",arguments)}},isc.A.erase=function isc_DrawLabel_erase(){if(this.$45c!=null)this.$45c.destroy();this.Super("erase",arguments)},isc.A.destroy=function isc_DrawLabel_destroy(){if(this.$45c!=null)this.$45c.destroy();this.Super("destroy",arguments)},isc.A.getFontString=function isc_DrawLabel_getFontString(){return(this.fontStyle!="normal"?this.fontStyle+" ":"")+(this.fontWeight!="normal"?this.fontWeight+" ":"")+this.fontSize+"px "+this.fontFamily},isc.A.$104w=function isc_DrawLabel__calculateAlignMiddleCorrection(){if(!(isc.Browser.isFirefox&&isc.Browser.hasCANVAS&&this.$104x)){return 0}else{var _1=this.drawPane.$104y;if(_1==null){_1=this.drawPane.$104y={}}
var _2=this.getFontString();if(_1.hasOwnProperty(_2)){return _1[_2]}
var _3=isc.DrawPane.$104v();_3.setContents("<CANVAS></CANVAS>");_3.redraw();var _4=_3.getHandle().getElementsByTagName("canvas")[0];var _5=_4.getContext("2d");_5.font=_2;var _6="The quick, brown fox",_7=_5.measureText(_6),_8=_7.width,_9=_7.height||this.fontSize;var _10=_5.canvas.width=Math.round(_8);var _11=_5.canvas.height=Math.round(3*_9);_5.textBaseline="middle";_5.font=_2;_5.fillText(_6,_9,0);var _12=_5.getImageData(0,0,_10,_11),_13=_12.data;var _14=0;for(var i=_13.length-4;i>0;i-=4){if(_13[i+3]){_14=Math.floor(i/(4*_10))-_9;break}}
_5.clearRect(0,0,_10,_11);_5.textBaseline="hanging";_5.font=_2;_5.fillText(_6,_9,0);_12=_5.getImageData(0,0,_10,_11);_13=_12.data;var _16=0;for(var i=_13.length-4;i>0;i-=4){if(_13[i+3]){_16=Math.floor(i/(4*_10))-_9;break}};var _17=0;for(var i=0,_18=_13.length;i<_18;i+=4){if(_13[i+3]){_17=Math.floor(i/(4*_10))-_9}}
var _19=_16-_17;return(_1[_2]=-Math.round((_19-(_16-_14))/2))}},isc.A.drawBitmapPath=function isc_DrawLabel_drawBitmapPath(_1){_1.textBaseline="top";_1.font=this.getFontString();_1.fillStyle=this.lineColor;_1.textAlign=this.alignment;this.bmFillText(this.contents,this.left,this.top+this.$104w(),_1)},isc.A.setLineColor=function isc_DrawLabel_setLineColor(_1){this.lineColor=_1;if(this.drawingVML){var _2=this.$125f().firstChild;while(_2!=null&&_2.tagName!=this.$95){_2=_2.firstChild}
if(_2!=null)_2.style.color=_1}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"fill",_1)}else if(this.drawingBitmap){if(this.$129x()){if(this.$45c!=null){this.$45c.setTextColor(_1)}}else{this.drawPane.redrawBitmap()}}},isc.A.setContents=function isc_DrawLabel_setContents(_1){this.contents=_1;if(this.drawingVML){var _2=this.$125f().firstChild;while(_2!=null&&_2.tagName!=this.$95){_2=_2.firstChild}
if(_2!=null)_2.innerText=_1}else if(this.drawingSVG){this.$44z.textContent=_1}else if(this.drawingBitmap){if(this.$129x()){if(this.$45c!=null){this.$45c.setContents(this.$129y())}}else{this.drawPane.redrawBitmap()}}
this.$5y()},isc.A.getTextWidth=function isc_DrawLabel_getTextWidth(){if(!(this.drawingVML||this.drawingSVG||this.drawingBitmap)){this.drawHandle()}
if(this.drawingVML){var _1=this.$125f();if(this.synchTextMove){return _1.firstChild.scrollWidth}else{return _1.scrollWidth}}else if(this.drawingSVG){if(this.$44z)return this.$44z.getComputedTextLength();else this.drawPane.measureLabel(this.contents,this).width}else if(this.drawingBitmap){if(this.$129x()){if(this.$45c==null)this.makeHTMLText();return this.$45c.getScrollWidth()}else{var _2=this.drawPane.getBitmapContext(),_3=_2.font,_4=this.getFontString()||_3,_5=(_4!=_3);if(_5){_2.save();_2.font=_4}
var _6=_2.measureText(this.contents).width;if(_5){_2.restore()}
return _6}}},isc.A.getTextHeight=function isc_DrawLabel_getTextHeight(){if(!(this.drawingVML||this.drawingSVG||this.drawingBitmap)){this.drawHandle()}
if(this.drawingVML){var _1=this.$125f();if(this.synchTextMove){return _1.firstChild.scrollHeight}else{return _1.scrollHeight}}else if(this.drawingSVG){if(this.$44z)return this.$44z.getBBox().height;else this.drawPane.measureLabel(this.contents,this).height}else if(this.drawingBitmap){if(this.$129x()){if(this.$45c==null)this.makeHTMLText();return this.$45c.getScrollHeight()}else{var _2=this.drawPane.getBitmapContext(),_3=_2.font,_4=this.getFontString()||_3,_5=(_4!=_3);if(_5){_2.save();_2.font=_4}
var _6=_2.measureText(this.contents).height||this.fontSize;if(_5){_2.restore()}
return _6}}},isc.A.setFontSize=function isc_DrawLabel_setFontSize(_1){if(_1!=null)this.fontSize=_1;if(this.drawingVML){this.$125u().fontSize=(_1*this.drawPane.zoomLevel)+"px"}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"font-size",_1+"px")}else if(this.drawingBitmap){if(this.$129x()){if(this.$45c!=null){this.$45c.setContents(this.$129y())}}else{this.drawPane.redrawBitmap()}}});isc.B._maxIndex=isc.C+26;isc.DrawLabel.markUnsupportedMethods("$class does not support knobs.",["showKnobs","setMoveKnobOffset"]);isc.DrawLabel.markUnsupportedMethods(null,["setLineWidth","setLineOpacity","setLinePattern","setLineCap","setFillColor","setFillGradient","setFillOpacity"]);isc.DrawLabel.markUnsupportedMethods(null,["setStartArrow","setEndArrow"]);isc.defineClass("DrawImage","DrawItem");isc.A=isc.DrawImage.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.left=0;isc.A.top=0;isc.A.width=16;isc.A.height=16;isc.A.src="blank.png";isc.A.isPointInPath=isc.DrawItem.getInstanceProperty("isInBounds");isc.A.$44l=isc.Class.NO_OP;isc.A.resizeBy=isc.DrawRect.getInstanceProperty("resizeBy");isc.A.resizeTo=isc.DrawRect.getInstanceProperty("resizeTo");isc.B.push(isc.A.getBoundingBox=function isc_DrawImage_getBoundingBox(_1){return[this.left,this.top,this.left+this.width,this.top+this.height]},isc.A.init=function isc_DrawImage_init(){this.Super("init");this.initImage(this.src)},isc.A.initImage=function isc_DrawImage_initImage(_1){if(_1){_1=this.getSrcURL(_1);var _2=this.image;if(_2==null){_2=this.image=new Image();var _3=this;_2.onload=function(){if(_3.drawPane&&_3.drawingBitmap){_3.drawPane.redrawBitmap()}}}
_2.src=_1}},isc.A.getSrcURL=function isc_DrawImage_getSrcURL(_1){var _2=isc.Canvas.getImgURL(_1);return _2},isc.A.$44v=function isc_DrawImage__getElementVML(_1){var _2=isc.SB.concat(this.drawPane.startTagVML('IMAGE')," ID='",_1,"' SRC='",this.getSrcURL(this.src),(this.title?"' ALT='"+this.title:""),"' STYLE='left:",this.left,"px; top:",this.top,"px; width:",this.width,"px; height:",this.height,"px;'>",this.drawPane.endTagVML("IMAGE"));return _2},isc.A.getSvgString=function isc_DrawImage_getSvgString(_1){var _2;var _3="<image id='isc_DrawItem_"+this.drawItemID;if(this.rotation&&(_2=this.getCenter())&&_2.length===2){_3+="' transform='rotate("+this.rotation+" "+_2[0]+" "+_2[1]+")"}
_3+="' x='"+this.left+"' y='"+this.top+"' width='"+this.width+"px' height='"+this.height+"px' "+(_1?_1.xlinkPrefix||isc.SVGStringConversionContext.$99a:isc.SVGStringConversionContext.$99a)+":href='"+this.getSrcURL(this.src)+"'";var _4=this.getAttributesSVG();if(_4)_3+=" "+_4;if(this.title){_3+="><title>"+isc.makeXMLSafe(this.title)+"</title></image>"}else _3+="/>";return _3},isc.A.drawBitmapPath=function isc_DrawImage_drawBitmapPath(_1){_1.drawImage(this.image,this.left,this.top,this.width,this.height)},isc.A.getCenter=function isc_DrawImage_getCenter(){return[this.left+Math.round(this.width/2),this.top+Math.round(this.height/2)]},isc.A.setSrc=function isc_DrawImage_setSrc(_1){this.initImage(_1);if(this.drawingVML){this.$125f().src=this.src}else if(this.drawingSVG){this.$44z.setAttributeNS(isc.$100f,"href",this.src)}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.moveBy=function isc_DrawImage_moveBy(_1,_2){this.left+=_1;this.top+=_2;if(this.drawingVML){var _3=this.$125f().style;_3.left=this.left;_3.top=this.top}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"x",this.left);this.$44z.setAttributeNS(null,"y",this.top)}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.Super("moveBy",arguments)},isc.A.moveTo=function isc_DrawImage_moveTo(_1,_2){this.moveBy(_1-this.left,_2-this.top)});isc.B._maxIndex=isc.C+11;isc.DrawImage.markUnsupportedMethods(null,["setLineWidth","setLineColor","setLineOpacity","setLinePattern","setLineCap","setFillColor","setFillGradient","setFillOpacity"]);isc.DrawImage.markUnsupportedMethods(null,["setStartArrow","setEndArrow"]);isc.defineClass("DrawCurve","DrawItem");isc.A=isc.DrawCurve.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.startPoint=[0,0];isc.A.endPoint=[100,100];isc.A.controlPoint1=[100,0];isc.A.controlPoint2=[0,100];isc.A.svgElementName="path";isc.A.vmlElementName="curve";isc.A.eventOpaque=false;isc.A.lineCap="butt";isc.A.showResizeKnobs=isc.Class.NO_OP;isc.A.hideResizeKnobs=isc.Class.NO_OP;isc.A.showMoveKnobs=isc.Class.NO_OP;isc.A.hideMoveKnobs=isc.Class.NO_OP;isc.A.c1KnobDefaults={cursor:"move",knobShapeProperties:{fillColor:"#0000ff"}};isc.A.c2KnobDefaults={cursor:"move",knobShapeProperties:{fillColor:"#0000ff"}};isc.B.push(isc.A.init=function isc_DrawCurve_init(){this.Super("init");this.startPoint=this.startPoint.duplicate();this.endPoint=this.endPoint.duplicate();this.controlPoint1=this.controlPoint1.duplicate();this.controlPoint2=this.controlPoint2.duplicate()},isc.A.$636=function isc_DrawCurve__getKnobPosition(_1){var x,y;x=this.endPoint[0]-this.startPoint[0];y=this.endPoint[1]-this.startPoint[1];return[x,y]},isc.A.getCenter=function isc_DrawCurve_getCenter(){return[this.startPoint[0]+Math.round((this.endPoint[0]-this.startPoint[0])/2),this.startPoint[1]+Math.round((this.endPoint[1]-this.startPoint[1])/2)]},isc.A.getAttributesVML=function isc_DrawCurve_getAttributesVML(){return isc.SB.concat("FROM='",this.startPoint[0]," ",this.startPoint[1],"' TO='",this.endPoint[0]," ",this.endPoint[1],"' CONTROL1='",this.controlPoint1[0]," ",this.controlPoint1[1],"' CONTROL2='",this.controlPoint2[0]," ",this.controlPoint2[1],"'")},isc.A.getAttributesSVG=function isc_DrawCurve_getAttributesSVG(){return"d='"+this.getPathSVG()+"'"},isc.A.getPathSVG=function isc_DrawCurve_getPathSVG(){return"M"+this.startPoint[0]+" "+this.startPoint[1]+"C"+this.controlPoint1[0]+" "+this.controlPoint1[1]+" "+this.controlPoint2[0]+" "+this.controlPoint2[1]+" "+this.endPoint[0]+" "+this.endPoint[1]},isc.A.$114a=function isc_DrawCurve__bezier(_1,_2,_3,_4,_5){var u=(1-_5),_7=u*_1+_5*_2,_8=u*_2+_5*_3,_9=u*_3+_5*_4,_10=u*_7+_5*_8,_11=u*_8+_5*_9;return(u*_10+_5*_11)},isc.A.computeBezierPoint=function isc_DrawCurve_computeBezierPoint(_1){var x=this.$114a(this.startPoint[0],this.controlPoint1[0],this.controlPoint2[0],this.endPoint[0],_1);var y=this.$114a(this.startPoint[1],this.controlPoint1[1],this.controlPoint2[1],this.endPoint[1],_1);return[x,y]},isc.A.drawBitmapPath=function isc_DrawCurve_drawBitmapPath(_1){var _2,_3,_4,_5,_6=10;if(this.startArrow=="open"){_1.save();_1.beginPath();_1.strokeStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_2=this.computeBezierPoint(0.01);_3=this.computeAngle(this.startPoint[0],this.startPoint[1],_2[0],_2[1]);_4=this.startPoint[0];_5=this.startPoint[1];_1.scale(1,1);_1.translate(_4,_5);_1.rotate(_3*this.$125w);this.bmMoveTo(_6,-_6,_1);this.bmLineTo(0,0,_1);this.bmLineTo(_6,_6,_1);_1.stroke();_1.restore()}else if(this.startArrow=="block"){_1.save();_1.beginPath();_1.fillStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_2=this.computeBezierPoint(0.01);_3=this.computeAngle(this.startPoint[0],this.startPoint[1],_2[0],_2[1]);_4=this.startPoint[0];_5=this.startPoint[1];_1.translate(_4,_5);_1.rotate(_3*this.$125w);this.bmMoveTo(_6,-_6,_1);this.bmLineTo(0,0,_1);this.bmLineTo(_6,_6,_1);_1.closePath();_1.fill();_1.stroke();_1.restore()}
if(this.endArrow=="open"){_1.save();_1.beginPath();_1.strokeStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_2=this.computeBezierPoint(0.99);_3=this.computeAngle(_2[0],_2[1],this.endPoint[0],this.endPoint[1]);_4=this.endPoint[0];_5=this.endPoint[1];_1.translate(_4,_5);_1.rotate(_3*this.$125w);this.bmMoveTo(-_6,_6,_1);this.bmLineTo(0,0,_1);this.bmLineTo(-_6,-_6,_1);_1.stroke();_1.restore()}else if(this.endArrow=="block"){_1.save();_1.beginPath();_1.fillStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_2=this.computeBezierPoint(0.99);_3=this.computeAngle(_2[0],_2[1],this.endPoint[0],this.endPoint[1]);_4=this.endPoint[0];_5=this.endPoint[1];_1.translate(_4,_5);_1.rotate(_3*this.$125w);this.bmMoveTo(-_6,_6,_1);this.bmLineTo(0,0,_1);this.bmLineTo(-_6,-_6,_1);_1.closePath();_1.fill();_1.restore()}
_1.moveTo(this.startPoint[0],this.startPoint[1]);_1.bezierCurveTo(this.controlPoint1[0],this.controlPoint1[1],this.controlPoint2[0],this.controlPoint2[1],this.endPoint[0],this.endPoint[1])},isc.A.setStartPoint=function isc_DrawCurve_setStartPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null)this.startPoint[0]=_1;if(_2!=null)this.startPoint[1]=_2;if(this.drawingVML){this.$125f().from=this.startPoint[0]+" "+this.startPoint[1]}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.getPathSVG())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.updateControlKnobs()},isc.A.setEndPoint=function isc_DrawCurve_setEndPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null)this.endPoint[0]=_1;if(_2!=null)this.endPoint[1]=_2;if(this.drawingVML){this.$125f().to=this.endPoint[0]+" "+this.endPoint[1]}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.getPathSVG())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.updateControlKnobs()},isc.A.setControlPoint1=function isc_DrawCurve_setControlPoint1(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null)this.controlPoint1[0]=_1;if(_2!=null)this.controlPoint1[1]=_2;if(this.drawingVML){this.$125f().control1=this.controlPoint1[0]+" "+this.controlPoint1[1]}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.getPathSVG())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.updateControlKnobs()},isc.A.setControlPoint2=function isc_DrawCurve_setControlPoint2(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null)this.controlPoint2[0]=_1;if(_2!=null)this.controlPoint2[1]=_2;if(this.drawingVML){this.$125f().control2=this.controlPoint2[0]+" "+this.controlPoint2[1]}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.getPathSVG())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.updateControlKnobs()},isc.A.getBoundingBox=function isc_DrawCurve_getBoundingBox(_1){var _2=0.000001,_3=new Array(4);for(var k=0;k<2;++k){var x=this.startPoint[k],y=this.controlPoint1[k],z=this.controlPoint2[k],w=this.endPoint[k],_9=Math.min(x,w),_10=Math.max(x,w),a=(x-3*y+3*z-w),b=(2*y-4*z+2*w),c=(-w+z),_14=(b*b-4*a*c),_15=(Math.abs(a)<_2);if(_15){var _16=(Math.abs(b)<_2);if(!_16){var _17=-c/b;if(0<_17&&_17<1){var _18=this.$114a(x,y,z,w,1-_17);_9=Math.min(_9,_18);_10=Math.max(_10,_18)}}}else if(_14>=0){var _19=Math.sqrt(_14),_20=(-b+_19)/(2*a),_21=(-b-_19)/(2*a);if(0<_20&&_20<1){var _18=this.$114a(x,y,z,w,1-_20);_9=Math.min(_9,_18);_10=Math.max(_10,_18)}
if(0<_21&&_21<1){var _18=this.$114a(x,y,z,w,1-_21);_9=Math.min(_9,_18);_10=Math.max(_10,_18)}}
_3[k]=_9;_3[k+2]=_10}
return _1!=true?_3:this.$141a(_3)},isc.A.showStartPointKnobs=function isc_DrawCurve_showStartPointKnobs(){if(this.$639!=null&&!this.$639.destroyed)return;this.$639=this.createAutoChild("startKnob",{_constructor:"DrawKnob",x:this.startPoint[0],y:this.startPoint[1],drawPane:this.drawPane,$113v:this,updatePoints:function(_9,_10,_11,_12,_13){var _1=this.$113v;if(_13=="start"){_1.$114b=_1.controlPoint1.duplicate();_1.$114c=_1.controlPoint2.duplicate()}
var _2=_1.$114b,_3=_1.$114c;if(_1.keepInParentRect){var _4=_1.$113u(),_5={startPoint:[_9,_10],controlPoint1:_2.duplicate(),controlPoint2:_3.duplicate(),endPoint:_1.endPoint};_1.$114d(_5.endPoint,_5,_4);var _6=_5.startPoint,_7=_5.controlPoint1,_8=_5.controlPoint2;_1.setStartPoint(_6[0],_6[1]);if(_1.controlPoint1[0]!=_7[0]||_1.controlPoint1[1]!=_7[1])
{_1.setControlPoint1(_7[0],_7[1])}
if(_1.controlPoint2[0]!=_8[0]||_1.controlPoint2[1]!=_8[1])
{_1.setControlPoint2(_8[0],_8[1])}}else{_1.setStartPoint(_9,_10)}
if(_13=="stop"){delete _1.$114b;delete _1.$114c}}})},isc.A.$114d=function isc_DrawCurve__intersectCurveBox(_1,_2,_3){var _4=Math.min(_3[0],_3[2]),_5=Math.min(_3[1],_3[3]),_6=Math.max(_3[0],_3[2]),_7=Math.max(_3[1],_3[3]);_3[0]=_4;_3[1]=_5;_3[2]=_6;_3[3]=_7;var _8=(_1==_2.endPoint);if(_8){this.$114e(_2)}
var _9=0.000001,_10=_2.startPoint,_11=_2.endPoint,_12=(_3[0]<=_10[0]&&_10[0]<=_3[2]&&_3[1]<=_10[1]&&_10[1]<=_3[3]),_13=(_3[0]<=_11[0]&&_11[0]<=_3[2]&&_3[1]<=_11[1]&&_11[1]<=_3[3]),_14=_12,_15=!_14&&_13,_16=!_14&&!_15,_17=null;for(var m=0;m<4;++m){var k=m%2,l=(k+1)%2,s=(m<2?-1:1),_22=_3[s+1+k];var x=_10[k],y=_2.controlPoint1[k],z=_2.controlPoint2[k],w=_11[k],a=(x-3*(y-z)-w),b=3*(y-z-z+w),c=3*(z-w),d=w-_22;var _31=(Math.abs(a)<_9),_32=(Math.abs(b)<_9),_33=(Math.abs(c)<_9);if(!(_31&&_32&&_33)){var _34;if(_31&&_32){_34=[-d/c]}else if(_31){var _35=(c*c-4*b*d);if(_35<0){_34=[]}else if(_35>0){var _36=Math.sqrt(_35);_34=[(-c+_36)/(2*b),(-c-_36)/(2*b)]}else{_34=[-c/(2*b)]}}else{var _37=a*a,_38=a*_37,_39=b*b,_40=b*_39,_41=-b/(3*a),p=(3*a*c-_39)/(3*_37),q=(2*_40-9*a*b*c+27*_37*d)/(27*_38),_35=(q*q/4+p*p*p/27);if(_35>0){var _36=Math.sqrt(_35),_44=(-q/2+_36),_45=(-q/2-_36),u=(_44>0?1:-1)*Math.pow(Math.abs(_44),1/3),v=(_45>0?1:-1)*Math.pow(Math.abs(_45),1/3);_34=[u+v+_41]}else{var r=Math.sqrt(-4*p/3),_49=-4*q/(r*r*r),_50=Math.acos(Math.max(-1,Math.min(1,_49)))/3;_34=[_41+r*Math.cos(_50),_41+r*Math.cos(_50+2*Math.PI/3),_41+r*Math.cos(_50-2*Math.PI/3)]}}
for(var i=_34.length;i--;){var r=_34[i],_52=3*a*r*r+2*b*r+c;if(_9<r&&r<1-_9&&_52!=0){var _53=(m+3)%4,_54=(m+1)%4,_55=(_53<2?-1:1),_56=(_54<2?-1:1),_57=l,_58=l,_59=_3[_55+1+_57],_60=_3[_56+1+_58],_61=this.$114a(_10[l],_2.controlPoint1[l],_2.controlPoint2[l],_11[l],1-r);if(!(_55*_61>_55*_59)&&!(_56*_61>_56*_60)&&(_15?(s==(_52>0?-1:1)&&(_17==null||_17<r)):(_17==null||(_14?(_17<r):(_17>r)))))
{_17=r}}}}}
if(_17!=null){this.$114f(_2,1-_17,false)}
if(_8){this.$114e(_2)}},isc.A.$114e=function isc_DrawCurve__backward(_1){var _2=_1.startPoint;_1.startPoint=_1.endPoint;_1.endPoint=_2;_2=_1.controlPoint1;_1.controlPoint1=_1.controlPoint2;_1.controlPoint2=_2},isc.A.$114f=function isc_DrawCurve__decasteljau(_1,_2,_3){var w=1-_2;for(var k=0;k<2;++k){var a=w*_1.startPoint[k]+_2*_1.controlPoint1[k],b=w*_1.controlPoint1[k]+_2*_1.controlPoint2[k],c=w*_1.controlPoint2[k]+_2*_1.endPoint[k],d=w*a+_2*b,e=w*b+_2*c,f=w*d+_2*e;if(!_3){_1.controlPoint1[k]=a;_1.controlPoint2[k]=d;_1.endPoint[k]=f}else{_1.startPoint[k]=f;_1.controlPoint1[k]=e;_1.controlPoint2[k]=c}}
return _1},isc.A.hideStartPointKnobs=function isc_DrawCurve_hideStartPointKnobs(){if(this.$639){this.$639.destroy();delete this.$639}},isc.A.showEndPointKnobs=function isc_DrawCurve_showEndPointKnobs(){if(this.$64a!=null&&!this.$64a.destroyed)return;this.$64a=this.createAutoChild("endKnob",{_constructor:"DrawKnob",x:this.endPoint[0],y:this.endPoint[1],drawPane:this.drawPane,$113v:this,updatePoints:function(_9,_10,_11,_12,_13){var _1=this.$113v;if(_13=="start"){_1.$114g=_1.controlPoint1.duplicate();_1.$114h=_1.controlPoint2.duplicate()}
var _2=_1.$114g,_3=_1.$114h;if(_1.keepInParentRect){var _4=_1.$113u(),_5={startPoint:_1.startPoint,controlPoint1:_2.duplicate(),controlPoint2:_3.duplicate(),endPoint:[_9,_10]};_1.$114d(_5.startPoint,_5,_4);var _6=_5.endPoint,_7=_5.controlPoint2,_8=_5.controlPoint1;_1.setEndPoint(_6[0],_6[1]);if(_1.controlPoint2[0]!=_7[0]||_1.controlPoint2[1]!=_7[1])
{_1.setControlPoint2(_7[0],_7[1])}
if(_1.controlPoint1[0]!=_8[0]||_1.controlPoint1[1]!=_8[1])
{_1.setControlPoint1(_8[0],_8[1])}}else{_1.setEndPoint(_9,_10)}
if(_13=="stop"){delete _1.$114g,delete _1.$114h}}})},isc.A.hideEndPointKnobs=function isc_DrawCurve_hideEndPointKnobs(){if(this.$64a){this.$64a.destroy();delete this.$64a}},isc.A.showControlPoint1Knobs=function isc_DrawCurve_showControlPoint1Knobs(){if(this.$64b==null||this.$64b.destroyed){this.$64b=this.createAutoChild("c1Knob",{_constructor:"DrawKnob",x:this.controlPoint1[0],y:this.controlPoint1[1],drawPane:this.drawPane,$113v:this,updatePoints:function(_10,_11,_12,_13,_14){var _1=this.$113v;if(_14=="start"){_1.$114i=_1.startPoint.duplicate();_1.$114j=_1.controlPoint2.duplicate();_1.$114k=_1.endPoint.duplicate()}
var _2=_1.$114i,_3=_1.$114j,_4=_1.$114k;if(_1.keepInParentRect){var _5=_1.$113u(),_6={startPoint:_2.duplicate(),controlPoint1:[_10,_11],controlPoint2:_3.duplicate(),endPoint:_4.duplicate()};_1.$114d(_6.endPoint,_6,_5);var _7=_6.startPoint,_8=_6.controlPoint1,_9=_6.controlPoint2;_1.setControlPoint1(_8[0],_8[1]);if(_7[0]!=_1.startPoint[0]||_7[1]!=_1.startPoint[1])
{_1.setStartPoint(_7[0],_7[1])}
if(_9[0]!=_1.controlPoint2[0]||_9[1]!==_1.controlPoint2[1])
{_1.setControlPoint2(_9[0],_9[1])}}else{_1.setControlPoint1(_10,_11)}
if(_14=="stop"){delete _1.$114i;delete _1.$114j;delete _1.$114k}}})}
if(this.$64c==null||this.$64c.destroyed){this.$64c=this.createAutoChild("c1Line",{_constructor:"DrawLine",startLeft:this.startPoint[0],startTop:this.startPoint[1],endLeft:this.controlPoint1[0],endTop:this.controlPoint1[1],drawPane:this.drawPane,autoDraw:true})}},isc.A.hideControlPoint1Knobs=function isc_DrawCurve_hideControlPoint1Knobs(){if(this.$64b){this.$64b.destroy();delete this.$64b}
if(this.$64c){this.$64c.erase();delete this.$64c}},isc.A.showControlPoint2Knobs=function isc_DrawCurve_showControlPoint2Knobs(){if(this.$64d==null||this.$64d.destroyed){this.$64d=this.createAutoChild("c2Knob",{_constructor:"DrawKnob",x:this.controlPoint2[0],y:this.controlPoint2[1],drawPane:this.drawPane,$113v:this,updatePoints:function(_10,_11,_12,_13,_14){var _1=this.$113v;if(_14=="start"){_1.$114l=_1.startPoint.duplicate();_1.$114m=_1.controlPoint1.duplicate();_1.$114n=_1.endPoint.duplicate()}
var _2=_1.$114l,_3=_1.$114m,_4=_1.$114n;if(_1.keepInParentRect){var _5=_1.$113u(),_6={startPoint:_2.duplicate(),controlPoint1:_3.duplicate(),controlPoint2:[_10,_11],endPoint:_4.duplicate()};_1.$114d(_6.startPoint,_6,_5);var _7=_6.controlPoint1,_8=_6.controlPoint2,_9=_6.endPoint;_1.setControlPoint2(_8[0],_8[1]);if(_7[0]!=_1.controlPoint1[0]||_7[1]!=_1.controlPoint1[1])
{_1.setControlPoint1(_7[0],_7[1])}
if(_9[0]!=_1.endPoint[0]||_9[1]!=_1.endPoint[1])
{_1.setEndPoint(_9[0],_9[1])}}else{_1.setControlPoint2(_10,_11)}
if(_14=="stop"){delete _1.$114l;delete _1.$114m;delete _1.$114n}}})}
if(this.$64e==null||this.$64e.destroyed){this.$64e=this.createAutoChild("c2Line",{_constructor:"DrawLine",startLeft:this.endPoint[0],startTop:this.endPoint[1],endLeft:this.controlPoint2[0],endTop:this.controlPoint2[1],drawPane:this.drawPane,autoDraw:true})}},isc.A.hideControlPoint2Knobs=function isc_DrawCurve_hideControlPoint2Knobs(){if(this.$64d){this.$64d.destroy();delete this.$64d}
if(this.$64e){this.$64e.erase();delete this.$64e}},isc.A.updateControlKnobs=function isc_DrawCurve_updateControlKnobs(){this.Super("updateControlKnobs",arguments);if(this.$639||this.$64c){var _1=this.startPoint[0],_2=this.startPoint[1];if(this.$64c)this.$64c.setStartPoint(_1,_2);if(this.$639){var _3=this.drawPane.drawing2screen([_1,_2,0,0]);this.$639.setCenterPoint(_3[0],_3[1])}}
if(this.$64a||this.$64e){var _1=this.endPoint[0],_2=this.endPoint[1];if(this.$64e)this.$64e.setStartPoint(_1,_2);if(this.$64a){var _3=this.drawPane.drawing2screen([_1,_2,0,0]);this.$64a.setCenterPoint(_3[0],_3[1])}}
if(this.$64b){var _1=this.controlPoint1[0],_2=this.controlPoint1[1];this.$64c.setEndPoint(_1,_2);var _3=this.drawPane.drawing2screen([_1,_2,0,0]);this.$64b.setCenterPoint(_3[0],_3[1])}
if(this.$64d){var _1=this.controlPoint2[0],_2=this.controlPoint2[1];this.$64e.setEndPoint(_1,_2);var _3=this.drawPane.drawing2screen([_1,_2,0,0]);this.$64d.setCenterPoint(_3[0],_3[1])}},isc.A.moveTo=function isc_DrawCurve_moveTo(_1,_2){this.moveBy(_1-this.startPoint[0],_2-this.startPoint[1])},isc.A.moveBy=function isc_DrawCurve_moveBy(_1,_2){this.startPoint[0]+=_1;this.startPoint[1]+=_2;this.controlPoint1[0]+=_1;this.controlPoint1[1]+=_2;this.controlPoint2[0]+=_1;this.controlPoint2[1]+=_2;this.endPoint[0]+=_1;this.endPoint[1]+=_2;if(this.drawingVML){var _3=this.$125f();_3.from=this.startPoint[0]+" "+this.startPoint[1];_3.to=this.endPoint[0]+" "+this.endPoint[1];_3.control1=this.controlPoint1[0]+" "+this.controlPoint1[1];_3.control2=this.controlPoint2[0]+" "+this.controlPoint2[1]}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.getPathSVG())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.Super("moveBy",arguments)});isc.B._maxIndex=isc.C+28;isc.defineClass("DrawBlockConnector","DrawCurve");isc.A=isc.DrawBlockConnector.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.svgElementName="path";isc.A.vmlElementName="curve";isc.B.push(isc.A.getAttributesVML=function isc_DrawBlockConnector_getAttributesVML(){return"FROM='"+this.startPoint[0]+" "+this.startPoint[1]+"' TO='"+this.endPoint[0]+" "+this.endPoint[1]+"' CONTROL1='"+this.controlPoint1[0]+" "+this.controlPoint1[1]+"' CONTROL2='"+this.controlPoint2[0]+" "+this.controlPoint2[1]+"'"},isc.A.getAttributesSVG=function isc_DrawBlockConnector_getAttributesSVG(){return"d='"+this.getPathSVG()+"'"},isc.A.setStartPoint=function isc_DrawBlockConnector_setStartPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null)this.startPoint[0]=_1;if(_2!=null)this.startPoint[1]=_2;if(this.drawingVML){this.$125f().from=this.startPoint[0]+" "+this.startPoint[1]}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.getPathSVG())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}});isc.B._maxIndex=isc.C+3;isc.defineClass("DrawPath","DrawItem");isc.A=isc.DrawPath.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.points=[[0,0],[100,100]];isc.A.svgElementName="polyline";isc.A.vmlElementName="POLYLINE";isc.A.eventOpaque=false;isc.A.showResizeKnobs=isc.Class.NO_OP;isc.A.hideResizeKnobs=isc.Class.NO_OP;isc.A.showMoveKnobs=isc.Class.NO_OP;isc.A.hideMoveKnobs=isc.Class.NO_OP;isc.B.push(isc.A.init=function isc_DrawPath_init(){this.Super("init",arguments);this.points=isc.clone(this.points)},isc.A.getBoundingBox=function isc_DrawPath_getBoundingBox(_1){var _2=this.points[0],_3=[_2[0],_2[1]],_4=[_2[0],_2[1]],i;for(i=1;i<this.points.length;++i){_2=this.points[i];_3[0]=Math.min(_3[0],_2[0]);_3[1]=Math.min(_3[1],_2[1]);_4[0]=Math.max(_4[0],_2[0]);_4[1]=Math.max(_4[1],_2[1])}
var _6=[].concat(_3,_4);return _1!=true?_6:this.$141a(_6)},isc.A.getPathSVG=function isc_DrawPath_getPathSVG(){if(this.points==null||this.points.length==0)return"";var _1="M ",i,_3=this.points[0];_1+=_3[0]+" "+_3[1]+" ";for(i=1;i<this.points.length;++i){_3=this.points[i];_1+=" L "+_3[0]+" "+_3[1]}
return _1},isc.A.getAttributesSVG=function isc_DrawPath_getAttributesSVG(){var _1=this.getPointsText();return"points='"+_1+"'"},isc.A.getPointsText=function isc_DrawPath_getPointsText(){if(this.points==null)return;var _1=isc.SB.create(),_2=this.points;for(var i=0;i<_2.length;i++){_1.append(_2[i][0]," ",_2[i][1]);if(i<_2.length-1)_1.append(" ")}
return _1.toString()},isc.A.getAttributesVML=function isc_DrawPath_getAttributesVML(){return isc.SB.concat("STYLE='position:absolute; left:",this.left,"px; top:",this.top,"px; width:",this.width,"px; height:",this.height,"px;'"," POINTS='"+this.getPointsText()+"'")},isc.A.drawBitmapPath=function isc_DrawPath_drawBitmapPath(_1){var _2=this.points;if(_2==null||_2.length==0)return;var _3,_4=10,_5=_2.length-1,_6,_7;if(this.startArrow=="open"){_1.save();_1.beginPath();_1.strokeStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_3=this.computeAngle(_2[0][0],_2[0][1],_2[1][0],_2[1][1]);_6=_2[0][0];_7=_2[0][1];_1.scale(1,1);_1.translate(_6,_7);_1.rotate(_3*this.$125w);this.bmMoveTo(_4,-_4,_1);this.bmLineTo(0,0,_1);this.bmLineTo(_4,_4,_1);_1.stroke();_1.restore()}else if(this.startArrow=="block"){_1.save();_1.beginPath();_1.fillStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_3=this.computeAngle(_2[0][0],_2[0][1],_2[1][0],_2[1][1]);_6=_2[0][0];_7=_2[0][1];_1.translate(_6,_7);_1.rotate(_3*this.$125w);this.bmMoveTo(_4,-_4,_1);this.bmLineTo(0,0,_1);this.bmLineTo(_4,_4,_1);_1.closePath();_1.fill();_1.stroke();_1.restore()}
if(this.endArrow=="open"){_1.save();_1.beginPath();_1.strokeStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_3=this.computeAngle(_2[_5-1][0],_2[_5-1][1],_2[_5][0],_2[_5][1]);_6=_2[_5][0];_7=_2[_5][1];_1.translate(_6,_7);_1.rotate(_3*this.$125w);this.bmMoveTo(-_4,_4,_1);this.bmLineTo(0,0,_1);this.bmLineTo(-_4,-_4,_1);_1.stroke();_1.restore()}else if(this.endArrow=="block"){_1.save();_1.beginPath();_1.fillStyle=this.lineColor;_1.lineWidth=this.lineWidth;_1.lineCap="round";_3=this.computeAngle(_2[_5-1][0],_2[_5-1][1],_2[_5][0],_2[_5][1]);_6=_2[_5][0];_7=_2[_5][1];_1.translate(_6,_7);_1.rotate(_3*this.$125w);this.bmMoveTo(-_4,_4,_1);this.bmLineTo(0,0,_1);this.bmLineTo(-_4,-_4,_1);_1.closePath();_1.fill();_1.restore()}
this.bmMoveTo(_2[0][0],_2[0][1],_1);for(var i=1;i<_2.length;i++){var _9=_2[i];if(!_1.setLineDash&&this.linePattern.toLowerCase()!=="solid"){this.$85x(_2[i-1][0],_2[i-1][1],_2[i][0],_2[i][1],_1)}else{this.bmLineTo(_9[0],_9[1],_1)}}},isc.A.getCenter=function isc_DrawPath_getCenter(){var _1,i,x=0,y=0,_5=this.points.length;for(i=0;i<_5;++i){_1=this.points[i];x+=_1[0];y+=_1[1]}
x=Math.round(x/_5);y=Math.round(y/_5);return[x,y]},isc.A.isPointInPath=function isc_DrawPath_isPointInPath(_1,_2){if(this.$125k()||this.eventOpaque){if(this.Super("isPointInPath",arguments))return true}
var _3=(this.hitTolerance!=null?this.hitTolerance:0);var _4=Math.max(this.lineWidth/2,2)+_3;var _5=this.$136i(_1,_2);var _6=this.points,_7=_6.length,_8,_9;for(var i=0;i<_7-1;++i){_8=_6[i];_9=_6[i+1];if(isc.Math.euclideanDistanceToLine(_8[0],_8[1],_9[0],_9[1],_5.v0,_5.v1)<_4){return true}}
if(isc.isA.DrawPolygon(this)&&_7>=3){var _11=_6[0],_12=_6[_7-1];if(isc.Math.euclideanDistanceToLine(_11[0],_11[1],_12[0],_12[1],_5.v0,_5.v1)<_4){return true}}
return false},isc.A.setPoints=function isc_DrawPath_setPoints(_1){this.points=_1;if(this.drawingVML){this.$125f().points.value=this.getPointsText()}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.getPathSVG())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}},isc.A.moveTo=function isc_DrawPath_moveTo(_1,_2){var _3=_1-this.points[0][0];var _4=_2-this.points[0][1];this.moveBy(_3,_4)},isc.A.moveBy=function isc_DrawPath_moveBy(_1,_2){if(this.getClass().getClassName()!=='DrawLinePath'){var _3,_4=this.points.length;for(var i=0;i<_4;++i){_3=this.points[i];_3[0]+=_1;_3[1]+=_2}
if(this.drawingVML){this.$125f().points.value=this.getPointsText()}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.getPathSVG())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}}
this.Super("moveBy",arguments)});isc.B._maxIndex=isc.C+12;isc.DrawPath.markUnsupportedMethods("$class does not support knobs.",["showKnobs","setMoveKnobOffset"]);isc.defineClass("DrawPolygon","DrawPath");isc.A=isc.DrawPolygon.getPrototype();isc.A.points=[[0,0],[50,50],[100,0]];isc.A.lineCap="butt";isc.A.svgElementName="path";isc.A.vmlElementName="POLYLINE";isc.A.eventOpaque=true;isc.A=isc.DrawPolygon.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_DrawPolygon_init(){this.Super("init");this.points=isc.clone(this.points)},isc.A.getPointsText=function isc_DrawPolygon_getPointsText(){var _1=isc.SB.create(),_2=this.points;for(var i=0;i<_2.length;i++){_1.append(_2[i][0]," ",_2[i][1]," ")}
_1.append(_2[0][0]," ",_2[0][1]);return _1.toString()},isc.A.getPathSVG=function isc_DrawPolygon_getPathSVG(){return this.Super("getPathSVG",arguments)+" Z"},isc.A.getAttributesSVG=function isc_DrawPolygon_getAttributesSVG(){return"d='"+this.getPathSVG()+"'"},isc.A.drawBitmapPath=function isc_DrawPolygon_drawBitmapPath(_1){var _2=this.points;this.bmMoveTo(_2[0][0],_2[0][1],_1);for(var i=1;i<_2.length;i++){var _4=_2[i];this.bmLineTo(_4[0],_4[1],_1)}
_1.closePath()});isc.B._maxIndex=isc.C+5;isc.DrawPolygon.markUnsupportedMethods(null,["setStartArrow","setEndArrow"]);isc.defineClass("DrawTriangle","DrawPolygon");isc.A=isc.DrawTriangle.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getCenter=function isc_DrawTriangle_getCenter(){var a=isc.Math.euclideanDistance(this.points[1],this.points[2]),b=isc.Math.euclideanDistance(this.points[0],this.points[2]),c=isc.Math.euclideanDistance(this.points[0],this.points[1]),P=a+b+c,u=[a,b,c],_6=[this.points[0][0],this.points[1][0],this.points[2][0]],_7=[this.points[0][1],this.points[1][1],this.points[2][1]],_8=[isc.Math.$fr(u,_6)/P,isc.Math.$fr(u,_7)/P];return _8});isc.B._maxIndex=isc.C+1;isc.defineClass("DrawLinePath","DrawPath");isc.A=isc.DrawLinePath.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.startPoint=[0,0];isc.A.endPoint=[100,100];isc.A.tailSize=30;isc.A.startArrow=null;isc.A.endArrow="open";isc.A.showResizeKnobs=isc.Class.NO_OP;isc.A.hideResizeKnobs=isc.Class.NO_OP;isc.A.showMoveKnobs=isc.Class.NO_OP;isc.A.hideMoveKnobs=isc.Class.NO_OP;isc.A.showStartPointKnobs=isc.DrawLine.getPrototype().showStartPointKnobs;isc.A.hideStartPointKnobs=isc.DrawLine.getPrototype().hideStartPointKnobs;isc.A.showEndPointKnobs=isc.DrawLine.getPrototype().showEndPointKnobs;isc.A.hideEndPointKnobs=isc.DrawLine.getPrototype().hideEndPointKnobs;isc.A.updateControlKnobs=isc.DrawLine.getPrototype().updateControlKnobs;isc.B.push(isc.A.init=function isc_DrawLinePath_init(){this.startPoint=this.startPoint.duplicate();this.endPoint=this.endPoint.duplicate();this.startLeft=(this.startLeft==0?0:(this.startLeft||this.startPoint[0]));this.startTop=(this.startTop==0?0:(this.startTop||this.startPoint[1]));this.endLeft=(this.endLeft==0?0:(this.endLeft||this.endPoint[0]));this.endTop=(this.endTop==0?0:(this.endTop||this.endPoint[1]));this.points=this.$45e();this.Super("init")},isc.A.$45e=function isc_DrawLinePath__getSegmentPoints(){var _1=this.tailSize;if(this.startLeft<=this.endLeft){_1=-_1}
this.$45f=[];this.$45f.addList([[this.startLeft,this.startTop],[this.startLeft-_1,this.startTop],[this.endLeft+_1,this.endTop],[this.endLeft,this.endTop]]);return this.$45f},isc.A.$63r=function isc_DrawLinePath__drawLineStartArrow(){return this.startArrow=="open"},isc.A.$63s=function isc_DrawLinePath__drawLineEndArrow(){return this.endArrow=="open"},isc.A.getCenter=function isc_DrawLinePath_getCenter(){return[this.startPoint[0]+Math.round((this.endPoint[0]-this.startPoint[0])/2),this.startPoint[1]+Math.round((this.endPoint[1]-this.startPoint[1])/2)]},isc.A.setStartPoint=function isc_DrawLinePath_setStartPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null){this.startLeft=this.startPoint[0]=_1}
if(_2!=null){this.startTop=this.startPoint[1]=_2}
this.setPoints(this.$45e());this.updateControlKnobs()},isc.A.setEndPoint=function isc_DrawLinePath_setEndPoint(_1,_2){if(isc.isAn.Array(_1)){_2=_1[1];_1=_1[0]}
if(_1!=null){this.endLeft=this.endPoint[0]=_1}
if(_2!=null){this.endTop=this.endPoint[1]=_2}
this.setPoints(this.$45e());this.updateControlKnobs()},isc.A.drawBitmapPath=function isc_DrawLinePath_drawBitmapPath(_1){var _2=10;if(this.startLeft>this.endLeft)_2=-_2;if(this.startArrow=="open"){this.bmMoveTo(this.startLeft+_2,this.startTop-_2,_1);this.bmLineTo(this.startLeft,this.startTop,_1);this.bmLineTo(this.startLeft+_2,this.startTop+_2,_1)}else if(this.startArrow=="block"){_1.stroke();_1.beginPath();_1.fillStyle=this.lineColor;_1.lineWidth="1px";_1.lineCap="round";this.bmMoveTo(this.startLeft+_2,this.startTop-_2,_1);this.bmLineTo(this.startLeft,this.startTop,_1);this.bmLineTo(this.startLeft+_2,this.startTop+_2,_1);_1.closePath();_1.fill()}
var _3=this.points;this.bmMoveTo(_3[0][0],_3[0][1],_1);for(var i=1;i<_3.length;i++){var _5=_3[i];if(this.linePattern.toLowerCase()!=="solid"){this.$85x(_3[i-1][0],_3[i-1][1],_3[i][0],_3[i][1],_1)}else{this.bmLineTo(_5[0],_5[1],_1)}}
if(this.endArrow=="open"){this.bmMoveTo(this.endLeft-_2,this.endTop+_2,_1);this.bmLineTo(this.endLeft,this.endTop,_1);this.bmLineTo(this.endLeft-_2,this.endTop-_2,_1)}else if(this.endArrow=="block"){_1.stroke();_1.beginPath();_1.fillStyle=this.lineColor;_1.lineWidth="1px";_1.lineCap="round";this.bmMoveTo(this.endLeft-_2,this.endTop+_2,_1);this.bmLineTo(this.endLeft,this.endTop,_1);this.bmLineTo(this.endLeft-_2,this.endTop-_2,_1);_1.closePath();_1.fill()}},isc.A.getBoundingBox=function isc_DrawLinePath_getBoundingBox(_1){var _2=this.startPoint[0],_3=this.startPoint[1],_4=this.endPoint[0],_5=this.endPoint[1];var _6=Math.min(_2,_4),_7=Math.max(_2,_4),_8=Math.min(_3,_5),_9=Math.max(_3,_5);var _10=[_6,_8,_7,_9];return _1!=true?_10:this.$141a(_10)},isc.A.moveBy=function isc_DrawLinePath_moveBy(_1,_2){this.startLeft+=_1;this.startPoint[0]+=_1;this.startTop+=_2;this.startPoint[1]+=_2;this.endLeft+=_1;this.endPoint[0]+=_1;this.endTop+=_2;this.endPoint[1]+=_2;this.setPoints(this.$45e());this.Super("moveBy",arguments)},isc.A.moveTo=function isc_DrawLinePath_moveTo(_1,_2){this.moveBy(_1-this.startLeft,_2-this.startTop)});isc.B._maxIndex=isc.C+11;isc.defineClass("DrawShape","DrawItem");isc.A=isc.DrawShape;isc.A.$1252="close";isc.A.$1253="moveto";isc.A.$1254="lineto";isc.A.$1255="circleto";isc.A=isc.DrawShape.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.vmlElementName="SHAPE";isc.A.svgElementName="path";isc.A.eventOpaque=false;isc.A.showResizeKnobs=isc.Class.NO_OP;isc.A.hideResizeKnobs=isc.Class.NO_OP;isc.A.showMoveKnobs=isc.Class.NO_OP;isc.A.hideMoveKnobs=isc.Class.NO_OP;isc.A.$1252=isc.DrawShape.$1252;isc.A.$1253=isc.DrawShape.$1253;isc.A.$1254=isc.DrawShape.$1254;isc.A.$1255=isc.DrawShape.$1255;isc.A.$1256=[];isc.A.$1257=["STYLE='width:",,"px; height:",,"px' COORDSIZE='",," ",,"' PATH='"];isc.A.$1258=["d='"];isc.B.push(isc.A.setCommands=function isc_DrawShape_setCommands(_1){this.commands=_1;if(this.drawingVML){this.$125f().path=this.$126a()}else if(this.drawingSVG){this.$44z.setAttributeNS(null,"d",this.$126b())}else if(this.drawingBitmap){this.drawPane.redrawBitmap()}
this.$5y()},isc.A.getBoundingBox=function isc_DrawShape_getBoundingBox(_1){var _2=this.drawPane,_3=_2.$163f(),_4=_2.$163g();return[0,0,_3,_4]},isc.A.$126a=function isc_DrawShape__getPathVML(_1){var _2=_1||[];var _3=this.commands;if(_3!=null&&_3.length>0){var _4=this.drawPane.$1259;for(var i=0;i<_3.length;++i){var _6=_3[i],_7=_6.type,_8=_6.args;if(_7==this.$1252){_2.push("x")}else if(_7==this.$1253){var _9=_8;_2.push("m",(_9[0]*_4)<<0,",",(_9[1]*_4)<<0)}else if(_7==this.$1254){var _10=_8,_9=_10[0];_2.push("l",(_9[0]*_4)<<0,",",(_9[1]*_4)<<0);for(var n=1;n<_10.length;++n){_9=_10[n];_2.push(",",(_9[0]*_4)<<0,",",(_9[1]*_4)<<0)}}else if(_7==this.$1255){var _12=_8[0],_13=(_12[0]*_4)<<0,_14=(_12[1]*_4)<<0,r=(_8[1]*_4)<<0,_16=_8[2],_17=_8[3],_18=_17-_16;_18=Math.min(_18,360);_2.push("ae",_13,",",_14,",",r,",",r,",",Math.floor(_16*-65536),",",Math.ceil(_18*-65536))}}}
if(_1==null)return _2.join(isc.emptyString)},isc.A.getAttributesVML=function isc_DrawShape_getAttributesVML(){var _1=this.$1257,_2=_1.length;var _3=this.drawPane,_4=_3.$43z,_5=_3.$430;_1[1]=_4;_1[5]=_4*this.drawPane.$1259;_1[3]=_5;_1[7]=_5*this.drawPane.$1259;this.$126a(_1);_1.push("'");var _6=_1.join(isc.emptyString);_1.setLength(_2);return _6},isc.A.$126b=function isc_DrawShape__getPathDataSVG(_1){var _2=_1||[];var _3=this.commands;if(_3!=null&&_3.length>0){var _4=isc.DrawShape.$125w;for(var i=0;i<_3.length;++i){var _6=_3[i],_7=_6.type,_8=_6.args;if(_7=="close"){_2.push(" Z")}else if(_7=="moveto"){var _9=_8;_2.push(" M ",_9[0]," ",_9[1])}else if(_7=="lineto"){var _10=_8,_9=_10[0];_2.push(" L ",_9[0]," ",_9[1]);for(var n=1;n<_10.length;++n){_9=_10[n];_2.push(" ",_9[0]," ",_9[1])}}else if(_7=="circleto"){var _12=_8[0],_13=_12[0],_14=_12[1],_15=_8[1],_16=_8[2],_17=_8[3],_18=Math.abs(_17-_16)>180?"1":"0",_19;if(_16<=_17){_19="1";_17=Math.min(_17,_16+359.9)}else{_19="0";_17=Math.max(_16-359.9,_17)}
var _20=_13+_15*Math.cos(_16*_4),_21=_14-_15*Math.sin(-_16*_4);_2.push(" L ",_20," ",_21);var x=_13+_15*Math.cos(_17*_4),y=_14-_15*Math.sin(-_17*_4);_2.push(" A ",_15," ",_15," ",_16<=_17?-_16:-_17," ",_18," ",_19," ",x," ",y)}}}
if(_1==null)return _2.join("")},isc.A.getAttributesSVG=function isc_DrawShape_getAttributesSVG(){var _1=this.$1258,_2=_1.length;this.$126b(_1);_1.push("'");var _3=_1.join("");_1.setLength(_2);return _3},isc.A.drawBitmapPath=function isc_DrawShape_drawBitmapPath(_1){var _2=this.commands;if(_2!=null&&_2.length>0){if(this.lineWidth==0){_1.strokeStyle=this.fillColor;_1.globalAlpha=this.fillOpacity}
_1.beginPath();for(var i=0;i<_2.length;++i){var _4=_2[i],_5=_4.type,_6=_4.args;if(_5=="close"){_1.closePath()}else if(_5=="moveto"){var _7=_6;_1.moveTo(_7[0],_7[1])}else if(_5=="lineto"){var _8=_6,_7=_8[0];_1.lineTo(_7[0],_7[1]);for(var n=1;n<_8.length;++n){_7=_8[n];_1.lineTo(_7[0],_7[1])}}else if(_5=="circleto"){var _10=_6[0],_11=_10[0],_12=_10[1],_13=_6[1],_14=_6[2],_15=_6[3];_1.arc(_11,_12,_13,_14*isc.DrawShape.$125w,_15*isc.DrawShape.$125w,_15<_14)}}}});isc.B._maxIndex=isc.C+7;isc.DrawShape.markUnsupportedMethods("$class does not support knobs.",["showKnobs","setMoveKnobOffset"]);isc.DrawShape.markUnsupportedMethods(null,["setStartArrow","setEndArrow"]);isc.GraphMath={zeroPoint:[0,0],polar2screen:function(_1,_2,_3,_4){_3=_3||this.zeroPoint;var _5=Math.PI-((_1+450)%360)/180*Math.PI;var _6=[_3[0]+(_2*Math.cos(_5)),_3[1]+(-_2*Math.sin(_5))]
if(_4){_6[0]=Math.round(_6[0]);_6[1]=Math.round(_6[1])}
return _6},screen2polar:function(_1,_2){return[((Math.PI-Math.atan2(-_2,_1))/Math.PI*180+270)%360,Math.sqrt(Math.pow(_1,2)+Math.pow(_2,2))]},angleDifference:function(_1,_2){var _3=Math.max(_1,_2),_4=Math.min(_1,_2),_5=_3-_4,_6=_4+360-_3;if(_6<_5){var _7=_3==_1?1:-1;return _7*_6}else{var _7=_3==_1?-1:1;return _7*_5}},straightDistance:function(_1,_2){var _3=_1[0]-_2[0],_4=_1[1]-_2[1];return Math.sqrt(_3*_3+_4*_4)},trimLineEnds:function(_1,_2,_3,_4,_5,_6){var _7=Math.sqrt(Math.pow(_3-_1,2)+Math.pow(_4-_2,2));if(_5+_6>_7){var _8=_5/(_5+_6)*(_3-_1)+_1;var _9=_5/(_5+_6)*(_4-_2)+_2;return[_8+(_1==_3?0:_1>_3?0.01:-0.01),_9+(_2==_4?0:_2>_4?0.01:-0.01),_8+(_1==_3?0:_1>_3?-0.01:0.01),_9+(_2==_4?0:_2>_4?-0.01:0.01)]}
var _10=Math.atan2(_2-_4,_3-_1);return[_1+(_5*Math.cos(_10)),_2-(_5*Math.sin(_10)),_3-(_6*Math.cos(_10)),_4+(_6*Math.sin(_10))]}}
isc.A=isc.Canvas.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.setCenter=function isc_Canvas_setCenter(_1,_2){this.moveTo(_1-this.getVisibleWidth()/2,_2-this.getVisibleHeight()/2)},isc.A.getCenter=function isc_Canvas_getCenter(){return[this.getLeft()+this.getVisibleWidth()/2,this.getTop()+this.getVisibleHeight()/2]});isc.B._maxIndex=isc.C+2;isc.defineClass("LinkedList","Class");isc.A=isc.LinkedList.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.length=0;isc.B.push(isc.A.init=function isc_LinkedList_init(){this.head=null},isc.A.add=function isc_LinkedList_add(_1){var _2={next:null,data:_1};if(!this.head){this.head=_2}else{var _3=this.head;while(_3.next){_3=_3.next}
_3.next=_2}
this.length++},isc.A.get=function isc_LinkedList_get(_1){var _2=null;if(_1>=0&&_1<this.length){var _3=this.head,i=0;while(i++<_1){_3=_3&&_3.next}
_2=_3.data}
return _2},isc.A.remove=function isc_LinkedList_remove(_1){var _2=null;if(_1>=0&&_1<this.length){var _3=this.head,i=0;if(_1===0){this.head=_3.next}else{var _5;while(i++<_1){_5=_3;_3=_3&&_3.next}
_5.next=_3.next}
_2=_3.data;this.length--}
return _2},isc.A.toArray=function isc_LinkedList_toArray(){var _1=[],_2=this.head;while(_2){_1.push(_2.data);_2=_2.next}
return _1});isc.B._maxIndex=isc.C+5;isc.defineClass("QuadTree").addClassProperties({$148u:function(_1){var _2=[_1];for(;_1;_1=_1.drawGroup){_2.unshift(_1)}
return _2},$148q:function(_1,_2){if(_1.addOrder!=_2.addOrder){return(_1.addOrder-_2.addOrder)}
_1=_1.shape;_2=_2.shape;var _3=isc.QuadTree.$148u(_1),_4=isc.QuadTree.$148u(_2);for(var i=0;i<_3.length;++i){if(_3[i]!=_4[i]){var _6=_3[i-1];if(_6===_1)return-1;if(_6===_2)return 1;var _7=_6.drawItems.indexOf(_3[i]);var _8=_6.drawItems.indexOf(_4[i]);return(_7-_8)}}
return 0}});isc.A=isc.QuadTree.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.depth=0;isc.A.maxDepth=0;isc.A.maxChildren=0;isc.B.push(isc.A.init=function isc_QuadTree_init(){this.root=null;this.bounds=null},isc.A.insert=function isc_QuadTree_insert(_1){if(isc.isAn.Array(_1)){var _2=_1.length;for(var i=0;i<_2;i++){this.root.insert(_1[i])}}else{this.root.insert(_1)}},isc.A.remove=function isc_QuadTree_remove(_1){this.root.remove(_1)},isc.A.clear=function isc_QuadTree_clear(){this.root.clear()},isc.A.retrieve=function isc_QuadTree_retrieve(_1){return this.root.retrieve(_1).slice()},isc.A.update=function isc_QuadTree_update(_1,_2,_3,_4,_5){return this.root.update(_1,_2,_3,_4,_5)});isc.B._maxIndex=isc.C+6;isc.defineClass("QuadTreeNode","Class");isc.A=isc.QuadTreeNode;isc.A.TOP_LEFT=0;isc.A.TOP_RIGHT=1;isc.A.BOTTOM_LEFT=2;isc.A.BOTTOM_RIGHT=3;isc.A=isc.QuadTreeNode.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.depth=0;isc.A.maxDepth=4;isc.A.maxChildren=4;isc.B.push(isc.A.init=function isc_QuadTreeNode_init(){this.bounds=null;this.nodes=[];this.children=isc.LinkedList.create()},isc.A.insert=function isc_QuadTreeNode_insert(_1){if(this.nodes.length){var _2=this.findQuadrants(_1);for(var i=0;i<_2.length;++i){var _4=_2[i];this.nodes[_4].insert(_1)}
return}
this.children.add(_1);var _5=this.children.length;if(!(this.depth>=this.maxDepth)&&_5>this.maxChildren){this.subdivide();for(var i=0;i<_5;i++){this.insert(this.children.get(i))}
this.children=isc.LinkedList.create()}},isc.A.remove=function isc_QuadTreeNode_remove(_1){if(this.nodes.length){var _2=this.findQuadrants(_1);for(var i=0;i<_2.length;++i){var _4=_2[i];this.nodes[_4].remove(_1)}}
var _5=this.children;for(var j=0,_7=_5.length;j<_7;++j){var _8=_5.get(j);if(_8===_1){_5.remove(j);--_7;--j}}},isc.A.retrieve=function isc_QuadTreeNode_retrieve(_1){if(this.nodes.length){var _2=this.findQuadrant(_1);return this.nodes[_2].retrieve(_1)}
return this.children.toArray()},isc.A.findQuadrant=function isc_QuadTreeNode_findQuadrant(_1){var b=this.bounds,_3=!(_1.x>b.x+b.width/2),_4=!(_1.y>b.y+b.height/2);var _5=isc.QuadTreeNode.TOP_LEFT;if(_3){if(!_4){_5=isc.QuadTreeNode.BOTTOM_LEFT}}else{if(_4){_5=isc.QuadTreeNode.TOP_RIGHT}else{_5=isc.QuadTreeNode.BOTTOM_RIGHT}}
return _5},isc.A.findQuadrants=function isc_QuadTreeNode_findQuadrants(_1){var _2=[];var _3={};var _4=this.findQuadrant({x:_1.x,y:_1.y});_2.push(_4);_3[_4]=true;_4=this.findQuadrant({x:_1.x+_1.width,y:_1.y+_1.height});if(!_3[_4]){_2.push(_4);_3[_4]=true}
_4=this.findQuadrant({x:_1.x,y:_1.y+_1.height});if(!_3[_4]){_2.push(_4);_3[_4]=true}
_4=this.findQuadrant({x:_1.x+_1.width,y:_1.y});if(!_3[_4]){_2.push(_4)}
return _2},isc.A.subdivide=function isc_QuadTreeNode_subdivide(){var _1=this.depth+1;var _2=this.bounds.x;var _3=this.bounds.y;var _4=(this.bounds.width/2)|0;var _5=(this.bounds.height/2)|0;var _6=_2+_4;var _7=_3+_5;this.nodes[isc.QuadTreeNode.TOP_LEFT]=isc.QuadTreeNode.create({depth:_1});this.nodes[isc.QuadTreeNode.TOP_LEFT].bounds={x:_2,y:_3,width:_4,height:_5};this.nodes[isc.QuadTreeNode.TOP_RIGHT]=isc.QuadTreeNode.create({depth:_1});this.nodes[isc.QuadTreeNode.TOP_RIGHT].bounds={x:_6,y:_3,width:_4,height:_5};this.nodes[isc.QuadTreeNode.BOTTOM_LEFT]=isc.QuadTreeNode.create({depth:_1});this.nodes[isc.QuadTreeNode.BOTTOM_LEFT].bounds={x:_2,y:_7,width:_4,height:_5};this.nodes[isc.QuadTreeNode.BOTTOM_RIGHT]=isc.QuadTreeNode.create({depth:_1});this.nodes[isc.QuadTreeNode.BOTTOM_RIGHT].bounds={x:_6,y:_7,width:_4,height:_5}},isc.A.clear=function isc_QuadTreeNode_clear(){this.children=isc.LinkedList.create();var _1=this.nodes.length;for(var i=0;i<_1;i++){this.nodes[i].clear()}
this.nodes=[];this.depth=0;this.maxDepth=4;this.maxChildren=4},isc.A.update=function isc_QuadTreeNode_update(_1,_2,_3,_4,_5){this.remove(_1);_1.x=_2;_1.y=_3;_1.width=_4;_1.height=_5;this.insert(_1)});isc.B._maxIndex=isc.C+9;isc.defineClass("DrawKnob","Canvas");isc.A=isc.DrawKnob.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width=10;isc.A.height=10;isc.A.overflow="hidden";isc.A.cursor="crosshair";isc.A.canDrag=true;isc.A.dragAppearance="none";isc.A.keepInParentRect=true;isc.A.autoDraw=false;isc.A.knobShapeDefaults={_constructor:isc.DrawOval,radius:5,lineWidth:2,fillColor:"#FF0000",fillOpacity:0.5,autoDraw:true,updateControlKnobs:function(){return},erase:function(){if(this.erasing)return;this.erasing=true;if(this.creator.isDrawn())this.creator.clear();this.Super("erase",arguments);delete this.erasing}};isc.B.push(isc.A.initWidget=function isc_DrawKnob_initWidget(){if(isc.Browser.isIE&&isc.Browser.version<11&&this.drawPane.drawingType=="bitmap"){this.setBackgroundColor("White");this.setOpacity(0)}
this.left=this.x-this.width/2;this.top=this.y-this.height/2;this.knobShape=this.createAutoChild("knobShape",{drawPane:this.drawPane,centerPoint:[this.x,this.y]});this.$907=true;this.drawPane.addCanvasItem(this);delete this.$907},isc.A.setCenterPoint=function isc_DrawKnob_setCenterPoint(_1,_2,_3){var _4,_5;if(_3){var _6=this.drawPane.drawing2screen([_1-this.$44g/2,_2-this.$44h/2,0,0]);_4=_6[0],_5=_6[1]}else{_4=_1-this.width/2;_5=_2-this.height/2}
this.moveTo(_4<<0,_5<<0)},isc.A.setRect=function isc_DrawKnob_setRect(_1,_2,_3,_4,_5){if(isc.isAn.Array(_1)){_2=_1[1];_3=_1[2];_4=_1[3];_1=_1[0]}else if(isc.isAn.Object(_1)){_2=_1.top;_3=_1.width;_4=_1.height;_1=_1.left}
var _6=this.keepInParentRect;if(_6){var _7=this.drawPane.getWidth(),_8=this.drawPane.getHeight(),_9=Math.min(_1+_3,_7),_10=Math.min(_2+_4,_8);_1=Math.max(_1,0);_2=Math.max(_2,0);_3=_9-_1;_4=_10-_2;if(_3<1||_4<1){this.hide();return false}else{this.show()}}
return this.Super("setRect",[_1,_2,_3,_4,_5])},isc.A.draw=function isc_DrawKnob_draw(){var _1=(this.$907);if(!_1)return this.Super("draw",arguments)},isc.A.moved=function isc_DrawKnob_moved(){if(!this.synchingToPane)this.updateKnobShape()},isc.A.$64f=function isc_DrawKnob__updatePoints(_1){var x=isc.EH.getX(),y=isc.EH.getY(),_4=x-
(this.drawPane.getPageLeft()+this.drawPane.getLeftMargin()+this.drawPane.getLeftBorderSize()),_5=y-
(this.drawPane.getPageTop()+this.drawPane.getTopMargin()+this.drawPane.getTopBorderSize());var _6=this.drawPane.screen2drawing([_4,_5,0,0]);var _7=_6[0],_8=_6[1],_9=_7-(this.$44e+this.$44g/2),_10=_8-(this.$44f+this.$44h/2);this.updatePoints(_7,_8,_9,_10,_1)},isc.A.updateKnobShape=function isc_DrawKnob_updateKnobShape(){var _1=this.drawPane.screen2drawing([this.getLeft()+this.getWidth()/2,this.getTop()+this.getHeight()/2,0,0]);var x=_1[0],y=_1[1],_4=x-this.$44g/2,_5=y-this.$44h/2;this.$44e=_4,this.$44f=_5;this.knobShape.setCenterPoint(x,y)},isc.A.updatePoints=function(x,y,dX,dY,state){},isc.A.clear=function isc_DrawKnob_clear(){this.Super("clear",arguments);this.knobShape.erase()},isc.A.dragStart=function isc_DrawKnob_dragStart(){return this.$64f("start")},isc.A.dragMove=function isc_DrawKnob_dragMove(){return this.$64f("move")},isc.A.dragStop=function isc_DrawKnob_dragStop(){return this.$64f("stop")});isc.B._maxIndex=isc.C+12;isc.DrawKnob.registerStringMethods({updatePoints:"x,y,dX,dY"});isc.ClassFactory.defineClass("Gauge","DrawPane");isc.A=isc.Gauge.getPrototype();isc.A.width=400;isc.A.height=400;isc.A.redrawOnResize=true;isc.A.dialRadius=150;isc.A.knobRadius=6;isc.A.fontSize=11;isc.A.borderWidth=1;isc.A.borderColor="#333333";isc.A.scaleColor=null;isc.A.needleColor="#000000";isc.A.sectorColors=["#AFFFFF","#008080","#AAAFFF","#FF0000","#FFCC99","#800080"];isc.A.minValue=0;isc.A.maxValue=100;isc.A.value=0;isc.A.numMajorTicks=0;isc.A.numMinorTicks=0;isc.A.labelPrefix="";isc.A.labelSuffix="%";isc.A.drawnClockwise=true;isc.A.sectors=null;isc.A.pivotPoint=null;isc.A.sectorDefaults={fillColor:null,startAngle:0,endAngle:0,value:0};isc.A=isc.Gauge.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_Gauge_initWidget(){this.Super("initWidget",arguments);if(this.fontSize<3){this.logWarn("Gauge specified with fontSize:"+this.fontSize+". Setting to 3.");this.fontSize=3}
if(!(this.sectorColors instanceof Array)){this.logWarn("Gauge specified with non-array sectorColors. Setting to [ \"#AFFFFF\" ].");this.sectorColors=["#AFFFFF"]}
if(this.sectorColors.length==0){this.logWarn("Gauge specified with empty sectorColors array. Setting to [ \"#AFFFFF\" ].");this.sectorColors=["#AFFFFF"]}
if(this.minValue>this.maxValue){this.logWarn("Gauge specified with minValue:"+this.minValue+", greater than maxValue:"+this.maxValue+". Swapping.");var _1=this.minValue;this.minValue=this.maxValue;this.maxValue=_1}
if(!(this.maxValue>=0.99999+this.minValue)){this.logWarn("Gauge specified with maxValue:"+this.maxValue+", not at least 1 greater than minValue:"+this.minValue);this.maxValue=1+this.minValue}
this.value=Math.min(Math.max(this.value,this.minValue),this.maxValue);this.numMajorTicks=Math.floor(this.numMajorTicks);this.numMajorTicks=Math.max(0,this.numMajorTicks);if(this.numMajorTicks!=0){this.numMajorTicks=Math.max(2,this.numMajorTicks)}
this.numMinorTicks=Math.floor(this.numMinorTicks);this.numMinorTicks=Math.max(0,this.numMinorTicks);if(this.numMinorTicks!=0){this.numMinorTicks=Math.max(2,this.numMinorTicks)}
this.$93w(this.getInnerContentWidth(),this.getInnerContentHeight());this.setSectors(this.sectors?this.sectors:[{fillColor:this.getDefaultFillColor(0),startAngle:0,endAngle:180,value:this.maxValue}])},isc.A.resized=function isc_Gauge_resized(_1,_2){this.$93w(this.getInnerContentWidth(),this.getInnerContentHeight());this.$134w()},isc.A.$134w=function isc_Gauge__makeItems(){this.erase();if(this.$930!=null){var _1=this.$930;for(var i=0;i<_1.length;++i){_1[i].destroy()}
delete this.$930}
if(this.$934!=null){var _3=this.$934;for(var i=0;i<_3.length;++i){_3[i].destroy()}
delete this.$934}
this.$93x();this.$931();this.$93e(this.value);this.$93y()},isc.A.$93w=function isc_Gauge__makePivotPoint(_1,_2){this.pivotPoint=[_1/2,_2*0.70]},isc.A.$93x=function isc_Gauge__makeDrawSectors(){var _1=new Array(this.sectors.length);if(this.$93z){for(var i=0;i<this.$93z.length;++i){this.$93z[i].destroy()}}
var _3=this.sectors;for(var _4=0;_4<_3.length;++_4){var _5=_3[_4];var _6,_7;if(this.drawnClockwise){_6=_5.startAngle-180;_7=_5.endAngle-180}else{_6=-_5.endAngle;_7=-_5.startAngle}
var _8;_1[_4]=_8=isc.DrawSector.create({radius:this.dialRadius,centerPoint:this.pivotPoint,startAngle:_6,endAngle:_7,lineWidth:this.borderWidth,lineColor:this.borderColor,fillColor:_5.fillColor});this.addDrawItem(_8,true)}
this.$93z=_1;this.$93d()},isc.A.$93d=function isc_Gauge__makeTickLines(){var _1=this.numMajorTicks;var _2=this.numMinorTicks;var _3=this.drawnClockwise;var _4=this.pivotPoint;var _5;var i;if(!this.$930){_5=new Array(_1+_2)}else if(this.$930.length!=_1+_2){for(i=_1+_2;i<this.$930.length;++i){this.$930[i].destroy()}
_5=new Array(_1+_2);for(i=0;i<_5.length;++i){_5[i]=this.$930[i]}}else{_5=this.$930}
var _7=this.scaleColor?this.scaleColor:this.borderColor;for(i=0;i<_1;++i){var _8=Math.PI-Math.PI*i/(_1-1);if(!_3){_8=Math.PI-_8}
var x=(this.dialRadius+3)*Math.cos(_8);var y=(this.dialRadius+3)*Math.sin(_8);var p=[_4[0]+x,_4[1]-y];var _12=(this.dialRadius-10)*Math.cos(_8);var _13=(this.dialRadius-10)*Math.sin(_8);var _14=[_4[0]+_12,_4[1]-_13];if(!_5[i]){_5[i]=isc.DrawLine.create({lineColor:_7,startPoint:_14,endPoint:p,lineWidth:2})}else{_5[i].setLineColor(_7);_5[i].setStartPoint(p[0],p[1]);_5[i].setEndPoint(_14[0],_14[1])}}
for(var j=0;j<_2;++j,++i){var _8=Math.PI-Math.PI*j/(_2-1);if(!_3){_8=Math.PI-_8}
var x=this.dialRadius*Math.cos(_8);var y=this.dialRadius*Math.sin(_8);var p=[_4[0]+x,_4[1]-y];var _12=(this.dialRadius-5)*Math.cos(_8);var _13=(this.dialRadius-5)*Math.sin(_8);var _14=[_4[0]+_12,_4[1]-_13];if(!_5[i]){_5[i]=isc.DrawLine.create({lineColor:_7,startPoint:_14,endPoint:p,lineWidth:1})}else{_5[i].setLineColor(_7);_5[i].setStartPoint(p[0],p[1]);_5[i].setEndPoint(_14[0],_14[1])}}
for(i=0;i<_5.length;++i){this.addDrawItem(_5[i],true)}
this.$930=_5},isc.A.$931=function isc_Gauge__makeNeedle(){var _1=this.needleColor?this.needleColor:this.borderColor;if(!this.$93v){this.$93v=isc.DrawTriangle.create({drawPane:this,autoDraw:true,lineColor:this.borderColor,lineWidth:this.borderWidth,fillColor:_1})}else{var _2=this.$93v;_2.setLineColor(this.borderColor);_2.setLineWidth(this.borderWidth);_2.setFillColor(_1);this.addDrawItem(_2,true)}
this.$932()},isc.A.$932=function isc_Gauge__makeKnob(){var _1=this.needleColor?this.needleColor:this.borderColor;if(!this.$933){this.$933=isc.DrawOval.create({drawPane:this,autoDraw:true,centerPoint:this.pivotPoint,radius:this.knobRadius,lineColor:this.borderColor,lineWidth:this.borderWidth,fillColor:_1})}else{var _2=this.$933;_2.setCenterPoint(this.pivotPoint[0],this.pivotPoint[1]);_2.setRadius(this.knobRadius);_2.setLineColor(this.borderColor);_2.setLineWidth(this.borderWidth);_2.setFillColor(_1);this.addDrawItem(_2,true)}},isc.A.$93y=function isc_Gauge__makeLabels(){var _1=this.sectors;var _2=new Array(1+_1.length);if(this.$934){for(var i=0;i<this.$934.length;++i){this.$934[i].destroy()}}
var _4;_2[0]=_4=this.$93g(this.formatLabelContents(this.minValue),this.minValue);this.addDrawItem(_4,true);for(var _5=0;_5<_1.length;++_5){var _6=_1[_5];var _7=this.$93g(this.formatLabelContents(_6.value),_6.value);_2[1+_5]=_7;this.addDrawItem(_7,true)}
this.$934=_2},isc.A.setMinValue=function isc_Gauge_setMinValue(_1){_1=Math.min(0+_1,this.maxValue-1);this.$93h(_1,this.maxValue)},isc.A.setMaxValue=function isc_Gauge_setMaxValue(_1){_1=Math.max(0+_1,1+this.minValue);this.$93h(this.minValue,_1)},isc.A.$93h=function isc_Gauge__rescaleSectors(_1,_2){var _3=this.maxValue;var _4=this.minValue;var _5=this.sectors;var _6=_3-_4;var _7=_2-_1;var _8=0;for(var _9=0;_9<_5.length;++_9){var _10=_5[_9];var _11=_7*(_10.value-_4)/_6+_1;_10.value=_11;_10.startAngle=_8;_10.endAngle=_8=this.$93i(_11,_1,_7)}
this.value=_7*(this.value-_4)/_6+_1;this.minValue=_4=_1;this.maxValue=_3=_2;this.$134w()},isc.A.setValue=function isc_Gauge_setValue(_1){_1=Math.min(Math.max(0+_1,this.minValue),this.maxValue);this.$93e(_1);this.value=_1},isc.A.setNumMajorTicks=function isc_Gauge_setNumMajorTicks(_1){_1=Math.floor(_1);if(this.numMajorTicks!=_1){_1=Math.max(0,_1);if(_1!=0){_1=Math.max(2,_1)}
this.numMajorTicks=_1;this.$134w()}},isc.A.setNumMinorTicks=function isc_Gauge_setNumMinorTicks(_1){_1=Math.floor(_1);if(this.numMinorTicks!=_1){_1=Math.max(0,_1);if(_1!=0){_1=Math.max(2,_1)}
this.numMinorTicks=_1;this.$134w()}},isc.A.setLabelPrefix=function isc_Gauge_setLabelPrefix(_1){if(_1==null)_1="";if(this.labelPrefix!=_1){this.labelPrefix=_1;this.reformatLabelContents()}},isc.A.setLabelSuffix=function isc_Gauge_setLabelSuffix(_1){if(_1==null)_1="";if(this.labelSuffix!=_1){this.labelSuffix=_1;this.reformatLabelContents()}},isc.A.setDrawnClockwise=function isc_Gauge_setDrawnClockwise(_1){_1=!!_1;if(this.drawnClockwise!=_1){this.drawnClockwise=_1;this.$134w()}},isc.A.formatLabelContents=function isc_Gauge_formatLabelContents(_1){return this.labelPrefix+(0+_1)+this.labelSuffix},isc.A.reformatLabelContents=function isc_Gauge_reformatLabelContents(){this.$134w()},isc.A.getNumSectors=function isc_Gauge_getNumSectors(){return this.sectors.length},isc.A.getSectorValue=function isc_Gauge_getSectorValue(_1){return this.sectors[_1].value},isc.A.getDefaultFillColor=function isc_Gauge_getDefaultFillColor(_1){var _2=this.sectorColors.length;return this.sectorColors[_1%_2]},isc.A.getSectorFillColor=function isc_Gauge_getSectorFillColor(_1){return this.sectors[_1].fillColor},isc.A.setSectorFillColor=function isc_Gauge_setSectorFillColor(_1,_2){var _3=this.sectors;var _4=this.$93z;_3[_1].fillColor=_2;if(_4&&_4.length==_3.length){_4[_1].setFillColor(_2)}else{this.$134w()}},isc.A.$1113=function isc_Gauge__shiftSectorFillColor(_1,_2){if(_2<this.sectors.length){_1.fillColor=this.sectors[_2].fillColor}else{_1.fillColor=this.getDefaultFillColor(_2)}},isc.A.getSectorLabelContents=function isc_Gauge_getSectorLabelContents(_1){return this.formatLabelContents(this.sectors[_1].value)},isc.A.setBorderColor=function isc_Gauge_setBorderColor(_1){this.borderColor=_1;this.redraw()},isc.A.setBorderWidth=function isc_Gauge_setBorderWidth(_1){this.borderWidth=_1;this.redraw()},isc.A.setSectors=function isc_Gauge_setSectors(_1){this.sectors=[];for(var i=0;i<_1.length;i++){this.addSector(_1[i],true)}
this.$134w()},isc.A.addSector=function isc_Gauge_addSector(_1,_2){if(!isc.isAn.Object(_1)){_1={value:_1}}
var _3=_1.value;_1=isc.addProperties({},this.sectorDefaults,_1);_3=Math.min(Math.max(0+_3,this.minValue),this.maxValue);var _4=this.sectors;var _5=this.maxValue;var _6=this.minValue;var _7=0;for(;_7<_4.length&&_4[_7].value<_3;++_7)
{}
var _8=new Array(_4.length+1);for(var _9=0;_9<_7;++_9){_8[_9]=_4[_9]}
var _10,_11=_5-_6,_12=!_1.fillColor;_1.startAngle=this.$93j(_7,_6,_11);_1.endAngle=_10=this.$93i(_3,_6,_11);_8[_7]=_1;if(_12)this.$1113(_1,_7);if(_7<_4.length){_4[_7].startAngle=_10}
for(var _9=_7;_9<_4.length;++_9){var _13=_4[_9];if(_12)this.$1113(_13,_9+1);_8[_9+1]=_13}
this.sectors=_4=_8;if(!_2){this.$134w()}
return _7},isc.A.removeSector=function isc_Gauge_removeSector(_1){var _2=this.sectors;if(_1==0&&_2.length==1){return}
var _3=new Array(_2.length-1);for(var i=0;i<_1;++i){_3[i]=_2[i]}
var _5=0;if(_1>0){_5=_2[_1-1].endAngle}
if(_1<_2.length-1){_2[_1+1].startAngle=_5}
for(var i=_1+1;i<_2.length;++i){_3[i-1]=_2[i]}
if(_1==_2.length-1){_3[_1-1].endAngle=180;_3[_1-1].value=this.maxValue}
this.sectors=_2=_3;this.$134w()},isc.A.$93j=function isc_Gauge__getSectorStartAngle(_1,_2,_3){if(_1==0){return 0}else{var _4=this.sectors[_1-1].value;return 180*(_4-_2)/_3}},isc.A.$93i=function isc_Gauge__getSectorEndAngle(_1,_2,_3){return 180*(_1-_2)/_3},isc.A.$93e=function isc_Gauge__positionNeedleTriangle(_1){var _2=this.pivotPoint;var _3=this.maxValue-this.minValue;var _4=Math.PI-Math.PI*(_1-this.minValue)/_3;if(!this.drawnClockwise){_4=Math.PI-_4}
var x=(this.dialRadius-15)*Math.cos(_4);var y=(this.dialRadius-15)*Math.sin(_4);var p=[_2[0]+x,_2[1]-y];var _8=_4-Math.PI/2.0;var _9=this.knobRadius*Math.cos(_8);var _10=this.knobRadius*Math.sin(_8);var _11=[_2[0]+_9,_2[1]-_10];var _12=_4+Math.PI/2.0;var _13=this.knobRadius*Math.cos(_12);var _14=this.knobRadius*Math.sin(_12);var _15=[_2[0]+_13,_2[1]-_14];this.$93v.setPoints([p,_11,_15])},isc.A.$93g=function isc_Gauge__makePositionedLabel(_1,_2){var _3=this.pivotPoint;var _4=this.maxValue-this.minValue;var _5=Math.PI-Math.PI*(_2-this.minValue)/_4;if(!this.drawnClockwise){_5=Math.PI-_5}
var _6={fontSize:this.fontSize,contents:_1,left:0,top:0};var _7=this.measureLabel(_1,_6),_8=_7.width,_9=_7.height;var x=(this.dialRadius+5)*Math.cos(_5);var y=(this.dialRadius+5)*Math.sin(_5);var _12;if(_5<9.0*Math.PI/20.0-0.001){_12=Math.round(_3[0]+x+2)}else if(_5<=11.0*Math.PI/20.0+0.001){_12=Math.round(_3[0]+x-_8/2)}else{_12=Math.round(_3[0]+x-_8-2)}
var _13;if(Math.PI/4.0<=_5&&_5<=3.0*Math.PI/4.0){_13=Math.round(_3[1]-y-_9*(1.0-Math.abs(Math.PI/2.0-_5)*0.5))}else{_13=Math.round(_3[1]-y-_9/2)}
_6.left=_12;_6.top=_13;return isc.DrawLabel.create(_6)});isc.B._maxIndex=isc.C+36;isc._nonDebugModules=(isc._nonDebugModules!=null?isc._nonDebugModules:[]);isc._nonDebugModules.push('Drawing');isc.checkForDebugAndNonDebugModules();isc._moduleEnd=isc._Drawing_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('Drawing module init time: '+(isc._moduleEnd-isc._moduleStart)+'ms','loadTime');delete isc.definingFramework;}else{if(window.isc&&isc.Log&&isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'Drawing'.");}
/*
 * Isomorphic SmartClient
 * Version v9.1p_2021-05-18 (2021-05-18)
 * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
 * "SmartClient" is a trademark of Isomorphic Software, Inc.
 *
 * licensing@smartclient.com
 *
 * http://smartclient.com/license
 */

