(self.webpackChunk=self.webpackChunk||[]).push([[5247],{71749:function(){"use strict"},30483:function(){"use strict"},71736:function(En,jn){"use strict";jn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},39886:function(En,jn){"use strict";jn.Z={flex_box_center:"flex_box_center___IBr6x",flex_space_between:"flex_space_between___n2Iz0",flex_box_vertical_center:"flex_box_vertical_center___1umwO",flex_box_center_end:"flex_box_center_end___SRZYb",flex_box_column:"flex_box_column___b90Da",form:"form___V3fAH",title_icon:"title_icon____uDZy",title:"title___RxKwK",content:"content___vFT5m",pubColSty:"pubColSty___dfLkL",selectSty:"selectSty____Wuek",borderSty:"borderSty___EuFYV",delSty:"delSty___AdEeI",delBorder:"delBorder___vcTJc",copHover:"copHover___JVVXI",multiple_select:"multiple_select___ZMPhl",work_checkbox_group:"work_checkbox_group___sGLxY"}},67795:function(En,jn){"use strict";jn.Z={flex_box_center:"flex_box_center___SF0m3",flex_space_between:"flex_space_between___ChLjp",flex_box_vertical_center:"flex_box_vertical_center____l_EF",flex_box_center_end:"flex_box_center_end___YcZNu",flex_box_column:"flex_box_column___R9dNq",downloadbutton:"downloadbutton___oEXJW",configWorkContainer:"configWorkContainer___CHUrh"}},18023:function(){"use strict";function En(Ft,nt,et,ht){et===void 0&&(et=0),ht===void 0&&(ht=1/0),this._name=Ft,this._defaultValue=nt,this._minimum=et,this._maximum=ht}Object.defineProperty(En.prototype,"name",{get:function(){return this._name},set:function(Ft){if(typeof Ft!="string"||Ft==="")throw new Error("Shape name must be a valid string.");this._name=Ft}}),Object.defineProperty(En.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ft){if(typeof Ft!="number"||isNaN(Ft))throw new Error("The default value must be a real number, not: "+Ft);this._defaultValue=Ft}}),Object.defineProperty(En.prototype,"minimum",{get:function(){return this._minimum},set:function(Ft){if(typeof Ft!="number"||isNaN(Ft))throw new Error("Minimum must be a real number, not: "+Ft);this._minimum=Ft}}),Object.defineProperty(En.prototype,"maximum",{get:function(){return this._maximum},set:function(Ft){if(typeof Ft!="number"||isNaN(Ft))throw new Error("Maximum must be a real number, not: "+Ft);this._maximum=Ft}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ft,nt){var et=go.Shape._FigureParameters[Ft];return et?et[nt]:null},go.Shape.setFigureParameter=function(Ft,nt,et){if(!(et instanceof En))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValueet.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var ht=go.Shape._FigureParameters[Ft];ht||(ht=[],go.Shape._FigureParameters[Ft]=ht),ht[nt]=et};var jn=[];function Nt(Ft,nt){var et=jn.pop();return et===void 0?new go.Point(Ft,nt):(et.x=Ft,et.y=nt,et)}function bt(){var Ft=jn.pop();return Ft===void 0?new go.Point:Ft}function ie(Ft){jn.push(Ft)}function De(Ft,nt,et,ht,lt,gt,mt,xt,Mt){Mt||(Mt=new go.Point);var jt=Ft-et,Qt=lt-mt,ne=NaN,qt=NaN;if(jt===0)if(Qt===0)Ft===et&&(ne=Ft,qt=nt);else{var $t=(gt-xt)/Qt,we=gt-$t*lt;ne=Ft,qt=$t*ne+we}else if(Qt===0){var ce=(nt-ht)/jt,be=nt-ce*Ft;ne=lt,qt=ce*ne+be}else{var ce=(nt-ht)/jt,$t=(gt-xt)/Qt,be=nt-ce*Ft,we=gt-$t*lt;ne=(we-be)/(ce-$t),qt=ce*ne+be}return Mt.x=ne,Mt.y=qt,Mt}function Ne(Ft,nt,et,ht,lt,gt,mt,xt,Mt,jt,Qt,ne,qt,$t){var we=1-Mt,ce=Mt,be=Ft*we+et*ce,Ge=nt*we+ht*ce,Oe=et*we+lt*ce,On=ht*we+gt*ce,Nn=lt*we+mt*ce,Sn=gt*we+xt*ce,Zn=be*we+Oe*ce,re=Ge*we+On*ce,Wt=Oe*we+Nn*ce,Me=On*we+Sn*ce,ln=Zn*we+Wt*ce,Dn=re*we+Me*ce;jt.x=be,jt.y=Ge,Qt.x=Zn,Qt.y=re,ne.x=ln,ne.y=Dn,qt.x=Wt,qt.y=Me,$t.x=Nn,$t.y=Sn}var Le=new go.Spot(.156,.156),It=new go.Spot(.844,.844),Jt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new En("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,nt/3),ht=Math.min(ht,et/3);var lt=ht*Jt,gt=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,nt-lt,0,nt,lt)).add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)).add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,et-lt,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,ht,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,lt,et,0,et-lt)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,lt,lt,0).close()));return lt>1&&(gt.spot1=new go.Spot(0,0,lt,lt),gt.spot2=new go.Spot(1,1,-lt,-lt)),gt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ft,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=et/2,ht.endX=nt,ht.endY=et/2,ht}),go.Shape.defineFigureGenerator("LineV",function(Ft,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=nt/2,ht.startY=0,ht.endX=nt/2,ht.endY=et,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ft,nt,et){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*nt,(1-ht)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Move,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ft,nt,et){var ht=nt/2,lt=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return lt.spot1=Le,lt.spot2=It,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Ft,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=nt,ht.endY=et,ht}),go.Shape.defineFigureGenerator("Line2",function(Ft,nt,et){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=nt,ht.startY=0,ht.endX=0,ht.endY=et,ht}),go.Shape.defineFigureGenerator("Curve1",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Jt*nt,0,nt,(1-Jt)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,Jt*et,(1-Jt)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,Jt*et,Jt*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-Jt)*nt,0,0,(1-Jt)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new En("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var lt=Math.abs(ht)*nt;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),ltnt&&(ht=nt);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),lt.5&&(ht=.5);var lt=Math.abs(ht)*nt;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),ltnt&&(ht=nt/2);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())),ltnt&&(ht=nt/2);var lt=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=nt,gt.endY=et,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,lt,et).close())):gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,nt-lt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())),lt0&&(mt.add(new go.PathSegment(go.PathSegment.Move,nt/2+xt,nt/2)),mt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,xt,xt).close())),gt.spot1=Le,gt.spot2=It,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ft,nt,et){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*et)).add(new go.PathSegment(go.PathSegment.Line,0,ht*et).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new En("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new En("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN,lt=Ft?Ft.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(lt)&&(lt=315);var gt=ht%360;gt<0&&(gt+=360);var mt=lt%360,xt=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(xt,xt).add(new go.PathSegment(go.PathSegment.Arc,gt,mt,xt,xt,xt,xt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ft,nt,et){var ht=Jt/Math.SQRT2*.5,lt=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,gt*et,nt,(1-ht)*et,(lt+ht)*nt,(gt+ht)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var lt=Math.min(ht,nt)/2,gt=nt/2,mt=et/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,mt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new En("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=Math.min(ht,nt)/2,gt=nt/2,mt=et/2;return new go.Geometry().add(new go.PathFigure(gt-lt,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+lt,0)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,nt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,et)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,mt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,mt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,mt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=30),nt===0||et===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=nt,lt.endY=et,lt}else{var gt=nt/2,mt=et/2,xt=Math.atan2(et,nt),Mt=ht-Math.min(Math.cos(xt)*ht/2,gt),jt=ht-Math.min(Math.sin(xt)*ht/2,mt),lt=new go.Geometry,Qt=new go.PathFigure(Mt,0,!0);return lt.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*et)),Qt.add(new go.PathSegment(go.PathSegment.Line,nt-Mt,0)),Qt.add(new go.PathSegment(go.PathSegment.Line,nt,jt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,nt,et-jt)),Qt.add(new go.PathSegment(go.PathSegment.Line,nt-Mt,et)),Qt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*et)),Qt.add(new go.PathSegment(go.PathSegment.Line,Mt,et)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,et-jt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,jt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new En("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var lt=new go.Geometry,gt=new go.PathFigure(.1*nt,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new En("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.2);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*nt,(1-ht)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*nt,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*et).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new En("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.5);var lt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-ht)*nt,.25*et,Math.abs(1-ht)*nt,.75*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*nt,.75*et,ht*nt,.25*et).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,Jt*nt,0,nt,(.5-Jt/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+Jt/2)*et,Jt*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.4*nt,.6*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var gt=.2,mt=.3,xt=0,Mt=gt*Jt;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5+gt+xt)*et,(.5-gt+mt)*nt,(.5+Mt+xt)*et,(.5-Mt+mt)*nt,(.5+gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+mt)*nt,(.5+xt)*et,(.5+Mt+mt)*nt,(.5+gt+xt)*et,(.5+gt+mt)*nt,(.5+Mt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+xt)*et,(1-.5+gt+mt)*nt,(.5-Mt+xt)*et,(.5+Mt+mt)*nt,(.5-gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-Mt+mt)*nt,(.5-gt+xt)*et,(.5-gt+mt+.05)*nt,(.5-Mt+xt-.02)*et)),gt=.2,mt=0,xt=-.3,Mt=gt*Jt,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+mt)*nt,(.5+xt)*et,(.5+Mt+mt)*nt,(.5+gt+xt)*et,(.5+gt+mt)*nt,(.5+Mt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+xt)*et,(1-.5+gt+mt)*nt,(.5-Mt+xt)*et,(.5+Mt+mt)*nt,(.5-gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+mt)*nt,(.5+xt)*et,(.5-Mt+mt)*nt,(.5-gt+xt)*et,(.5-gt+mt)*nt,(.5-Mt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Mt+mt)*nt,(.5+gt+xt)*et,(.5-gt+mt)*nt,(.5+Mt+xt)*et,(.5-Mt+mt)*nt,(.5+gt+xt)*et)),gt=.2,mt=-.3,xt=0,Mt=gt*Jt,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5-gt+xt)*et,(1-.5+gt+mt-.05)*nt,(.5-Mt+xt-.02)*et,(.5+Mt+mt)*nt,(.5-gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+mt)*nt,(.5+xt)*et,(.5-Mt+mt)*nt,(.5-gt+xt)*et,(.5-gt+mt)*nt,(.5-Mt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+mt)*nt,(.5+gt+xt)*et,(.5-gt+mt)*nt,(.5+Mt+xt)*et,(.5-Mt+mt)*nt,(.5+gt+xt)*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+Mt+mt)*nt,(.5+gt+xt)*et,(.5+gt+mt)*nt,(.5+Mt+xt)*et).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.5,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var gt=.1,mt=.5,xt=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(mt+gt)*nt,xt*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*mt,et*xt,gt*nt,gt*nt).close()),lt=new go.PathFigure(nt*.5,0,!1),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),xt=.75,lt=new go.PathFigure((mt+gt)*nt,xt*et,!0),ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*mt,et*xt,gt*nt,gt*nt).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(Ft,nt,et){var ht=.8535533905932737,lt=.5*nt,gt=.5*et;return new go.Geometry().add(new go.PathFigure(lt,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,lt,gt,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,lt,et)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,ht*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=.5,mt=.5,xt=.5,Mt=new go.PathFigure(mt*nt,(xt-gt)*et);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),gt=.4,lt=Jt*.4;var jt=bt(),Qt=bt(),ne=bt(),qt=bt();Ne(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.42,jt,Qt,ne,qt,qt);var $t=bt(),we=bt(),ce=bt();Ne(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.58,qt,qt,ce,$t,we);var be=bt(),Ge=bt(),Oe=bt();Ne(mt,xt+gt,mt-lt,xt+gt,mt-gt,xt+lt,mt-gt,xt,.42,be,Ge,Oe,qt,qt);var On=bt(),Nn=bt(),Sn=bt();return Ne(mt,xt+gt,mt-lt,xt+gt,mt-gt,xt+lt,mt-gt,xt,.58,qt,qt,Sn,On,Nn),Mt.add(new go.PathSegment(go.PathSegment.Move,Sn.x*nt,Sn.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,On.x*nt,On.y*et,Nn.x*nt,Nn.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,ne.x*nt,ne.y*et,jt.x*nt,jt.y*et,Qt.x*nt,Qt.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,Sn.x*nt,Sn.y*et).close()),Mt.add(new go.PathSegment(go.PathSegment.Move,Oe.x*nt,Oe.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,ce.x*nt,ce.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,$t.x*nt,$t.y*et,we.x*nt,we.y*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Oe.x*nt,Oe.y*et,be.x*nt,be.y*et,Ge.x*nt,Ge.y*et).close()),ie(jt),ie(Qt),ie(ne),ie(qt),ie($t),ie(we),ie(ce),ie(be),ie(Ge),ie(Oe),ie(On),ie(Nn),ie(Sn),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>nt&&(ht=nt);var lt=(nt-ht)/2,gt=lt+ht;return new go.Geometry().add(new go.PathFigure(gt,.5*et).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,lt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.4,gt=.4,mt=.5,xt=.5,Mt=bt(),jt=bt(),Qt=bt(),ne=bt(),qt=new go.PathFigure((mt-gt)*nt,xt*et,!1);ht.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et)),Ne(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.44,Qt,ne,jt,Mt,Mt),qt.add(new go.PathSegment(go.PathSegment.Bezier,jt.x*nt,jt.y*et,Qt.x*nt,Qt.y*et,ne.x*nt,ne.y*et));var $t=Nt(jt.x,jt.y);Ne(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.56,Mt,Mt,jt,Qt,ne);var we=Nt(jt.x,jt.y);qt.add(new go.PathSegment(go.PathSegment.Line,($t.x*.1+.95*.9)*nt,$t.y*.1*et)),qt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,$t.y*.1*et)),qt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),qt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),qt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),qt.add(new go.PathSegment(go.PathSegment.Line,(we.x*.1+.9)*nt,.15*et)),qt.add(new go.PathSegment(go.PathSegment.Line,(we.x*.1+.9)*nt,(we.y*.1+.05*.9)*et)),qt.add(new go.PathSegment(go.PathSegment.Line,we.x*nt,we.y*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,Qt.x*nt,Qt.y*et,ne.x*nt,ne.y*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et)),gt=.35,lt=Jt*.35;var ce=new go.PathFigure(mt*nt,(xt-gt)*et,!1);ht.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),ce.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),ce.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et));var be=new go.PathFigure((mt-gt)*nt,xt*et,!1);return ht.add(be),ie(Mt),ie(jt),ie(Qt),ie(ne),ie($t),ie(we),ht.spot1=new go.Spot(.202,.257),ht.spot2=new go.Spot(.792,.739),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("GenderFemale",function(Ft,nt,et){var ht=new go.Geometry,lt=.375,gt=0,mt=-.125,xt=lt*Jt,Mt=new go.PathFigure((.525+gt)*nt,(.5+lt+mt)*et,!1);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*nt,(.5+mt)*et,(.5+xt+gt)*nt,(.5+lt+mt)*et,(.5+lt+gt)*nt,(.5+xt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-lt+mt)*et,(1-.5+lt+gt)*nt,(.5-xt+mt)*et,(.5+xt+gt)*nt,(.5-lt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-xt+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-xt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*nt,(.5+lt+mt)*et,(.5-lt+gt)*nt,(.5+xt+mt)*et,(.5-xt+gt)*nt,(.5+lt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),lt=.325,gt=0,mt=-.125,xt=lt*Jt;var Mt=new go.PathFigure((1-.5+lt+gt)*nt,(.5+mt)*et,!1);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5+lt+mt)*et,(.5+lt+gt)*nt,(.5+xt+mt)*et,(.5+xt+gt)*nt,(.5+lt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-xt+gt)*nt,(.5+lt+mt)*et,(.5-lt+gt)*nt,(.5+xt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-xt+mt)*et,(.5-xt+gt)*nt,(.5-lt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*nt,(.5+mt)*et,(.5+xt+gt)*nt,(.5-lt+mt)*et,(1-.5+lt+gt)*nt,(.5-xt+mt)*et));var Mt=new go.PathFigure((.525+gt)*nt,(.5+lt+mt)*et,!1);return ht.add(Mt),ht.spot1=new go.Spot(.232,.136),ht.spot2=new go.Spot(.682,.611),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicImplies",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,ht*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,ht*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ft,nt,et){var ht=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ft,nt,et){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*nt,ht*et,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ft,nt,et){var ht=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,ht*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*nt,ht*et,ht*nt,ht*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new En("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new En("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=Ft?Ft.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ht)*nt,mt=(.5-lt/2)*et,xt=(.5+lt/2)*et,Mt=new go.Geometry,jt=new go.PathFigure(0,mt,!0);Mt.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,gt,mt)),jt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),jt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),jt.add(new go.PathSegment(go.PathSegment.Line,gt,et)),jt.add(new go.PathSegment(go.PathSegment.Line,gt,xt)),jt.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),Mt.spot1=new go.Spot(0,mt/et);var Qt=De(0,xt/et,1,xt/et,gt/nt,1,1,.5,bt());return Mt.spot2=new go.Spot(Qt.x,Qt.y),ie(Qt),Mt}),go.Shape.setFigureParameter("Arrow2",0,new En("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new En("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=30),ht>nt&&(ht=nt);var lt=Ft?Ft.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,et/2);var gt=nt-ht,mt=(et-lt)/2,xt=mt+lt,Mt=new go.Geometry,jt=new go.PathFigure(0,mt,!0);Mt.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,gt,mt)),jt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),jt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),jt.add(new go.PathSegment(go.PathSegment.Line,gt,et)),jt.add(new go.PathSegment(go.PathSegment.Line,gt,xt)),jt.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),Mt.spot1=new go.Spot(0,mt/et);var Qt=De(0,xt/et,1,xt/et,gt/nt,1,1,.5,bt());return Mt.spot2=new go.Spot(Qt.x,Qt.y),ie(Qt),Mt}),go.Shape.defineFigureGenerator("Chevron",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new En("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,mt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var Mt=De(0,.5,.3,0,0,lt/et,.1,lt/et,bt());return mt.spot1=new go.Spot(Mt.x,Mt.y),Mt=De(.7,1,1,.5,0,gt/et,1,gt/et,Mt),mt.spot2=new go.Spot(Mt.x,Mt.y),ie(Mt),mt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new En("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new En("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=Ft?Ft.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(et-ht)/2,mt=gt+ht,xt=(et-lt)/2,Mt=xt+lt;(ht>et||lt>et)&&(lt>ht?(ht=ht*et/lt,gt=(et-ht)/2,mt=gt+ht,xt=0,Mt=et):(gt=0,mt=et,xt=0,Mt=et));var jt=new go.Geometry,Qt=new go.PathFigure(nt,.5*et,!0);jt.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Qt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,xt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close());var ne=De(0,.5,.3,xt/et,0,gt/et,1,gt/et,bt());return jt.spot1=new go.Spot(ne.x,ne.y),ne=De(.7,Mt/et,1,.5,0,mt/et,1,mt/et,ne),jt.spot2=new go.Spot(ne.x,ne.y),ie(ne),jt}),go.Shape.setFigureParameter("IBeamArrow",0,new En("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,mt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(0,lt/et);var Mt=De(.7,1,1,.5,0,gt/et,1,gt/et,bt());return mt.spot2=new go.Spot(Mt.x,Mt.y),ie(Mt),mt}),go.Shape.setFigureParameter("IBeamArrow2",0,new En("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new En("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=40);var lt=Ft?Ft.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(et-ht)/2,mt=gt+ht,xt=(et-lt)/2,Mt=xt+lt;(ht>et||lt>et)&&(lt>ht?(ht=ht*et/lt,gt=(et-ht)/2,mt=gt+ht,xt=0,Mt=et):(gt=0,mt=et,xt=0,Mt=et));var jt=new go.Geometry,Qt=new go.PathFigure(nt,.5*et,!0);jt.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,Mt)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,xt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,xt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Qt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close()),jt.spot1=new go.Spot(0,gt/et);var ne=De(.7,Mt/et,1,.5,0,mt/et,1,mt/et,bt());return jt.spot2=new go.Spot(ne.x,ne.y),ie(ne),jt}),go.Shape.setFigureParameter("Pointer",0,new En("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.1);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ht,.35);var mt=De(.2,.65,1,.65,0,1,1,.5,bt());return lt.spot2=new go.Spot(mt.x,mt.y),ie(mt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new En("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.3);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*nt,.75*et,ht*nt,.25*et).close()),lt.spot1=new go.Spot(ht,.35);var mt=De(0,.65,1,.65,0,1,1,.5,bt());return lt.spot2=new go.Spot(mt.x,mt.y),ie(mt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new En("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.4);var lt=(.5-ht/2)*et,gt=(.5+ht/2)*et,mt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(.2,.3);var Mt=De(.7,1,1,.5,0,gt/et,1,gt/et,bt());return mt.spot2=new go.Spot(Mt.x,Mt.y),ie(Mt),mt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new En("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=50);var lt=(et-ht)/2,gt=lt+ht;ht>et&&(lt=0,gt=et);var mt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),mt.spot1=new go.Spot(.2,lt/et);var Mt=De(.7,1,1,.5,0,gt/et,1,gt/et,bt());return mt.spot2=new go.Spot(Mt.x,Mt.y),ie(Mt),mt}),go.Shape.setFigureParameter("SquareArrow",0,new En("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.7);var lt=new go.Geometry,gt=new go.PathFigure(nt,.5*et,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ht,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=Jt*.1,mt=new go.PathFigure(0,.9*et,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.9*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var gt=new go.PathFigure(0,.9*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var gt=new go.PathFigure(.5*nt,et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.3*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var gt=new go.PathFigure(0,.3*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=Jt*.5,mt=new go.PathFigure(0,ht,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,Jt*ht,(.5-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,ht,(.5+gt)*nt,0,1*nt,Jt*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-Jt*ht,(.5+gt)*nt,1*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,(.5-gt)*nt,1*et,0,et-Jt*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var xt=new go.PathFigure(nt,ht,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*ht,1*nt,2*ht-Jt*ht,(.5+gt)*nt,2*ht)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-gt)*nt,2*ht,0,2*ht-Jt*ht)),lt.spot1=new go.Spot(0,0,0,2*ht),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var lt=new go.Geometry,gt=Jt*.5,mt=new go.PathFigure(0,et-ht,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,Jt*ht,(.5-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,(.5+gt)*nt,0,nt,Jt*ht)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-ht)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-Jt*ht,(.5+gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-ht,(.5-gt)*nt,et,0,et-Jt*ht));var xt=new go.PathFigure(0,et-ht,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*ht,0,et-ht-Jt*ht,(.5-gt)*nt,et-2*ht)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-ht,(.5+gt)*nt,et-2*ht,nt,et-ht-Jt*ht)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ht),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=Jt*.5,mt=new go.PathFigure(ht,0,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-Jt*ht,0,nt,(.5-gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,(.5+gt)*et,nt-Jt*ht,et)),mt.add(new go.PathSegment(go.PathSegment.Line,ht,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,Jt*ht,et,0,(.5+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*et,Jt*ht,0));var xt=new go.PathFigure(ht,0,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*et,ht+Jt*ht,0,2*ht,(.5-gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,ht,et,2*ht,(.5+gt)*et,ht+Jt*ht,et)),lt.spot1=new go.Spot(0,0,2*ht,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var lt=new go.Geometry,gt=Jt*.5,mt=new go.PathFigure(nt-ht,0,!0);lt.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-Jt*ht,0,nt,(.5-gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt,(.5+gt)*et,nt-Jt*ht,et)),mt.add(new go.PathSegment(go.PathSegment.Line,ht,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,Jt*ht,et,0,(.5+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*et,Jt*ht,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0));var xt=new go.PathFigure(nt-ht,0,!1);return lt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*ht,.5*et,nt-ht-Jt*ht,0,nt-2*ht,(.5-gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,et,nt-2*ht,(.5+gt)*et,nt-ht-Jt*ht,et)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ht,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,.25*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(.25*nt,.25*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.25*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var gt=new go.PathFigure(.5*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var gt=new go.PathFigure(.5*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(Ft,nt,et){var ht=new go.Geometry,lt=.2,gt=.1,mt=Jt*lt,xt=Jt*gt,Mt=.5,jt=.1,Qt=new go.PathFigure(Mt*nt,(jt+gt)*et,!0);ht.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-lt)*nt,jt*et,(Mt-mt)*nt,(jt+gt)*et,(Mt-lt)*nt,(jt+xt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt-gt)*et,(Mt-lt)*nt,(jt-xt)*et,(Mt-mt)*nt,(jt-gt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+lt)*nt,jt*et,(Mt+mt)*nt,(jt-gt)*et,(Mt+lt)*nt,(jt-xt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt+gt)*et,(Mt+lt)*nt,(jt+xt)*et,(Mt+mt)*nt,(jt+gt)*et));var ne=.05,qt=Jt*ne;Mt=.05,jt=.25;var $t=new go.PathFigure(.5*nt,.2*et,!0);return ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),Mt=.95,jt=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+ne)*nt,jt*et,(Mt+qt)*nt,(jt-ne)*et,(Mt+ne)*nt,(jt-qt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),ne=.025,qt=Jt*ne,Mt=.825,jt=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt-ne)*et,(Mt+ne)*nt,(jt-qt)*et,(Mt+qt)*nt,(jt-ne)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-ne)*nt,jt*et,(Mt-qt)*nt,(jt-ne)*et,(Mt-ne)*nt,(jt-qt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),ne=.05,qt=Jt*ne,Mt=.5,jt=.7,$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt-ne)*et,(Mt+ne)*nt,(jt-qt)*et,(Mt+qt)*nt,(jt-ne)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-ne)*nt,jt*et,(Mt-qt)*nt,(jt-ne)*et,(Mt-ne)*nt,(jt-qt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),$t.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),ne=.025,qt=Jt*ne,Mt=.175,jt=.35,$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt-ne)*et,(Mt+ne)*nt,(jt-qt)*et,(Mt+qt)*nt,(jt-ne)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-ne)*nt,jt*et,(Mt-qt)*nt,(jt-ne)*et,(Mt-ne)*nt,(jt-qt)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),$t.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),ne=.05,qt=Jt*ne,Mt=.05,jt=.25,$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt-ne)*et,(Mt-ne)*nt,(jt-qt)*et,(Mt-qt)*nt,(jt-ne)*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new En("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;isNaN(ht)&&(ht=.2);var lt=new go.Geometry,gt=new go.PathFigure(nt,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*et)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*nt,0).close()),lt.spot1=new go.Spot(0,ht),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var gt=new go.PathFigure(.5*nt,.5*et,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure(0,lt*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),mt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-lt)*et)),ht}),go.Shape.defineFigureGenerator("Database",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=Jt*.1,mt=new go.PathFigure(nt,.1*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-gt)*et,(.5-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+lt)*nt,0,nt,(.1-gt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+gt)*et,(.5+lt)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+gt)*et,(.5+lt)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+gt)*et,(.5+lt)*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-lt)*nt,.4*et,0,(.3+gt)*et)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=Jt*.1,mt=new go.PathFigure(nt,.1*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+gt)*et,(.5+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-lt)*nt,et,0,(.9+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-gt)*et,(.5-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+lt)*nt,0,nt,(.1-gt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+gt)*et,(.5+lt)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-lt)*nt,.2*et,0,(.1+gt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+gt)*et,(.5+lt)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-lt)*nt,.3*et,0,(.2+gt)*et)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=Jt*.2,mt=new go.PathFigure(0,.2*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-gt)*et,(.2-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+gt)*nt,0,nt,(.2-gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+gt)*et,(.8+gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-gt)*nt,et,0,(.8+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var xt=new go.PathFigure(0,lt*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure(0,lt*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,lt*et)),ht}),go.Shape.defineFigureGenerator("Document",function(Ft,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure(lt*nt,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,0,lt*et)),mt.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-lt)*et)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var gt=new go.PathFigure(.1*nt,.4*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(.75*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var gt=new go.PathFigure(nt,.5*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et));var mt=new go.PathFigure(nt,.5*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN,gt=Ft?Ft.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.1);var mt=new go.PathFigure(0,0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var xt=new go.PathFigure(lt*nt,0,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,gt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,gt*et)),ht}),go.Shape.defineFigureGenerator("Junction",function(Ft,nt,et){var ht=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,mt=Jt*.5,xt=.5,Mt=new go.PathFigure(nt,xt*et,!0);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,et,nt,(xt+mt)*et,(xt+mt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,xt*et,(xt-mt)*nt,et,0,(xt+mt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,0,0,(xt-mt)*et,(xt-mt)*nt,0)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,xt*et,(xt+mt)*nt,0,nt,(xt-mt)*et));var jt=new go.PathFigure((gt+lt)*nt,(gt+lt)*et,!1);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,gt*nt,gt*et)),jt.add(new go.PathSegment(go.PathSegment.Move,gt*nt,(gt+lt)*et)),jt.add(new go.PathSegment(go.PathSegment.Line,(gt+lt)*nt,gt*et)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(Ft,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var gt=new go.PathFigure(.1*nt,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=.5,mt=new go.PathFigure(.5*nt,et,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*nt,.9*et,nt,(gt+lt)*et,(gt+lt)*nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)&&(lt=.7);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,lt*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(Ft,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var gt=new go.PathFigure(.1*nt,.2*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,.1*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var gt=new go.PathFigure(.2*nt,.1*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=1-lt,mt=new go.PathFigure(0,0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close());var xt=new go.PathFigure(.5*lt*nt,lt*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*nt,lt*et)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=.5,mt=new go.PathFigure(nt,gt*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,nt,(gt+lt)*et,(gt+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et));var xt=new go.PathFigure(nt,.5*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(Ft,nt,et){var ht=new go.Geometry;et=et/.8;var lt=new go.PathFigure(0,.7*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN,gt=Ft?Ft.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var mt=new go.PathFigure(0,0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,.5*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN,gt=Ft?Ft.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var mt=new go.PathFigure(0,0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure((1-lt)*nt,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ht}),go.Shape.defineFigureGenerator("Process",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var mt=new go.PathFigure(lt*nt,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var gt=new go.PathFigure(0,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(lt*nt,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var mt=new go.PathFigure(lt*nt,0,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*nt,et)),ht.spot1=new go.Spot(lt,0),ht.spot2=new go.Spot(1-lt,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.25*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ft,nt,et){var ht=new go.Geometry,lt=Ft?Ft.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*et).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+lt)*nt,0,nt,(.5-lt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+lt)*et,(.5+lt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=.5,mt=new go.PathFigure(nt,gt*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,nt,(gt+lt)*et,(gt+lt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*et,(gt-lt)*nt,et,0,(gt+lt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,0,0,(gt-lt)*et,(gt-lt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,gt*et,(gt+lt)*nt,0,nt,(gt-lt)*et));var xt=new go.PathFigure(nt,gt*et,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,gt*et));var Mt=new go.PathFigure(.8*nt,.75*et,!1);return ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),ht}),go.Shape.defineFigureGenerator("Ground",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),ht}),go.Shape.defineFigureGenerator("Inverter",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.1,gt=.1,mt=.9,xt=.5,Mt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Mt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Mt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var jt=new go.PathFigure((mt+gt)*nt,xt*et,!0);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt-gt)*et,(mt+gt)*nt,(xt-lt)*et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=Jt*.4,mt=Jt*.1,xt=.1,Mt=.9,jt=.5,Qt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+gt)*et,(.4+lt)*nt,et)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Qt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Qt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+lt)*nt,0,.8*nt,(.5-gt)*et));var ne=new go.PathFigure((Mt+xt)*nt,jt*et,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt+xt)*et,(Mt+xt)*nt,(jt+mt)*et,(Mt+mt)*nt,(jt+xt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt)*nt,jt*et,(Mt-mt)*nt,(jt+xt)*et,(Mt-xt)*nt,(jt+mt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt-xt)*et,(Mt-xt)*nt,(jt-mt)*et,(Mt-mt)*nt,(jt-xt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt)*nt,jt*et,(Mt+mt)*nt,(jt-xt)*et,(Mt+xt)*nt,(jt-mt)*et)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(Ft,nt,et){var ht=new go.Geometry,lt=.5,gt=Jt*lt,mt=0,xt=.5,Mt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(mt+gt)*nt,(xt-lt)*et,.7*nt,(xt-gt)*et)),lt=.1,gt=Jt*.1,mt=.9,xt=.5;var jt=new go.PathFigure((mt-lt)*nt,xt*et,!0);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(Ft,nt,et){var ht=new go.Geometry,lt=.5,gt=Jt*lt,mt=0,xt=.5,Mt=new go.PathFigure(0,0,!0);return ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(mt+gt+gt)*nt,(xt-lt)*et,.8*nt,(xt-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(xt+gt)*et,(mt+gt+gt)*nt,(xt+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(Ft,nt,et){var ht=new go.Geometry,lt=.5,gt=Jt*lt,mt=.2,xt=.5,Mt=new go.PathFigure(.1*nt,0,!1);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var jt=new go.PathFigure(.8*nt,.5*et,!0);ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(mt+gt)*nt,(xt-lt)*et,.7*nt,(xt-gt)*et)),lt=.1,gt=Jt*.1,mt=.9,xt=.5;var Qt=new go.PathFigure((mt-lt)*nt,xt*et,!0);return ht.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(Ft,nt,et){var ht=new go.Geometry,lt=.5,gt=Jt*lt,mt=.2,xt=.5,Mt=new go.PathFigure(.1*nt,0,!1);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var jt=new go.PathFigure(.2*nt,0,!0);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(mt+gt)*nt,(xt-lt)*et,.9*nt,(xt-gt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("Resistor",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Inductor",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.1,gt=.1,mt=.1,xt=.5,Mt=new go.PathFigure((mt-lt*.5)*nt,et,!1);return ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.3,Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.5,Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.7,Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,0,(mt-lt)*nt,et,(mt-gt)*nt,0)),mt=.9,Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt*.5)*nt,et,(mt+gt)*nt,0,(mt+lt)*nt,et)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.5,gt=.5,mt=.5,xt=.5,Mt=new go.PathFigure((mt-gt)*nt,xt*et,!1);return ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt-gt)*et,(mt+gt)*nt,(xt-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Move,(mt-gt+.1)*nt,xt*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt-.1)*nt,xt*et,mt*nt,(xt-gt)*et,mt*nt,(xt+gt)*et)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("Diode",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(Ft,nt,et){var ht=new go.Geometry,lt=nt,gt=et;nt=nt*.38,et=et*.6;var mt=Jt*.8,xt=.8,Mt=0,jt=.5,Qt=(lt-nt)/2,ne=(gt-et)/2,qt=new go.PathFigure(Mt*nt+Qt,(jt+xt)*et+ne,!0);ht.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt)*nt+Qt,jt*et+ne,(Mt-mt)*nt+Qt,(jt+xt)*et+ne,(Mt-xt)*nt+Qt,(jt+mt)*et+ne)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt-xt)*et+ne,(Mt-xt)*nt+Qt,(jt-mt)*et+ne,(Mt-mt)*nt+Qt,(jt-xt)*et+ne)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt+mt*.5)*nt+Qt,jt*et+ne,Mt*nt+Qt,(jt-xt)*et+ne,(Mt-xt+mt*.5)*nt+Qt,(jt-mt)*et+ne)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt+xt)*et+ne,(Mt-xt+mt*.5)*nt+Qt,(jt+mt)*et+ne,Mt*nt+Qt,(jt+xt)*et+ne).close()),mt=Jt*.4,xt=.4,Mt=.2,jt=.5;var $t=new go.PathFigure(Mt*nt+Qt,(jt+xt)*et+ne,!0);ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt)*nt+Qt,jt*et+ne,(Mt-mt)*nt+Qt,(jt+xt)*et+ne,(Mt-xt)*nt+Qt,(jt+mt)*et+ne)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt-xt)*et+ne,(Mt-xt)*nt+Qt,(jt-mt)*et+ne,(Mt-mt)*nt+Qt,(jt-xt)*et+ne)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt+mt*.5)*nt+Qt,jt*et+ne,Mt*nt+Qt,(jt-xt)*et+ne,(Mt-xt+mt*.5)*nt+Qt,(jt-mt)*et+ne)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt+xt)*et+ne,(Mt-xt+mt*.5)*nt+Qt,(jt+mt)*et+ne,Mt*nt+Qt,(jt+xt)*et+ne).close()),mt=Jt*.2,xt=.2,Mt=.5,jt=.5;var we=new go.PathFigure((Mt-xt)*nt+Qt,jt*et+ne,!0);ht.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt-xt)*et+ne,(Mt-xt)*nt+Qt,(jt-mt)*et+ne,(Mt-mt)*nt+Qt,(jt-xt)*et+ne)),we.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt)*nt+Qt,jt*et+ne,(Mt+mt)*nt+Qt,(jt-xt)*et+ne,(Mt+xt)*nt+Qt,(jt-mt)*et+ne)),we.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt+xt)*et+ne,(Mt+xt)*nt+Qt,(jt+mt)*et+ne,(Mt+mt)*nt+Qt,(jt+xt)*et+ne)),we.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-xt)*nt+Qt,jt*et+ne,(Mt-mt)*nt+Qt,(jt+xt)*et+ne,(Mt-xt)*nt+Qt,(jt+mt)*et+ne)),mt=Jt*.4,xt=.4,Mt=.8,jt=.5;var ce=new go.PathFigure(Mt*nt+Qt,(jt-xt)*et+ne,!0);ht.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt)*nt+Qt,jt*et+ne,(Mt+mt)*nt+Qt,(jt-xt)*et+ne,(Mt+xt)*nt+Qt,(jt-mt)*et+ne)),ce.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt+xt)*et+ne,(Mt+xt)*nt+Qt,(jt+mt)*et+ne,(Mt+mt)*nt+Qt,(jt+xt)*et+ne)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt-mt*.5)*nt+Qt,jt*et+ne,Mt*nt+Qt,(jt+xt)*et+ne,(Mt+xt-mt*.5)*nt+Qt,(jt+mt)*et+ne)),ce.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt-xt)*et+ne,(Mt+xt-mt*.5)*nt+Qt,(jt-mt)*et+ne,Mt*nt+Qt,(jt-xt)*et+ne).close()),mt=Jt*.8,xt=.8,Mt=1,jt=.5;var be=new go.PathFigure(Mt*nt+Qt,(jt-xt)*et+ne,!0);return ht.add(be),be.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt)*nt+Qt,jt*et+ne,(Mt+mt)*nt+Qt,(jt-xt)*et+ne,(Mt+xt)*nt+Qt,(jt-mt)*et+ne)),be.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt+xt)*et+ne,(Mt+xt)*nt+Qt,(jt+mt)*et+ne,(Mt+mt)*nt+Qt,(jt+xt)*et+ne)),be.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+xt-mt*.5)*nt+Qt,jt*et+ne,Mt*nt+Qt,(jt+xt)*et+ne,(Mt+xt-mt*.5)*nt+Qt,(jt+mt)*et+ne)),be.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt+Qt,(jt-xt)*et+ne,(Mt+xt-mt*.5)*nt+Qt,(jt-mt)*et+ne,Mt*nt+Qt,(jt-xt)*et+ne).close()),ht}),go.Shape.defineFigureGenerator("Email",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Move,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.35*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var gt=new go.PathFigure(.1*nt,et,!0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var mt=new go.PathFigure(.6*nt,et,!0,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et).close());var xt=new go.PathFigure(0,.5*et,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),ht}),go.Shape.defineFigureGenerator("Power",function(Ft,nt,et){var ht=new go.Geometry,lt=Jt*.4,gt=.4,mt=.5,xt=.5,Mt=bt(),jt=bt(),Qt=bt(),ne=bt();Ne(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.5,Mt,Mt,jt,Qt,ne);var qt=Nt(jt.x,jt.y),$t=new go.PathFigure(jt.x*nt,jt.y*et,!0);ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,Qt.x*nt,Qt.y*et,ne.x*nt,ne.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,(mt-lt)*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et)),Ne(mt-gt,xt,mt-gt,xt-lt,mt-lt,xt-gt,mt,xt-gt,.5,Qt,ne,jt,Mt,Mt),$t.add(new go.PathSegment(go.PathSegment.Bezier,jt.x*nt,jt.y*et,Qt.x*nt,Qt.y*et,ne.x*nt,ne.y*et)),lt=Jt*.3,gt=.3,Ne(mt-gt,xt,mt-gt,xt-lt,mt-lt,xt-gt,mt,xt-gt,.5,Qt,ne,jt,Mt,Mt),$t.add(new go.PathSegment(go.PathSegment.Line,jt.x*nt,jt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(mt-gt)*nt,xt*et,ne.x*nt,ne.y*et,Qt.x*nt,Qt.y*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+gt)*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(mt+gt)*nt,xt*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Ne(mt,xt-gt,mt+lt,xt-gt,mt+gt,xt-lt,mt+gt,xt,.5,Mt,Mt,jt,Qt,ne),$t.add(new go.PathSegment(go.PathSegment.Bezier,jt.x*nt,jt.y*et,ne.x*nt,ne.y*et,Qt.x*nt,Qt.y*et).close());var $t=new go.PathFigure(.45*nt,0,!0);return ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),$t.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),ie(Mt),ie(jt),ie(Qt),ie(ne),ie(qt),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et/2,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function gt(mt,xt,Mt){mt.add(new go.PathSegment(go.PathSegment.Move,(.3+xt)*nt,(.8+Mt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.5+xt)*nt,(.5+Mt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.1+xt)*nt,(.5+Mt)*et)),mt.add(new go.PathSegment(go.PathSegment.Line,(.3+xt)*nt,(.8+Mt)*et).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.37*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ft,nt,et){var ht=new go.Geometry,lt=.5,gt=0,mt=0,xt=lt*Jt,Mt=.4*Math.SQRT2/2+.5,jt=.5-.5*Math.SQRT2/2,Qt=1,ne=.5,qt=.5,$t=0,we=new go.PathFigure(Mt*nt,(1-jt)*et,!1);return ht.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,ne*et,Qt*nt,.7*et,Qt*nt,ne*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(qt+gt)*nt,($t+gt)*et,(.5+lt+gt)*nt,(.5-xt+gt)*et,(.5+xt+gt)*nt,(.5-lt+gt)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*nt,(.5+mt)*et,(.5-xt+gt)*nt,(.5-lt+mt)*et,(.5-lt+gt)*nt,(.5-xt+mt)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*nt,.9*et,(.5-lt+gt)*nt,(.5+xt+mt)*et,(.5-xt+gt)*nt,.9*et)),we.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*nt,.8*et)),we.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*nt,.9*et)),we.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*nt,.95*et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(nt,et,!1);ht.add(gt);var mt=new go.PathFigure(0,.5*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var lt=new go.PathFigure(0,.2*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.7*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var gt=new go.PathFigure(.45*nt,.73*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(.335*nt,(1-.555)*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var mt=.5-.285,xt=.5,Mt=mt,jt=Math.PI/4,Qt=4*(1-Math.cos(jt))/(3*Math.sin(jt)),ne=Qt*.5,qt=mt,$t=mt,we=Qt*qt,ce=Qt*$t;gt.add(new go.PathSegment(go.PathSegment.Bezier,(xt-qt)*nt,Mt*et,(xt-(we+qt)/2)*nt,(Mt+($t+ce)/2)*et,(xt-qt)*nt,(Mt+ce)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,(Mt-$t)*et,(xt-qt)*nt,(Mt-ce)*et,(xt-we)*nt,(Mt-$t)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(xt+qt)*nt,Mt*et,(xt+we)*nt,(Mt-$t)*et,(xt+qt)*nt,(Mt-ce)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(xt+qt)*nt,(Mt+ce)*et,(xt+(we+qt)/2)*nt,(Mt+($t+ce)/2)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var be=new go.PathFigure(.2*nt,et,!1);ht.add(be),be.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var Ge=new go.PathFigure(.8*nt,et,!1);return ht.add(Ge),Ge.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var gt=new go.PathFigure(.2*nt,.2*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt);var gt=new go.PathFigure(nt,et,!1);ht.add(gt);var mt=new go.PathFigure(.1*nt,et,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.05*nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var gt=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*nt,.875*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,gt*nt,gt*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.325*et,.575*nt,.725*et,.625*nt,.375*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.75*et,.375*nt,.375*et,.425*nt,.725*et)),ht}),go.Shape.defineFigureGenerator("Recycle",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.45*nt,.95*et,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var gt=new go.PathFigure(.475*nt,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var mt=new go.PathFigure(.675*nt,.575*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),mt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ft,nt,et){var ht=new go.Geometry,lt=.5,gt=Jt*.5,mt=new go.PathFigure(nt,lt*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,et,nt,(lt+gt)*et,(lt+gt)*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*et,(lt-gt)*nt,et,0,(lt+gt)*et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,lt*nt,0,0,(lt-gt)*et,(lt-gt)*nt,0)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt,lt*et,(lt+gt)*nt,0,nt,(lt-gt)*et));var xt=new go.PathFigure(lt*nt,0,!1);return ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.15*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,lt*nt,.85*et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),xt.add(new go.PathSegment(go.PathSegment.Move,lt*nt,lt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),ht}),go.Shape.defineFigureGenerator("Package",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.15*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,.15*et,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var mt=new go.PathFigure(0,.5*et,!1);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),ht}),go.Shape.defineFigureGenerator("Component",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var gt=new go.PathFigure(0,.2*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var mt=new go.PathFigure(0,.6*et,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),mt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.15*nt,.6*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var gt=new go.PathFigure(.15*nt,.6*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht}),go.Shape.defineFigureGenerator("Workcell",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(nt,.8*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var mt=.1,xt=Jt*.1,Mt=.2,jt=.9,Qt=new go.PathFigure((Mt-mt)*nt,jt*et,!0);ht.add(Qt),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt-mt)*et,(Mt-mt)*nt,(jt-xt)*et,(Mt-xt)*nt,(jt-mt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+mt)*nt,jt*et,(Mt+xt)*nt,(jt-mt)*et,(Mt+mt)*nt,(jt-xt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt+mt)*et,(Mt+mt)*nt,(jt+xt)*et,(Mt+xt)*nt,(jt+mt)*et)),Qt.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-mt)*nt,jt*et,(Mt-xt)*nt,(jt+mt)*et,(Mt-mt)*nt,(jt+xt)*et).close()),mt=.1,xt=Jt*.1,Mt=.8,jt=.9;var ne=new go.PathFigure((Mt-mt)*nt,jt*et,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt-mt)*et,(Mt-mt)*nt,(jt-xt)*et,(Mt-xt)*nt,(jt-mt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Mt+mt)*nt,jt*et,(Mt+xt)*nt,(jt-mt)*et,(Mt+mt)*nt,(jt-xt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,Mt*nt,(jt+mt)*et,(Mt+mt)*nt,(jt+xt)*et,(Mt+xt)*nt,(jt+mt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Mt-mt)*nt,jt*et,(Mt-xt)*nt,(jt+mt)*et,(Mt-mt)*nt,(jt+xt)*et).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.2*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),ht}),go.Shape.defineFigureGenerator("Forklift",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0));var gt=new go.PathFigure(0,.5*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var mt=new go.PathFigure(.5*nt,.8*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et));var xt=new go.PathFigure(.5*nt,.7*et,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var Mt=.1,jt=Jt*.1,Qt=.1,ne=.9,qt=new go.PathFigure((Qt-Mt)*nt,ne*et,!0);ht.add(qt),qt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,(ne-Mt)*et,(Qt-Mt)*nt,(ne-jt)*et,(Qt-jt)*nt,(ne-Mt)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+Mt)*nt,ne*et,(Qt+jt)*nt,(ne-Mt)*et,(Qt+Mt)*nt,(ne-jt)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,(ne+Mt)*et,(Qt+Mt)*nt,(ne+jt)*et,(Qt+jt)*nt,(ne+Mt)*et)),qt.add(new go.PathSegment(go.PathSegment.Bezier,(Qt-Mt)*nt,ne*et,(Qt-jt)*nt,(ne+Mt)*et,(Qt-Mt)*nt,(ne+jt)*et)),Mt=.1,jt=Jt*.1,Qt=.4,ne=.9;var $t=new go.PathFigure((Qt-Mt)*nt,ne*et,!0);return ht.add($t),$t.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,(ne-Mt)*et,(Qt-Mt)*nt,(ne-jt)*et,(Qt-jt)*nt,(ne-Mt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Qt+Mt)*nt,ne*et,(Qt+jt)*nt,(ne-Mt)*et,(Qt+Mt)*nt,(ne-jt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,Qt*nt,(ne+Mt)*et,(Qt+Mt)*nt,(ne+jt)*et,(Qt+jt)*nt,(ne+Mt)*et)),$t.add(new go.PathSegment(go.PathSegment.Bezier,(Qt-Mt)*nt,ne*et,(Qt-jt)*nt,(ne+Mt)*et,(Qt-Mt)*nt,(ne+jt)*et)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.1*nt,.4*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var gt=new go.PathFigure(.45*nt,.7*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var mt=new go.PathFigure(.55*nt,.4*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Qt=.05,ne=Jt*.05,qt=.175,$t=.95,xt=new go.PathFigure((qt-Qt)*nt,$t*et,!0);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,qt*nt,($t-Qt)*et,(qt-Qt)*nt,($t-ne)*et,(qt-ne)*nt,($t-Qt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(qt+Qt)*nt,$t*et,(qt+ne)*nt,($t-Qt)*et,(qt+Qt)*nt,($t-ne)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,qt*nt,($t+Qt)*et,(qt+Qt)*nt,($t+ne)*et,(qt+ne)*nt,($t+Qt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(qt-Qt)*nt,$t*et,(qt-ne)*nt,($t+Qt)*et,(qt-Qt)*nt,($t+ne)*et));var Qt=.05,ne=Jt*.05,qt=.375,$t=.95,Mt=new go.PathFigure((qt-Qt)*nt,$t*et,!0);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,qt*nt,($t-Qt)*et,(qt-Qt)*nt,($t-ne)*et,(qt-ne)*nt,($t-Qt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(qt+Qt)*nt,$t*et,(qt+ne)*nt,($t-Qt)*et,(qt+Qt)*nt,($t-ne)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,qt*nt,($t+Qt)*et,(qt+Qt)*nt,($t+ne)*et,(qt+ne)*nt,($t+Qt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(qt-Qt)*nt,$t*et,(qt-ne)*nt,($t+Qt)*et,(qt-Qt)*nt,($t+ne)*et));var Qt=.05,ne=Jt*.05,qt=.625,$t=.95,jt=new go.PathFigure((qt-Qt)*nt,$t*et,!0);ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,qt*nt,($t-Qt)*et,(qt-Qt)*nt,($t-ne)*et,(qt-ne)*nt,($t-Qt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(qt+Qt)*nt,$t*et,(qt+ne)*nt,($t-Qt)*et,(qt+Qt)*nt,($t-ne)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,qt*nt,($t+Qt)*et,(qt+Qt)*nt,($t+ne)*et,(qt+ne)*nt,($t+Qt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(qt-Qt)*nt,$t*et,(qt-ne)*nt,($t+Qt)*et,(qt-Qt)*nt,($t+ne)*et));var Qt=.05,ne=Jt*.05,qt=.825,$t=.95,we=new go.PathFigure((qt-Qt)*nt,$t*et,!0);ht.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,qt*nt,($t-Qt)*et,(qt-Qt)*nt,($t-ne)*et,(qt-ne)*nt,($t-Qt)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(qt+Qt)*nt,$t*et,(qt+ne)*nt,($t-Qt)*et,(qt+Qt)*nt,($t-ne)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,qt*nt,($t+Qt)*et,(qt+Qt)*nt,($t+ne)*et,(qt+ne)*nt,($t+Qt)*et)),we.add(new go.PathSegment(go.PathSegment.Bezier,(qt-Qt)*nt,$t*et,(qt-ne)*nt,($t+Qt)*et,(qt-Qt)*nt,($t+ne)*et).close());var ce=new go.PathFigure(0,et,!1);return ht.add(ce),ce.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var mt=new go.PathFigure(.15*nt,et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var xt=.05,Mt=Jt*.05,jt=.35,Qt=.775,ne=new go.PathFigure((jt-xt)*nt,Qt*et,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Qt-xt)*et,(jt-xt)*nt,(Qt-Mt)*et,(jt-Mt)*nt,(Qt-xt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(jt+xt)*nt,Qt*et,(jt+Mt)*nt,(Qt-xt)*et,(jt+xt)*nt,(Qt-Mt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,jt*nt,(Qt+xt)*et,(jt+xt)*nt,(Qt+Mt)*et,(jt+Mt)*nt,(Qt+xt)*et)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(jt-xt)*nt,Qt*et,(jt-Mt)*nt,(Qt+xt)*et,(jt-xt)*nt,(Qt+Mt)*et).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.75*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Globe",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),ht}),go.Shape.defineFigureGenerator("Wave",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.25*et,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Operator",function(Ft,nt,et){var ht=new go.Geometry,lt=.3,gt=Jt*.3,mt=.5,xt=.7,Mt=new go.PathFigure((mt-lt)*nt,xt*et,!0);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et));var jt=new go.PathFigure(0,.7*et,!1);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.5*nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt,0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),ht}),go.Shape.defineFigureGenerator("Battery",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var gt=new go.PathFigure(0,.6*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),ht}),go.Shape.defineFigureGenerator("Delete",function(Ft,nt,et){var ht=new go.Geometry,lt=.5,gt=Jt*.5,mt=.5,xt=.5,Mt=new go.PathFigure((mt-lt)*nt,xt*et,!0);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et));var jt=new go.PathFigure(.15*nt,.5*et,!1);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),ht}),go.Shape.defineFigureGenerator("Flag",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.1*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),ht}),go.Shape.defineFigureGenerator("Help",function(Ft,nt,et){var ht=new go.Geometry,lt=.5,gt=Jt*.5,mt=.5,xt=.5,Mt=new go.PathFigure((mt-lt)*nt,xt*et,!1);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et).close()),lt=.05,gt=Jt*.05,mt=.5,xt=.8;var jt=new go.PathFigure((mt-lt)*nt,xt*et,!1);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt-lt)*et,(mt-lt)*nt,(xt-gt)*et,(mt-gt)*nt,(xt-lt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt+lt)*nt,xt*et,(mt+gt)*nt,(xt-lt)*et,(mt+lt)*nt,(xt-gt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,mt*nt,(xt+lt)*et,(mt+lt)*nt,(xt+gt)*et,(mt+gt)*nt,(xt+lt)*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(mt-lt)*nt,xt*et,(mt-gt)*nt,(xt+lt)*et,(mt-lt)*nt,(xt+gt)*et).close()),jt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),jt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),jt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),ht}),go.Shape.defineFigureGenerator("Location",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var gt=new go.PathFigure(.2*nt,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var gt=new go.PathFigure(.2*nt,.5*et,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),ht}),go.Shape.defineFigureGenerator("Gear",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.5*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),ht}),go.Shape.defineFigureGenerator("Map",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,.2*et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),lt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),ht}),go.Shape.defineFigureGenerator("Eject",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var gt=new go.PathFigure(0,et*.6,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*1,et*1,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var gt=new go.PathFigure(.126*nt,.85*et,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var mt=new go.PathFigure(.402*nt,.85*et,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),mt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.85*et).close());var xt=new go.PathFigure(.678*nt,.85*et,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var Mt=new go.PathFigure(.5*nt,.1*et,!1);return ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),Mt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),ht}),go.Shape.defineFigureGenerator("5Bars",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,et*1,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var gt=new go.PathFigure(nt*.204,et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var mt=new go.PathFigure(nt*.408,et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*1).close());var xt=new go.PathFigure(nt*.612,et,!0);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var Mt=new go.PathFigure(nt*.816,et,!0);return ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var gt=new go.PathFigure(nt*.055,.07*et,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var mt=new go.PathFigure(nt*.055,.13*et,!0);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.16).close());var xt=new go.PathFigure(nt*.055,.18*et,!0);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var Mt=new go.PathFigure(nt*1,0,!0);return ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(.55*nt,et,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),ht}),go.Shape.defineFigureGenerator("Key",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*1,et*.5,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(0,0,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var gt=new go.PathFigure(0,0,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var mt=new go.PathFigure(nt*.11,et*.1,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.11,et*.8).close());var xt=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var Mt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ft,nt,et){var ht=new go.Geometry,lt=8,gt=lt*Jt,mt=new go.PathFigure(lt,0,!1);ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-lt,et,nt,et-gt,nt-gt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,lt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-lt,gt,et,0,et-gt)),mt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,gt,gt,0).close());var xt=new go.PathFigure(nt*.83,0,!1);ht.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var Mt=new go.PathFigure(nt*.83,et*1,!1);ht.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),Mt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var jt=new go.PathFigure(nt*.78,et*.05,!1);return ht.add(jt),jt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),jt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),jt.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ft,nt,et){var ht=Ft?Ft.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,nt/3),ht=Math.min(ht,et/3);var lt=ht*Jt,gt=et*.8,mt=new go.Geometry,xt=new go.PathFigure(ht,0,!0);return mt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt-ht,0)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,ht,nt-lt,0,nt,lt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,gt-ht)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-ht,gt,nt,gt-lt,nt-lt,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,gt)),xt.add(new go.PathSegment(go.PathSegment.Line,ht,gt)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ht,lt,gt,0,gt-lt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),xt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,lt,lt,0).close()),lt>1?(mt.spot1=new go.Spot(0,0,lt,lt),mt.spot2=new go.Spot(1,.8,-lt,-lt)):(mt.spot1=go.Spot.TopLeft,mt.spot2=new go.Spot(1,.8)),mt}),go.Shape.defineFigureGenerator("Repeat",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*.45,!0);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var gt=new go.PathFigure(nt*1,et*.55,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(Ft,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*.1,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var gt=new go.PathFigure(nt*.1,et*.2,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var mt=new go.PathFigure(nt*.28,et*.37,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(Ft,nt,et){var ht=new go.Geometry,lt=15,gt=lt*Jt,mt=new go.PathFigure(nt*.62,et*.475,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt,et-lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,nt-lt,et,nt,et-gt,nt-gt,et)),mt.add(new go.PathSegment(go.PathSegment.Line,lt,et)),mt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-lt,gt,et,0,et-gt)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),gt>1?(ht.spot1=new go.Spot(0,0,gt,gt),ht.spot2=new go.Spot(1,1,-gt,-gt)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close());var mt=new go.PathFigure(nt*.4,et*0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;return lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*0,et*1,!0);ht.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-gt)).close());var mt=new go.PathFigure(nt*.5,et*0,!0);return ht.add(mt),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),mt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),ht}),go.Shape.defineFigureGenerator("Drink",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.15,et*0,!1);ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var gt=new go.PathFigure(nt*.235,et*.28,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(Ft,nt,et){var ht=new go.Geometry,lt=new go.PathFigure(nt*.5,et*0,!0);return ht.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.25).close()),ht}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var En={},jn="5.0",Nt={},bt=null,ie=!1,De=!1,Ne=null,Le=!1,It=null,Jt=null,fe=0;fe4?parseFloat(Ae):5};En.setHTML5Codebase=function(Ae,pn){Jt=Ae,Me(Ae,pn)},En.setJavaCodebase=En.setJavaCodebaseVersion=En.isCompiledInstalled=En.setPreCompiledScriptPath=En.setPreCompiledResourcePath=function(){},En.setHTML5CodebaseVersion=function(Ae,pn){var $e=parseFloat(Ae);if($e!==NaN&&$e<5){console.log("The GeoGebra HTML5 codebase version "+$e+" is deprecated. Using version latest instead.");return}It=Ae,Wt(Ae,pn)},En.getHTML5CodebaseVersion=function(){return Ft},En.getParameters=function(){return Nt},En.setFontsCSSURL=function(Ae){mt=Ae},En.setGiacJSURL=function(Ae){},En.setJNLPFile=function(Ae){xe=Ae},En.setJNLPBaseDir=function(Ae){},En.inject=function(){function Ae(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pn="auto",$e=Nt.id,An,Fe=!1,de=0;de=5)return!0;var Ae=En.getAppletObject();return Ae&&typeof Ae.recalculateEnvironments=="function"?(Ae.recalculateEnvironments(),!0):!1},En.startAnimation=function(){var Ae=En.getAppletObject();return Ae&&typeof Ae.startAnimation=="function"?(Ae.startAnimation(),!0):!1},En.stopAnimation=function(){var Ae=En.getAppletObject();return Ae&&typeof Ae.stopAnimation=="function"?(Ae.stopAnimation(),!0):!1},En.getAppletObject=function(){var Ae=Nt.id!==void 0?Nt.id:"ggbApplet";return window[Ae]},En.resize=function(){};var we=function(Ae,pn,$e){var An=document.createElement("param");An.setAttribute("name",pn),An.setAttribute("value",$e),Ae.appendChild(An)},ce=function(Ae){return Ae&&Ae!=="false"},be=function(Ae,pn,$e){Mt(Ft)<=4.2&&($e=!0);var An=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ft||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(An=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Fe=document.createElement("div");Fe.classList.add("appletParameters","notranslate");var de=pn.width,Ie=pn.height;if(pn.disableAutoScale=pn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pn.disableAutoScale,pn.width!==void 0)if(Mt(Ft)<=4.4)ce(pn.showToolBar)&&(pn.height-=7),ce(pn.showAlgebraInput)&&(pn.height-=37),pn.width<605&&ce(pn.showToolBar)&&(pn.width=605,de=605);else{var cn=100;(ce(pn.showToolBar)||ce(pn.showMenuBar))&&(pn.hasOwnProperty("customToolBar")&&(pn.customToolbar=pn.customToolBar),cn=ce(pn.showMenuBar)?245:155),de=5?(pn.appletOnLoad=function(je){var In=Ae.querySelector(".ggb_preview");In&&In.parentNode.removeChild(In),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Lt),window.GGBT_wsf_view&&$(window).trigger("resize"),Ht(je)},Ct||Lt.appendChild(Dt)):Fe.appendChild(Dt),Lt.appendChild(Fe),Ct||Ae.appendChild(Lt),setTimeout(function(){En.resize()},1)}else{var Zt=document.createElement("div");Zt.className="applet_scaler",Zt.style.position="relative",Zt.style.display="block",Zt.appendChild(Fe),Ae.appendChild(Zt),pn.appletOnLoad=function(je){En.resize(),Ht(je)}}function kt(je,In){In&&typeof In.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(je,In.appletOnLoad):renderGGBElement(je),ln("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",In)}function _t(je,In){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:je,params:In}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ti){kt(ti.article,ti.params)}),html5AppletsToProcess=null)},Mt(Ft)<5&&(je.className+=" geogebraweb")):kt(je,In)}if(An){scriptLoadStarted=!0;for(var tn=0;tn0?(Ke.remove(),Lt.attr("id","fullscreencontent").show(),jQuery(Ht).append(Lt),window.dispatchEvent(new Event("resize"))):be(Ke,pn,!1),window.GGBT_wsf_view.launchFullScreen(Ht)}else Rt=An,be(Ae,pn,!1);if(!window.GGBT_wsf_view)for(Ie=0;IeAe/4*3&&(Ke=Ae/4*3),Ht=Ke/5.8,cn.setAttribute("src",lt),cn.setAttribute("width",Ke),cn.setAttribute("height",Ht);var Lt=(Ae-Ke)/2,Ct=(pn-Ht)/2;cn.style.left=Lt+"px",cn.style.top=Ct+"px",Fe.appendChild(cn)}}return Fe.appendChild(Ie),Fe},Zn=function(Ae){return Ae=Ae.toLowerCase(),Ae==="html5"||Ae==="screenshot"?Ae:"html5"},re=["web","webSimple","web3d","tablet","tablet3d","phone"],Wt=function(Ae,pn){if(Ft=Ae,pn){Me(Ft,!0);return}var $e=!ie;if($e){var An=Mt(Ft);!isNaN(An)&&An<4.4&&($e=!1)}var Fe,de;window.location.protocol.substr(0,4)==="http"?Fe=window.location.protocol:Fe="http:";var Ie=Ft.indexOf("//");Ie>0?de=Ft:Ie===0?de=Fe+Ft:de="https://www.geogebra.org/apps/5.2.814.0/";for(var cn in re)if(Ft.slice(re[cn].length*-1)===re[cn]||Ft.slice((re[cn].length+1)*-1)===re[cn]+"/"){Me(de,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&$e&&!bt.is3D&&!bt.AV&&!bt.SV&&!bt.CV&&!bt.EV2&&!bt.CP&&!bt.PC&&!bt.DA&&!bt.FI&&!bt.PV&&!ce(Nt.showToolBar)&&!ce(Nt.showMenuBar)&&!ce(Nt.showAlgebraInput)&&!ce(Nt.enableRightClick)&&(!Nt.appName||Nt.appName=="classic")?de+="webSimple/":de+="web3d/",Me(de,!1)},Me=function(Ae,pn){if(Ae.requirejs){Ve=Ae;return}Ae.slice(-1)!=="/"&&(Ae+="/"),Ve=Ae,pn===null&&(pn=Ae.indexOf("http")===-1),he=pn,nt="web.nocache.js",et=!1;var $e=Ve.split("/");$e.length>1&&(!pn&&$e[$e.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):re.indexOf($e[$e.length-2])>=0&&(nt=$e[$e.length-2]+".nocache.js")),$e=Ae.split("/"),Ft=$e[$e.length-3],Ft.substr(0,4)==="test"?Ft=Ft.substr(4,1)+"."+Ft.substr(5,1):(Ft.substr(0,3)==="war"||Ft.substr(0,4)==="beta")&&(Ft="5.0");var An=parseFloat(Ft);An!==NaN&&An<5&&Ae.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+An+" is deprecated. Using version latest instead."),Wt("5.0",pn))},ln=function(Ae,pn){window.console&&window.console.log&&(!pn||typeof pn.showLogging=="undefined"||pn.showLogging&&pn.showLogging!=="false")&&console.log(Ae)};Nt.material_id!==void 0?ne(Dn):Dn();function Dn(){var Ae=jn;It!==null?Ae=It:parseFloat(Ae)<5&&(Ae="5.0"),Wt(Ae,!1),Jt!==null&&Me(Jt,he),Le=!0}return En},GGBAppletUtils=function(){"use strict";function En(){return window.GGBT_wsf_edit!==void 0}function jn(Le,It){It!=1?(Le.style.transformOrigin="0% 0% 0px",Le.style.webkitTransformOrigin="0% 0% 0px",Le.style.transform="scale("+It+","+It+")",Le.style.webkitTransform="scale("+It+","+It+")",Le.style.maxWidth="initial",Le.querySelector(".ggb_preview")!==null&&(Le.querySelector(".ggb_preview").style.maxWidth="initial"),Le.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Le.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Le.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Le.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Le.style.transform="none",Le.style.webkitTransform="none")}function Nt(Le,It,Jt,fe,ve,xe){var Ve=null;if(xe!=null&&xe!="")for(var he=Le.parentNode;he!=null;)if((" "+he.className+" ").indexOf(" "+xe+" ")>-1){Ve=he;break}else he=he.parentNode;var Rt=0,Ft=0,nt=0,et=0,ht=0,lt=0,gt=0;if(Ve)Rt=Ve.offsetWidth,Ft=Math.max(fe?Ve.offsetWidth:0,Ve.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Rt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ft=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Rt):(Rt=window.innerWidth,Ft=window.innerHeight,nt=window.innerWidth),Le){var mt=Le.getBoundingClientRect();mt.left>0&&mt.left<=Rt&&(ve===void 0||!ve)&&(document.dir==="rtl"?(ht=Rt-mt.width-mt.left,lt=nt<=480?10:30):(lt=mt.left,ht=nt<=480?10:30),et=lt+ht)}if(Le&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xt=Le.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,gt=40)}}return Le&&((Jt===void 0||!Jt)&&It>0&&It+et1&&(xe=!0)),It&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(xe=!0),!(Le.hasOwnProperty("disableAutoScale")&&Le.disableAutoScale))ve=bt(Le,It,xe,Jt,Le.scaleContainerClass);else return fe;return xe&&(!Le.hasOwnProperty("scale")||fe===1)?ve:Math.min(fe,ve)}function De(Le){var It=Math.min(window.innerWidth,document.documentElement.clientWidth),Jt=Math.min(window.innerHeight,document.documentElement.clientHeight),fe=Le.getBoundingClientRect(),ve=(It-fe.width)/2,xe=(Jt-fe.height)/2;xe<0&&(xe=0),Le.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ve<40?Le.style.left="40px":Le.style.left=ve+"px",Le.style.top=xe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(xe<40?Le.style.top="40px":Le.style.top=xe+"px",Le.style.left=ve+"px")}function Ne(Le,It){var Jt=Le.querySelector(".appletParameters");if(Jt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(It.id!==Jt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Le)}if(Jt.parentElement&&/fullscreen/.test(Jt.parentElement.className))return;var fe=ie(It,Le);En()&&Jt.setAttribute("data-param-scale",fe);for(var ve=null,xe=0;xe=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(En){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(En){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(En){var jn=c[En];return jn==null?null:jn},r=d,webModule.__errFn=e}function B(){function En(Le){var It=Le.lastIndexOf(rb);It==-1&&(It=Le.length);var Jt=Le.indexOf(sb);Jt==-1&&(Jt=Le.length);var fe=Le.lastIndexOf(tb,Math.min(Jt,It));return fe>=O?Le.substring(O,fe+P):W}function jn(Le){if(!Le.match(/^\w+:\/\//)){var It=o.createElement(ub);It.src=Le+vb,Le=En(It.src)}return Le}function Nt(){var Le=__gwt_getMetaProperty(wb);return Le!=null?Le:W}function bt(){for(var Le=o.getElementsByTagName(_),It=O;ItO?Le[Le.length-P].href:W}function De(){var Le=o.location;return Le.href==Le.protocol+zb+Le.host+Le.pathname+Le.search+Le.hash}var Ne=Nt();return Ne==W&&(Ne=bt()),Ne==W&&(Ne=ie()),Ne==W&&De()&&(Ne=En(o.location.href)),Ne=jn(Ne),Ne}function C(En){return En.match(/^\//)||En.match(/^[a-zA-Z]+:\/\//)?En:webModule.__moduleBase+En}function D(){var En=[],jn=O,Nt=[],bt=[];function ie(Le){var It=bt[Le](),Jt=Nt[Le];if(It in Jt)return It;var fe=[];for(var ve in Jt)fe[Jt[ve]]=ve;throw r&&r(Le,fe,It),null}if(__gwt_isKnownPropertyValue=function(Le,It){return It in Nt[Le]},webModule.__getPropMap=function(){var Le={};for(var It in Nt)Nt.hasOwnProperty(It)&&(Le[It]=ie(It));return Le},webModule.__computePropValue=ie,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var De;try{De=Cb;var Ne=De.indexOf(Db);Ne!=-1&&(jn=parseInt(De.substring(Ne+P),$),De=De.substring(O,Ne))}catch(Le){}return webModule.__softPermutationId=jn,C(De+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(En,jn,Nt){"use strict";Nt.d(jn,{Ax:function(){return Ne},Ds:function(){return Le},KI:function(){return Jt},SI:function(){return De},f1:function(){return ie}});var bt=Nt(11320);function ie(fe){let ve=!0;if(fe.length>0){for(let xe=0;xenew Promise((jt,Qt)=>{var ne=we=>{try{$t(Mt.next(we))}catch(ce){Qt(ce)}},qt=we=>{try{$t(Mt.throw(we))}catch(ce){Qt(ce)}},$t=we=>we.done?jt(we.value):Promise.resolve(we.value).then(ne,qt);$t((Mt=Mt.apply(mt,xt)).next())});const lt=({dispatch:mt,courseEndTime:xt,classroomList:Mt,successCallback:jt=()=>{},visible:Qt,homeworkIds:ne,courseId:qt,isBatch:$t,shixunHomeworks:we})=>{const[ce]=ie.default.useForm(),[be,Ge]=(0,bt.useState)(!1),[Oe,On]=(0,bt.useState)(!1),[Nn,Sn]=(0,bt.useState)(!1),[Zn,re]=(0,bt.useState)([]),[Wt,Me]=(0,bt.useState)([]),[ln,Dn]=(0,bt.useState)([]),[Ae,pn]=(0,bt.useState)([]),[$e,An]=(0,bt.useState)([]),[Fe,de]=(0,bt.useState)([]),[Ie,cn]=(0,bt.useState)([]),[Ke,Ht]=(0,bt.useState)([]),[Lt,Ct]=(0,bt.useState)([]);(0,bt.useEffect)(()=>{Qt?Dt():kt()},[Qt]);const Dt=()=>ht(void 0,null,function*(){Ge(!0);const _t=yield(0,nt.oR)(ne[0],{course_id:qt});Sn(_t.no_group),$t?(cn(_t.all_course_groups),Ht(_t.all_course_groups)):(pn(_t.late_course_groups),An(_t.late_course_groups),re(_t.submit_course_groups),Me(_t.submit_course_groups)),Ge(!1),ce.setFieldsValue({end_time:Ve()()})}),Zt=()=>ht(void 0,null,function*(){const _t=ce.getFieldsValue(),tn=Ve()(_t.end_time).format("YYYY-MM-DD HH:mm");if(($t?Lt.length===0:ln.length===0&&Fe.length===0)&&!Nn){De.ZP.warning("\u8BF7\u9009\u62E9\u9700\u8981\u64CD\u4F5C\u7684\u73ED\u7EA7");return}On(!0);const _n=yield(0,nt.Mc)(qt,{no_group:Nn,homework_ids:ne,group_ids:$t?Lt:ln,end_time:tn,late_group_ids:$t?Lt:Fe});On(!1),_n.status===0&&(kt(),De.ZP.success("\u64CD\u4F5C\u6210\u529F"),jt(),mt({type:"classroomList/setActionTabs",payload:{key:"\u6E05\u9664\u9009\u62E9\u6570\u636E"}}))}),kt=()=>{Dn([]),de([]),Me([]),An([])};return bt.createElement(Ne.default,{centered:!0,title:"\u7ACB\u5373\u622A\u6B62",className:Ft.modalWrapper,width:$t||Nn?520:760,open:Qt,confirmLoading:Oe,destroyOnClose:!0,okText:"\u622A\u6B62",cancelText:"\u53D6\u6D88",onOk:()=>Zt(),onCancel:()=>{kt(),mt({type:"classroomList/setActionTabs",payload:{}})}},bt.createElement("div",{className:Ft.tips},bt.createElement("div",null,"1\u3001\u622A\u6B62\u540E\u5B66\u751F\u4E0D\u80FD\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"),bt.createElement("div",null,"2\u3001\u672C\u64CD\u4F5C\u53EA\u5BF9\u201C\u63D0\u4EA4\u4E2D\u201D\u3001\u201C\u8865\u4EA4\u4E2D\u201D\u7684\u4F5C\u4E1A\u6709\u6548\u3002")),bt.createElement(ie.default,{form:ce,layout:"vertical"},bt.createElement(ie.default.Item,{name:"end_time",label:"\u622A\u6B62\u65F6\u95F4"},bt.createElement(Le.default,{style:{width:"100%"},disabledDate:_t=>(0,et.Q8)(_t,xt),disabledTime:_t=>(0,et.d0)(_t),placeholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:Ve()((0,he.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),!Nn&&bt.createElement(bt.Fragment,null,$t?bt.createElement("div",null,bt.createElement(It.default,{placeholder:"\u641C\u7D22\u73ED\u7EA7",onChange:_t=>{Ht(Ie.filter(tn=>tn.name.indexOf(_t.target.value)>-1))}}),bt.createElement(Jt.default,{style:{marginTop:"10px",height:"300px",overflow:"auto"},className:Ft.antdTable,rowSelection:{type:"checkbox",onChange:_t=>{Ct(_t)}},rowKey:"id",pagination:!1,dataSource:Ke,loading:be,columns:[{title:"\u73ED\u7EA7",dataIndex:"name"}]})):bt.createElement(fe.Z,{gutter:24},bt.createElement(ve.Z,{span:14},bt.createElement("div",{className:Ft.homeworkType},"\u4F5C\u4E1A\u622A\u6B62"),bt.createElement(It.default,{placeholder:"\u641C\u7D22\u73ED\u7EA7",onChange:_t=>{Me(Zn.filter(tn=>tn.name.indexOf(_t.target.value)>-1))}}),bt.createElement("div",{className:Ft.tableWrapper},bt.createElement(Jt.default,{style:{marginTop:"10px",height:"260px",overflow:"auto"},className:Ft.antdTable,rowSelection:{type:"checkbox",onChange:_t=>{Dn(_t)}},rowKey:"id",pagination:!1,dataSource:Wt,loading:be,columns:[{title:"\u73ED\u7EA7",dataIndex:"name",ellipsis:!0},{title:"\u53D1\u5E03\u65F6\u95F4",dataIndex:"publish_time"},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"end_time"}]}))),bt.createElement(ve.Z,{flex:10,style:{maxWidth:"280px"}},bt.createElement("div",{className:Ft.homeworkType},"\u8865\u4EA4\u622A\u6B62"),bt.createElement(It.default,{placeholder:"\u641C\u7D22\u73ED\u7EA7",onChange:_t=>{An(Ae.filter(tn=>tn.name.indexOf(_t.target.value)>-1))}}),bt.createElement("div",{className:Ft.tableWrapper},bt.createElement(Jt.default,{style:{marginTop:"10px",height:"260px",overflow:"auto",maxWidth:"280px"},className:Ft.antdTable,rowSelection:{type:"checkbox",onChange:_t=>{de(_t)}},rowKey:"id",pagination:!1,loading:be,dataSource:$e,columns:[{title:"\u73ED\u7EA7",dataIndex:"name",ellipsis:!0,width:120},{title:"\u622A\u6B62\u65F6\u95F4",dataIndex:"late_time"}]}))))))};var gt=(0,Rt.connect)(({shixunHomeworks:mt,classroomList:xt})=>({shixunHomeworks:mt,classroomList:xt}))(lt)},63205:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return Ve}});var bt=Nt(67294),ie={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},De=Nt(94184),Ne=Nt.n(De),Le=Nt(74330),It=Nt(15979),Jt=Nt(33170),fe=Nt(28706),ve=(he,Rt,Ft)=>new Promise((nt,et)=>{var ht=mt=>{try{gt(Ft.next(mt))}catch(xt){et(xt)}},lt=mt=>{try{gt(Ft.throw(mt))}catch(xt){et(xt)}},gt=mt=>mt.done?nt(mt.value):Promise.resolve(mt.value).then(ht,lt);gt((Ft=Ft.apply(he,Rt)).next())}),Ve=({data:he,className:Rt,fullWidth:Ft,style:nt={},onClose:et,onOk:ht,showFullTools:lt,noAssociationId:gt})=>{const mt=(0,bt.useRef)(null),xt=(0,bt.useRef)(null),Mt=(0,bt.useRef)(null),jt=(0,bt.useRef)(null),[Qt,ne]=(0,bt.useState)(!1),[qt,$t]=(0,bt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,bt.useEffect)(()=>(Mt.current||(Mt.current=document.createElement("style"),document.head.appendChild(Mt.current)),he!=null&&he.visible?(document.body.setAttribute("data-custom","y-hidden"),Mt.current.innerHTML=" html { overflow-y: hidden; }",he!=null&&he.src&&we()):(document.body.removeAttribute("data-custom"),Mt.current&&(document.head.removeChild(Mt.current),Mt.current=null)),()=>{document.body.removeAttribute("data-custom"),Mt.current&&(document.head.removeChild(Mt.current),Mt.current=null)}),[he==null?void 0:he.visible]);const we=()=>ve(void 0,null,function*(){ne(!0),$t("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Oe=yield(0,fe.ZJ)(he==null?void 0:he.src);mt.current.src="",mt.current.src=Oe,mt.current.onload=function(){Ge()},ne(!1),$t("")}),ce=Oe=>ve(void 0,null,function*(){ne(!0),$t("\u6B63\u5728\u4FDD\u5B58\u4E2D");const On=yield(0,Jt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:he.title,file:Oe.dataUrl}});On!=null&&On.id&&!gt?(yield(0,Jt.ZP)(`/api/attachments/${he.id}/add_subitem.json`,{method:"post",body:{subitem_id:On==null?void 0:On.id,settings:JSON.stringify(Oe.state)}})).status===0&&ht():On!=null&&On.id&&ht(On),ne(!1),$t("")}),be=()=>{const Oe=document.querySelector('a[href="https://markerjs.com/"]');Oe&&Oe.parentNode&&(Oe.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(Nn=>{const Sn=document.querySelector(Nn.name);Sn&&Sn.setAttribute("title",Nn.title)})},Ge=()=>{xt.current=new It.hP(mt.current),xt.current.targetRoot=jt.current,xt.current.addEventListener("render",ce),xt.current.addEventListener("beforeclose",et),lt&&(xt.current.availableMarkerTypes=xt.current.ALL_MARKER_TYPES,xt.current.uiStyleSettings.redoButtonVisible=!0,xt.current.uiStyleSettings.notesButtonVisible=!0,xt.current.uiStyleSettings.zoomButtonVisible=!0,xt.current.uiStyleSettings.zoomOutButtonVisible=!0,xt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=xt.current.uiStyleSettings,xt.current.show(),he!=null&&he.snapshotData&&xt.current.restoreState(he.snapshotData),setTimeout(()=>{window.scrollTo(0,0),be()},300)};return bt.createElement(bt.Fragment,null,(he==null?void 0:he.visible)&&bt.createElement(Le.Z,{spinning:Qt,tip:qt,style:{position:"absolute",width:"100vw"}},bt.createElement("div",{ref:jt,className:Ne()(ie.imageDimensions,Rt,Ft?ie.fullWidth:""),style:nt},bt.createElement("img",{className:ie.img,ref:mt}))))}},36527:function(En,jn,Nt){"use strict";var bt=Nt(67294),ie=Nt(71230),De=Nt(15746),Ne=Nt(55238),Le=Nt(85804),It=Nt(65226),Jt=Nt(71736),fe=Nt(84279),ve=Nt(67294);const xe=(0,bt.forwardRef)(({callback:Ve,showSaveButton:he,value:Rt=""},Ft)=>{const nt=(0,bt.useRef)(),et=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],ht=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r x=a + r\\text{cos}\\theta \\ \r y=b + r\\text{sin}\\theta \r \\end{matrix}\\right. `},{value:`\\begin{array}{l} \r \\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r \\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\left\\{\\begin{matrix} \r \\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r \\end{matrix}\\right. \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r \\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r a \\perp \\alpha \\ \r b \\perp \\alpha \r \\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r \\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r a \\parallel \\partial ,b \\parallel \\partial \r \\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r a \\perp m,a \\perp n \r \\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r \\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r a^{2}+b^{2}=c^{2} \r \\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r \\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r \\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r a,b \\in R^{+} \\ \r \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r a,b \\in R \\ \r \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r \\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r \\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r \\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r \\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r P \\left( \\emptyset \\right) =0 \\\\ \r P \\left( S \\right) =1 \r \\end{array}`},{value:`\\begin{array}{c} \r \\forall A \\in S \\\\ \r P \\left( A \\right) \\ge 0 \r \\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r \\end{array}`},{value:`\\begin{array}{c} \r P_{n}=n! \\\\ \r A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r \\end{array}`}]}]}],lt=xt=>{nt.current.setValue(nt.current.getValue()+" "+xt.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ve.createElement(ie.Z,{className:Jt.Z.lists,gutter:[10,10]},et.map((xt,Mt)=>ve.createElement(De.Z,{flex:"110px",className:Jt.Z.item},ve.createElement("div",null,ve.createElement(It.Z,{value:`$$${xt.value}$$`}),xt.name),ve.createElement("div",{className:Jt.Z.children},xt.children.map((jt,Qt)=>ve.createElement("div",{key:Qt},ve.createElement("h1",null,jt.name),ve.createElement(ie.Z,{gutter:[10,10]},jt.data.map((ne,qt)=>ve.createElement(De.Z,{key:qt,onClick:()=>lt(ne),className:Jt.Z.diamond},ve.createElement(It.Z,{value:"`$$"+ne.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ve.createElement(ie.Z,{className:Jt.Z.lists,gutter:[10,10]},ht.map((xt,Mt)=>ve.createElement(De.Z,{flex:"110px",className:Jt.Z.item},ve.createElement("div",null,ve.createElement(It.Z,{value:"`$$"+xt.value+"$$`"}),xt.name),ve.createElement("div",{className:Jt.Z.children},xt.children.map((jt,Qt)=>ve.createElement("div",{key:Qt},jt.name&&ve.createElement("h1",null,jt.name),ve.createElement(ie.Z,{gutter:[10,10]},jt.data.map((ne,qt)=>ve.createElement(De.Z,{key:qt,onClick:()=>lt(ne),className:Jt.Z.diamond},ve.createElement(It.Z,{value:"`$$"+ne.value+"$$`"}))))))))))}],mt=()=>{var xt=document.createElement("div");xt.innerHTML=nt.current.getValue();var Mt=xt.innerText;return Ve&&Ve(Mt),Mt};return(0,bt.useImperativeHandle)(Ft,()=>({getData:mt})),ve.createElement("div",{className:Jt.Z.mathWrap},ve.createElement(Ne.default,{defaultActiveKey:"1",items:gt}),ve.createElement("math-field",{locale:"zh_cn",className:Jt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Rt||""),he&&ve.createElement("div",{className:Jt.Z.button},ve.createElement(Le.ZP,{size:"large",onClick:mt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});jn.Z=xe},26194:function(En,jn,Nt){"use strict";var bt=Nt(67294),ie=Nt(4977),De=Nt(85804),Ne=Object.defineProperty,Le=Object.defineProperties,It=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,xe=(Ft,nt,et)=>nt in Ft?Ne(Ft,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Ft[nt]=et,Ve=(Ft,nt)=>{for(var et in nt||(nt={}))fe.call(nt,et)&&xe(Ft,et,nt[et]);if(Jt)for(var et of Jt(nt))ve.call(nt,et)&&xe(Ft,et,nt[et]);return Ft},he=(Ft,nt)=>Le(Ft,It(nt));const Rt=({img:Ft,buttonProps:nt={},styles:et={},customText:ht,ButtonText:lt,ButtonClick:gt,Buttonclass:mt,ButtonTwo:xt,imgStyles:Mt,loading:jt=!1,className:Qt=""})=>bt.createElement("section",{className:`tc animated fadeIn ${Qt}`,style:Ve({color:"#999",margin:"100px auto",visibility:jt?"hidden":"visible"},et)},bt.createElement("img",{src:Ft||ie,style:he(Ve({},Mt),{pointerEvents:"none",userSelect:"none"})}),bt.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&bt.createElement(De.ZP,Ve({className:mt,onClick:gt},nt),lt),xt&&xt);jn.Z=Rt},39717:function(En,jn,Nt){"use strict";Nt.d(jn,{Q:function(){return It}});var bt=Nt(67294),ie=Nt(88044),De=Nt(98813),Ne=Nt(37720),Le=Nt(67294),It=(fe=>(fe[fe.Number=1]="Number",fe[fe.Percent=2]="Percent",fe))(It||{});const Jt=({value:fe,onChange:ve,disabled:xe,hidePercentOption:Ve=!1,percentType:he="select"})=>{const Rt=(0,bt.useMemo)(()=>Ve?1:2,[Ve]),[Ft,nt]=(0,bt.useState)(Rt);console.log(Ft);const et=lt=>fe.type===1?`${lt}\u5206`:`${lt}%`,ht=(0,bt.useCallback)(lt=>{if(Ft===1){const gt=lt.replace("\u5206","");return isNaN(parseInt(gt,10))?0:gt}else return lt.replace("%","")},[Ft]);return(0,bt.useEffect)(()=>{nt(fe.type)},[fe]),Le.createElement("div",{style:{display:"flex",alignItems:"center"}},he=="select"&&Le.createElement(ie.default,{size:"large",onChange:lt=>{nt(lt),ve({type:lt,inputValue:lt===1?5:20})},value:Ft||Rt,style:{width:100},options:Ve?[{label:"\u5206\u503C",value:1}]:[{label:"\u767E\u5206\u6BD4",value:2},{label:"\u5206\u503C",value:1}],disabled:xe}),he=="radio"&&Le.createElement(De.ZP.Group,{size:"large",onChange:lt=>{const gt=lt.target.value;nt(gt),ve({type:gt,inputValue:gt===1?5:20})},value:Ft||Rt,disabled:xe},!Ve&&Le.createElement(De.ZP,{value:2,style:{marginRight:"50px"}},"\u767E\u5206\u6BD4\u6263\u5206"),Le.createElement(De.ZP,{value:1},"\u56FA\u5B9A\u5206\u503C")),he=="radio"&&Le.createElement("div",{style:{marginRight:"10px",color:"#000000"}},fe.type==2?"\u6263\u9664\u8865\u4EA4\u9636\u6BB5\u5F97\u5206\u7684":"\u6263\u9664\u603B\u6210\u7EE9\u7684"),Le.createElement(Ne.Z,{size:"large",disabled:xe,value:fe.inputValue,style:{width:"120px"},parser:ht,addonAfter:fe.type===1?"\u5206":"%",max:Ft===2?100:Number.MAX_SAFE_INTEGER,min:0,precision:0,onChange:lt=>{ve({type:Ft,inputValue:lt})}}),he=="radio"&&fe.type==2&&Le.createElement("div",{style:{marginLeft:"10px",color:"#000000"}},"\u5206\u6570"))};jn.Z=Jt},20819:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return mt}});var bt=Nt(67294),ie={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},De=Nt(85804),Ne=Nt(30153),Le=Nt(36295),It=Nt(83062),Jt=Nt(28706),fe=Nt(15835),ve=Nt(26194),xe=Nt(11320),Ve=Nt(66540),he=Nt(67294),Rt=Object.defineProperty,Ft=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,ht=(xt,Mt,jt)=>Mt in xt?Rt(xt,Mt,{enumerable:!0,configurable:!0,writable:!0,value:jt}):xt[Mt]=jt,lt=(xt,Mt)=>{for(var jt in Mt||(Mt={}))nt.call(Mt,jt)&&ht(xt,jt,Mt[jt]);if(Ft)for(var jt of Ft(Mt))et.call(Mt,jt)&&ht(xt,jt,Mt[jt]);return xt},gt=(xt,Mt,jt)=>new Promise((Qt,ne)=>{var qt=ce=>{try{we(jt.next(ce))}catch(be){ne(be)}},$t=ce=>{try{we(jt.throw(ce))}catch(be){ne(be)}},we=ce=>ce.done?Qt(ce.value):Promise.resolve(ce.value).then(qt,$t);we((jt=jt.apply(xt,Mt)).next())}),mt=({editOffice:xt="view",data:Mt,issaver:jt,onSaver:Qt,theme:ne,type:qt,filename:$t,monacoEditor:we,className:ce,style:be,close:Ge,onClose:Oe,hasMask:On,disabledDownload:Nn,onImgDimensions:Sn,showNodata:Zn,recordInfo:re})=>{const[Wt,Me]=(0,bt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[ln,Dn]=(0,bt.useState)(""),[Ae,pn]=(0,bt.useState)(),$e=window.ENV==="build"?"/react/build":"",An=location.host.startsWith("localhost")?xe.Z.PROXY_SERVER:xe.Z.API_SERVER,de=10*(1024*1024),Ie=(0,bt.useRef)();Mt!=null&&Mt.startsWith("/api")&&qt!=="txt"&&(Mt=xe.Z.API_SERVER+Mt);const cn=Dt=>Dt.substring(Dt.lastIndexOf("/")+1).split(".").pop();$t&&we&&(we.filename=$t),(0,bt.useEffect)(()=>{var Dt,Zt;const kt=(Zt=(Dt=document.cookie)==null?void 0:Dt.replace(/\s/g,""))==null?void 0:Zt.split(";");kt==null||kt.map(_t=>{let tn=_t.split("=");tn[0]==="_educoder_session"&&Dn(tn[1])})},[]),(0,bt.useEffect)(()=>{qt==="office"&&(Mt.indexOf("bigfilescdn.")>-1||Mt.indexOf("bigfiles1")>-1?pn({url:Mt,fileType:cn(Mt),model:Mt.indexOf("model=edit")?"edit":"view"}):Ht())},[qt,Mt]);function Ke(Dt){return gt(this,null,function*(){Dt.data.type==="pdfdata"&&(Qt(Dt.data.data),window.removeEventListener("message",Ke,!1)),console.log("mess---:",Dt.data)})}const Ht=()=>gt(void 0,null,function*(){console.log("data:",Mt);let Dt=Mt;Mt.startsWith("http")||(Dt=location.origin+Dt);let Zt=new URL(Dt).pathname.split("/").pop();const kt=yield(0,fe.gJ)({attachment_id:Zt});kt.url=An+kt.url,pn(kt)}),Lt=()=>{if(Mt.startsWith("http")||Mt.startsWith("blob:")){Ct();return}(0,Jt.Sv)($t||"educoder",Mt,$t)},Ct=()=>{re&&(0,Ve.fc)({id:re==null?void 0:re.id,watch_type:1,course_id:re==null?void 0:re.course_id}),(0,Jt.Nd)($t||"educoder",decodeURIComponent(Mt))};return he.createElement("div",{style:lt({},be||{}),className:`${On&&ie.bgBlack} ${qt?ie.wrp:"hide"}`},Ge&&he.createElement("div",{className:ie.close,ref:Ie},!!Sn&&he.createElement(It.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ie.current},he.createElement("span",{onClick:()=>{Oe(),Sn()}},he.createElement("i",{className:"icon-yulanpizhu"}))),!Nn&&he.createElement(It.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ie.current},he.createElement("span",{onClick:Ct},he.createElement("i",{className:"icon-quxiaozhiding"}))),jt&&he.createElement(It.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ie.current},he.createElement("span",{className:"",onClick:()=>{const Dt=document.getElementById("pdfiframe");window.addEventListener("message",Ke,!1),setTimeout(()=>{Dt.contentWindow.postMessage("getData","*")},300)}},he.createElement("i",{className:"icon-baocun"}))),he.createElement(It.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ie.current},he.createElement("span",{className:"",onClick:()=>{Oe()}},he.createElement("i",{className:"icon-guanbi1"})))),he.createElement("div",{className:`${ie[ce]} ${ce} ${ie.monaco} ${qt==="txt"?"show":"hide"}`},qt==="txt"&&he.createElement(he.Fragment,null,he.createElement(Le.ZP,lt({},we)))),qt==="audio"&&he.createElement("audio",{src:`${(Mt==null?void 0:Mt.indexOf("http://"))>-1||(Mt==null?void 0:Mt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Mt}`,autoPlay:!0}),qt==="video"&&he.createElement(he.Fragment,null,(Mt==null?void 0:Mt.indexOf("http"))>-1?he.createElement("video",{controls:!0,src:`${Mt}`,autoPlay:!0}):he.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Mt}`,autoPlay:!0})),qt==="office"&&Ae&&he.createElement("iframe",{src:`${$e}/office.html?key=${Ae.key}&url=${btoa(Ae.url)}&callbackUrl=${An+(Ae.callbackUrl||"")}&fileType=${Ae.fileType}&title=${Ae.title||""}&model=${xt}&officeServer=${xe.Z.ONLYOFFICE}&disabledDownload=${!!Nn}`}),qt==="html"&&he.createElement("iframe",{src:Mt+"&disposition=inline"}),qt==="pdf"&&he.createElement("iframe",{id:"pdfiframe",src:`${$e}/js/pdfview/index.html?filename=${$t||"educoder.pdf"}&url=${encodeURIComponent(Mt)}&disabledDownload=${!!Nn}&model=${xt}`}),qt==="image"&&he.createElement("img",{src:`${(Mt==null?void 0:Mt.indexOf("http://"))>-1||(Mt==null?void 0:Mt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Mt}`}),(qt==="other"||qt==="download")&&he.createElement(he.Fragment,null,Zn?he.createElement(ve.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:he.createElement(De.ZP,{icon:he.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Lt,disabled:Nn},"\u4E0B\u8F7D")}):he.createElement(De.ZP,{type:"primary",size:"middle",onClick:Lt,disabled:Nn},he.createElement(Ne.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},65226:function(En,jn,Nt){"use strict";Nt.d(jn,{z:function(){return qt},Z:function(){return $t}});var bt=Nt(67294),ie=Nt(81897),De=Nt(51161),Ne=Nt(11771),Le=Nt(67631),It=Nt.n(Le),Jt=Nt(11320),fe=Nt(28706),ve=Nt(20527),xe=Nt(25934),Ve=Nt(20819),he=Nt(67294),Ft=({html:we})=>{const ce=(0,bt.useRef)(null),be=(0,bt.useRef)(null),Ge=`.markdown-body p { margin: 0 0 16px 0 !important; line-height: 28px; white-space: pre-wrap; } ol, ul, li { list-style-type: none } ol, ul, dl { margin-bottom: 0px; } .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #333; overflow: hidden; font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif; word-break: break-word; font-size: 16px; line-height: 1.6; white-space: normal; word-wrap: break-word; position: relative; } .markdown-body ul>li { list-style-type: disc; } .markdown-body ol>li { list-style-type: decimal; } .markdown-body a { background: transparent; } .markdown-body a:active, .markdown-body a:hover { outline: 0; } .markdown-body strong { font-weight: bold; } .markdown-body h1 { font-size: 2em; margin: 0.67em 0; } .markdown-body img { border: 0; } .markdown-body hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } .markdown-body pre { overflow: auto; } .markdown-body code, .markdown-body kbd, .markdown-body pre { font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; font-size: 1em; } .markdown-body input { color: inherit; font: inherit; margin: 0; } .markdown-body html input[disabled] { cursor: default; } .markdown-body input { line-height: normal; } .markdown-body input[type="checkbox"] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } .markdown-body table { border-collapse: collapse; border-spacing: 0; } .markdown-body td, .markdown-body th { padding: 0; } .markdown-body * { -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body input { font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; } .markdown-body a { color: #4183c4; text-decoration: none; } .markdown-body a:hover, .markdown-body a:active { text-decoration: underline; } .markdown-body hr { height: 0; margin: 15px 0; overflow: hidden; background: transparent; border: 0; border-bottom: 1px solid #ddd; } .markdown-body hr:before { display: table; content: ""; } .markdown-body hr:after { display: table; clear: both; content: ""; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin-top: 15px; margin-bottom: 15px; line-height: 1.1; } .markdown-body h1 { font-size: 30px; } .markdown-body h2 { font-size: 21px; } .markdown-body h3 { font-size: 16px; } .markdown-body h4 { font-size: 14px; } .markdown-body h5 { font-size: 12px; } .markdown-body h6 { font-size: 11px; } .markdown-body blockquote { margin: 0; } .markdown-body ul, .markdown-body ol { padding: 0; margin-top: 0; margin-bottom: 0; } ul.linenums, ol.linenums { padding: 16px 0 0 56px !important; } .markdown-body ul, .markdown-body ol { padding-left: 2em; } .markdown-body ol ol, .markdown-body ul ol { list-style-type: lower-roman; } .markdown-body ul ul ol, .markdown-body ul ol ol, .markdown-body ol ul ol, .markdown-body ol ol ol { list-style-type: lower-alpha; } .markdown-body dd { margin-left: 0; } .markdown-body code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-body .octicon { font: normal normal 16px octicons-anchor; line-height: 1; display: inline-block; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .markdown-body .octicon-link:before { content: '\f05c'; } .markdown-body>*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !important; } .markdown-body .anchor { position: absolute; top: 0; left: 0; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; } .markdown-body .anchor:focus { outline: none; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; margin-top: 1em; margin-bottom: 16px; font-weight: bold; line-height: 1.4; } .markdown-body h1 .octicon-link, .markdown-body h2 .octicon-link, .markdown-body h3 .octicon-link, .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { display: none; color: #000; vertical-align: middle; } .markdown-body h1:hover .anchor, .markdown-body h2:hover .anchor, .markdown-body h3:hover .anchor, .markdown-body h4:hover .anchor, .markdown-body h5:hover .anchor, .markdown-body h6:hover .anchor { padding-left: 8px; margin-left: -30px; text-decoration: none; } .markdown-body h1:hover .anchor .octicon-link, .markdown-body h2:hover .anchor .octicon-link, .markdown-body h3:hover .anchor .octicon-link, .markdown-body h4:hover .anchor .octicon-link, .markdown-body h5:hover .anchor .octicon-link, .markdown-body h6:hover .anchor .octicon-link { display: inline-block; } .markdown-body h1 { padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid #eee; } .markdown-body h1 .anchor { line-height: 1; } .markdown-body h2 { padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; } .markdown-body h2 .anchor { line-height: 1; } .markdown-body h3 { font-size: 1.5em; line-height: 1.43; } .markdown-body h3 .anchor { line-height: 1.2; } .markdown-body h4 { font-size: 1.25em; } .markdown-body h4 .anchor { line-height: 1.2; } .markdown-body h5 { font-size: 1em; } .markdown-body h5 .anchor { line-height: 1.1; } .markdown-body h6 { font-size: 1em; color: #777; } .markdown-body h6 .anchor { line-height: 1.1; } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; } .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, .markdown-body ol ul { margin-top: 0; margin-bottom: 0; } .markdown-body li>p { margin-top: 16px; } .markdown-body dl { padding: 0; } .markdown-body dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: bold; } .markdown-body dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-body blockquote { padding: 0 15px; color: #777; border-left: 4px solid #ddd; } .markdown-body blockquote> :first-child { margin-top: 0; } .markdown-body blockquote> :last-child { margin-bottom: 0; } .markdown-body table { display: block; width: 100%; overflow: auto; word-break: normal; word-break: keep-all; } .markdown-body table th { font-weight: bold; text-align: revert; } .markdown-body table th, .markdown-body table td { padding: 6px 13px; border: 1px solid #ddd; } .markdown-body table tr { background-color: #fff; border-top: 1px solid #ccc; } .markdown-body table tr:nth-child(2n) { background-color: #f8f8f8; } .markdown-body img { max-width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body code { padding: 0; padding-top: 0.2em; padding-bottom: 0.2em; margin: 0; font-size: 85%; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; } .markdown-body code:has(.katex) { background-color: transparent; } .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; content: "\\00a0"; } .markdown-body pre>code { padding: 0; margin: 0; font-size: 100%; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-body .highlight { margin-bottom: 16px; } .markdown-body .highlight pre, .markdown-body pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f7f7f7; border-radius: 3px; } .markdown-body .highlight pre { margin-bottom: 0; word-break: normal; } .markdown-body pre { word-wrap: normal; } .markdown-body pre code { display: inline; max-width: initial; padding: 0; margin: 0; overflow: initial; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-body pre code:before, .markdown-body pre code:after { content: normal; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font-size: 11px; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .pl-c { color: #969896; } .markdown-body .pl-c1, .markdown-body .pl-mdh, .markdown-body .pl-mm, .markdown-body .pl-mp, .markdown-body .pl-mr, .markdown-body .pl-s1 .pl-v, .markdown-body .pl-s3, .markdown-body .pl-sc, .markdown-body .pl-sv { color: #0086b3; } .markdown-body .pl-e, .markdown-body .pl-en { color: #795da3; } .markdown-body .pl-s1 .pl-s2, .markdown-body .pl-smi, .markdown-body .pl-smp, .markdown-body .pl-stj, .markdown-body .pl-vo, .markdown-body .pl-vpf { color: #333; } .markdown-body .pl-ent { color: #63a35c; } .markdown-body .pl-k, .markdown-body .pl-s, .markdown-body .pl-st { color: #a71d5d; } .markdown-body .pl-pds, .markdown-body .pl-s1, .markdown-body .pl-s1 .pl-pse .pl-s2, .markdown-body .pl-sr, .markdown-body .pl-sr .pl-cce, .markdown-body .pl-sr .pl-sra, .markdown-body .pl-sr .pl-sre, .markdown-body .pl-src { color: #df5000; } .markdown-body .pl-mo, .markdown-body .pl-v { color: #1d3e81; } .markdown-body .pl-id { color: #b52a1d; } .markdown-body .pl-ii { background-color: #b52a1d; color: #f8f8f8; } .markdown-body .pl-sr .pl-cce { color: #63a35c; font-weight: bold; } .markdown-body .pl-ml { color: #693a17; } .markdown-body .pl-mh, .markdown-body .pl-mh .pl-en, .markdown-body .pl-ms { color: #1d3e81; font-weight: bold; } .markdown-body .pl-mq { color: #008080; } .markdown-body .pl-mi { color: #333; font-style: italic; } .markdown-body .pl-mb { color: #333; font-weight: bold; } .markdown-body .pl-md, .markdown-body .pl-mdhf { background-color: #ffecec; color: #bd2c00; } .markdown-body .pl-mdht, .markdown-body .pl-mi1 { background-color: #eaffea; color: #55a532; } .markdown-body .pl-mdr { color: #795da3; font-weight: bold; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .task-list-item { list-style-type: none; } .markdown-body .task-list-item+.task-list-item { margin-top: 3px; } .markdown-body .task-list-item input { float: left; margin: 0.3em 0 0.25em -1.6em; vertical-align: middle; } .markdown-body :checked+.radio-label { z-index: 1; position: relative; border-color: #4183c4; } /*! Pretty printing styles. Used with prettify.js. */ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000 } /* plain text */ @media screen { .str { color: #080 } /* string content */ .kwd { color: #008 } /* a keyword */ .com { color: #800 } /* a comment */ .typ { color: #606 } /* a type name */ .lit { color: #066 } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660 } .tag { color: #008 } /* a markup tag name */ .atn { color: #606 } /* a markup attribute name */ .atv { color: #080 } /* a markup attribute value */ .dec, .var { color: #606 } /* a declaration; a variable name */ .fun { color: red } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060 } .kwd { color: #006; font-weight: bold } .com { color: #600; font-style: italic } .typ { color: #404; font-weight: bold } .lit { color: #044 } .pun, .opn, .clo { color: #440 } .tag { color: #006; font-weight: bold } .atn { color: #404 } .atv { color: #060 } } /* Put a border around prettyprinted code snippets. */ pre.prettyprint { padding: 2px; /* border: 1px solid #888 */ } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: none } /* Alternate shading for lines */ li.L1, li.L3, li.L5, li.L7, li.L9 { background: #eee } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; }`;return(0,bt.useEffect)(()=>{const Oe=ce.current.attachShadow({mode:"open"});be.current=document.createElement("div"),be.current.className="markdown-body",be.current.innerHTML=we,Oe.appendChild(be.current);const On=document.createElement("style");return On.textContent=Ge,Oe.appendChild(On),()=>{Oe.innerHTML=""}},[]),(0,bt.useEffect)(()=>{be.current&&(be.current.innerHTML=we)},[we]),he.createElement("div",{ref:ce})};function nt(we){const ce=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],be=new RegExp(`\\b(${ce.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return we.replace(be,"").trim()}var et=Object.defineProperty,ht=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,mt=(we,ce,be)=>ce in we?et(we,ce,{enumerable:!0,configurable:!0,writable:!0,value:be}):we[ce]=be,xt=(we,ce)=>{for(var be in ce||(ce={}))lt.call(ce,be)&&mt(we,be,ce[be]);if(ht)for(var be of ht(ce))gt.call(ce,be)&&mt(we,be,ce[be]);return we};const Mt="@\u2581\u2581@",jt="@\u2581@",Qt=/]*>/g;function ne(we){let ce=document.createElement("div");return ce.innerHTML=we,ce.childNodes.length===0?"":ce.childNodes[0].nodeValue}const qt=(we,ce)=>{we=we||"";const be=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ge=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Oe=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,On=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ce?we.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(be,(Nn,Sn,Zn,re,Wt,Me,ln)=>{const Dn=Sn||re||Me,Ae=Zn||Wt||ln||"?";return Jt.Z.API_SERVER+"/api/attachments/"+Dn+Ae+"&t="+(0,fe.Jn)(Dn,Date.now())+(Nn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(we=we.replace(On,(Nn,Sn,Zn,re,Wt,Me,ln)=>{const Dn=Sn||re||Me,Ae=Zn||Wt||ln||"?";return Jt.Z.API_SERVER+"/attachments/download/"+Dn+Ae+"&t="+(0,fe.Jn)(Dn,Date.now())+(Nn.indexOf(")")>-1?")":"&")}).replace(be,(Nn,Sn,Zn,re,Wt,Me,ln)=>{const Dn=Sn||re||Me,Ae=Zn||Wt||ln||"?";return Jt.Z.API_SERVER+"/api/attachments/"+Dn+Ae+"&t="+(0,fe.Jn)(Dn,Date.now())+(Nn.indexOf(")")>-1?")":"&")}).replace(Ge,(Nn,Sn,Zn,re,Wt)=>{const Me=Sn||re,ln=Zn||Wt||"";return'"'+Jt.Z.API_SERVER+"/api/attachments/"+Me+ln+Me+ln+"&t="+(0,fe.Jn)(Me,Date.now())}).replace(Oe,(Nn,Sn,Zn,re,Wt)=>{const Me=Sn||re,ln=Zn||Wt||"";return"("+Jt.Z.API_SERVER+"/files/uploads/"+Me+ln+Me+ln+"&t="+(0,fe.Jn)(Me,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `),we)};var $t=({value:we="",className:ce,showTextOnly:be,showLines:Ge,style:Oe={},stylesPrev:On={},highlightKeywords:Nn,showProgramFill:Sn,isProgramFill:Zn,disabledFill:re=!1,programFillValue:Wt,onFillChange:Me=Ae=>{},onFillBlur:ln=()=>{},onFillFocus:Dn=()=>{}})=>{let Ae=nt(String(we||""));const[pn,$e]=(0,bt.useState)(""),[An,Fe]=(0,bt.useState)("office"),[de,Ie]=(0,bt.useState)([]),cn=(0,bt.useRef)("a"+(0,xe.Z)()),Ke={},Ht=je=>//i.test(je||""),Lt=(je,In,ti)=>{const Ii=document.createElement(je===jt?"input":"textarea");Ii.style.width="100%",Ii.style.height=je===jt?"40px":"151px",Ii.rows=5,Ii.spellcheck=!1,Ii.name="edu-program-fill",Ii.placeholder="\u8BF7\u8F93\u5165",Ii.dataset.id=In;const ni=Object.keys(Ke).length;return Ke[ni]=Ii,`${Ii.outerHTML}`};function Ct(je){return je=je.replace(/!\[.*?\]\(.*?\)/g,""),je=je.replace(/\[.*?\]\(.*?\)/g,""),je=je.replace(new RegExp("","gs"),""),je=je.replace(//g,""),je=je.replace(//g,""),je=je.replace(new RegExp(".*?<\\/video>","gs"),""),je=je.replace(new RegExp(".*?<\\/audio>","gs"),""),je=je.replace(new RegExp(".*?<\\/style>","gs"),""),je=je.replace(new RegExp(".*?<\\/script>","gs"),""),je}const Dt=je=>!be&&Ht(Ae)?je:je.replace(/([\s\S]+?)<\/style>/gim,function(In,ti){let Ii=ti.replace(/(\n|\r)/g,"").split("}"),ni=[];return Ii.map(Pi=>{Pi!=""&&ni.push(`.${cn.current} ${Pi}`)}),``}),Zt=(0,bt.useMemo)(()=>{try{const Ii=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,ni=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Pi=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Zi=/\(\/attachments\/download\//g;Ae=Ae.replace(Zi,"("+Jt.Z.API_SERVER+"/attachments/download/").replace(Ii,"("+Jt.Z.API_SERVER+"/api/attachments/").replace(ni,'"'+Jt.Z.API_SERVER+"/api/attachments/").replace(Pi,'"'+Jt.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(Ii){}if(Sn){let Ii=-1;return Ae=Ae.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(ni,Pi,Zi){var ii;return++Ii,Lt(ni,Ii,(ii=Wt==null?void 0:Wt[Ii])==null?void 0:ii.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Dt(Ae||"")}
`}let je=Dt(Ae);je=(0,De.ZP)(je);const In=(0,De.ez)();Ae.match(/\[TOC\]/)&&(je=je.replace("

[TOC]

",(0,De.Qv)()),(0,De.Iy)()),je=je.replace(/(__special_katext_id_\d+__)/g,(Ii,ni)=>{const{type:Pi,expression:Zi}=In[ni];return(0,ve.renderToString)(ne(Zi)||"",{displayMode:Pi==="block",throwOnError:!1,output:"html"})}),je=je.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,De.AL)();const ti=document.createElement("div");if(ti.innerHTML=je,be)return ti.innerText;if(Nn){const Ii=Nn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return an(ti,Ii),ti.innerHTML}return setTimeout(()=>Pn(),500),ti.innerHTML},[Ae,Nn]);(0,bt.useEffect)(()=>{_n.current&&_n.current.querySelectorAll(["input","textarea"]).forEach(In=>{In.oninput=kt,In.onblur=_t,In.onfocus=tn})},[de]),(0,bt.useEffect)(()=>{var je,In,ti,Ii,ni;if(Wt!=null&&Wt.length)try{const Pi=_n.current.querySelectorAll(".edu-program-fill-score"),Zi=_n.current.querySelectorAll('[name="edu-program-fill"]');for(const[ii,ci]of Zi.entries())ci.value=((je=Wt==null?void 0:Wt[ii])==null?void 0:je.value)||"",((In=Wt==null?void 0:Wt[ii])==null?void 0:In.type)==="warning"?ci.className="program-fill-warning":((ti=Wt==null?void 0:Wt[ii])==null?void 0:ti.type)==="success"?ci.className="program-fill-success":ci.className="";for(const[ii,ci]of Pi.entries())ci.innerHTML=(Ii=Wt==null?void 0:Wt[ii])!=null&&Ii.score?`${(ni=Wt==null?void 0:Wt[ii])==null?void 0:ni.score}\u5206`:"";Ie(Wt)}catch(Pi){console.log(Pi,"error")}},[Wt]);const kt=je=>{de[je.target.dataset.id]=de[je.target.dataset.id]||{},de[je.target.dataset.id].value=je.target.value,Ie([...de]),Me(de,je.target.dataset.id)},_t=je=>{de[je.target.dataset.id]=de[je.target.dataset.id]||{},de[je.target.dataset.id].value=je.target.value,Ie([...de]),ln(de,je.target.dataset.id)},tn=je=>{de[je.target.dataset.id]=de[je.target.dataset.id]||{},de[je.target.dataset.id].value=je.target.value,Ie([...de]),Dn(de,je.target.dataset.id)};function an(je,In){return je.childNodes.forEach(ti=>{var Ii;if(ti.childNodes.length>0)an(ti,In);else if(ti.nodeName!=="IMG")if(ti.innerHTML)ti.innerHTML=(Ii=ti.innerHTML)==null?void 0:Ii.replace(new RegExp(In,"gi"),'$&');else{const ni=document.createElement("span");ni.innerHTML=ti.textContent.replace(new RegExp(In,"gi"),'$&'),ti.replaceWith(ni)}})}const _n=(0,bt.useRef)();De.jb.WebkitLineClamp=Ge,Ge&&(Oe=xt(xt({},Oe),De.jb));function nn(je){let In=je.target;if(In.tagName.toUpperCase()==="A"){let ti=In.getAttribute("href");if(ti.indexOf("office")>-1)je.preventDefault(),$e(ti),Fe("office");else if(ti.indexOf("application/pdf")>-1)je.preventDefault(),$e(ti),Fe("pdf");else if(ti.indexOf("text/html")>-1)je.preventDefault(),$e(ti),Fe("html");else if(ti.startsWith("#")){je.preventDefault();let Ii=document.getElementById(ti.replace("#",""));Ii&&Ii.scrollIntoView(!0)}}}const Pn=()=>{var je;const In=(je=_n.current)==null?void 0:je.querySelectorAll("video");In==null||In.forEach(ti=>{if(ti.oncontextmenu=()=>!1,ti.src.indexOf(".m3u8")>-1&&!ti.canPlayType("application/vnd.apple.mpegurl")){if(It().isSupported()){var Ii=new(It());Ii.loadSource(ti.src),Ii.attachMedia(ti)}}})};return(0,bt.useEffect)(()=>{if(_n.current&&Zt&&Zt.match(Qt)&&window.PR.prettyPrint(),_n.current)return _n.current.addEventListener("click",nn),()=>{var je;(je=_n.current)==null||je.removeEventListener("click",nn),(0,De.AL)(),(0,De.Iy)()}},[Zt,_n.current,nn]),(0,bt.useEffect)(()=>{var je;const In=ti=>{ti.preventDefault(),ti.clipboardData.setData("text",window.getSelection().toString())};return(je=_n.current)==null||je.addEventListener("copy",In),()=>{var ti;(ti=_n.current)==null||ti.removeEventListener("copy",In)}},[_n.current]),bt.createElement(bt.Fragment,null,be&&bt.createElement("div",{ref:_n},Zt),!be&&!Ht(Zt)&&bt.createElement("div",{ref:_n,style:xt({},Oe),className:`${ce||""} ${re?"disabled-fill":""} markdown-body ${cn.current}`,dangerouslySetInnerHTML:{__html:Zt}}),!be&&Ht(Zt)&&bt.createElement(Ft,{html:Zt}),bt.createElement(Ve.Z,{close:!0,data:pn,type:pn!=null&&pn.length?An:"",style:xt({},On),onClose:()=>$e("")}))}},96332:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return fe}});var bt=Nt(67294),ie={flex_box_center:"flex_box_center___rQJfc",flex_space_between:"flex_space_between___MDW24",flex_box_vertical_center:"flex_box_vertical_center___RZbAv",flex_box_center_end:"flex_box_center_end___ILhJA",flex_box_column:"flex_box_column___Fmij7",orangeColor:"orangeColor___U5vU6",redColor:"redColor___qYa6X",statustitle:"statustitle___pTBLm",statusbody:"statusbody___qUPQx",flex:"flex___VtL45"},De=Nt(62844),Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",Le="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",It=(ve,xe,Ve)=>new Promise((he,Rt)=>{var Ft=ht=>{try{et(Ve.next(ht))}catch(lt){Rt(lt)}},nt=ht=>{try{et(Ve.throw(ht))}catch(lt){Rt(lt)}},et=ht=>ht.done?he(ht.value):Promise.resolve(ht.value).then(Ft,nt);et((Ve=Ve.apply(ve,xe)).next())}),fe=({type:ve,resdata:xe,onok:Ve,oktext:he,okloading:Rt})=>{const[Ft,nt]=(0,bt.useState)(!1),{can_copy_list:et,can_copy_num:ht,challenge_type:lt,course_data_list:gt,no_copy_list:mt,no_copy_num:xt,no_use_list:Mt,no_use_num:jt,repeat_shixun_num:Qt,student_count:ne,total_num:qt,use_num:$t}=xe;let we=ht>0||ve==="exercise";(0,bt.useEffect)(()=>{(xe==null?void 0:xe.student_count)>0&&nt(!0)},[xe]),console.log("---11",Rt),(0,bt.useEffect)(()=>{Rt||nt(!1)},[Rt]);const ce=()=>{if(ve==="exercise"&<===1)return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709",bt.createElement("span",{className:ie.orangeColor},ne),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",bt.createElement("span",{className:ie.orangeColor},$t),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u4F5C\u7B54\u5DF2\u6311\u6218\u8FC7\u7684\u5B9E\u8BAD\u9898\u3002"));if(ve==="exercise"&<===2)return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709",bt.createElement("span",{className:ie.orangeColor},ne),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",bt.createElement("span",{className:ie.orangeColor},$t),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ve==="shixun"&<===1)return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709",bt.createElement("span",{className:ie.orangeColor},ne),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ve==="shixun"&<===2)return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709",bt.createElement("span",{className:ie.orangeColor},ne),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ve==="subject"&<===1)return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709",bt.createElement("span",{className:ie.orangeColor},ne),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",bt.createElement("span",{className:ie.orangeColor},$t),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ve==="subject"&<===2)return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",bt.createElement("span",{className:ie.orangeColor},ne)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",bt.createElement("span",{className:ie.orangeColor},$t)," \u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ve==="exercisepush")return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709",bt.createElement("span",{className:ie.orangeColor},ne),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",bt.createElement("span",{className:ie.orangeColor},$t),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u5728\u5F53\u524D\u8003\u8BD5\u4E2D\u8FDB\u884C\u4F5C\u7B54\u3002"));if(ve==="shixunpush"&<===1)return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709",bt.createElement("span",{className:ie.orangeColor},ne),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",bt.createElement("span",{className:ie.orangeColor},$t),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ve==="shixunpush"&<===2)return bt.createElement(bt.Fragment,null,"\u8BFE\u5802\u5185\u6709",bt.createElement("span",{className:ie.orangeColor},ne),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",bt.createElement("span",{className:ie.orangeColor},$t),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",bt.createElement("span",{className:ie.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},be=()=>{if(ve==="exercise"||ve==="subject"||ve==="exercisepush"||ve==="shixunpush")return bt.createElement("div",{style:{marginTop:20}},xt>0&&bt.createElement("div",null,bt.createElement("span",{className:ie.flex},bt.createElement("img",{src:Le,style:{width:14}}),bt.createElement("span",{className:ie.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),bt.createElement("div",{className:ie.statusbody},ve==="exercise"&&bt.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",bt.createElement("span",{className:ie.redColor},"\u4EE5\u4E0B\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\u3002"),"\u60A8\u4E5F\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),(ve==="subject"||ve==="exercisepush")&&bt.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",we&&bt.createElement("span",{className:ie.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ve==="shixunpush"&&bt.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",we&&bt.createElement("span",{className:ie.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u5EFA\u8BAE\u60A8\u91CD\u65B0\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE\u518D\u53D1\u5E03\u4F5C\u4E1A\uFF0C\u4E5F\u53EF\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),bt.createElement("div",null,mt==null?void 0:mt.map((Ge,Oe)=>bt.createElement("a",{href:`/shixuns/${Ge.identifier}/challenges`,target:"_blank"},"\u300A",Ge==null?void 0:Ge.name,"\u300B",Oe+1!==xt&&"\u3001"))))),ht>0&&bt.createElement("div",{style:{marginTop:20}},bt.createElement("span",{className:ie.flex},bt.createElement("img",{src:Ne,style:{width:14}}),bt.createElement("span",{className:ie.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),bt.createElement("div",{className:ie.statusbody},ve==="exercise"&&bt.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u8BD5\u5377\u4E2D\u7684\u539F\u8BD5\u9898\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),(ve==="subject"||ve==="exercisepush")&&bt.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ve==="shixunpush"&&bt.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u5F53\u524D\u4F5C\u4E1A\u4E2D\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),bt.createElement("div",null,et==null?void 0:et.map((Ge,Oe)=>bt.createElement("a",{href:`/shixuns/${Ge.identifier}/challenges`,target:"_blank"},"\u300A",Ge==null?void 0:Ge.name,"\u300B",Oe+1!==ht&&"\u3001"))))));if(ve==="shixun")return bt.createElement("div",{style:{marginTop:20}},ht>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return bt.createElement(De.default,{open:Ft,onCancel:()=>{nt(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!we&&"none"}},zIndex:1003,confirmLoading:Rt,okText:we?he:"\u6211\u77E5\u9053\u4E86",onOk:()=>It(void 0,null,function*(){we?yield Ve([...et,...Mt]):nt(!1)})},bt.createElement("div",{style:{maxHeight:600,overflow:"auto"}},ce(),be()))}},57444:function(En,jn,Nt){"use strict";Nt.d(jn,{h:function(){return xt}});var bt=Nt(67294),ie=Nt(88044),De=Nt(91773),Ne=Nt(85804),Le=Nt(4631),It=Nt.n(Le),Jt=Nt(71749),fe=Nt(30483),ve=Object.defineProperty,xe=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,nt=(Mt,jt,Qt)=>jt in Mt?ve(Mt,jt,{enumerable:!0,configurable:!0,writable:!0,value:Qt}):Mt[jt]=Qt,et=(Mt,jt)=>{for(var Qt in jt||(jt={}))Rt.call(jt,Qt)&&nt(Mt,Qt,jt[Qt]);if(he)for(var Qt of he(jt))Ft.call(jt,Qt)&&nt(Mt,Qt,jt[Qt]);return Mt},ht=(Mt,jt)=>xe(Mt,Ve(jt));const lt=ie.default.Option,gt={labelCol:{span:4},wrapperCol:{span:20}},mt={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};jn.Z=({callback:Mt,onCancel:jt})=>{const[Qt,ne]=(0,bt.useState)("python");function qt(we){ne(mt[we][1])}function $t(we){Mt(we)}return bt.createElement(De.default,ht(et({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:$t,style:{width:500}}),bt.createElement(De.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},bt.createElement(ie.default,{getPopupContainer:we=>we.parentNode,onChange:qt},Object.keys(mt).map(we=>bt.createElement(lt,{key:we,value:we},mt[we][0])))),bt.createElement(De.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},bt.createElement(xt,{mode:Qt})),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(Ne.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(Ne.ZP,{type:"ghost",onClick:jt},"\u53D6\u6D88")))};function xt({value:Mt,onChange:jt,mode:Qt,options:ne={}}){const qt=(0,bt.useRef)(),[$t,we]=(0,bt.useState)();return(0,bt.useEffect)(()=>{if($t){let ce=function(be){const Ge=be.getValue();jt&&jt(Ge)};return $t.on("change",ce),()=>{$t.off("change",ce)}}},[$t,jt]),(0,bt.useEffect)(()=>{$t&&$t.setOption("mode",Qt)},[$t,Qt]),(0,bt.useEffect)(()=>{$t&&(Mt!==$t.getValue()||Mt==="")&&setTimeout(()=>{$t.setValue(Mt||"")},300)},[$t,Mt]),(0,bt.useEffect)(()=>{if(qt.current&&!$t){const ce=It().fromTextArea(qt.current,et({mode:Qt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ne));we(ce)}},[qt.current,$t]),bt.createElement("div",{className:"my-codemirror-container"},bt.createElement("textarea",{ref:qt}))}},35567:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return hr}});var bt=Nt(67294),ie=Nt(4631),De=Nt.n(ie),Ne=Nt(91033),Le=Nt(71749),It=Nt(57341),Jt=Nt(82801),fe=Nt(88386),ve=Nt(49047),xe=Nt(80785),Ve=Nt(65226),he=({value:Qe="",className:on,showTextOnly:Pe,showLines:_e,style:fi={}})=>{const Mi=(0,bt.useMemo)(()=>"",[Qe]);return bt.createElement(bt.Fragment,null,bt.createElement("div",{dangerouslySetInnerHTML:{__html:Mi}}))},Rt=Object.defineProperty,Ft=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,gt=(Qe,on,Pe)=>on in Qe?Rt(Qe,on,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Qe[on]=Pe,mt=(Qe,on)=>{for(var Pe in on||(on={}))ht.call(on,Pe)&>(Qe,Pe,on[Pe]);if(et)for(var Pe of et(on))lt.call(on,Pe)&>(Qe,Pe,on[Pe]);return Qe},xt=(Qe,on)=>Ft(Qe,nt(on));let Mt=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function jt({onActionCallback:Qe,title:on,icon:Pe,actionName:_e,className:fi="",children:Mi}){function Si(){Qe(_e)}return bt.createElement("a",{title:on,className:fi,onClick:Si},bt.createElement("i",{className:`${Pe}`}),Mi)}var Qt=({watch:Qe,showNullButton:on,showNullProgramButton:Pe,onActionCallback:_e,fullScreen:fi,insertTemp:Mi,hidetoolBar:Si,extraUse:We})=>{const Ln=[...Mt,{title:`${Qe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Qe?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return bt.createElement("ul",{className:"markdown-toolbar-container"},!Si&&Ln.map((ji,Ar)=>bt.createElement("li",{key:Ar},ji.actionName?bt.createElement(jt,xt(mt({},ji),{onActionCallback:_e})):bt.createElement("span",{className:"v-line"}))),on?bt.createElement("li",null,bt.createElement(jt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:_e},bt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Pe?bt.createElement(bt.Fragment,null,bt.createElement("li",null,bt.createElement(jt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:_e},bt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),bt.createElement("li",null,bt.createElement(jt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:_e},bt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Mi&&bt.createElement("li",null,bt.createElement(jt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Mi}`,onActionCallback:_e},bt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),We&&bt.createElement("li",null,We),bt.createElement("li",{className:"btn-full-screen"},bt.createElement(jt,{icon:`${fi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:fi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:_e})))},ne=Nt(76621),qt=Nt(91773),$t=Nt(28802),we=Nt(85804),ce=Object.defineProperty,be=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,Sn=(Qe,on,Pe)=>on in Qe?ce(Qe,on,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Qe[on]=Pe,Zn=(Qe,on)=>{for(var Pe in on||(on={}))On.call(on,Pe)&&Sn(Qe,Pe,on[Pe]);if(Oe)for(var Pe of Oe(on))Nn.call(on,Pe)&&Sn(Qe,Pe,on[Pe]);return Qe},re=(Qe,on)=>be(Qe,Ge(on));const Wt={labelCol:{span:4},wrapperCol:{span:20}};var Me=({callback:Qe,onCancel:on})=>{function Pe(_e){Qe(_e)}return bt.createElement(qt.default,re(Zn({},Wt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Pe,style:{width:500}}),bt.createElement(qt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},bt.createElement($t.default,null)),bt.createElement(qt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},bt.createElement($t.default,null)),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(we.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(we.ZP,{type:"ghost",onClick:on},"\u53D6\u6D88")))},ln=Nt(57444),Dn=Nt(70859),Ae=Nt(62844),pn=Nt(71230),$e=Nt(63205),An=Nt(67294),Fe=({callback:Qe,onCancel:on})=>{const Pe=document.createElement("canvas"),_e=Pe.getContext("2d");Pe.width=1e3,Pe.height=800,_e.fillStyle="#ffffff",_e.fillRect(0,0,Pe.width,Pe.height);const fi=Pe.toDataURL("image/png");return An.createElement(Ae.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},An.createElement(pn.Z,{style:{height:"100vh"}},An.createElement($e.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:fi,visible:!0,title:String(Date.now())},onOk:Mi=>{Qe({src:Mi.url})},onClose:on})))},de=Nt(23495);function Ie(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Ie,go.CommandHandler),Ie.prototype.canAlignSelection=function(){var Qe=this.diagram;return!(Qe===null||Qe.isReadOnly||Qe.isModelReadOnly||Qe.selection.count<2)},Ie.prototype.alignLeft=function(){var Qe=this.diagram;Qe.startTransaction("aligning left");var on=1/0;Qe.selection.each(function(Pe){Pe instanceof go.Link||(on=Math.min(Pe.position.x,on))}),Qe.selection.each(function(Pe){Pe instanceof go.Link||Pe.move(new go.Point(on,Pe.position.y))}),Qe.commitTransaction("aligning left")},Ie.prototype.alignRight=function(){var Qe=this.diagram;Qe.startTransaction("aligning right");var on=-1/0;Qe.selection.each(function(Pe){if(!(Pe instanceof go.Link)){var _e=Pe.actualBounds.x+Pe.actualBounds.width;on=Math.max(_e,on)}}),Qe.selection.each(function(Pe){Pe instanceof go.Link||Pe.move(new go.Point(on-Pe.actualBounds.width,Pe.position.y))}),Qe.commitTransaction("aligning right")},Ie.prototype.alignTop=function(){var Qe=this.diagram;Qe.startTransaction("alignTop");var on=1/0;Qe.selection.each(function(Pe){Pe instanceof go.Link||(on=Math.min(Pe.position.y,on))}),Qe.selection.each(function(Pe){Pe instanceof go.Link||Pe.move(new go.Point(Pe.position.x,on))}),Qe.commitTransaction("alignTop")},Ie.prototype.alignBottom=function(){var Qe=this.diagram;Qe.startTransaction("aligning bottom");var on=-1/0;Qe.selection.each(function(Pe){if(!(Pe instanceof go.Link)){var _e=Pe.actualBounds.y+Pe.actualBounds.height;on=Math.max(_e,on)}}),Qe.selection.each(function(Pe){Pe instanceof go.Link||Pe.move(new go.Point(Pe.actualBounds.x,on-Pe.actualBounds.height))}),Qe.commitTransaction("aligning bottom")},Ie.prototype.alignCenterX=function(){var Qe=this.diagram,on=Qe.selection.first();if(on){Qe.startTransaction("aligning Center X");var Pe=on.actualBounds.x+on.actualBounds.width/2;Qe.selection.each(function(_e){_e instanceof go.Link||_e.move(new go.Point(Pe-_e.actualBounds.width/2,_e.actualBounds.y))}),Qe.commitTransaction("aligning Center X")}},Ie.prototype.alignCenterY=function(){var Qe=this.diagram,on=Qe.selection.first();if(on){Qe.startTransaction("aligning Center Y");var Pe=on.actualBounds.y+on.actualBounds.height/2;Qe.selection.each(function(_e){_e instanceof go.Link||_e.move(new go.Point(_e.actualBounds.x,Pe-_e.actualBounds.height/2))}),Qe.commitTransaction("aligning Center Y")}},Ie.prototype.alignColumn=function(Qe){var on=this.diagram;on.startTransaction("align Column"),Qe===void 0&&(Qe=0),Qe=parseFloat(Qe);var Pe=new Array;on.selection.each(function(We){We instanceof go.Link||Pe.push(We)});for(var _e=0;_e0){for(var We=Mi.elt(Si-1);We!==null&&We.isTreeExpanded&&!We.isTreeLeaf;){var Ln=this._sortTreeChildrenByY(We);We=Ln.last()}We!==null&&Qe.select(We)}else Qe.select(fi)}}else if(Pe.key==="Down")if(on.isTreeExpanded&&!on.isTreeLeaf){var _e=this._sortTreeChildrenByY(on).first();_e!==null&&Qe.select(_e)}else for(;on!==null;){var fi=on.findTreeParentNode();if(fi===null)break;var Mi=this._sortTreeChildrenByY(fi),Si=Mi.indexOf(on);if(SiMi.y?1:fi.xMi.x?1:0}),on},Ie.prototype.copyToClipboard=function(Qe){go.CommandHandler.prototype.copyToClipboard.call(this,Qe),this._lastPasteOffset.set(this.pasteOffset)},Ie.prototype.pasteFromClipboard=function(){var Qe=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Qe,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Qe},Object.defineProperty(Ie.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Qe){if(Qe!=="move"&&Qe!=="select"&&Qe!=="scroll"&&Qe!=="tree"&&Qe!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Qe);this._arrowKeyBehavior=Qe}}),Object.defineProperty(Ie.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Qe){if(!(Qe instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Qe);this._pasteOffset.set(Qe)}});var cn=Ie,Ke=Nt(18023),Ht=Nt(15746),Lt=Nt(33170),Ct={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Dt=Nt(52262),Zt=Nt(67294),kt=(Qe,on,Pe)=>new Promise((_e,fi)=>{var Mi=Ln=>{try{We(Pe.next(Ln))}catch(ji){fi(ji)}},Si=Ln=>{try{We(Pe.throw(Ln))}catch(ji){fi(ji)}},We=Ln=>Ln.done?_e(Ln.value):Promise.resolve(Ln.value).then(Mi,Si);We((Pe=Pe.apply(Qe,on)).next())});function _t({onCancel:Qe,callback:on}){let Pe=(0,bt.useRef)(),_e=(0,bt.useRef)(),fi=(0,bt.useRef)(),Mi=(0,bt.useRef)(!1);const Si=(0,bt.useRef)(!1),[We,Ln]=(0,bt.useState)(0);function ji(){const Hn=de.bx.make,Be={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};Pe.current=new de.S0(_e.current,{padding:20,grid:Hn(de.s_,"Grid",Hn(de.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Hn(de.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Re=>{var gr=Re.diagram.commandHandler.addTopLevelParts(Re.diagram.selection,!0);gr||Re.diagram.currentTool.doCancel()},commandHandler:Hn(cn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Re=>{var gr=Re.subject;gr.location=gr.location.copy().snapToGridPoint(Re.diagram.grid.gridOrigin,Re.diagram.grid.gridCellSize),setTimeout(()=>{Re.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Re=>{var gr=Re.subject;setTimeout(()=>{Re.diagram.commandHandler.editTextBlock()})},LinkRelinked:Re=>{var gr=Re.parameter.part;gr.invalidateConnectedLinks();var yo=Re.subject;Re.diagram.toolManager.linkingTool.isForwards?yo.toNode.invalidateConnectedLinks():yo.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Pe.current.nodeTemplate=Hn(de.NB,"Auto",{locationSpot:de.z6.Center,locationObjectName:"SHAPE",desiredSize:new de.$u(120,60),minSize:new de.$u(40,40),resizable:!0,resizeCellSize:new de.$u(10,10),rotatable:!0},new de.KX("location","loc",de.E9.parse).makeTwoWay(de.E9.stringify),new de.KX("desiredSize","size",de.$u.parse).makeTwoWay(de.$u.stringify),Hn(de.bn,{name:"SHAPE",fill:Be.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:de.z6.AllSides,toSpot:de.z6.AllSides},new de.KX("figure"),new de.KX("fill"),new de.KX("stroke","borderColor"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),Hn(de.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Hn(de.al,{margin:1,textAlign:"center",overflow:de.al.OverflowEllipsis,editable:!0},new de.KX("text").makeTwoWay(),new de.KX("stroke","color"))),Pe.current.nodeTemplate.toolTip=Hn("ToolTip",Hn(de.s_,"Vertical",{maxSize:new de.$u(200,NaN)},Hn(de.al,{font:"bold 10pt sans-serif",textAlign:"center"},new de.KX("text")),Hn(de.al,{font:"10pt sans-serif",textAlign:"center"},new de.KX("text","details"))));function xi(Re,gr){var yo=(er,Ca)=>{er.handled=!0,er.diagram.model.commit(fo=>{var To=Ca.part.adornedPart,oo=new de.E9().setRectSpot(To.actualBounds,Re);oo.subtract(To.location),oo.scale(2,2),oo.x+=Math.sign(oo.x)*130,oo.y+=Math.sign(oo.y)*130,oo.add(To.location),oo.snapToGridPoint(er.diagram.grid.gridOrigin,er.diagram.grid.gridCellSize);var zr=fo.copyNodeData(To.data);fo.setGroupKeyForNodeData(zr,fo.getGroupKeyForNodeData(To.data)),fo.addNodeData(zr);var qo={from:To.key,to:fo.getKeyForNodeData(zr)};fo.addLinkData(qo);var xn=er.diagram.findNodeForData(zr);xn.location=oo,er.diagram.select(xn),setTimeout(()=>{er.diagram.commandHandler.editTextBlock()},20)})};return Hn(de.bn,{figure:gr,alignment:Re,alignmentFocus:Re.opposite(),width:Re.equals(de.z6.Top)||Re.equals(de.z6.Bottom)?25:18,height:Re.equals(de.z6.Top)||Re.equals(de.z6.Bottom)?18:25,fill:"orange",stroke:Be.white,strokeWidth:4,mouseEnter:(er,Ca)=>Ca.fill="dodgerblue",mouseLeave:(er,Ca)=>Ca.fill="orange",isActionable:!0,click:yo,contextClick:yo})}function Ki(Re){return Hn(de.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(gr,yo)=>yo.fill="dodgerblue",mouseLeave:(gr,yo)=>yo.fill="orange",click:(gr,yo)=>{gr.diagram.commandHandler.showContextMenu(yo.part.adornedPart)}},Re||{})}Pe.current.nodeTemplate.selectionAdornmentTemplate=Hn(de.uz,"Spot",Hn(de.Vm,{padding:10}),xi(de.z6.Top,"TriangleUp"),xi(de.z6.Left,"TriangleLeft"),xi(de.z6.Right,"TriangleRight"),xi(de.z6.Bottom,"TriangleDown"),Ki({alignment:new de.z6(.75,0)}));function Tr(Re,gr){return(yo,er)=>{yo.handled=!0,yo.diagram.model.commit(Ca=>{Ca.set(er.part.adornedPart.data,Re,gr)})}}function mn(Re,gr){return gr||(gr="color"),Hn(de.bn,{width:16,height:16,stroke:"lightgray",fill:Re,margin:1,background:"transparent",mouseEnter:(yo,er)=>er.stroke="dodgerblue",mouseLeave:(yo,er)=>er.stroke="lightgray",click:Tr(gr,Re),contextClick:Tr(gr,Re)})}function Ni(){return[Hn("ContextMenuButton",Hn(de.s_,"Horizontal",mn(Be.white,"fill"),mn(Be.beige,"fill"),mn(Be.extralightblue,"fill"),mn(Be.extralightred,"fill"))),Hn("ContextMenuButton",Hn(de.s_,"Horizontal",mn(Be.lightgray,"fill"),mn(Be.lightgreen,"fill"),mn(Be.lightblue,"fill"),mn(Be.lightred,"fill")))]}function io(){return[Hn("ContextMenuButton",Hn(de.s_,"Horizontal",mn(Be.black),mn(Be.green),mn(Be.blue),mn(Be.red))),Hn("ContextMenuButton",Hn(de.s_,"Horizontal",mn(Be.white),mn(Be.magenta),mn(Be.purple),mn(Be.orange)))]}function ma(Re,gr){return gr||(gr="thickness"),Hn(de.bn,"LineH",{width:16,height:16,strokeWidth:Re,margin:1,background:"transparent",mouseEnter:(yo,er)=>er.background="dodgerblue",mouseLeave:(yo,er)=>er.background="transparent",click:Tr(gr,Re),contextClick:Tr(gr,Re)})}function Ao(Re,gr){return gr||(gr="dash"),Hn(de.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Re,margin:1,background:"transparent",mouseEnter:(yo,er)=>er.background="dodgerblue",mouseLeave:(yo,er)=>er.background="transparent",click:Tr(gr,Re),contextClick:Tr(gr,Re)})}function Ei(){return[Hn("ContextMenuButton",Hn(de.s_,"Horizontal",ma(1),ma(2),ma(3),ma(4))),Hn("ContextMenuButton",Hn(de.s_,"Horizontal",Ao(null),Ao([2,4]),Ao([4,4])))]}function bi(Re,gr){return gr||(gr="figure"),Hn(de.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Re,margin:1,background:"transparent",mouseEnter:(yo,er)=>er.fill="dodgerblue",mouseLeave:(yo,er)=>er.fill="lightgray",click:Tr(gr,Re),contextClick:Tr(gr,Re)})}Pe.current.nodeTemplate.contextMenu=Hn("ContextMenu",Hn("ContextMenuButton",Hn(de.s_,"Horizontal",bi("Rectangle"),bi("RoundedRectangle"),bi("Ellipse"),bi("Diamond"))),Hn("ContextMenuButton",Hn(de.s_,"Horizontal",bi("Parallelogram2"),bi("ManualOperation"),bi("Procedure"),bi("Cylinder1"))),Hn("ContextMenuButton",Hn(de.s_,"Horizontal",bi("Terminator"),bi("CreateRequest"),bi("Document"),bi("TriangleDown"))),Ni(),io(),Ei()),Pe.current.groupTemplate=Hn(de.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:de.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Re,gr)=>{var yo=gr.addMembers(gr.diagram.selection,!0);yo||gr.diagram.currentTool.doCancel()},avoidable:!1},new de.KX("location","loc",de.E9.parse).makeTwoWay(de.E9.stringify),Hn(de.s_,"Auto",{name:"BODY"},Hn(de.bn,{parameter1:10,fill:Be.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:de.z6.AllSides,toSpot:de.z6.AllSides},new de.KX("fill"),new de.KX("stroke","color"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),Hn(de.Vm,{background:"transparent",margin:20})),Hn(de.al,{alignment:de.z6.Top,alignmentFocus:de.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new de.KX("text"),new de.KX("stroke","color"))),Pe.current.groupTemplate.selectionAdornmentTemplate=Hn(de.uz,"Spot",Hn(de.s_,"Auto",Hn(de.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Hn(de.Vm,{margin:1.5})),Ki({alignment:de.z6.TopRight,alignmentFocus:de.z6.BottomRight})),Pe.current.groupTemplate.contextMenu=Hn("ContextMenu",Ni(),io(),Ei()),Pe.current.linkTemplate=Hn(de.rU,{layerName:"Foreground",routing:de.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new de.KX("fromSpot","fromSpot",de.z6.parse),new de.KX("toSpot","toSpot",de.z6.parse),new de.KX("fromShortLength","dir",Re=>Re>=1?10:0),new de.KX("toShortLength","dir",Re=>Re>=1?10:0),new de.KX("points").makeTwoWay(),Hn(de.bn,{strokeWidth:2},new de.KX("stroke","color"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),Hn(de.bn,{segmentIndex:0,segmentOffset:new de.E9(15,0),segmentOrientation:de.rU.OrientAlong,alignmentFocus:de.z6.Right,figure:"circle",width:10,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Re=>Re===1)),Hn(de.bn,{segmentIndex:-1,segmentOffset:new de.E9(-10,6),segmentOrientation:de.rU.OrientPlus90,alignmentFocus:de.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Re=>Re>=1),new de.KX("width","thickness",Re=>7+3*Re),new de.KX("height","thickness",Re=>7+3*Re),new de.KX("segmentOffset","thickness",Re=>new de.E9(-15,4+1.5*Re))),Hn(de.bn,{segmentIndex:0,segmentOffset:new de.E9(15,-6),segmentOrientation:de.rU.OrientMinus90,alignmentFocus:de.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Re=>Re===2),new de.KX("width","thickness",Re=>7+3*Re),new de.KX("height","thickness",Re=>7+3*Re),new de.KX("segmentOffset","thickness",Re=>new de.E9(-15,4+1.5*Re))),Hn(de.al,{alignmentFocus:new de.z6(0,1,-4,0),editable:!0},new de.KX("text").makeTwoWay(),new de.KX("stroke","color"))),Pe.current.linkTemplate.selectionAdornmentTemplate=Hn(de.uz,Hn(de.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Wi(2)},new de.KX("pathPattern","thickness",Wi)),Ki({alignmentFocus:new de.z6(0,0,-6,-4)}));function Wi(Re){return Hn(de.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Re+4).toString()+" H3"})}function $r(Re){var gr="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Re===0?gr="M0 0 M16 16 M0 8 L16 8":Re===2&&(gr="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Hn(de.bn,{geometryString:gr,margin:2,background:"transparent",mouseEnter:(yo,er)=>er.background="dodgerblue",mouseLeave:(yo,er)=>er.background="transparent",click:Tr("dir",Re),contextClick:Tr("dir",Re)})}function Kr(Re){var gr=(yo,er)=>{yo.handled=!0,yo.diagram.model.commit(Ca=>{var fo=er.part.adornedPart;Ca.set(fo.data,Re?"toSpot":"fromSpot",de.z6.stringify(de.z6.AllSides)),(Re?fo.toNode:fo.fromNode).invalidateConnectedLinks()})};return Hn(de.bn,{width:12,height:12,fill:"transparent",mouseEnter:(yo,er)=>er.background="dodgerblue",mouseLeave:(yo,er)=>er.background="transparent",click:gr,contextClick:gr})}function Xn(Re,gr){var yo=0,er=de.z6.RightSide;Re.equals(de.z6.Top)?(yo=270,er=de.z6.TopSide):Re.equals(de.z6.Left)?(yo=180,er=de.z6.LeftSide):Re.equals(de.z6.Bottom)&&(yo=90,er=de.z6.BottomSide),gr||(yo-=180);var Ca=(fo,To)=>{fo.handled=!0,fo.diagram.model.commit(oo=>{var zr=To.part.adornedPart;oo.set(zr.data,gr?"toSpot":"fromSpot",de.z6.stringify(er)),(gr?zr.toNode:zr.fromNode).invalidateConnectedLinks()})};return Hn(de.bn,{alignment:Re,alignmentFocus:Re.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:yo,background:"transparent",mouseEnter:(fo,To)=>To.background="dodgerblue",mouseLeave:(fo,To)=>To.background="transparent",click:Ca,contextClick:Ca})}Pe.current.linkTemplate.contextMenu=Hn("ContextMenu",io(),Ei(),Hn("ContextMenuButton",Hn(de.s_,"Horizontal",$r(0),$r(1),$r(2))),Hn("ContextMenuButton",Hn(de.s_,"Horizontal",Hn(de.s_,"Spot",Kr(!1),Xn(de.z6.Top,!1),Xn(de.z6.Left,!1),Xn(de.z6.Right,!1),Xn(de.z6.Bottom,!1)),Hn(de.s_,"Spot",{margin:new de.Zt(0,0,0,2)},Kr(!0),Xn(de.z6.Top,!0),Xn(de.z6.Left,!0),Xn(de.z6.Right,!0),Xn(de.z6.Bottom,!0)))));const ir=`{ "class": "GraphLinksModel", "nodeDataArray": [ {"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3}, {"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"}, {"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"}, {"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"}, {"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"}, {"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3}, {"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22}, {"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22}, {"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"} ], "linkDataArray": [ {"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1}, {"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1}, {"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]}, {"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2}, {"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"}, {"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1}, {"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]} ]}`;var pl=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function gs(Re){return console.log("shapeName:",Re),pl.indexOf(Re)>=0}var qa=new de.YI(fi.current,{maxSelectionCount:1,linkTemplate:Hn(de.rU,{locationSpot:de.z6.Center,selectionAdornmentTemplate:Hn(de.uz,"Link",{locationSpot:de.z6.Center},Hn(de.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Hn(de.bn,{toArrow:"Standard",stroke:null}))},{routing:de.rU.AvoidsNodes,curve:de.rU.JumpOver,corner:5,toShortLength:4},new de.KX("points"),Hn(de.bn,{isPanelMain:!0,strokeWidth:2}),Hn(de.bn,{toArrow:"Standard",stroke:null})),model:new de.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...de.bn.getFigureGenerators().toArray().map(Re=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Re.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Pe.current.addDiagramListener("TextEdited",function(Re){var gr;const yo=Re.subject.part;var er=(gr=document.activeElement)==null?void 0:gr.value;typeof er=="string"&&er.trim()===""&&Pe.current.model.commit(function(Ca){Ca.set(yo.data,"text","\u672A\u547D\u540D"),Pe.current.commandHandler.stopCommand()},"increment")}),qa.nodeTemplate=Hn(de.NB,"Auto",{locationSpot:de.z6.Center},new de.KX("location","location",de.E9.parse).makeTwoWay(de.E9.stringify),Hn(de.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new de.KX("stroke").makeTwoWay(),new de.KX("fill").makeTwoWay(),new de.KX("figure")),Hn(de.al,{margin:new de.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new de.$u(16,16),maxSize:new de.$u(10,NaN),textAlign:"center",editable:!0},new de.KX("key").makeTwoWay())),setTimeout(()=>{Pe.current.grid=Hn(de.s_,"Grid",Hn(de.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Hn(de.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Pe.current.grid.visible=!0,Pe.current.grid.gridCellStroke="darkgray",Pe.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Pe.current,Pe.current}const Ar=()=>kt(this,null,function*(){var Hn,Be=Pe.current.makeImage();const xi=yield(0,Lt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Be.src,file_data:JSON.stringify({login:(Hn=(0,Dt.eY)())==null?void 0:Hn.login,data:JSON.parse(Pe.current.model.toJson())})}});on({src:xi.url})});return(0,bt.useEffect)(()=>(setTimeout(()=>{ji()},500),Ln(We+1),()=>{Pe.current=null}),[]),Zt.createElement("div",{ref:Si,className:"body-overflow-initial"},Zt.createElement(Ae.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!We,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Zt.createElement(pn.Z,null,Zt.createElement(Ht.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Zt.createElement(Ht.Z,{onClick:()=>{var Hn,Be,xi=Pe.current.selection.first();if(Mi.current=!Mi.current,document.activeElement&&xi){let Ki=(Be=(Hn=document.activeElement)==null?void 0:Hn.value)==null?void 0:Be.trim();typeof Ki=="string"&&Pe.current.model.commit(function(Tr){Tr.set(xi.data,"text",Ki||"\u672A\u547D\u540D"),Pe.current.commandHandler.stopCommand()},"increment")}Ln(We+1)}},Zt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Qe},Zt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Mi.current?"none":"block"},className:Ct.flowChartWrp},Zt.createElement("div",{style:{display:"flex",height:"100%"}},Zt.createElement("div",{style:{width:"300px",height:"100%"}},Zt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Zt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ct.myPaletteDiv,ref:fi})),Zt.createElement("div",{style:{flex:1,position:"relative"}},Zt.createElement("div",{ref:_e,style:{height:"80vh"}}))),Zt.createElement("div",{className:"tr"},Zt.createElement(we.ZP,{size:"large",onClick:Ar,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var tn=_t,an=Nt(98813),_n=Nt(37720);const nn=an.ZP.Group,Pn={margin:"0 8px"};var je=({callback:Qe,onCancel:on})=>{function Pe(_e){Qe(_e)}return bt.createElement(qt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Pe},bt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},bt.createElement("span",{style:Pn},"\u5355\u5143\u683C\u6570\uFF1A"),bt.createElement("span",{style:Pn},"\u884C\u6570"),bt.createElement(qt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},bt.createElement(_n.Z,null)),bt.createElement("span",{style:Pn},"\u5217\u6570"),bt.createElement(qt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},bt.createElement(_n.Z,null))),bt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},bt.createElement("span",{style:Pn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),bt.createElement(qt.default.Item,{name:"align"},bt.createElement(nn,null,bt.createElement(an.ZP,{value:"default"},bt.createElement("i",{className:"fa fa-align-justify"})),bt.createElement(an.ZP,{value:"left"},bt.createElement("i",{className:"fa fa-align-left"})),bt.createElement(an.ZP,{value:"center"},bt.createElement("i",{className:"fa fa-align-center"})),bt.createElement(an.ZP,{value:"right"},bt.createElement("i",{className:"fa fa-align-right"}))))),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(we.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(we.ZP,{type:"ghost",onClick:on},"\u53D6\u6D88")))},In=Nt(59637),ti=Nt(61016),Ii=Nt.n(ti),Pi=(0,bt.forwardRef)(({use3d:Qe,width:on,height:Pe,callback:_e,showSaveButton:fi},Mi)=>{const Si=(0,bt.useRef)(),We=(0,bt.useRef)(),[Ln,ji]=(0,bt.useState)(!1),Ar=(0,bt.useRef)({id:Si,appName:"graphing",width:on||1e3,height:Pe||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,bt.useEffect)(()=>{We.current=new(Ii())(Ar.current,!0),window.onload=function(){We.current.inject("applet_container")}},[]);const Hn=()=>{var Be=window.ggbApplet.getPNGBase64(1,!0,72);return _e&&_e(Be),Be};return(0,bt.useEffect)(()=>{Ar.current.appName=Ln?"3D":"graphing",We.current.inject("applet_container")},[Ln]),(0,bt.useEffect)(()=>{ji(Qe)},[Qe]),(0,bt.useImperativeHandle)(Mi,()=>({getImgData:Hn})),bt.createElement(bt.Fragment,null,bt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Si}),bt.createElement(pn.Z,{align:"middle"},bt.createElement(Ht.Z,{flex:1},bt.createElement(In.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ln,onChange:Be=>ji(Be)})),bt.createElement(Ht.Z,null,bt.createElement(we.ZP,{size:"large",onClick:Hn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Zi=Nt(36527),ii=Nt(2453);const ci="link",li="upload-image",di="add-flowchart",cr="draw-image",Gr="add-flowchart",fr="code-block",Di="add-table",Zr="------------",Mo={default:Zr,left:`:${Zr}`,center:`:${Zr}:`,right:`${Zr}:`};var Ha=Nt(99914);function pa(){}let xa=0;const _a=1e4,Oa="\u2581",Go="@\u2581\u2581@",Cn="@\u2581@",wt=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Ue=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function He(Qe){return/^\d+$/.test(Qe)?`${Qe}px`:Qe}const hi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Un={[hi+"-B"]:"bold",[hi+"-I"]:"italic"},zi={[ci]:"\u6DFB\u52A0\u94FE\u63A5",[fr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[li]:"\u6DFB\u52A0\u56FE\u7247",[cr]:"\u6DFB\u52A0\u753B\u56FE",[di]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Di]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var hr=({defaultValue:Qe="",onChange:on,width:Pe="100%",height:_e=400,miniToolbar:fi=!1,isFocus:Mi=!1,watch:Si,insertTemp:We,mode:Ln="markdown",id:ji="markdown-editor-id",showResizeBar:Ar=!1,noStorage:Hn=!1,showNullButton:Be=!1,showNullProgramButton:xi=!1,hidetoolBar:Ki=!1,fullScreen:Tr=!1,onBlur:mn,onCMBeforeChange:Ni,onFullScreen:io,className:ma="",disablePaste:Ao=!1,disabled:Ei=!1,disabledFill:bi=!1,placeholder:Wi="",values:$r="",extraUse:Kr})=>{const[Xn,ir]=(0,bt.useState)(null),[pl,gs]=(0,bt.useState)(Qe),[qa,Re]=(0,bt.useState)(Si),[gr,yo]=(0,bt.useState)(Tr),[er,Ca]=(0,bt.useState)(""),[fo,To]=(0,bt.useState)(0),[oo,zr]=(0,bt.useState)(_e),[qo,xn]=(0,bt.useState)(!1),[La,hn]=(0,bt.useState)(0),[po,Fs]=(0,bt.useState)(0),Ia=(0,bt.useRef)(),$s=(0,bt.useRef)(),wa=(0,bt.useRef)(),bo=(0,bt.useRef)();(0,bt.useEffect)(()=>{const sr=window.scrollY||window.pageYOffset;gs($r),Xn==null||Xn.setValue($r),window.scrollTo(0,sr)},[$r]),(0,bt.useEffect)(()=>{io==null||io(gr)},[gr]),(0,bt.useEffect)(()=>{if(Ia.current){let sr=function(Br,sn){var pr;if(Ao){sn.preventDefault();return}const ro=sn.clipboardData;if(ro){const Ra=ro.types.toString(),Ma=ro.items;if(Ra==="Files"||ro.types.indexOf("Files")>-1){if(sn.preventDefault(),Ln=="stex")return;try{let ba=Ma[1];((pr=Ma[0])==null?void 0:pr.kind)==="file"&&(ba=Ma[0]);const Ws=ba.getAsFile(),xl=Ws.name.split(".").pop();(0,Dn.I)(Ws,wl=>{var Xh,fh,Ye;wl.id?((Xh=Ws==null?void 0:Ws.type)==null?void 0:Xh.indexOf("image"))>-1?Yi.replaceSelection(``):((fh=Ws==null?void 0:Ws.type)==null?void 0:fh.indexOf("video"))>-1?Yi.replaceSelection(``):((Ye=Ws==null?void 0:Ws.type)==null?void 0:Ye.indexOf("pdf"))>-1?Yi.replaceSelection(`${Ws.name}`):Ue.includes(xl)?Yi.replaceSelection(`${Ws.name}`):Yi.replaceSelection(`[${Ws.name}](/api/attachments/${wl.id}?type=${wl.content_type})`):(wl==null?void 0:wl.status)===401&&(document.location.href="/user/login")})}catch(ba){ii.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Yi=De().fromTextArea(Ia.current,{mode:Ln,lineNumbers:!fi,lineWrapping:!0,value:Qe,autoCloseTags:!0,autoCloseBrackets:!0});return Yi.on("keyup",function(Br,sn){sn.keyCode===8&&(Br.getValue()==""?Yi.setOption("placeholder",Wi):Yi.setOption("placeholder",null))}),Yi.on("keydown",function(Br,sn){if(sn.keyCode===8){var pr=al(Br);pr&&sn.preventDefault()}}),Mi&&Yi.focus(),Yi.on("paste",sr),Ei&&Yi.on("beforeChange",function(Br,sn){(sn.origin==="paste"||sn.origin==="+input")&&sn.cancel()}),ir(Yi),()=>{Yi.off("paste",sr)}}},[]);const Aa=(0,bt.useCallback)(()=>{if($s.current)try{}catch(sr){console.log(sr,"---- to set md editor body height")}},[oo,$s,gr]);(0,bt.useEffect)(()=>{function sr(){let Yi=new Ne.Z(Br=>{for(let sn of Br)(sn.target.offsetHeight>0||sn.target.offsetWidth>0)&&(Aa(),Xn.setSize("100%","100%"),Xn.refresh())});return Yi.observe(Ia.current.parentElement),Yi}if(Xn){const Yi=sr();return()=>{var Br,sn;(Br=Ia.current)!=null&&Br.parentElement&&Yi.unobserve((sn=Ia.current)==null?void 0:sn.parentElement)}}},[Xn,Aa]),(0,bt.useEffect)(()=>{if(Xn){let sr=[];for(const[Yi,Br]of Object.entries(Un)){let sn={[Yi]:()=>{oa(Br)}};sr.push(sn),Xn.addKeyMap(sn)}return()=>{for(let Yi of sr)Xn.removeKeyMap(Yi)}}},[Xn]),(0,bt.useEffect)(()=>{Tr!==gr&&yo(Tr)},[Tr]),(0,Ha.Z)(()=>{if(!Hn&&fo>0){let sr=new Date().getTime(),Yi=window.sessionStorage.getItem(ji);sr>=fo+_a&&(!Yi||Yi!==pl)&&(window.sessionStorage.setItem(ji,pl),xn(!0))}},_a),(0,bt.useEffect)(()=>{Re(Si)},[Xn,Si]),(0,bt.useEffect)(()=>{Xn&&Mi&&Xn.focus()},[Xn,Mi]),(0,bt.useEffect)(()=>{if(qa&&Xn){let sr=function(Br){let sn=Br.target;if(bo.current){let pr=sn.scrollTop/sn.scrollHeight;bo.current.scrollTop=bo.current.scrollHeight*pr}};const Yi=Xn.getScrollerElement();return Yi.addEventListener("scroll",sr),()=>{Yi.removeEventListener("scroll",sr)}}},[Xn,qa]),(0,bt.useEffect)(()=>{if(Xn&&Ni){let sr=function(Yi,Br){Ni(Yi,Br)};return Xn.on("beforeChange",sr),()=>{Xn.off("beforeChange",sr)}}},[Xn,Ni]),(0,bt.useEffect)(()=>{if(Xn&&mn){let sr=function(){mn(Xn.getValue())};return Xn.on("blur",sr),()=>{Xn.off("blur",sr)}}},[Xn,mn]);function al(sr,Yi){var Br=sr.getDoc(),sn=Br.getCursor(),pr=Br.getLine(sn.line),ro=pr.charAt(sn.ch-1),Ra=pr.lastIndexOf("@\u2581@",sn.ch),Ma=pr.lastIndexOf("@\u2581\u2581@",sn.ch),ba=Ra>Ma?Ra:Ma,Ws=Ra>Ma?3:4;if(Go.indexOf(ro)===-1)return null;if(console.log("change1:",Yi,sr,pr,sn,ba,Ra,Ma,ro),ba>=0&&sn.ch-ba<5){var xl=ba+Ws;return Br.replaceRange("",{line:sn.line,ch:ba},{line:sn.line,ch:xl}),{line:sn.line,ch:xl}}return null}(0,bt.useEffect)(()=>{if(Xn){let sr=function(Yi,Br){const sn=Yi.getValue();gs(sn),To(new Date().getTime()),Yi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),on&&(xi?on(sn,tl(sn)):on(sn))};return Xn.on("change",sr),()=>{Xn.off("change",sr)}}},[Xn,on]),(0,bt.useEffect)(()=>{if(Xn)if(Qe==null)Xn.setValue(""),gs("");else{const sr=window.scrollY||window.pageYOffset;Qe!==Xn.getValue()&&(Xn.setValue(Qe),gs(Qe),Xn.setCursor(Ei?1:Xn.lineCount(),0),window.scrollTo(0,sr))}},[Xn,Qe]);const oa=(0,bt.useCallback)(sr=>{const Yi=Xn.getCursor(),Br=Xn.getSelection();let sn=Br.split(` `);switch(sr){case"bold":return Xn.replaceSelection("**"+Br+"**"),Br===""&&Xn.setCursor(Yi.line,Yi.ch+2),Xn.focus();case"italic":return Xn.replaceSelection("*"+Br+"*"),Br===""&&Xn.setCursor(Yi.line,Yi.ch+1),Xn.focus();case"code":return Xn.replaceSelection("`"+Br+"`"),Br===""&&Xn.setCursor(Yi.line,Yi.ch+1),Xn.focus();case"inline-latex":return Ca("inline-latex"),Xn.focus();case"latex":return Xn.replaceSelection("```latex\n"+Br+"\n```"),Xn.setCursor(Yi.line+1,Br.length+1),Xn.focus();case"line-break":return Xn.replaceSelection(`
`),Xn.focus();case"list-ul":return Br===""?Xn.replaceSelection("- "+Br):Xn.replaceSelection(sn.map(pr=>pr===""?"":`- ${pr}`).join(` `)),Xn.focus();case"list-ol":return Br===""?Xn.replaceSelection("1. "+Br):Xn.replaceSelection(sn.map((pr,ro)=>pr===""?"":`${ro+1}. ${pr}`).join(` `)),Xn.focus();case"add-null-ch":return Br===""&&Xn.setCursor(Yi.line,Yi.ch),Xn.replaceSelection(Oa),Xn.focus();case"add-signal":return Br===""&&Xn.setCursor(Yi.line,Yi.ch),Xn.replaceSelection(Cn),Xn.focus();case"add-multiple":return Br===""&&Xn.setCursor(Yi.line,Yi.ch),Xn.replaceSelection(Go),Xn.focus();case"inster-template-1":return Br===""&&Xn.setCursor(Yi.line,Yi.ch),Xn.replaceSelection(wt),Xn.focus();case"eraser":return Xn.setValue(""),Xn.focus();case"trigger-watch":return Re(!qa),Xn.focus();case"trigger-full-screen":return yo(!gr),Xn.focus();case ci:Ca(ci);return;case fr:Ca(fr);return;case li:Ca(li);return;case cr:Ca(cr);return;case"maths-latex":Ca("maths-latex");return;case di:Ca(di);return;case Di:Ca(Di);return;default:throw new Error}},[Xn,qa,gr]),gi=(0,bt.useCallback)((sr,Yi)=>{var Br,sn,pr,ro,Ra,Ma;switch(Ca(""),er){case ci:const{title:Xh,link:fh}=sr;return Xn.replaceSelection(`[${Xh}](${fh})`),Xn.focus();case fr:const{language:Ye,content:bl}=sr;return Xn.replaceSelection(["```"+Ye,bl,"```"].join(` `)),Xn.focus();case"maths-latex":for(var ba=atob(sr),Ws=new Uint8Array(ba.length),xl=0;xl{to.id?Xn.replaceSelection(`![,](/api/attachments/${to.id}?type=${to.content_type})`):(to==null?void 0:to.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Xn.replaceSelection("`$$"+sr+"$$`");break;case li:case cr:case Gr:const{src:Lu,alt:Ah}=sr,as=Yi,bh=(pr=(sn=(Br=as==null?void 0:as.name)==null?void 0:Br.split("."))==null?void 0:sn.pop)==null?void 0:pr.call(sn);return((ro=as==null?void 0:as.type)==null?void 0:ro.indexOf("image"))>-1||!(as!=null&&as.type)?as!=null&&as.align||as!=null&&as.width?Xn.replaceSelection(`

${Ah||

`):Xn.replaceSelection(`${Ah||`):((Ra=as==null?void 0:as.type)==null?void 0:Ra.indexOf("video"))>-1?Xn.replaceSelection(``):((Ma=as==null?void 0:as.type)==null?void 0:Ma.indexOf("pdf"))>-1?Xn.replaceSelection(`${as.name}`):Ue.includes(bh)?Xn.replaceSelection(`${as.name}`):Xn.replaceSelection(`[${as.name}](${Lu})`),Xn.focus();case Di:const{row:Fh,col:Jh,align:za}=sr;let Ps=` `;for(let to=0;to{switch(er){case ci:return bt.createElement(Me,{callback:gi,onCancel:os});case fr:return bt.createElement(ln.Z,{callback:gi,onCancel:os});case li:return bt.createElement(Dn.Z,{callback:gi,onCancel:os});case di:return bt.createElement(tn,{callback:gi,onCancel:os});case Di:return bt.createElement(je,{callback:gi,onCancel:os});case"maths-latex":return bt.createElement(Pi,{showSaveButton:!0,callback:gi});case"inline-latex":return bt.createElement(Zi.Z,{showSaveButton:!0,callback:gi});default:return null}},[er]);function os(){Ca("")}(0,bt.useEffect)(()=>{if(wa.current){let sr=function(Ra){pr=!0,ro=Ra.pageY},Yi=function(){pr=!1},Br=function(Ra){if(pr){let Ma=Ra.pageY-ro;Ma<0&&(Ma=0),Ma>300&&(Ma=300);let ba=_e+Ma+"px";zr(ba)}},sn=wa.current,pr=!1,ro=0;return sn.addEventListener("mousedown",sr),document.addEventListener("mousemove",Br),document.addEventListener("mouseup",Yi),()=>{sn.removeEventListener("mousedown",sr),document.removeEventListener("mousemove",Br),document.removeEventListener("mouseup",Yi)}}},[Xn,wa]),(0,bt.useEffect)(()=>{zr(_e)},[_e]);const uu=He(Pe),hu=He(oo),Ys={width:uu,height:hu},du=(0,bt.useMemo)(()=>{if(fo){let sr=new Date(fo),Yi=sr.getHours(),Br=sr.getMinutes(),sn=sr.getSeconds();return Yi=Yi<10?"0"+Yi:Yi,Br=Br<10?"0"+Br:Br,sn=sn<10?"0"+sn:sn,`${Yi}:${Br}:${sn}`}return 0},[fo]),tl=sr=>{const Yi=[];if(xi){let Br=-1;sr=sr.replace(/(@▁▁@|@▁@)/g,function(sn,pr,ro){Yi.push({multiLine:sn!==Cn})})}return Yi};function kh(){window.sessionStorage.removeItem(ji),xn(!1),To(0)}function Cu(){xn(!1),To(0),Xn.setValue(window.sessionStorage.getItem(ji))}(0,bt.useEffect)(()=>{zi[er]&&er!==cr&&er!==di&&setTimeout(()=>{const sr=document.getElementsByClassName("markdown-popup-form")[0],Yi=window.innerWidth/2-sr.offsetWidth/2,Br=window.innerHeight/2-sr.offsetHeight/2;hn(Yi),Fs(Br)},0)},[er]);const Ea=sr=>{sr.preventDefault();const Yi=sr.clientX-La,Br=sr.clientY-po;document.body.onmousemove=sn=>{let pr=sn.clientX-Yi,ro=sn.clientY-Br;const Ra=document.getElementsByClassName("markdown-popup-form")[0],Ma=window.innerWidth-Ra.offsetWidth,ba=window.innerHeight-Ra.offsetHeight;pr=Math.max(0,Math.min(pr,Ma)),ro=Math.max(0,Math.min(ro,ba)),Xa(sn.clientX,sn.clientY,Yi,Br)&&(hn(pr),Fs(ro))},document.body.onmouseup=function(){document.body.onmousemove=null}},Xa=(sr,Yi,Br,sn)=>{const pr=document.body.clientHeight,ro=document.body.clientWidth;return sr<20&&Br>sr||sr>ro-20&&BrYi||Yi>pr-20&&sn$t in qt?Ve(qt,$t,{enumerable:!0,configurable:!0,writable:!0,value:we}):qt[$t]=we,lt=(qt,$t)=>{for(var we in $t||($t={}))nt.call($t,we)&&ht(qt,we,$t[we]);if(Ft)for(var we of Ft($t))et.call($t,we)&&ht(qt,we,$t[we]);return qt},gt=(qt,$t)=>he(qt,Rt($t));const{useForm:mt}=bt.default,xt={width:280,marginRight:10},Mt={labelCol:{span:5},wrapperCol:{span:19}};var jt=({callback:qt,onCancel:$t})=>{const[we]=mt();let ce=(0,ve.useRef)();function be(On){ce.current.width=we.getFieldValue("width"),ce.current.align=we.getFieldValue("align"),qt(On,ce.current)}function Ge(On,Nn){if(On.status===-1){ie.ZP.error(On.message);return}we.setFieldsValue({src:`/api/attachments/${On.id}`,type:Nn.type})}function Oe(On){let Nn=On.target.files[0];ce.current=Nn,ne(Nn,Ge)}return xe.createElement(bt.default,gt(lt({form:we},Mt),{className:"upload-image-panel",onFinish:be,style:{width:470,overflow:"hidden"}}),xe.createElement(bt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},xe.createElement("div",{className:"flex-container"},xe.createElement(bt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},xe.createElement(De.default,{style:xt})),xe.createElement(Qt,{onFileChange:Oe}))),xe.createElement(bt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},xe.createElement(De.default,{style:{width:264}})),xe.createElement(bt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},xe.createElement(Ne.Z,null,xe.createElement(bt.default.Item,{name:"width",style:{margin:0}},xe.createElement(Le.Z,{style:{width:264}})),xe.createElement("span",{className:"ml8"},"%"))),xe.createElement(bt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},xe.createElement(It.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),xe.createElement("aside",null,xe.createElement(bt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},xe.createElement(Jt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),xe.createElement(Jt.ZP,{type:"default",onClick:$t},"\u53D6\u6D88"))))};function Qt({onFileChange:qt}){return xe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",xe.createElement("input",{type:"file",onChange:qt}))}function ne(qt,$t){if(!qt)throw new String("\u6CA1\u6709\u6587\u4EF6");let we=new FormData;we.append("editormd-image-file",qt),we.append("file_param_name","editormd-image-file"),we.append("byxhr","true");var ce=new window.XMLHttpRequest;ce.withCredentials=!0,ce.addEventListener("load",function(be){$t(JSON.parse(be.target.responseText),qt)},!1),ce.addEventListener("error",function(be){console.error(be)},!1),ce.open("POST",`${fe.KI}/api/attachments.json`),ce.send(we)}},76621:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return De}});var bt=Nt(67294),ie=Nt(73935);class De extends bt.Component{constructor(Le){super(Le);const It=window.document;this.node=It.createElement("div"),It.body.appendChild(this.node)}render(){const{children:Le}=this.props;return(0,ie.createPortal)(Le,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(En,jn,Nt){"use strict";Nt.d(jn,{SV:function(){return de},ZP:function(){return Fe}});var bt=Nt(67294),ie=Nt(91033);const De={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},Ne={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},Le={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},It={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},Jt={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(` `)}]};var fe=Nt(84204),ve=Nt.n(fe),xe=(Ie,cn,Ke)=>new Promise((Ht,Lt)=>{var Ct=kt=>{try{Zt(Ke.next(kt))}catch(_t){Lt(_t)}},Dt=kt=>{try{Zt(Ke.throw(kt))}catch(_t){Lt(_t)}},Zt=kt=>kt.done?Ht(kt.value):Promise.resolve(kt.value).then(Ct,Dt);Zt((Ke=Ke.apply(Ie,cn)).next())});const Ve={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},he=(Ie,cn,Ke,Ht)=>{const Lt=cn.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Ke.lineNumber,endColumn:Ke.column});return Array.from(new Set(Lt.match(/\b\w{2,}\b/g)||[])).map(Dt=>({label:Dt,kind:Ie.languages.CompletionItemKind.Text,insertText:Dt,range:Ht}))},Rt=(Ie,cn,Ke,Ht)=>{Ie.languages.registerCompletionItemProvider(cn,{provideCompletionItems(Lt,Ct){const Dt=Lt.getWordUntilPosition(Ct),Zt={startLineNumber:Ct.lineNumber,endLineNumber:Ct.lineNumber,startColumn:Dt.startColumn,endColumn:Dt.endColumn},kt=Lt.getLineContent(Ct.lineNumber).substring(Dt.startColumn-2,Dt.endColumn);return{suggestions:[...he(Ie,Lt,Ct,Zt),...Ke.map(tn=>({label:tn,kind:Ie.languages.CompletionItemKind.Keyword,documentation:tn,insertText:tn,insertTextRules:Ie.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Zt})),...Ht.map(tn=>({label:tn.label,kind:Ie.languages.CompletionItemKind.Snippet,documentation:tn.content,insertText:kt.startsWith("#")?tn.content.replace(/#/,""):tn.content,insertTextRules:Ie.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Zt}))]}}})};var Ft=Ie=>{Ve.languages.forEach(cn=>{Ie.languages.registerDocumentFormattingEditProvider(cn,{provideDocumentFormattingEdits(Ke){return xe(this,null,function*(){const Ht=ve()(Ke.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Ke.getFullModelRange(),text:Ht}]})}})}),Rt(Ie,"java",Ne.keywords,Ne.quickKey),Rt(Ie,"cpp",Le.keywords,Le.quickKey),Rt(Ie,"c",De.keywords,[]),Rt(Ie,"python",It.keywords,It.quickKey),Rt(Ie,"scala",Jt.keywords,Jt.quickKey)};const nt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var et=Object.defineProperty,ht=(Ie,cn,Ke)=>cn in Ie?et(Ie,cn,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Ie[cn]=Ke,lt=(Ie,cn,Ke)=>ht(Ie,typeof cn!="symbol"?cn+"":cn,Ke);const gt=class px{constructor(cn,Ke,Ht){this.placeholder=cn,this.editor=Ke,this.monaco=Ht,Ke.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};lt(gt,"ID","editor.widget.placeholderHint");var xt=gt,Mt=Nt(84144),jt=Nt(2453),Qt=Nt(83062),ne=Nt(96486),qt=Nt(33054),$t=Nt(74855),we=Object.defineProperty,ce=Object.defineProperties,be=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,Nn=(Ie,cn,Ke)=>cn in Ie?we(Ie,cn,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Ie[cn]=Ke,Sn=(Ie,cn)=>{for(var Ke in cn||(cn={}))Oe.call(cn,Ke)&&Nn(Ie,Ke,cn[Ke]);if(Ge)for(var Ke of Ge(cn))On.call(cn,Ke)&&Nn(Ie,Ke,cn[Ke]);return Ie},Zn=(Ie,cn)=>ce(Ie,be(cn)),re=(Ie,cn)=>{var Ke={};for(var Ht in Ie)Oe.call(Ie,Ht)&&cn.indexOf(Ht)<0&&(Ke[Ht]=Ie[Ht]);if(Ie!=null&&Ge)for(var Ht of Ge(Ie))cn.indexOf(Ht)<0&&On.call(Ie,Ht)&&(Ke[Ht]=Ie[Ht]);return Ke},Wt=(Ie,cn,Ke)=>new Promise((Ht,Lt)=>{var Ct=kt=>{try{Zt(Ke.next(kt))}catch(_t){Lt(_t)}},Dt=kt=>{try{Zt(Ke.throw(kt))}catch(_t){Lt(_t)}},Zt=kt=>kt.done?Ht(kt.value):Promise.resolve(kt.value).then(Ct,Dt);Zt((Ke=Ke.apply(Ie,cn)).next())});function Me(Ie){return/^\d+$/.test(Ie)?`${Ie}px`:Ie}function ln(){}let Dn=!1;const Ae={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function pn(Ie=[]){let cn=Ie;if(Array.isArray(Ie)){for(let Ke=0;KeWt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Ie){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Ie)}});var Fe=Ie=>{var cn=Ie,{width:Ke="100%",height:Ht="100%",value:Lt,language:Ct="javascript",style:Dt={},options:Zt={},overrideServices:kt={},theme:_t="vs-dark",onEditBlur:tn,isCopy:an=!1,onSave:_n,autoHeight:nn=!1,forbidCopy:Pn=!1,onChange:je=ln,editorDidMount:In=ln,onFocus:ti=ln,onBreakPoint:Ii=ln,breakPointValue:ni=[],filename:Pi="educoder.txt",errorLine:Zi,errorContent:ii="",highlightLine:ci,openBreakPoint:li=!1,placeholder:di="",showMiniMap:cr=!0}=cn,Gr=re(cn,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const fr=(0,bt.useRef)(),Di=(0,bt.useRef)({}),Zr=(0,bt.useRef)(),Mo=(0,bt.useRef)(),Ha=(0,bt.useRef)([]),pa=(0,bt.useRef)(!1),xa=(0,bt.useRef)(),_a=(0,bt.useRef)(),Oa=(0,bt.useRef)(!1),[Go,Cn]=(0,bt.useState)(!1);function wt(){let We;return fr.current&&(We=new ie.Z(Ln=>{for(let ji of Ln)(ji.target.offsetHeight>0||ji.target.offsetWidth>0)&&Di.current.instance.layout()}),We.observe(fr.current)),We}function Ue(){jt.ZP.warning({content:decodeURIComponent(nt),key:"monaco-editor-tip"})}const He=()=>{let We=Di.current.instance;if(Lt!=null&&We&&Go){const Ln=We.getModel();Ln&&Lt!==Ln.getValue()&&(Dn=!0,Ln.setValue(Lt),We.layout(),Dn=!1)}};(0,bt.useEffect)(()=>{const We=qt.Z.subscribe("formatDocument",Ln=>{var ji;let Ar=Di.current.instance;(ji=Ar==null?void 0:Ar.getAction)==null||ji.call(Ar,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ln=>{je(Ln)},We},[]),(0,bt.useEffect)(()=>{var We;let Ln=Di.current.instance;Mo.current&&clearTimeout(Mo.current),Mo.current=setTimeout(()=>{He()},500),Lt&&(Lt!=null&&Lt.length)&&((We=Ln==null?void 0:Ln.updateOptions)==null||We.call(Ln,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Lt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Lt,Go,Di.current]),(0,bt.useEffect)(()=>{if(Zi&&Di.current&&Di.current.instance){let Ln=Di.current.instance;Ln.changeViewZones(function(ji){var Ar=document.createElement("div");Ar.style.padding="10px 20px",Ar.style.width="calc(100% - 20px)",Ar.className="my-error-line-wrp",Ar.innerHTML=ii,ji.addZone({afterLineNumber:Zi||11,heightInLines:3,domNode:Ar})});var We={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Ln.addOverlayWidget(We),Ln.revealPositionInCenter({lineNumber:20,column:1})}},[Zi,Di.current,Go]);const wi=(We="",Ln)=>{if(!We||We.trim()==="")return!0;const Ar=Di.current.instance.getModel().getLineTokens(Ln);let Hn=!1;for(let Be=0;Be<2;Be++)Ar.getStandardTokenType(Be)===1&&(Hn=!0);return Hn};(0,bt.useEffect)(()=>{var We;const Ln=(We=Di.current)==null?void 0:We.instance;if(Ln&&Go&&Pn){const ji=Ln.onDidBlurEditorWidget(()=>{Oa.current=!1}),Ar=Ln.onDidFocusEditorText(()=>{Oa.current=!0});return()=>{ji.dispose(),Ar.dispose()}}},[Di.current,Go,Pn]),(0,bt.useEffect)(()=>{var We;if((We=Di.current)!=null&&We.instance&&Go&&li){let Ln=Di.current.instance,ji=Ln.getModel();if(!ji)return;(()=>{var Ei;let bi=[],Wi=[];const $r=ji.getAllDecorations();for(let Xn of $r)Xn.options.className==="highlighted-line"&&(bi.push((Ei=Xn==null?void 0:Xn.range)==null?void 0:Ei.startLineNumber),Wi.push(Xn==null?void 0:Xn.id));if(ci===bi[0])return;ji.deltaDecorations(Wi,[]);const Kr=ji.getLineCount();ci&&ci<=Kr&&(Ln.deltaDecorations([],[{range:new $e.Range(ci,1,ci,ji.getLineMaxColumn(ci)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ln.revealLineInCenter(ci))})();const Hn=(Ei=!1)=>{var bi;let Wi=[],$r=[];const Kr=ji.getAllDecorations();for(let Xn of Kr)Xn.options.linesDecorationsClassName==="breakpoints-select"&&(Wi.push((bi=Xn==null?void 0:Xn.range)==null?void 0:bi.startLineNumber),$r.push(Xn==null?void 0:Xn.id));if(Ei)return{lines:Wi,ids:$r};Ii(Wi)},Be=Ei=>Wt(void 0,null,function*(){let bi={range:new $e.Range(Ei,1,Ei,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield ji.deltaDecorations([],[bi]),Hn()}),xi=Ei=>Wt(void 0,null,function*(){let bi=[];const Wi=Ln.getLineDecorations(Ei);for(let $r of Wi)$r.options.linesDecorationsClassName==="breakpoints-select"&&bi.push($r.id);yield ji.deltaDecorations(bi,[]),Hn()}),Ki=Ei=>{let bi=Ln.getLineDecorations(Ei);for(let Wi of bi)if(Wi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ne.isEqual)(ni,Hn(!0).lines)){ji.deltaDecorations(Hn(!0).ids,[]);const Ei=ni.map(bi=>({range:new $e.Range(bi,1,bi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));ji.deltaDecorations([],Ei)}const Tr=Ln.onDidChangeModelContent(Ei=>{let bi=Ln.getPosition();if(bi){let Wi=bi.lineNumber;clearTimeout(_a.current),_a.current=setTimeout(()=>{wi(ji.getLineContent(Wi),Wi)?xi(Wi):Ki(Wi)?(xi(Wi),Be(Wi)):Hn()},100)}}),mn=Ln.onMouseDown(Ei=>{var bi,Wi,$r;if(Ei.target.detail&&(($r=(Wi=(bi=Ei.target)==null?void 0:bi.element)==null?void 0:Wi.className)!=null&&$r.includes("line-numbers"))){let Kr=Ei.target.position.lineNumber;if(wi(ji.getLineContent(Kr),Kr))return;Ki(Kr)?xi(Kr):Be(Kr)}}),Ni=Ei=>{let bi={range:new $e.Range(Ei,1,Ei,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ha.current=Ln.deltaDecorations(Ha.current,[bi])},io=()=>{Ha.current=Ln.deltaDecorations(Ha.current,[])},ma=Ln.onMouseMove(Ei=>{var bi,Wi,$r;if(io(),Ei.target.detail&&(($r=(Wi=(bi=Ei.target)==null?void 0:bi.element)==null?void 0:Wi.className)!=null&&$r.includes("line-numbers"))){let Kr=Ei.target.position.lineNumber;if(wi(ji.getLineContent(Kr),Kr))return;Ni(Kr)}}),Ao=Ln.onMouseLeave(()=>{io()});return()=>{Tr.dispose(),mn.dispose(),ma.dispose(),Ao.dispose()}}},[Di.current,Go,ni,ci,li,Ct]),(0,bt.useEffect)(()=>{var We;(We=Di.current)!=null&&We.instance&&li&&Di.current.instance.setPosition({lineNumber:0,column:0})},[ci]);function hi(){let We=Di.current.instance;if(We){const Ln=We.getSelection(),ji=Di.current.pastePos||{},Ar=new $e.Range(ji.startLineNumber||Ln.endLineNumber,ji.startColumn||Ln.endColumn,ji.endLineNumber||Ln.endLineNumber,ji.endColumn||Ln.endColumn);setTimeout(()=>{We.executeEdits("",[{range:Ar,text:""}])},300)}}function Un(We){(window.navigator.platform.match("Mac")?We.metaKey:We.ctrlKey)&&We.keyCode==83&&(We.preventDefault(),_n())}const zi=()=>{if(nn&&Di.current.instance){const We=Di.current.instance.getContentHeight();Mi(We{if(!Oa.current)return;const{keyCode:Ln,ctrlKey:ji,metaKey:Ar,target:Hn,type:Be}=We;return(Be==="paste"||(Ln===67||Ln===86)&&(Ar||ji))&&Hn.nodeName==="TEXTAREA"&&(Ue(),We.preventDefault()),!1};function on(We,Ln){var ji=window.URL||window.webkitURL||window,Ar=new Blob([Ln]),Hn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Hn.href=ji.createObjectURL(Ar),Hn.download=We,hr(Hn)}(0,bt.useEffect)(()=>{zi()},[zi]),(0,bt.useEffect)(()=>{fr.current&&!Go&&Promise.all([Nt.e(5552),Nt.e(9651)]).then(Nt.bind(Nt,55826)).then(We=>{try{$e=We,Di.current.instance=$e.editor.create(fr.current,{value:Lt,language:pn(Ct),theme:_t,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:cr||!1}},kt);const Ln=Di.current.instance;let Hn=[...Mt.BH._menuItems].find(Tr=>Tr[0]._debugName=="EditorContext")[1],Be=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],xi=(Tr,mn)=>{var Ni,io;let ma=Tr._first;do mn.includes((io=(Ni=ma.element)==null?void 0:Ni.command)==null?void 0:io.id)&&Tr._remove(ma);while(ma=ma.next)};if(In(Ln,$e),setTimeout(()=>{zi(),Di.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{on(Pi||"educoder.txt",Ln.getValue())}})},500),Di.current.subscription=Ln.onDidChangeModelContent(Tr=>{pa.current?clearTimeout(xa.current):(zi(),je(Ln.getValue(),Tr)),xa.current=setTimeout(()=>{pa.current=!1},500)}),window.Monaco||Ft($e,pn(Ct)),Pn&&(xi(Hn,Be),fr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Qe),window.removeEventListener("paste",Qe),window.addEventListener("keydown",Qe),window.addEventListener("paste",Qe)),window.Monaco=$e,tn&&Ln.onDidBlurEditorWidget(()=>{tn(Ln.getValue())}),ti&&Ln.onDidFocusEditorText(()=>{Pn&&An(),ti(Ln.getValue())}),Pn){An();try{Ln.onDidPaste(Tr=>{const mn=Ln.getSelection(),Ni=Di.current.pastePos||{},io=new $e.Range(Ni.startLineNumber||mn.endLineNumber,Ni.startColumn||mn.endColumn,Ni.endLineNumber||mn.endLineNumber,Ni.endColumn||mn.endColumn);Ln.executeEdits("",[{range:Tr.range,text:""}])})}catch(Tr){}}let Ki=wt();return di&&typeof di=="string"&&new xt(di,Ln,$e),Cn(!0),()=>{const Tr=Di.current.instance;Tr.dispose();const mn=Tr.getModel();mn&&mn.dispose(),Di.current.subscription&&Di.current.subscription.dispose(),Ki.unobserve(fr.current)}}catch(Ln){}})},[]),(0,bt.useEffect)(()=>{if(Di.current.instance&&Go)return document.addEventListener("keydown",Un,!1),()=>{document.removeEventListener("keydown",Un)}},[_n,Go]),(0,bt.useEffect)(()=>{let We=Di.current.instance;if(We&&Go){let Ln=pn(Ct);$e.editor.setModelLanguage(We.getModel(),Ln)}},[Ct,Go]),(0,bt.useEffect)(()=>{Di.current.instance&&Go&&$e.editor.setTheme(_t)},[_t,Go]),(0,bt.useEffect)(()=>{let We=Di.current.instance;Zr.current=Zt,We&&Go&&(We.updateOptions(Sn({},Zt)),setTimeout(()=>{We.getModel().updateOptions(Sn({},Zt))},200))},[JSON.stringify(Zt),Go]),(0,bt.useEffect)(()=>{let We=Di.current.instance;We&&Go&&We.layout()},[Ke,Ht,Go]);const[Pe,_e]=(0,bt.useState)(Me(Ke)),[fi,Mi]=(0,bt.useState)(Me(Ht)),Si=Zn(Sn({},Dt),{width:Pe,height:fi,position:"relative"});return bt.createElement("div",{className:"my-monaco-editor",ref:fr,style:Si},an&&bt.createElement($t.CopyToClipboard,{text:Lt,onCopy:()=>jt.ZP.success("\u590D\u5236\u6210\u529F")},bt.createElement(Qt.Z,{title:"\u590D\u5236\u4EE3\u7801"},bt.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},bt.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function de({width:Ie="100%",height:cn="100%",original:Ke,modified:Ht,language:Lt,options:Ct={}}){const Dt=(0,bt.useRef)(),[Zt,kt]=(0,bt.useState)(null);function _t(nn){let Pn;return Dt.current&&(Pn=new ie.Z(je=>{for(let In of je)(In.target.offsetHeight>0||In.target.offsetWidth>0)&&nn.layout()}),Pn.observe(Dt.current)),Pn}(0,bt.useEffect)(()=>(Dt.current&&Promise.all([Nt.e(5552),Nt.e(9404)]).then(Nt.bind(Nt,50048)).then(nn=>{$e=nn;const Pn=$e.editor.createDiffEditor(Dt.current,Zn(Sn({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ct),{wordWrap:!0}));kt(Pn);let je=_t(Pn);return()=>{Pn.dispose();const In=Pn.getModel();In&&In.dispose(),je.unobserve(Dt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,bt.useEffect)(()=>{Zt&&Zt.setModel({original:$e.editor.createModel(Ke,Lt),modified:$e.editor.createModel(Ht,Lt)})},[Ke,Ht,Lt,Zt]);const tn=Me(Ie),an=Me(cn),_n={width:tn,height:an};return bt.createElement("div",{className:"my-diff-editor",ref:Dt,style:_n})}},99914:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return ie}});var bt=Nt(67294);function ie(De,Ne){const Le=(0,bt.useRef)();(0,bt.useEffect)(()=>{Le.current=De}),(0,bt.useEffect)(()=>{function It(){Le.current()}if(Ne!==null){let Jt=setInterval(It,Ne);return()=>clearInterval(Jt)}},[Ne])}},17998:function(En,jn,Nt){"use strict";Nt.d(jn,{Q8:function(){return Wt},d0:function(){return Me},w6:function(){return re}});var bt=Nt(67294),ie=Nt(18046),De=Nt(88044),Ne=Nt(2453),Le=Nt(62844),It=Nt(98813),Jt=Nt(71230),fe=Nt(15746),ve=Nt(83062),xe=Nt(84567),Ve=Nt(85804),he=Nt(94699),Rt=Nt.n(he),Ft=Nt(52262),nt=Nt(33170),et=Nt(96486),ht=Nt.n(et),lt=Nt(28706),gt=Nt(39886),mt=Nt(35973),xt=Nt(39717),Mt=Nt(78207),jt=Nt(92882),Qt=Nt(96332),ne=Nt(93686),qt=Nt(67294),$t=Object.defineProperty,we=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,On=($e,An,Fe)=>An in $e?$t($e,An,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):$e[An]=Fe,Nn=($e,An)=>{for(var Fe in An||(An={}))Ge.call(An,Fe)&&On($e,Fe,An[Fe]);if(be)for(var Fe of be(An))Oe.call(An,Fe)&&On($e,Fe,An[Fe]);return $e},Sn=($e,An)=>we($e,ce(An)),Zn=($e,An,Fe)=>new Promise((de,Ie)=>{var cn=Lt=>{try{Ht(Fe.next(Lt))}catch(Ct){Ie(Ct)}},Ke=Lt=>{try{Ht(Fe.throw(Lt))}catch(Ct){Ie(Ct)}},Ht=Lt=>Lt.done?de(Lt.value):Promise.resolve(Lt.value).then(cn,Ke);Ht((Fe=Fe.apply($e,An)).next())});function re($e,An){const Fe=[];for(let de=$e;de{const de=$eRt()(An).endOf("day"),cn=$e{const Fe=parseInt(Rt()($e).format("HH")),de=parseInt(Rt()().format("HH")),Ie=parseInt(Rt()().format("mm"));if(!$e)return{disabledHours:()=>re(0,de),disabledMinutes:()=>re(0,Ie)};if(An){const cn=parseInt(Rt()(An).format("HH")),Ke=parseInt(Rt()(An).format("mm"));return Rt()($e).isSame(Rt()(An),"day")?{disabledHours:()=>re(0,cn),disabledMinutes:()=>Fe<=cn?re(0,Ke):[]}:void 0}if(Rt()($e).isSame(Rt()(),"day"))return{disabledHours:()=>re(0,de),disabledMinutes:()=>Rt()($e).isSame(Rt()(),"hour")&&Fe<=de?re(0,Ie):[]}},ln=($e,An)=>$e==null?void 0:$e.map(Fe=>{var de;return(de=An==null?void 0:An.find(Ie=>Ie.value===Fe))==null?void 0:de.id}),{RangePicker:Dn}=ie.default,{Option:Ae}=De.default,pn=({shixunHomeworks:$e,loading:An,dispatch:Fe,classroomList:de,user:Ie})=>{var cn,Ke,Ht,Lt,Ct,Dt,Zt,kt,_t;const tn=(0,mt.useParams)(),{workSetting:an,workList:_n,shixunWorkList:nn,headerInfo:Pn,changeData:je}=$e,[In,ti]=(0,bt.useState)(!1),[Ii,ni]=(0,bt.useState)(!1);let[Pi,Zi]=(0,bt.useState)([]),[ii,ci]=(0,bt.useState)([]),[li,di]=(0,bt.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:xt.Q.Percent,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,action_analysis:!1,work_end_forbid_evaluate:!1});const[cr,Gr]=(0,bt.useState)({}),[fr,Di]=(0,bt.useState)({});(0,bt.useEffect)(()=>()=>{Zi([])},[]),(0,bt.useEffect)(()=>{ti(!(0,Ft.GJ)())},[(0,Ft.GJ)()]);const Zr=()=>{Fe({type:"shixunHomeworks/getWorkSetting",payload:Nn({},tn)})};(0,bt.useEffect)(()=>{if(!(an!=null&&an.course_id))return;Object.keys(li).map(function(He){li[He]=an[He]}),(!li.allow_late||!li.unified_late)&&(li.late_penalty=20,li.penalty_type=xt.Q.Percent),li.unified_setting||(li.unified_late=!1,li.unified_anonymous_comment=!1,li.unified_anonymous_appeal=!1),Pi=JSON.parse(JSON.stringify(an.group_settings.map(He=>Sn(Nn({},He),{group_name:[He.group_name]})).filter(He=>He.publish_time!==null))),ii=JSON.parse(JSON.stringify(an.allow_late_settings.map(He=>Sn(Nn({},He),{group_name:[He.group_name]})).filter(He=>He.late_time!==null))),di(Nn({},li));const Ue=(0,lt.QE)((Pi==null?void 0:Pi.length)>0?Pi:[]);Zi([...Ue]),(ii==null?void 0:ii.length)<=0?ci([{penalty_type:xt.Q.Percent,late_penalty:20}]):ci([...ii])},[an]);const Mo=()=>Zn(void 0,null,function*(){var Ue,He;if(((Ue=Ie==null?void 0:Ie.userInfo)==null?void 0:Ue.user_status)===2){(0,Mt.Rd)();return}const wi=JSON.parse(JSON.stringify(li));if(wi.challenge_settings.filter(Un=>!Un.hide),wi.categoryId=tn.categoryId,(He=wi.challenge_settings)!=null&&He.every(Un=>!Un.checked)){Ne.ZP.warning("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(console.log(Pi),!li.unified_setting)Pi=Pi==null?void 0:Pi.map(Un=>{var zi;if(!Un.publish_time||!Un.end_time)throw Ne.ZP.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!Un.group_name)throw Ne.ZP.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Un.group_name=typeof(Un==null?void 0:Un.group_name)=="string"?[Un==null?void 0:Un.group_name]:Un==null?void 0:Un.group_name,Un.group_id=(zi=an.group_settings)==null?void 0:zi.filter(hr=>{var Qe;return(Qe=Un==null?void 0:Un.group_name)==null?void 0:Qe.includes(hr.group_name)}).map(hr=>hr.group_id||hr.id).toString().split(","),Un});else if(!li.publish_time||!li.end_time)throw Ne.ZP.error("\u53D1\u5E03\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A"),new String("\u53D1\u5E03\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A");if(wi.group_settings=Pi,li.allow_late)if(li.unified_late){if(li.late_penalty===null||li.late_penalty===void 0||li.late_penalty<0||li.late_penalty>100)throw Ne.ZP.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!li.late_time)throw Ne.ZP.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else ii=ii==null?void 0:ii.map(Un=>{var zi,hr;if(Un.late_penalty===null||Un.late_penalty===void 0||Un.late_penalty<0||Un.late_penalty>100)throw Ne.ZP.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!Un.late_time)throw Ne.ZP.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!Un.group_name)throw Ne.ZP.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return Un.group_name=typeof(Un==null?void 0:Un.group_name)=="string"?[Un==null?void 0:Un.group_name]:Un==null?void 0:Un.group_name,Un.group_id=(hr=(zi=Un==null?void 0:Un.group_name)==null?void 0:zi.map(Qe=>{var on,Pe;let _e=(Pe=(on=an.group_settings)==null?void 0:on.filter(fi=>(fi==null?void 0:fi.group_name)===Qe))==null?void 0:Pe[0];return _e==null?void 0:_e.group_id}))==null?void 0:hr.toString().split(","),Un}),wi.allow_late_settings=ii;let hi=yield(0,ne.Tr)({homework_common_ids:[parseInt(tn.categoryId)],course_id:tn.coursesId,type:"homework_common"});(hi==null?void 0:hi.student_count)===0?Ha(wi):(Di(wi),Gr(hi))}),Ha=Ue=>{var He;if(Ue.total_score===null){Ne.ZP.warning("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(Ue!=null&&Ue.work_efficiency&&Ue.eff_score===null){Ne.ZP.warning("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}const wi=Ue.challenge_settings.reduce((zi,hr)=>zi+Number(hr.challenge_score),0);if((wi==null?void 0:wi.toFixed(10))!==((He=Ue.total_score-Ue.eff_score)==null?void 0:He.toFixed(10))){Ne.ZP.warning(`\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A${Ue.total_score}\u5206`);return}const hi={shixun_evaluation:Ue.shixun_evaluation,challenge_settings:Ue.challenge_settings};let Un=()=>{var zi;const hr=()=>Zn(void 0,null,function*(){ni(!0),(yield(0,nt.ZP)(`/api/homework_commons/${tn.categoryId}/publish_setting.json`,{method:"post",body:Nn({},Ue)})).status===0&&(Ne.ZP.success("\u66F4\u65B0\u6210\u529F"),Zr(),Fe({type:"shixunHomeworks/getShixunWorkHeadInfo",payload:Nn({},tn)})),ni(!1)});!(0,et.isEqual)(je,hi)&&!((zi=Pn==null?void 0:Pn.homework_status)!=null&&zi.includes("\u672A\u53D1\u5E03"))?Le.default.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:hr}):hr()};an!=null&&an.high_resources_consume&&!(an!=null&&an.high_resources_consume_permission)?Fe({type:"classroomList/setActionTabs",payload:{key:"\u6388\u6743\u4F7F\u7528",id:tn.coursesId,type:"shixun",type_id:tn.categoryId,name:an.homework_name,fn:()=>{Un()}}}):Un()},pa=(Ue,He,wi="group_id")=>{var hi;return He?He.find(Un=>Un[wi]===Ue):(hi=an==null?void 0:an.group_settings)==null?void 0:hi.find(Un=>Un.group_id[0]===Ue)},xa=(an==null?void 0:an.allow_late)||(an==null?void 0:an.anonymous_comment),_a=Ue=>{var He,wi;const hi=pa(Ue,an==null?void 0:an.allow_late_settings,"id"),Un=pa(Ue,an==null?void 0:an.anonymous_comment_settings),zi=pa(Ue);return(an==null?void 0:an.allow_late)&&hi&&Rt()(hi==null?void 0:hi.late_time)<=Rt()()||(an==null?void 0:an.anonymous_comment)&&Un&&(Un==null?void 0:Un.evaluation_start)!==null||((wi=(Rt()(zi==null?void 0:zi.end_time)<=Rt()()&&((He=an==null?void 0:an.allow_late_settings)==null?void 0:He.filter(hr=>hr.group_id.includes(Ue))))[0])==null?void 0:wi.late_time)!=null},Oa=(0,bt.useMemo)(()=>(an==null?void 0:an.allow_late)||(an==null?void 0:an.all_group_late),[an,Pn]),Go=an==null?void 0:an.anonymous_comment,Cn=Ue=>{if(!Ue)return!1;const He=pa(Ue,an==null?void 0:an.anonymous_comment_settings);return(an==null?void 0:an.anonymous_comment)&&He&&(He==null?void 0:He.evaluation_start)!==null},wt=(Ue,He)=>{var wi,hi,Un,zi,hr;Ue!=null&&Ue.group_id||(Ue.group_id=ln(Ue==null?void 0:Ue.group_name,an==null?void 0:an.group_settings)),Fe({type:"classroomList/setActionTabs",payload:{key:"\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",data:Ue,index:He,rangePickerDisabled:(hi=(wi=Ue==null?void 0:Ue.group_id)==null?void 0:wi[0])!=null&&hi.publish_time?In||(Rt()()<=Rt()((zi=pa((Un=Ue==null?void 0:Ue.group_id)==null?void 0:Un[0]))==null?void 0:zi.publish_time)?!1:[!0,_a((hr=Ue==null?void 0:Ue.group_id)==null?void 0:hr[0])]):!1,disabledDate:an==null?void 0:an.course_end_date}})};return qt.createElement("section",{className:gt.Z.form},qt.createElement("div",{className:gt.Z.title},"\u4F5C\u4E1A\u53D1\u5E03",qt.createElement("span",{className:"c-grey-666 font14",style:{fontWeight:400}},"\uFF08\u4F5C\u4E1A\u4E00\u65E6\u53D1\u5E03\u540E\u4E0D\u53EF\u53D8\u66F4\u8BD5\u9898\u53D1\u5E03\u6A21\u5F0F\uFF09")),qt.createElement("div",null,qt.createElement("div",{style:{background:"#F6F7F9",padding:"13px 30px",display:"flex",alignItems:"center"}},qt.createElement(It.ZP.Group,{disabled:In||!((cn=Pn==null?void 0:Pn.homework_status)!=null&&cn.includes("\u672A\u53D1\u5E03"))||(0,Ft.Rm)()&&!((Ke=de.AssistantObject.practice)!=null&&Ke.can_publish),value:li.unified_setting,onChange:Ue=>{var He;if(!((He=Pn==null?void 0:Pn.homework_status)!=null&&He.includes("\u672A\u53D1\u5E03"))){Ne.ZP.error("\u5DF2\u53D1\u5E03\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u7EDF\u4E00\u8BBE\u7F6E");return}if(li.unified_setting=!li.unified_setting,li.unified_setting||(li.unified_late=!1,ci([{late_penalty:5}])),di(Object.assign({},li)),li.unified_setting===!1&&Pi==""){Zi(Pi.concat({}));return}li.unified_setting&&(Zi([]),ci([{late_penalty:5}]))}},qt.createElement(It.ZP,{value:!0,disabled:In||!(an!=null&&an.manage_all_group),style:{marginRight:"50px"}},"\u7EDF\u4E00\u53D1\u5E03"),qt.createElement(It.ZP,{disabled:In||!((Ht=an==null?void 0:an.group_settings)!=null&&Ht.length),value:!1},"\u5206\u73ED\u53D1\u5E03")),((Lt=an==null?void 0:an.group_settings)==null?void 0:Lt.length)===0&&qt.createElement("div",{style:{color:"rgba(0, 0, 0, 0.25)",height:"22px"}},"\uFF08\u672C\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03\u201C\uFF09")),li.unified_setting&&qt.createElement("div",{style:{display:"flex",color:"#666666",background:"#F6F7F9",padding:"5px 30px",height:"50px",marginTop:"1px"}},qt.createElement(Jt.Z,{align:"middle"},qt.createElement(fe.Z,{style:{marginLeft:"23px"}},"\u53D1\u5E03\u65F6\u95F4"),qt.createElement(fe.Z,{className:"ml10"},qt.createElement(ie.default,{size:"large",disabled:In||!((Ct=Pn==null?void 0:Pn.homework_status)!=null&&Ct.includes("\u672A\u53D1\u5E03")||(Dt=Pn==null?void 0:Pn.homework_status)!=null&&Dt.includes("\u672A\u5F00\u59CB"))||(0,Ft.Rm)()&&!((Zt=de.AssistantObject.practice)!=null&&Zt.can_publish),style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:Ue=>Wt(Ue,an==null?void 0:an.course_end_date),disabledTime:Ue=>Me(Ue),value:li.publish_time?Rt()(li.publish_time):"",onChange:(Ue,He)=>{li.publish_time=He,(li.end_time==""||!li.end_time)&&li.unified_setting&&(li.end_time=Rt()(Ue).add(7,"days").format("YYYY-MM-DD HH:mm:ss")),di(Object.assign({},li))}}))),qt.createElement(Jt.Z,{align:"middle",className:"pl30"},qt.createElement(fe.Z,null,"\u622A\u6B62\u65F6\u95F4"),qt.createElement(fe.Z,{className:"ml10"},qt.createElement(ie.default,{size:"large",style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:Rt()((0,lt.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:(an==null?void 0:an.allow_late)&&(an==null?void 0:an.homework_status.includes("\u5DF2\u622A\u6B62"))||In||(an==null?void 0:an.allow_late)&&Rt()()>=Rt()(an==null?void 0:an.end_time)||(0,Ft.Rm)()&&!((kt=de.AssistantObject.practice)!=null&&kt.can_publish),disabledDate:Ue=>Wt(Ue,an==null?void 0:an.course_end_date,li.publish_time),disabledTime:Ue=>Me(Ue,li.publish_time),value:li.end_time?Rt()(li.end_time):"",onChange:(Ue,He)=>{li.end_time=He,di(Object.assign({},li))}})))),!li.unified_setting&&(Pi==null?void 0:Pi.length)>0&&qt.createElement(Jt.Z,{style:{display:"flex",color:"#666666",background:"#F6F7F9",padding:"5px 30px",marginTop:"1px"}},Pi&&Pi.map(function(Ue,He){var wi,hi,Un,zi,hr,Qe,on;return qt.createElement(fe.Z,{span:24,key:He},qt.createElement(Jt.Z,{gutter:[8,16],style:{display:"flex",alignItems:"center",marginBottom:He==(Pi==null?void 0:Pi.length)-1?"0px":"10px"}},qt.createElement("div",{style:{minWidth:85,marginRight:"15px",textAlign:"right"}},"\u53D1\u5E03\u89C4\u5219",He+1),qt.createElement(De.default,{disabled:In||((wi=Pn==null?void 0:Pn.homework_status)!=null&&wi.includes("\u672A\u53D1\u5E03")&&Ue.id||Rt()(){var _e;if((0,Ft.Rm)()&&!((_e=de.AssistantObject.practice)!=null&&_e.can_publish)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Pi[He].group_name=Pe,Pi[He].group_id=Ue.group_id;const fi=(0,et.flattenDeep)(Pi.map(Si=>Si.group_name)),Mi=ii.map(Si=>{let We=(Si==null?void 0:Si.group_name)||[];return Sn(Nn({},Si),{group_name:(0,et.remove)(We,Ln=>fi.includes(Ln))})});ci(Mi),Zi(Pi.slice())},maxTagCount:4,maxTagPlaceholder:Pe=>qt.createElement("div",{style:{cursor:"pointer"},onClick:()=>wt(Ue,He)},"+",Pe==null?void 0:Pe.length)},an.group_settings&&an.group_settings.map(function(Pe){if(!Pi.map(fi=>fi.group_name).flat().includes(Pe.group_name))return qt.createElement(Ae,{value:Pe.group_name,key:Pe.id},Pe.group_name)})),qt.createElement("div",{className:"ml20"},qt.createElement(Dn,{size:"large",ranges:{\u6B64\u523B:[Ue.publish_time?Rt()(Ue.publish_time):Rt()(),Rt()()]},allowClear:!1,disabled:In||(Rt()()<=Rt()((zi=pa((Un=Ue==null?void 0:Ue.group_id)==null?void 0:Un[0]))==null?void 0:zi.publish_time)?!1:[!0,_a((hr=Ue==null?void 0:Ue.group_id)==null?void 0:hr[0])]),style:{width:605},placeholder:["\u53D1\u5E03\u65F6\u95F4\uFF08\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4\uFF09","\u622A\u6B62\u65F6\u95F4\uFF08\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9\uFF09"],disabledDate:Pe=>Wt(Pe,an==null?void 0:an.course_end_date),disabledTime:Pe=>Me(Pe),showTime:{showNow:!0,format:"HH:mm",defaultValue:[Rt()((0,lt.U6)(),"HH:mm"),Rt()((0,lt.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:[Ue.publish_time?Rt()(Ue.publish_time):void 0,Ue.end_time?Rt()(Ue.end_time):void 0],onChange:(Pe,_e)=>{var fi;if((0,Ft.Rm)()&&!((fi=de.AssistantObject.practice)!=null&&fi.can_publish)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Pi[He].publish_time=_e[0],!Ue.end_time&&_e[0]?Pi[He].end_time=Rt()(_e[0]).add(7,"days"):Pi[He].end_time=_e[1],Zi([...Pi])},onCalendarChange:(Pe,_e,fi)=>{if(_e!=null&&_e[0]&&!_e[1]){const Mi=Rt()(_e[0]).add(7,"days");Pi[He].publish_time=_e[0],Pi[He].end_time=Mi,Zi([...Pi])}}})),!In&&qt.createElement("div",{style:{display:"flex",width:"50px"}},((Qe=Ue==null?void 0:Ue.group_id)==null?void 0:Qe.length)>1&&qt.createElement(ve.Z,{title:"\u89C4\u5219\u62C6\u5206"},qt.createElement("i",{className:"iconfont icon-chaifen ml10",style:{cursor:"pointer",color:"#3061d0"},onClick:()=>wt(Ue,He)})),Pi.length<((on=an==null?void 0:an.group_settings)==null?void 0:on.length)&&qt.createElement("i",{className:"iconfont icon-zengjia1 ml10 mr10",style:{cursor:"pointer",color:"#00B187"},onClick:()=>{var Pe;if((0,Ft.Rm)()&&!((Pe=de.AssistantObject.practice)!=null&&Pe.can_publish)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Zi(Pi.concat({}))}}),((Ue==null?void 0:Ue.publish_time)&&Rt()(){const Pe=(0,et.cloneDeep)(ii);Pe.forEach((_e,fi)=>{_e.group_name&&(_e.group_name=_e.group_name.filter(Mi=>{var Si;return!((Si=Pi[He].group_name)!=null&&Si.includes(Mi))}))}),Pi=Pi.filter((_e,fi)=>He!==fi),ci(Pe),Zi(Pi.slice()),setTimeout(()=>Zi(Pi.slice()),10)}}))))}))),qt.createElement(Jt.Z,null,qt.createElement(fe.Z,null,qt.createElement("div",{className:gt.Z.title,style:{marginTop:"30px"}},"\u8865\u4EA4\u8BBE\u7F6E",qt.createElement("span",{className:"c-grey-666 font14",style:{fontWeight:400}},"\uFF08\u53EF\u5BF9\u5728\u4F5C\u4E1A\u53D1\u5E03\u65F6\u95F4\u8303\u56F4\u5185\u672A\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\uFF0C\u5EF6\u957F\u65F6\u95F4\u8FDB\u884C\u8865\u4EA4\uFF09"))),qt.createElement(fe.Z,{span:24,style:{background:"#F6F7F9",padding:"13px 30px",display:"flex",alignItems:"center"}},qt.createElement(xe.default,{checked:li.allow_late,disabled:In||Oa,onChange:Ue=>{var He;if((0,Ft.Rm)()&&!((He=de.AssistantObject.practice)!=null&&He.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Ue.target.checked&&Le.default.warning({title:"\u5F00\u542F\u8865\u4EA4\u63D0\u793A",centered:!0,width:480,content:qt.createElement("div",{style:{padding:10,background:"#f5f6f9"}},qt.createElement("div",null,"1.\u5F00\u542F\u8865\u4EA4\u540E\u4E0D\u53EF\u5173\u95ED\uFF0C\u8865\u4EA4\u65B9\u5F0F\u63D0\u4EA4\u4FDD\u5B58\u540E\u4E0D\u53EF\u4FEE\u6539\uFF1B"),qt.createElement("div",null,"2.\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u5FC5\u987B\u665A\u4E8E\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\uFF1B"),qt.createElement("div",null,"3.\u73ED\u7EA7\u9636\u6BB5\u8FDB\u5165\u201C\u8865\u4EA4\u4E2D\u201D\u5219\u4E0D\u53EF\u53D8\u66F4\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\u3002"))}),li.allow_late=!li.allow_late,ii==""&&ci([{late_penalty:5}]),di(Object.assign({},li))}},qt.createElement("strong",null,"\u5F00\u542F\u8865\u4EA4")))),(li==null?void 0:li.allow_late)&&qt.createElement("div",{style:{background:"#F6F7F9",padding:"10px 30px",marginTop:"1px",color:"#666666"}},qt.createElement("div",{style:{display:"flex"}},qt.createElement("div",{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u65B9\u5F0F"),qt.createElement(It.ZP.Group,{style:{marginLeft:"20px"},disabled:In||(an==null?void 0:an.anonymous_comment)||(an==null?void 0:an.allow_late),value:li.unified_late,onChange:Ue=>{var He;if((0,Ft.Rm)()&&!((He=de.AssistantObject.practice)!=null&&He.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}li.unified_late=Ue.target.value,ii==""&&!Ue.target.value&&ci([{penalty_type:xt.Q.Percent,late_penalty:20}]),di(Nn({},li))}},(li==null?void 0:li.unified_setting)&&qt.createElement(It.ZP,{value:!0,disabled:!(an!=null&&an.manage_all_group),style:{marginRight:"50px"}},"\u7EDF\u4E00\u8865\u4EA4"),((_t=an==null?void 0:an.group_settings)==null?void 0:_t.length)>0&&qt.createElement(It.ZP,{value:!1},"\u5206\u73ED\u8865\u4EA4"))),li!=null&&li.unified_late?qt.createElement(qt.Fragment,null,qt.createElement(Jt.Z,{align:"middle",style:{marginTop:"10px"}},qt.createElement(fe.Z,{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u6263\u5206"),qt.createElement(fe.Z,{className:"ml20"},qt.createElement(xt.Z,{disabled:In||Go,value:{type:li.penalty_type,inputValue:li.late_penalty},onChange:Ue=>{var He;if((0,Ft.Rm)()&&!((He=de.AssistantObject.practice)!=null&&He.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}di(Sn(Nn({},li),{late_penalty:Ue.inputValue,penalty_type:Ue.type}))}})),qt.createElement(fe.Z,{flex:"1",className:"ml5"},qt.createElement("span",{className:"c-grey-c ml10"},li.penalty_type===xt.Q.Number?"(\u8865\u4EA4\u65F6\u6309\u7167\u5B66\u751F\u603B\u6210\u7EE9\u6263\u5206)":"(\u5B66\u751F\u6700\u7EC8\u5F97\u5206=\u8865\u4EA4\u524D\u5F97\u5206+\u8865\u4EA4\u9636\u6BB5\u589E\u52A0\u7684\u5206\u503C*\uFF08100%-\u767E\u5206\u6BD4%\uFF09)"))),qt.createElement(Jt.Z,{align:"middle",style:{marginTop:"15px"}},qt.createElement(fe.Z,{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4"),qt.createElement(fe.Z,{className:"ml20"},qt.createElement(ie.default,{size:"large",allowClear:!1,style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:Rt()((0,lt.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:In||Go,value:li.late_time?Rt()(li.late_time):"",disabledDate:Ue=>Wt(Ue,an==null?void 0:an.course_end_date),onChange:(Ue,He)=>{var wi;if((0,Ft.Rm)()&&!((wi=de.AssistantObject.practice)!=null&&wi.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}li.late_time=He,di(Object.assign({},li))}})))):ii.map(function(Ue,He){var wi;return qt.createElement(fe.Z,{span:24,key:He},qt.createElement(Jt.Z,{style:{display:"flex",alignItems:"center",marginTop:"10px"}},qt.createElement("div",{style:{width:"85px",marginLeft:"27px",textAlign:"right"}},"\u8865\u4EA4\u89C4\u5219",He+1),qt.createElement(De.default,{disabled:In||!((wi=Pn==null?void 0:Pn.homework_status)!=null&&wi.includes("\u672A\u53D1\u5E03"))&&Ue.id||(an==null?void 0:an.anonymous_comment),mode:"multiple",className:gt.Z.multiple_select,style:{width:"212px",marginLeft:"18px"},value:typeof Ue.group_name=="string"?[Ue.group_name]:Ue.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:hi=>{var Un;if((0,Ft.Rm)()&&!((Un=de.AssistantObject.practice)!=null&&Un.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ii[He].group_name=hi,ii[He].group_id=Ue.group_id,ci(ii.slice())}},an.group_settings&&an.group_settings.map(function(hi){const Un=ii.map(hr=>hr.group_name).flat(),zi=Pi.map(hr=>hr.group_name).flat();if(li!=null&&li.unified_setting){if(!Un.includes(hi.group_name))return qt.createElement(Ae,{value:hi.group_name,key:hi.id},hi.group_name)}else if(zi.includes(hi.group_name)&&!Un.includes(hi.group_name))return qt.createElement(Ae,{value:hi.group_name,key:hi.id},hi.group_name)})),qt.createElement("div",{className:"ml20 mr10"},"\u8865\u4EA4\u6263\u5206"),qt.createElement(xt.Z,{disabled:In||Cn(Ue.id),value:{type:Ue.penalty_type,inputValue:Ue.late_penalty},onChange:hi=>{var Un;if((0,Ft.Rm)()&&!((Un=de.AssistantObject.practice)!=null&&Un.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ii[He].late_penalty=hi.inputValue,ii[He].penalty_type=hi.type,ci([...ii])}}),qt.createElement("div",{className:"ml20 mr10"},"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4"),qt.createElement(ie.default,{size:"large",disabled:In||Cn(Ue.id),style:{width:225},showTime:{format:"HH:mm",defaultValue:Rt()((0,lt.U6)(),"HH:mm")},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",disabledDate:hi=>Wt(hi,an==null?void 0:an.course_end_date),format:"YYYY-MM-DD HH:mm",value:Ue!=null&&Ue.late_time?Rt()(Ue.late_time):void 0,onChange:(hi,Un)=>{var zi;if((0,Ft.Rm)()&&!((zi=de.AssistantObject.practice)!=null&&zi.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ii[He].late_time=Un,ci([...ii])}}),!In&&qt.createElement("div",{style:{display:"flex",width:"50px"}},qt.createElement("i",{className:"iconfont icon-zengjia1 ml10 mr10",style:{cursor:"pointer",color:"#00B187"},onClick:()=>{var hi;if((0,Ft.Rm)()&&!((hi=de.AssistantObject.practice)!=null&&hi.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ci(ii.concat({penalty_type:xt.Q.Percent,late_penalty:20}))}}),He>0&&!Ue.id&&qt.createElement("i",{className:"iconfont icon-shanjian1",style:{cursor:"pointer",color:"#E30000"},onClick:()=>{var hi;if((0,Ft.Rm)()&&!((hi=de.AssistantObject.practice)!=null&&hi.can_late)){Ne.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}ii=ii.filter((Un,zi)=>He!==zi),ci(ii.slice()),setTimeout(()=>ci(ii.slice()),10)}}))))})),!In&&qt.createElement(qt.Fragment,null,qt.createElement(Ve.ZP,{type:"primary",size:"large",loading:Ii,style:{width:"138px",marginTop:"30px"},onClick:()=>Mo()},"\u4FDD\u5B58")),qt.createElement(jt.Z,{onConfirm:(Ue,He)=>{Pi.splice(Ue,0,...He),Pi.splice(Ue+He.length,1);const wi=(0,lt.QE)([...Pi]);Zi([...wi])}}),qt.createElement(Qt.Z,{resdata:cr,type:"shixun",okloading:Ii,oktext:(cr==null?void 0:cr.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:Ue=>Zn(void 0,null,function*(){ni(!0);let He=yield(0,nt.ZP)(`/api/courses/${tn.coursesId}/batch_copy_shixuns.json`,{method:"post",body:{type:"homework_common",ids:[parseInt(tn.categoryId)]}});ni(!1),(He==null?void 0:He.status)===0&&Ha(fr)})}))};jn.ZP=(0,mt.connect)(({shixunHomeworks:$e,classroomList:An,loading:Fe,user:de})=>({shixunHomeworks:$e,classroomList:An,loading:Fe.effects,user:de}))(pn)},6151:function(En,jn,Nt){"use strict";var bt=Nt(67294),ie=Nt(35059),De=Nt(91773),Ne=Nt(62844),Le=Nt(2453),It=Nt(57399),Jt=Nt(35973),fe=Nt(11320),ve=Nt(67795),xe=Nt(33170),Ve=Nt(94699),he=Nt.n(Ve),Rt=Nt(28706),Ft=Nt(67294),nt=Object.defineProperty,et=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,gt=(Qt,ne,qt)=>ne in Qt?nt(Qt,ne,{enumerable:!0,configurable:!0,writable:!0,value:qt}):Qt[ne]=qt,mt=(Qt,ne)=>{for(var qt in ne||(ne={}))ht.call(ne,qt)&>(Qt,qt,ne[qt]);if(et)for(var qt of et(ne))lt.call(ne,qt)&>(Qt,qt,ne[qt]);return Qt},xt=(Qt,ne,qt)=>new Promise(($t,we)=>{var ce=Oe=>{try{Ge(qt.next(Oe))}catch(On){we(On)}},be=Oe=>{try{Ge(qt.throw(Oe))}catch(On){we(On)}},Ge=Oe=>Oe.done?$t(Oe.value):Promise.resolve(Oe.value).then(ce,be);Ge((qt=qt.apply(Qt,ne)).next())});const{Dragger:Mt}=ie.default,jt=({classroomList:Qt,dispatch:ne,onOk:qt})=>{const $t=(0,Jt.useParams)(),[we]=De.default.useForm(),[ce,be]=(0,bt.useState)(),[Ge,Oe]=(0,bt.useState)(!1),On={height:100,onRemove:()=>{be("")},accept:".xls,.xlsx",multiple:!1,maxCount:1,beforeUpload:Nn=>xt(void 0,null,function*(){return be(Nn),!1})};return(0,bt.useEffect)(()=>{we.setFieldsValue({publish_time:he()(he()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm")),end_time:he()(he()(new Date((0,Rt.qd)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))})},[]),Ft.createElement(Ne.default,{centered:!0,title:"\u8865\u5145\u6210\u7EE9",open:Qt.actionTabs.key==="\u8865\u5145\u6210\u7EE9",okText:"\u786E\u5B9A",width:750,destroyOnClose:!0,cancelText:"\u53D6\u6D88",okButtonProps:{loading:Ge},onOk:()=>xt(void 0,null,function*(){we.submit()}),onCancel:()=>{we.resetFields(),ne({type:"classroomList/setActionTabs",payload:{}})}},Ft.createElement(De.default,{form:we,onFinish:Nn=>xt(void 0,null,function*(){var Sn,Zn,re;if(!(ce!=null&&ce.size)){Le.ZP.info("\u8BF7\u4E0A\u4F20\u6587\u4EF6");return}Oe(!0);let Wt=new FormData;Wt.append("type",Qt.actionTabs.type),Wt.append("file",ce);let Me;window.location.href.indexOf("exercise")>-1?Me=`/api/exercises/${Qt.actionTabs.id}/supplement_score.json`:Me=`/api/homework_commons/${Qt.actionTabs.id}/supplement_score.json`;let ln=yield(0,xe.ZP)(Me,{method:"post",body:Wt},!0);Oe(!1),(ln==null?void 0:ln.status)===0&&(qt(),we.resetFields(),ne({type:"classroomList/setActionTabs",payload:{}}),((Zn=(Sn=ln==null?void 0:ln.data)==null?void 0:Sn.fail)==null?void 0:Zn.length)>0&&Ne.default.confirm({title:"\u5BFC\u5165\u5931\u8D25",closable:!0,icon:null,width:610,content:Ft.createElement(It.default,{pagination:!1,dataSource:(re=ln==null?void 0:ln.data)==null?void 0:re.fail,scroll:{y:400},columns:[{title:"\u59D3\u540D",align:"left",dataIndex:"name"},{title:"\u5B66\u53F7/\u624B\u673A\u53F7/\u90AE\u7BB1",align:"left",dataIndex:"student_id"},{title:"\u5BFC\u5165\u5931\u8D25\u539F\u56E0",align:"left",dataIndex:"message"}]}),okText:"\u4E0B\u8F7D\u5BFC\u5165\u5931\u8D25\u6587\u4EF6",cancelText:"\u53D6\u6D88",onOk:()=>{(0,Rt.FH)("",fe.Z.API_SERVER+`/api/courses/get_external_score_fail_data.xlsx?type=${Qt.actionTabs.type}`)}}))})},Ft.createElement(De.default.Item,{label:"\u4F5C\u4E1A\u540D\u79F0",labelCol:{span:3},name:"name"},Qt.actionTabs.name),Ft.createElement(De.default.Item,{style:{marginBottom:0},label:Ft.createElement("div",null,Ft.createElement("span",{style:{color:"#ff4d4f",marginRight:5,fontFamily:"SimSun,sans-serif"}},"*"),Ft.createElement("span",null,"\u5BFC\u5165\u6587\u4EF6")),labelCol:{span:3},rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u540D\u79F0"}]},Ft.createElement("div",null,Ft.createElement("a",{download:"\u6A21\u7248.xlsx",className:ve.Z.downloadbutton,href:fe.Z.API_SERVER+`/api/courses/down_external_score_template.json?type=${Qt.actionTabs.type}`},"\u4E0B\u8F7D\u6A21\u7248\u8868\u683C"),Ft.createElement("span",{style:{marginLeft:10,color:"#999999"}},"\uFF08\u6839\u636E\u63D0\u793A\u4FE1\u606F\u5B8C\u5584\u8868\u683C\u5185\u5BB9\uFF09")),Ft.createElement(De.default.Item,{style:{marginBottom:0}},Ft.createElement(Mt,mt({},On),Ft.createElement("a",{className:ve.Z.downloadbutton,style:{width:96}},"\u9009\u62E9\u6587\u4EF6"),Ft.createElement("br",null),Ft.createElement("span",{style:{color:"#999999"}},"\u4E0B\u8F7D\u6A21\u677F\u5E76\u5B8C\u5584\u4FE1\u606F\u540E\uFF0C\u53EF\u5C06\u6587\u4EF6\u62D6\u66F3\u81F3\u6B64\u5904\u4E0A\u4F20\u3002\u652F\u6301\u683C\u5F0F\uFF1A.xls\u3001.xlsx"))))))};jn.Z=(0,Jt.connect)(({classroomList:Qt})=>({classroomList:Qt}))(jt)},12317:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return xe}});var bt=Nt(67294),ie=Nt(28802),De=Nt(84567),Ne=Nt(71230),Le={leftdiv:"leftdiv___aBzsX",listClass:"listClass___bxIEW",spantitle:"spantitle___v_Vc4",rightdiv:"rightdiv___xWu4M"},It="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC",Jt=Nt(26194),fe=(Ve,he,Rt)=>new Promise((Ft,nt)=>{var et=gt=>{try{lt(Rt.next(gt))}catch(mt){nt(mt)}},ht=gt=>{try{lt(Rt.throw(gt))}catch(mt){nt(mt)}},lt=gt=>gt.done?Ft(gt.value):Promise.resolve(gt.value).then(et,ht);lt((Rt=Rt.apply(Ve,he)).next())}),xe=({data:Ve,value:he=[],handleChangePage:Rt,className:Ft="",setSelectedRowKeys:nt,selectedRowKeys:et,onChange:ht=()=>{}})=>{const[lt,gt]=(0,bt.useState)([]),[mt,xt]=(0,bt.useState)([]),[Mt,jt]=(0,bt.useState)([]);let[Qt,ne]=(0,bt.useState)(1),[qt,$t]=(0,bt.useState)();return(0,bt.useEffect)(()=>{gt(Ve),xt([]),jt([])},[Ve]),(0,bt.useEffect)(()=>{nt&&(xt(et),jt(et))},[et]),bt.createElement("div",{className:`flex justify-between w-full ${Ft}`},bt.createElement("div",{className:Le.leftdiv},bt.createElement(ie.default.Search,{size:"middle",style:{marginBottom:"10rem"},onChange:we=>fe(void 0,null,function*(){gt(Ve.filter(ce=>{var be;return(be=ce==null?void 0:ce.name)==null?void 0:be.includes(we.target.value)}))}),placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),lt.length===0&&bt.createElement(Jt.Z,{styles:{margin:"70rem auto"},customText:"\u6682\u65E0\u5206\u73ED"}),bt.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},bt.createElement(De.default.Group,{value:mt.map(we=>`${we.id}`),onChange:we=>{nt(lt.filter(ce=>we.includes(`${ce.id}`)))},style:{marginTop:"10px",flexDirection:"column"}},lt.map((we,ce)=>bt.createElement(Ne.Z,{key:we.id,style:{marginTop:"10rem",lineHeight:"24rem",display:"flex",width:"200rem"}},bt.createElement(De.default,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:we.is_published,value:`${we.id}`},bt.createElement("div",{className:Le.listClass},bt.createElement("span",{className:Le.spantitle,style:{width:we.is_published?"108px":"170px"}},we.name),we.is_published&&bt.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"\u5DF2\u53D1\u5E03")))))))),bt.createElement("div",{className:Le.rightdiv},bt.createElement(ie.default.Search,{onChange:we=>{jt(mt.filter(ce=>ce.name.includes(we.target.value)))},size:"middle",placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),Mt.length===0&&bt.createElement(Jt.Z,{imgStyles:{width:"200rem"},styles:{margin:"70rem auto"},customText:"\u6682\u672A\u9009\u62E9\u5206\u73ED"}),Mt.length>0&&bt.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},bt.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},Mt.map((we,ce)=>bt.createElement("div",{className:"flex justify-between item-center",style:{marginTop:"10rem"},key:we.id},bt.createElement("div",{className:"multi_ellipsis1 flex-1 minW-0",style:{margin:"0 5rem"}},we.name),bt.createElement("img",{src:It,className:"current",style:{height:"16rem",marginRight:"17rem"},onClick:()=>{nt(mt.filter(be=>`${be.id}`!=`${we.id}`))}})))))))}},92882:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return ht}});var bt=Nt(67294),ie=Nt(35973),De=Nt(18046),Ne=Nt(62844),Le=Nt(28802),It=Nt(2453),Jt=Nt(71230),fe=Nt(15746),ve={title_tooltip:"title_tooltip___LLdrn",multiple_select:"multiple_select___kDXUm",modal_con:"modal_con___ERnkW"},xe=Nt(94699),Ve=Nt.n(xe),he=Nt(28706),Rt=Nt(26194),Ft=Nt(67294);const{RangePicker:nt}=De.default,et=({dispatch:lt,classroomList:gt,onConfirm:mt})=>{const[xt,Mt]=(0,bt.useState)([]),[jt,Qt]=(0,bt.useState)([]),[ne,qt]=(0,bt.useState)(""),[$t,we]=(0,bt.useState)([!1,!1]);(0,bt.useEffect)(()=>{var Ge,Oe,On,Nn;if(gt.actionTabs.key==="\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206"){console.log((Ge=gt.actionTabs)==null?void 0:Ge.rangePickerDisabled),(Oe=gt.actionTabs)!=null&&Oe.rangePickerDisabled?we((On=gt.actionTabs)==null?void 0:On.rangePickerDisabled):we([!1,!1]);let Sn=gt.actionTabs.data,Zn=(Nn=Sn==null?void 0:Sn.group_name)==null?void 0:Nn.map((re,Wt)=>{var Me;return{group_id:Sn==null?void 0:Sn.group_id[Wt],group_name:Sn==null?void 0:Sn.group_name[Wt],is_admin:Sn==null?void 0:Sn.is_admin,end_time:Sn==null?void 0:Sn.end_time,publish_time:Array.isArray(Sn==null?void 0:Sn.publish_time)?(Me=Sn==null?void 0:Sn.publish_time)==null?void 0:Me[0]:Sn==null?void 0:Sn.publish_time}});Zn&&(Mt([...Zn]),Qt([...Zn]))}},[gt.actionTabs]);const ce=()=>{lt({type:"classroomList/setActionTabs",payload:{}}),qt("")},be=Ge=>{if(Ge){const Oe=jt==null?void 0:jt.filter(On=>{var Nn,Sn;return(Sn=(Nn=On==null?void 0:On.group_name)==null?void 0:Nn.toLowerCase())==null?void 0:Sn.includes(Ge==null?void 0:Ge.toLowerCase())});Mt(Oe)}else Mt(jt)};return Ft.createElement(Ne.default,{width:980,title:Ft.createElement("div",{style:{fontWeight:"bold",display:"flex"}},Ft.createElement("div",null,"\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",Ft.createElement("span",{className:ve.title_tooltip},"\uFF08\u5F53\u5206\u73ED\u53D1\u5E03\u65F6\u95F4\u548C\u622A\u6B62\u65F6\u95F4\u4E0D\u76F8\u540C\u65F6\u5019\uFF0C\u73ED\u7EA7\u81EA\u52A8\u62C6\u5206\u51FA\u53BB\u65B0\u8D77\u89C4\u5219\uFF09")),Ft.createElement(Le.default.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",style:{width:220,marginLeft:"60px"},value:ne,onChange:Ge=>{qt(Ge.target.value.trim()),be(Ge.target.value.trim())}})),centered:!0,maskClosable:!1,open:gt.actionTabs.key==="\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",onCancel:()=>ce(),onOk:()=>{var Ge;if(jt.some(On=>!On.end_time||!On.publish_time)){It.ZP.warning("\u8BF7\u5C06\u5217\u8868\u6570\u636E\u4E2D\u7684\u53D1\u5E03\u65F6\u95F4\u548C\u622A\u6B62\u65F6\u95F4\u8865\u5145\u5B8C\u6574\uFF01");return}mt((Ge=gt.actionTabs)==null?void 0:Ge.index,jt),ce()}},Ft.createElement("div",{className:ve.modal_con},Ft.createElement(Jt.Z,{style:{display:"flex",color:"#666666",padding:"5px",marginTop:"1px"}},(xt==null?void 0:xt.length)>0?xt.map(function(Ge,Oe){return Ft.createElement(fe.Z,{span:24,key:Oe},Ft.createElement(Jt.Z,{gutter:[8,16],style:{display:"flex",alignItems:"center",marginBottom:Oe==(xt==null?void 0:xt.length)-1?"0px":"10px"}},Ft.createElement("div",{className:ve.multiple_select,title:Ge==null?void 0:Ge.group_name},Ge==null?void 0:Ge.group_name),Ft.createElement("div",{className:"ml20"},Ft.createElement(nt,{size:"large",allowClear:!1,disabled:$t,style:{width:600},placeholder:["\u53D1\u5E03\u65F6\u95F4\uFF08\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4\uFF09","\u622A\u6B62\u65F6\u95F4\uFF08\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9\uFF09"],disabledDate:On=>{var Nn;return(0,he.Q8)(On,(Nn=gt.actionTabs)==null?void 0:Nn.disabledDate)},disabledTime:On=>(0,he.d0)(On),showTime:{showNow:!0,format:"HH:mm",defaultValue:[Ve()((0,he.U6)(),"HH:mm"),Ve()((0,he.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:(Ge==null?void 0:Ge.publish_time)&&[Ve()(Ge==null?void 0:Ge.publish_time),Ge!=null&&Ge.end_time?Ve()(Ge==null?void 0:Ge.end_time):void 0],onChange:(On,Nn)=>{xt[Oe].publish_time=Nn[0],xt[Oe].end_time=Nn[1],Mt([...xt]),jt.forEach(Sn=>{Sn.group_id===(Ge==null?void 0:Ge.group_id)&&(Sn.publish_time=Nn[0],Sn.end_time=Nn[1])}),Qt([...jt])},onCalendarChange:(On,Nn,Sn)=>{if(Nn!=null&&Nn[0]&&!Nn[1]){const Zn=Ve()(Nn[0]).add(7,"days");xt[Oe].publish_time=Nn[0],xt[Oe].end_time=Zn,Mt([...xt]),jt.forEach(re=>{re.group_id===(Ge==null?void 0:Ge.group_id)&&(re.publish_time=Nn[0],re.end_time=Zn)}),Qt([...jt])}}})),$t[0]?Ft.createElement("i",{className:"iconfont icon-shanjian1 ml15",style:{color:"#E30000",opacity:"0.2",cursor:"not-allowed"}}):Ft.createElement("i",{className:"iconfont icon-shanjian1 ml15",style:{cursor:"pointer",color:"#E30000"},onClick:()=>{xt.splice(Oe,1),Mt([...xt]),jt.forEach((On,Nn)=>{On.group_id===(Ge==null?void 0:Ge.group_id)&&jt.splice(Nn,1)}),Qt([...jt])}})))}):Ft.createElement(Rt.Z,null))))};var ht=(0,ie.connect)(({classroomList:lt})=>({classroomList:lt}))(et)},51161:function(En,jn,Nt){"use strict";Nt.d(jn,{AL:function(){return xt},Iy:function(){return Ve},Qv:function(){return Ft},ez:function(){return mt},jb:function(){return he}});var bt=Nt(47084),ie=Nt.n(bt),De=Nt(90621),Ne=Nt.n(De);let Le=1;function It(qt,$t){const we=qt.match(/^(\s+)(?:```)/);if(we===null)return $t;const ce=we[1];return $t.split(` `).map(be=>{const Ge=be.match(/^\s+/);if(Ge===null)return be;const[Oe]=Ge;return Oe.length>=ce.length?be.slice(ce.length):be}).join(` `)}let Jt=[],fe=["
    "];const ve=new(ie()).Renderer,xe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ve(){Jt.length=0,fe=["
      "]}const he={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Rt(qt,$t,we,ce){if($t>=qt.length||qt[$t].level<=we)return $t;var be=qt[$t];ce.push("
    • "+be.text+""),$t++;var Ge=[];return $t=Rt(qt,$t,be.level,Ge),Ge.length>0&&(ce.push("
        "),Ge.forEach(function(Oe){ce.push(Oe)}),ce.push("
      ")),ce.push("
    • "),$t=Rt(qt,$t,we,ce),$t}function Ft(){return Rt(Jt,0,0,fe),fe.push("
    "),fe.join("")}const nt={heading(qt){const $t=xe.exec(qt);if(Le+=1,$t)return{type:"heading",raw:$t[0],depth:$t[1].length,text:$t[2]}},fences(qt){const $t=this.rules.block.fences.exec(qt);if($t){const we=$t[0];let ce=It(we,$t[3]||"");const be=$t[2]?$t[2].trim():$t[2];if(["latex","katex","math"].indexOf(be)>=0){const Ge=lt(),Oe=ce;ce=Ge,gt[Ge]={type:"block",expression:Oe}}return{type:"code",raw:we,lang:be,text:ce}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ht=0;const lt=()=>`__special_katext_id_${ht++}__`;let gt={};function mt(){return gt}function xt(){ht=0,gt={}}function Mt(qt){return qt=qt.replace(et,($t,we)=>{const ce=lt();return gt[ce]={type:"inline",expression:we},ce}),qt}const jt=ve.listitem;ve.listitem=function(qt){return jt(Mt(qt))};const Qt=ve.paragraph;ve.paragraph=function(qt){return Qt(Mt(qt))};const ne=ve.tablecell;ve.tablecell=function(qt,$t){return ne(Mt(qt),$t)},ve.code=function(qt,$t,we){const ce=($t||"").match(/\S*/)[0];return ce?["latex","katex","math"].indexOf(ce)>=0?`

    ${qt}

    `:`
    ${we?qt:(0,De.escape)(qt,!0)}
    `:'
    '+(we?qt:(0,De.escape)(qt,!0))+"
    "},ve.heading=function(qt,$t,we){let ce=this.options.headerPrefix+we.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Jt.push({anchor:ce,level:$t,text:qt}),"'+qt+""},ie().setOptions({silent:!0,gfm:!0,pedantic:!1}),ie().use({tokenizer:nt,renderer:ve}),jn.ZP=ie()},78207:function(En,jn,Nt){"use strict";Nt.d(jn,{rX:function(){return Mt},pW:function(){return jt},gy:function(){return Qt},xY:function(){return xt},O5:function(){return mt},hs:function(){return et},tJ:function(){return Ft},o1:function(){return nt},Rd:function(){return gt}});var bt=Nt(35973),ie=Nt(62844),De=Nt(96074),Ne=Nt(2453),Le=Nt(52262),It=Nt(28706),Jt=Nt(55304),fe=Nt(25510),ve="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAouElEQVR42u3de5gU1Z038HOqqu89PQPMhQHkNqCiCCK5qMRojIkXRNFERDTGNRvik5hNjPtgzEuyJLq6sq/EbEyy+u5jjBEhSEREvKyXQJRVs1FEMARhhhlgLsDAMD3T96o67x8zzPQMPTPVU12XX8/38/D4PDZdVedUd3+py6nf4UIIBgBAgeR0AwAAjEJgAQAZCCwAIAOBBQBkILAAgAwEFgCQgcACADIQWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMxfhbOedOt7a/nKUmcrbT2aIUxned8Xaa/DhMbsi2dppk8nO3ovG27XnbemTbDmE4wgIAQhBYAEAGAgsAyEBgAQAZCCwAIAOBBQBk5DGsIaedO3dWVFRY3cpVq1atXLnS4JuNj3WwgvF7tCbHZFhxe9u2dZp8Z04uHGlhxbAbKz44F/6KB2I2sCoqKqqqqqzuajgctnoTACMWoV8xTgkBgAwEFgCQgcACADIQWABABgILAMgwe5cwJ5O3jVtaWgp+z8KKW+bOPvjuwq1bMaTD+OLG2+ks2/aSSS78FTMcYQEAIQgsACADgQUAZCCwAIAMBBYAkIHAAgAyLBnW4CxnS/fb9k4r7nk7W8LBClZUQbBiYIEVI2ycnXjFIjjCAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQU4bAGK25Fu/Besm03wm27i2/bEATbNmTbN6QoRzDkhCMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5F7Xpnpy2w7Ta8bawo4eDC6RVIf0YmufBXzCwKLIvaCgC2ceevGKeEAEAGAgsAyEBgAQAZCCwAIMPsRfdVq1aFw2GrW7llyxZ7dgfACEToV8ydvd9vkhV1CPBOvHOkvdNZeY0IwSkhAJCBwAIAMhBYAEAGAgsAyEBgAQAZCCwAICOPcVhUnke3rcg/lYktbLuT7eyet+0zIo16j3CEBQBkILAAgAwEFgCQgcACADIQWABABgILAMjIo1pDHit19K6zFXfxXTiwgMqz+FZ004Wc/YidHSJjsuILqjUAQHFCYAEAGQgsACADgQUAZCCwAIAMBBYAkGF21hxnKxZQqdJvW5Nsm1LEinbmXNy2vlNZ3DhnfwgWjbDBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgw+ywBpOsuMlKZZ3GN2RycdsKcriQC3cIlclH3FkOBEdYAEAGAgsAyEBgAQAZCCwAIAOBBQBkILAAgAz7JqHIiUqZfeONN8nZ4gS29d2KggcmWbF1Z4tnGN8QlZk+GI6wAIAQBBYAkIHAAgAyEFgAQAYCCwDIQGABABl5VGuw7Z63FSMYSN/NpTK1hEkuHC5AZdzMyPl14AgLAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkGG2WoMLa++bbKdxzvbIZN+pVL9wdqyDs01y4eKO/95xhAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIyKNaQ0623bA3eUPUhdMBmOym8XdaMdOH8b67cLYLZ1kxdsS2ARDOThTCcIQFAIQgsACADAQWAJCBwAIAMhBYAEAGAgsAyDBbrSGPLbmvEgDpDRnfum3VGqzYEJXSCC5skjtnkTAJR1gAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyqNdh2x93kOq1ovLM9smIQgG1lDEw2ydlhNzk5+7lb0U1n5+/AJBQAUJwQWABABgILAMhAYAEAGQgsACADgQUAZJidhMI2VlTpt22sQ045t27baAPjO8TZ2S5sG/hiRa0IZ4tSWNFO4zAJBQCMdAgsACADgQUAZCCwAIAMBBYAkIHAAgAyzA5rcPYpc2ebZFvjTXJ2h9h2v9/Zxhtf3OSGrJjpw2Q7c7LogyMzDguMsOKbN5LbCW6DU0IYcdasWTNhwgSnWwHDkce8hM7OOmcclUHtJtcJJi1ZsmTNmjU9/+vCT9PxankONn4gOMKCEeqZZ55ZtmyZ062A/OAIq8AbyglHWK510003rV27lrny08QRVo7VIrAKu6GcEFhuNnHixIMHD7rw00Rg5Vitsx2wIu+c/c2T/pIZbXkyqbceUxsOqrV16r46rf6A1tist7Xp7e2iIyYyaZFRGWPco3CPl5eEpNJSadQoeXy1PHmiMm2qUjNVmXSaVD6G+/1Od4Uxxp599tlFixbl7qkF/5wbX9x4k6xIB3d+FRFYdnQzJyo96m5DJqO3HM7s2p1+f3vmo13q3lrtaKuIdghVZcabxzlXFB4pkSvKlek1nlkzvXPneGbOkMZWcY/Hwd5VVlYePXo0R68RWMNd3CIILDu6mROJHolMRqs/kNr2burNrentO7SDjSKVKuD6uc8nnzbeO2e279KLffPOlydPdCS5+t0x7O0+Amu4i1sEgWVHN3NyeY/01mOpbe8mNm5ObXtHa2xmmmbt9mRZHl/tm3dB4Nr5vnnnS+Vj7OzsunXrbrzxxlNfR2ANe3GLILDs6GZOLu2REGp9Q/KFl+Lrn8/s2i2SSfs23bUH/H7PzBnBry70XzNfmTyR2fJoTlNT0/jx43PtDATWMBe3CALLjm7m5LoeCaHW1cfXPBv/w3Nq3X6m63ZsdCCSpNRMCS66PnjTDcrUyTbElhWJg8AqOASWHd3MyVU90ppb4qvXxZ56Rt1Xl8dFdKtxrkybGrp1SfDmRXL1WIs3hcAqZI8sYsk4LLNtct84F+Mc/0TzbnA8kXjx5c5fPpbevsPyC1XDI8veObPD3/1W4OoreTBg0UZcOGrJihGFtpVbsGjXIbAKjFZgZT7e3bHq0cTzm0Q84XRbhsCDgcDCBSU/uNNz9gxL1o/AcmhDeUFgFRiVwBLJZGL9xuhDP1f31Trdljwo02oi99wV+Oq1BR90isByakN5QWAVGInA0pqaOx56JLZ6rYjFnW5L3ngoGLp5cck935fHVRdytQgshzaUFwRWgbk/sNLvf9i+/GeprW+76OJ6vjj3Xfy50vt/4p17buFWicByZkN5QXmZkUQXyc2vHL/tjtSWtwinFWNMiNSWt47fdkdy8ytMp9wRyBMCa8RQ1dhTq9u+czeti1aDdWhfbdt37o49tZqpqtNtAZvYV17GOCqFPqwYSGXRiYlIZ2KPPxG9f6XeHjW5KreRSiOR5ctCS2/nXlMPIbpwAJ0Lf0dWbD0vmISi+Il0pvNXj0UfeFh0djrdlsLT26PtP/03kcmEv/Mtk5kF7odTwmKnqrHHnyjWtOoiOjujDzwce/wJnBsWPQRWURMi9vTa6P0rizitujva2Rm9f2Xs6bW0bybAUBBYxSy5+dXoigeL77pVTnp7NLriweTmV51uCFgIgVW00u9vP/GjFdrhI043xD7a4SMnfrQi/f52pxsCVkFgFSetqbl9+X3q3iIZwWCcure2ffl9WlOz0w0BS5gtL0Nlghxnh0rYPGhYpFLt9/yk87EnzGyUtPC3bi996Gfc5zO+CJXyMjk5+8CJSZhIdaRLPLsh9vRap1vhpNjTaxPPbnC6FVB4CKxik9m1O7ryEYpPNReQiMWjKx/JfLzb6YZAgSGwioqIJzoeeXQEXro6lbq3tuPnj7q/zhfkBYFVVBKbXkps2OR0K9wisWFTYtNLTrcCCgmBVTy05pbOXz2OY4oeIp7o/NXjWnOL0w2BgkFgFY/46nXp9z90uhXukn7/w/jqdU63AgrGbLUG45ytbeBsqQnzd4iH3CdqbV3rdUtw9epUyvSa8g3PKDVTB3+bC2d1craIgjtLOOAIq0jE16xHWuWk7q2Nr1nvdCugMBBYxUCtq4+ve86SVQvBdL3Pn7z0WzbfP13/IJtpAGOMsfi659S6ekv2D9gL9bCKQXLTS+q+usKvVzBp9Gipopyxk0fyqqodbBSZjKHFZVmedBr3+XsXz4uua43NTFXl08Yz5eQXNZPRDjUZbcBJ6r665KaXwt/7duF3EdgLgUWe3nosvn6j0bIqksR0vXvCVM67/wy4ai2wcH5k+bLu4xpJ0hqbjn9tqbq/nklDHZsLIZWWjvrFv3tmnT2c+Vk5F52x40u/q+5vGPX/fqlMnsR0nUmy+vc9x267Qxw5mt/k9ULE128M3nyjVD6mwHsf7IXAIi+17d3Mro+NvJN7veE7vyVVVqh792kNB9WDh/Rjx0VHh0ilezOF8z5hJMty9djedNB1pshGWyZLUlXFsKeYF50x7vMxIeSKip4ZvdRP9opEcoh0zpVlmV0fp7a9G7h2fmF2OjgEgUVcRk1s3CySqaHfKQTz+fxXXub73IVMFyKR0KMd+uEjWlOzWrtf3V+v7m/Qmpr11mPakaO9pTu7LiT1REC+53ambgoJJgQPBJjX2/OS1tTCFZmXlrIBDrBEOiOSyRyvJ1OJjZsDV13OPPjOE2b2wzN+N9f4XVKT91OtmA7AhVN1dFHrG1Lb3jHaNq9HKokwxpjEeSgoh4JydZXn3HO6m5hIing88/dPjn/j21r9gazjLBPtNPdJMsakkrAU6J3k2ff5C8f84XcDLiFJsaeeiT+1JudBVmrbO2p9gzK9Jo8WOPqltYJtG7II/rWhLbXtXe1Qk6G3CsH9fl4Szv23nPNggAcDUqSEJVMDXiHiLI8Q0nX9SKvW3DLErT0heDgklZX1vhCL6+3tojMmkkmpojy7zfKE8fKE8YNsMfa71UzXmZzjvFU71JTa9m5egQVug8AiTGQyqTe3Gr/TL0VKeCAw+Hu0xmY9Gu0bWKInpISqCdXYHTrO9RPtbf/0z0MXpdL14A3XRZYv6zmmS7zyWvS+h5imaQcOhW67mfv9Q26te00n2tVP9g2yodSbW0M3L2IeTK5DFQKLML35cHr7jjzeH4+n3tyqnHWmXFXRHV6nHImo++tFKt3zv9zr7XMNXlVZMmX0IEvTtLp6MUSecsaE1nI4+zq6ONGu/v0TputMUTyzzzF+Q1A/clRrbB7k/entO7Tmw/LECeZ2PDgGgUVY5uPd2qFGo++WJO3AobZv38VLI3L5GKmqUh43VpkyWamZKk86TR5fLY0qk8JhdX89U9WeIOM+b/Y6RDotdN3oSaEQ8qSJ/su/yBUl9309SdIONSZe+m/GeZ8Q5IzJMhNCKh/jmTPr1NX2+d+seFIPHtJPnBgksLRDjZmPdyOw6EJgEZb+4END9wd7CCHSaXHkqN5yhO36G2OMSRLzeKRwSBpVJo+rlieMT3/4Ud8xVn1+/CKeyGPuP133nHl62cr7BjwP5Tz15p+Tb2wdqLWeGWcoU6f0vKDure38zX+JRKI7knThn//lwIKret+we4+IxQcJLJFMpT/40H/llwr9UYBNEFhUiWQys2Nn/osJxhiT+5zl6W0n9ONt6r46JgST5d4fPOc8FOyzdCwm8p2sdPCxqQP9jRBMUQJXXymVRnpeS7ywufPRx5jouqYmmCR5P31eVke0zK7dTNNyXnHvkdmxUySTxq+LgavkEVi2VUGwYl4M295pxfiJnFvXW4/l/bSzokiREhGLi1Sqz0jRfoNFszfc9+BI7+hkeT4WM0y6rpx5uv/qK3pfaDuRfOX1rl507Slp9CjPWWf2viEazezeM+SK1b21euuxwW41DsW2CU2cnZnCtqIUecERFlVqwwHtaGseC+i6MmVS2cMPiERSO9SoHWpUDxzS6hu0I0f1Y20imWSZDBOMSVnhJUk80mcYhIh2iIya32MxgxtoVUJ4Pz1XmXRazwuZ7TsyH+3qbZsQ8tgqOesNWlOzdvDQkM8MaUdb1YYDZgILHITAokqt3S+iHXksIIQ0epT3U+dJo8q6X0ilRWen3npMa2pWGw6otfvV+gPq7j2Z3Xt6Hh6USkuz16G3nRjOg4Enpf705/T/fsCknlNOSd1XK9JdNyX7/YPMpdKSnvQRGTX+x436ifbswFKmTZVGj+rdIX//RD/eNmSYimiHWrvfN++Cgn8iYAMEFlXqvrr8ihYIIZWEs0dFcZ+X+0ZLY0YrZ0z3nXxPfN1zbd/8btdYBK7I2eM5GWPakaNM14d+8nkAiU0vd/z8l4xLJ69ddT/003/wBOt/bSvz0c7ky6/1eUmWvZ+em30pKv3RLpFKDdk2oWY0KypbgC0QWFRp9QfyXYSXlAwxZpJzrflwdw4Kwf3+7GveTNf1I0eMloXIxTN7ZuAr1/E+mSKYzxf4yrW5joxOjlZNp2NPrtYam7IPr6RIxPuZub1ricUzH+401DbB1Px3HbgEAosqrdHYEzk9OJdGj+LyoAcgQmj1Dd032oTgoSAv6z0lFKqqHztu5nnm0C2LgzfdcErDJN7/gWTOOJfC3ZfPUlu3JZ57oU+i6bo8ZZJy5unZeyOzZ6/Bi2taIyaypwqBRZXediK/BSQp/Zf3o//678q0GnnSBLm6WhpdJoVCvbXxGBPxhLq/oXeJsrLsi0QintBaj5l6nlmWuTx0dRqhaUywrrIKasOBjodW6a3H+p3reT8zVy4f031IxXnmk3264SJZelubiT6Ak/IILGdnfLDz1qkZtg2A0Nvb821ZZseuzI6dzOORgkFpzChp7FhlyiRl8iRl+lR5XLVUVck0TWts6v7ZCyFPGN9zmMMYEx0d+rHjhbxFOFDXWg4zXWNcUusb2u/5SWrbu/2vTMlyZuff2u76IdNPBtbHu0UyaTSwcu06275Lzs5yYtvvyKIN4QiLKtERy3sZiTPGmabp0aje3s5q96fffofJEvMo3B+QIiVSaUStb2C8Ox2UaVN5VmkXrblFb80zsPKq7sAYY0zd35B85XXGeeqtbcmXXhlo4rL0O++ls+vqSJLxWwHD2XXgDggsqkQmPfyF+40+VzXR0aFFo9qhRiZJ3Qnj8XjOOrPPk3r7G0RHNJ/A4npbe+qd97jPa/DKl360Nfbk6vT2HUySUlve6r4jKQQvKQl/8zZ5fLXQdc640NT46nV9hmXZtuvAUQgsqkTGwCMyeR2BnzwT7PqvFClRzpie/feZj3eL5FDjBrLjTJbS23ccW/T1PI6x0hmRSPYO1OralhBSaST09SU97RGpVGrL28N5Msn4rgNXQmAVL865z9f748+LpnvOmenJCiyRTKqf1HK/f/Ca7iKj9j4d3dUAzvOolOz19taHEEwkEl3jVLnPx/xZdbXSGZFIOLRbwUkILKq4RxGDDDoXQopEIivuVaZMEnr+VzqFUCaM7zPHjCSF71wa/NriQU4JucRjT61JrN/IZIkJIZWVlj74U+X0acOZTJBzEU+0/+S+zPsfMsZ4KCiFQj1/qcfjejQ67ALMHGXdycInRxX3eIeoLePz+i660DPzrMJszuv1fW7ox1lS297rPQ/1eLxzZnlmnzO8LYrOmFRa2lXuVCorzb78Lzpjoj067AEW3OMd5pLgNEsCy4q7pC4cwWCFPEaElIRYx6DPEgphbtKaYenb1OEc3GUtffKCGpPHVmXPnSNiMb0zNuwBFrwkNLwFuxe3ax4HF/6OrKg/kVeTMFU9Vf0eS87N/hlS+KD/O9x1yuOqedZDRfrxNpFIDnt9hnYduBJOCamSRo0a8j0ik2GaJvKrr8C595TnDVV1qNLsjDHGJalPLQchWEY10gAuyQNfyxdM8chTJmW/pB05KmIxpmmMc2Zg6Pwwdh24EwKLKnl89WB/zbmIdrT/aIUUKTU0uIGzrnKjodtu8V/+xey/UffVdqz8hX7ixBDHS5wxxjJ/29NdzpRz0dHR/uP7pNIhGiCEHvjSpaF//HrPgInUn7fFf79WpNPqnr1MkngwoNRMyV5ECocDV1/BGNdjsfT/vNdbNLkguw5cDIFFlTJ5Iht0wIBIp1NvbDU+FEvoeuCqL3tmnd3nxXi84//+R+y3vzfarKwR5yKVTr2xZYjDK86ZEHL5mFBWO9VP9sV+t7q7XjNjckW5Mmli9kL+L1/q++IljDMR7Tj29aWp1/6Ux3EWZ8rkiUbfDC6DwKJKnjaVK54hSmIZ/xlrmnfunNIHfypXj81+ObFhU/zZ57sLvZ+afYMf1wghjRmjnD6NDVgigov29szuPUyS+xy+SZx5PN2DIXRdHlctVVb0WU5RuMIYY7x8THDhgtSWt42PnOCKR5421eTOB6cgsKhSaqbwSIk4drwA69J1efKk0gdX9BsDkd7+UfShn4vOTibLgQVXej/7aSZO5gKXUlvfSr765mCnibrumTNr9G9/wwP+nEeCXJaTW986/rWlg48sVc48XcqesFqI7KD0XXKRMnWy+sk+g4/p8EiJUoPAosq+SSiMs+22scm+G2+8FVMMKJMmyhXluvnA0nV5bFXpA//iv/TiPi+3Hove/1DXVSSmatznC3/7H7MrfPo+d37mw51ay5FBBtNzRZFKI4NMNy2FQkMcpnm93s/MzQ4jtW4/D4XlsZXd+6Fmiv/KL3UOMuFzX3JFeXap+N6mWvCtM/m1Mfnjsq1HxhtvHoY1UCWVj1Gm15hdi65LY0aXPvAvweuvyQ4OkUp1PPLr5CuvdyeFxJNvbEn/dXv2op45s/3XXJXHYzfDap5cUe6dOyf7tcSml1Ov/ylrR0iBa6+Wxow2eLVOmV7TZwQ/kILAoor7/cMeRN5N16XKitL7fxJc/NU+51NCxH+/tvM3/5U9FZjeeiz+hz9mT0rIPZ7QLTdKVZVmiiYPeRXMc+45ytTJvS8kEqktbyde2CySveOwvHNm+y660OBlLM/sczApIV24hkWY97xzud+X3+TPPbrOBB/8aXDxV/pd/Um+sTX64MOis7P/6y+/pn7zNs+smT2veM6dFbjyy7EnnzY4qiCzZ6/WcKDn+jqXpfT2j5jWFYK5Uk9R/Jd9gQd7J3PVmlvUv38iMhl1X13PFTceDAQWLki+8vrJCXgGxP0+73nnWvBRgE0QWIR5zp4hTxivDmMOGE2Xp0ws+7efBa6d3y+V0n/9oH3Z8u7CWNkkSWtsSrz4SnZgcZ8v9A83J17+b4PlieO/W9356ONZNw050zQRT+SeHVrX5dMm+C65qE/zPtihtbSIVDr56uvZtwh8F12onDE9s2Pn4Jfe5QnjPWfPsO4TAavhlJAwqbrKO2d23ovpuufsM0c9uipw3YJ+P291z94Td/+fzMe7c//sdT2xYZN2qDH7Nc95cwLzLzd4VshDIamyQqqsPPmnQqquUmac4bvw/BxbFML3+QuVrCEIIpNJvvq6iCeYpiVffi27qr08YVzg6iuGDE3vnNlydZUFHwXYBEdYhHGPx3fpxfE/bjQ6CkkIxpjvC58vffCn3jmz+v2lure27a4fpt/73wEPUiQps3tP4sVXw3fc3tsGryd065LE5leNHGSF7/hG8KYb+oyEEIx7PNLJW349a2VCSKPKgjfdkD2RorqvLrX17a7DsfSOnem/vJ89KD9wzVWx3z6tNTUP0n7fpRcPMdEZuJvZSSisWNzZMQRWjN6wbqyDb9758oRx2oFDRjrGFCV4/TWR+5b3GzjOGFPr6k/84N7UG1uGGM2UTifWbwguWiiNHt3zmue82f4vXxp/ai2Th2i8NGa0NGY0G5IQTNd9l32hX0Gb5Euvage7z1VFtCPx4sv+yy7pGRyrnHWm79LPx3+/dqC1yhPG+eadP/A2C/+1Mcn4Ol04g4ZFTcIpIW3K5EmGZl3Xdam0NPLDH5T9x8pT0yqzY2fbHd9LvvanocdeSlJ6+0ept9/Nfo37fKHbbpEqy03dLsxubNsJqaI8fMc3sgdwaQcb4+s2ZB9Lpv68Tc06P+Veb/ArC3kkMlAzfPMuUPo+RA3kILCI8yiBa+fz7PLBpxJCmXHGqF+vKrnnrn5TzzNdT/152/Gl/5Ta+rahUjCci46O+Nr12aMKGGPez3wqMP+KggSW3h5N/c97wZtu8F3wmezXEy9szvwt6+KaJGn7G1JvvZP9Hu9nP+U556ycJ8jc7wtcOz97EkagCJ8feb5553tmnp3+6wcDvcH76fMiP7zbM2eWfuRoVqZwpmuJza92rHpUO3Awj+lnJCm15a3ka3/yfmpO70AtWfZ96QuJjS/qJ9r7DEBNJrXGZh7wG6sYwUVnLPbkav3o0eCy72tHjnZHjySp9Q2djz3B0pnsdopkMrFhk2/eZ7nXe3JGVcl3wWfT7/zl1HV7Zp49yPkgUMGtGOlv2+UAF17DcuRiWecvfn3i3hW5Q4FzuapSKivNUdBK07RDTSKRGMZkWXJVJS/rWzdG1bRDh0Q662FswXgoKI+vNl77RcTjWlOLFCnpMx6Vc9HRqTXlmF+e+3zyhPG94yS63tnc0n9XcF724Irw976dbzdtu2SDeYKNNgCBNezF3RNYal1968LF6t7agbY04AFOzgFQRugix1DPXEMT8j5PlKTcS+VMVcF6n8ce+J3K9Jry59dmj5g3CIHl1A4ZCK5hFQNl6uTgousH/GvOu8tUnfpn2Hd+pVzrzGvTA/0ZaKncXWNG3hlcdP0w0gpcKI8jrNzLO/pEuLP/BJnse2Ebr9bWtV63ZMCDrBFMmV5TvuEZR0rKOPvrsGJDVnQTk1CMRErN1NCtS4Y3dXsxk6TQrUtQAKto4PtdPII3L/LOPdfpVriLd+65wZsXOd0KKBgEVvGQq8eGv7OUBwPmV1UceDAQ/s7SfkWfgTQEVlEJLLgqcN0Cp1vhFoHrFgQWXOV0K6CQEFhFhQcDJXfdqUyf5nRDnKdMn1Zy15043iwyCKxi4zl7RmTZ93goaH5VdPFQMLLseyh9VXzsq9aQk8nn0W2r0p9znS4c19clcMN16b9u73zsCacb4pjQLYsDN1xn0cptG0FtG5M/Lju7iSOsIsR9vpJl3+9Xq3Pk8F1yUcmy72cX0oKigcAqTvK46tL7f1yAaXWoUabXlN7/Y3kcJqMvTgisouWdO6fsgRVyVaX5VVEhV1WWPbCi37RgUEwQWMXMP//yyIp7pdKI0w2xg1Qaiay41z//cqcbAhZCYBU1zkO3LI4sX8bDYfMrczMeDkeWLwvdsnj4j3MDBQisYqcooaW3R350dxFnFg+HIz+6O7T0dhQULXpurNZgkhWjDWwr5mVRj0Q6E3v8iej9K/X2aMF3jrOk0khk+bLQ0tu519R0OLaVHLCi7ogLG29ReRUEVoG76c7AYowxVY09vTa64kHt8JGC7x+nyFWVkRX3hm5ZbP7YyoW/edKNtyiwcEo4YihK6NYlo371sDKtSMY6KNNqRv3q4dCtS3AmOHIgsEYSSfLPv2L0k//pu+Qi2henOfddctHoJ//TP/8KlAAbUXBKWOBuuveUMIvW1Nzx0COx1WtFLF7YNduAh4KhmxeX3PP9wo4OdeFZFenG4xqWUQgsQ+tMJhPrN0Yf+rm6j1JVZWVaTeSeuwJfvZb7/YVdswt/86Qbj8AyCoFlXObj3R2rHk08v0nEExZtolB4MBBYuKDkB3daVIPBhb950o13PrBsa6sVc2oZZ1veuaTYg4gnEi++3PnLx9Lbd/ROjOoqsuydMzv83W8Frr7SuvpWVvzmXbhO4xvKCYFV+A2ZNNICq4vW3BJfvS721DPqvrqCzDhfGJwr06aGbl0SvHmR1ZWOXRguLvzOI7AKvyGTRmZgdTVIrauPr3k2/ofn1Lr97NSZou0kScrUKcEbrw/edIMydbIN9zRdGC4u/M4jsAq/IZNGbmCdbJZafyD5wub4+uczu3aLZNLm7XO/3zNzRvCrC/3XzFcmT7Rt+IULw8WF33kEVuE3ZNJID6yT9NZjqW3vJjZuTm17R2tstvzylizL46t98y4IXDvfN+98qXyMzf11Ybi48DuPwCr8hkxCYPVpZCaj1R9IbXs39ebW9PYd2sFGkUoVcs/4fPJp471zZvsuvdg373x58kTuMfVI4PBb4r5wceF3HoFV+A2ZhMDKSWQyesvhzK7d6fe3Zz7ape6t1Y62imiHUNU8LtJzzhWFR0rkinJleo1n1kzv3DmemTOksVVO5VR200ztHwTWcN+ZF7PjsKzolXG0fvNGkIg2kUzqrcfUhoNqbZ26r06rP6A1NultJ/T2dtERE5m0yKiMMe5RuMfLS0JSaak0qkweP06ePFGZNlWpmapMOk0qH1PwwZ/2sO3fY5NNMs62wYPm+47AchcSgTXCIbCGvU7zfceDowBABgILAMhAYAEAGQgsqtauXet0EwDshovu7pLXrqusrLzssssWLlx40UUXjR1r7aN20AMX3Ye9TvN9t6S2rMm2OjsOy2Q3c7KikowVWzfZ95Hzsyl4O40vnrOdVnwczn5pB4JTQgAgA4EFAGQgsACADAQWAJCBwAIAMhBYAECGfeVlnOXCqXSojMexopvO7qWcRsiX1njf3VlnCUdYAEAGAgsAyEBgAQAZCCwAIAOBBQBkILAAgIw8qjXYdpPVtkodVgzUoHIr2rbBCiZ7ZFvfnS0xYlvtDePFHoyz89eBIywAIAOBBQBkILAAgAwEFgCQgcACADIQWABARh7DGpx97N62ev5W3KO1besmpy0wyYXDBXKiUmLEWVZMgYFqDQAwgiCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIyGMSCks2774n161op8l12nbH3YUzkpCelcMkZ7+fJjdkUQkHHGEBABkILAAgA4EFAGQgsACADAQWAJCBwAIAMsgMa3DhU/vO3sV34Z1sk+s0zoVbd+E4D2fLq1gER1gAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDwmoTDOihoMxhc3eefVZEV9K7hwAg6T7XR2ZgrH780XvEkunGPFor7jCAsAyEBgAQAZCCwAIAOBBQBkILAAgAwEFgCQkUe1BmfLGFixIdv6bnydLpwXwzjbboTbtnXbyi04O6TD2flQMKwBAIoTAgsAyEBgAQAZCCwAIAOBBQBkILAAgIw8qjWYLGNg2/wIVrBitIELZ9BwdoeYXNy2cR623e/PyYq+W7FOi3YIjrAAgAwEFgCQgcACADIQWABABgILAMhAYAEAGXlUazC7JUeLEzhbK8K2IR3FN3bEhTVCrOhmTi4cVGFbjwaCIywAIAOBBQBkILAAgAwEFgCQgcACADIQWABARh7VGkxytjyAyQ1ZcdvYtjoEVgyAoDLbhbPrNF7LxHiTbCvI4WydjIHgCAsAyEBgAQAZCCwAIAOBBQBkILAAgAwEFgCQkcewBioPvlsxAMK2u/gunHPB5OJWjJ+wbeSKs1u3YnHqRT5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIMFutYefOnRUVFVa3ctWqVStXrjT4ZtsqK+RE5Ql7K1BpvAtHmdhWI8S2QhcWDWswG1gVFRVVVVVWtCxbOBy2ehMA4H44JQQAMhBYAEAGAgsAyEBgAQAZCCwAIMOSSShM3tFsaWkp+J1HZx+RN75O23pkRWEGk5wdEWJFN0023mTdEWfH9xjvZl5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIsGRYg7NIP99vRd+tKDlg2zutYLxJzk7/Ydv+dOEcKwPBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgowiHNYzk4QJWPEzvwm7mZEVlBZP1Epwd65CTbSMYLBq5giMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5yBgrbSvfbVnKASsED25j8iE2u0/jiJsc6uLBWhLPrZBYFVsHnvAEAYDglBABCEFgAQAYCCwDIQGABABlmL7qvWrUqHA5b3cotW7bYszsAwM24FXeIbUPl0XPbahsY76ZtU3W48+64ma0bZ9tnZFtdB9tKoQwEp4QAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyGNQAAOAtHWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjP8Prqme11Be/zoAAAAASUVORK5CYII=",xe=Nt.p+"static/newqrcode.a8740efb.png",Ve=Nt(32637),he=Nt(67294),Rt=(ne,qt,$t)=>new Promise((we,ce)=>{var be=On=>{try{Oe($t.next(On))}catch(Nn){ce(Nn)}},Ge=On=>{try{Oe($t.throw(On))}catch(Nn){ce(Nn)}},Oe=On=>On.done?we(On.value):Promise.resolve(On.value).then(be,Ge);Oe(($t=$t.apply(ne,qt)).next())});const Ft=(ne,qt=!1,$t=!1,we="",ce=!1)=>!!(nt(ne)&&ht(ne,qt,$t,we,ce)),nt=ne=>(0,Le.bg)()?!0:(ne({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1),et=ne=>{var qt,$t,we;const{user:ce}=(0,bt.getDvaApp)()._store.getState();(0,Le.bg)()&&!(($t=(qt=ce==null?void 0:ce.userInfo)==null?void 0:qt.course)!=null&&$t.course_public)&&!((we=ce==null?void 0:ce.userInfo)!=null&&we.profile_completed)&&ne({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:"/account/profile/edit",isCurrentPage:!0}})},ht=(ne,qt=!1,$t=!0,we="",ce=!1)=>{var be;const{user:Ge}=(0,bt.getDvaApp)()._store.getState();return(be=Ge.userInfo)!=null&&be.profile_completed?!0:($t?ne({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:we,isCurrentPage:ce}}):ie.default.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:()=>{(0,It.xg)("/account/profile/edit"),lt()}}),!1)},lt=()=>{ie.default.success({title:"\u63D0\u793A",width:430,closable:!0,centered:!0,content:"\u5DF2\u5B8C\u5584\u4E2A\u4EBA\u8D44\u6599\uFF1F\u8BF7\u5237\u65B0\u9875\u9762",okText:"\u7ACB\u5373\u5237\u65B0",icon:null,onOk:()=>{location.reload()}})},gt=()=>{ie.default.warning({title:"\u63D0\u793A",icon:null,width:400,content:he.createElement("div",{style:{textAlign:"center"}},he.createElement("div",{style:{color:"#191919",fontSize:14,marginBottom:15,textAlign:"left"}},"\u8001\u5E08\u60A8\u597D\uFF0C\u60A8\u7684\u8BFE\u5802\u8BD5\u7528\u671F\u5DF2\u7ED3\u675F\uFF0C\u76F8\u5173\u529F\u80FD\u88AB\u9650\u5236\u3002 \u5982\u9700\u7EE7\u7EED\u4F7F\u7528\uFF0C\u8BF7\u5C3D\u5FEB\u5BF9\u63A5\u4EBA\u5DE5\u652F\u6301\uFF01"),he.createElement("img",{style:{border:"1px solid #D8E3E9",width:190,height:180},src:Ve}),he.createElement("div",{style:{color:"#666666",fontSize:14,marginTop:15}},"\u6DFB\u52A0\u5BA2\u670D\u4EBA\u5458\u5FAE\u4FE1\uFF0C\u83B7\u5F97\u66F4\u591A\u652F\u6301"))})},mt=()=>{var ne;const{user:qt}=(0,bt.getDvaApp)()._store.getState();return(ne=qt.userInfo)!=null&&ne.professional_certification?!0:(ie.default.confirm({title:"\u63D0\u793A",centered:!0,content:he.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:()=>{(0,It.xg)("/account/certification")}}),!1)},xt=()=>(0,Le.V9)()?!0:(ie.default.warning({centered:!0,width:530,title:"\u63D0\u793A",content:he.createElement("div",{className:"tc",style:{marginLeft:-38}},he.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),he.createElement("img",{src:xe,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1),Mt=(ne,qt)=>ne?!0:(ie.default.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:he.createElement("div",null,he.createElement("p",null,qt||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),he.createElement("div",{style:{marginLeft:"110px"}},he.createElement("img",{src:ve,width:200}),he.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:()=>{(0,It.xg)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1),jt=ne=>{ie.default.info({title:"\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425",icon:null,width:615,centered:!0,content:he.createElement("div",null,he.createElement("div",null,he.createElement("p",{style:{color:"#191919",fontWeight:400,fontSize:14}},"\u201C\u4FDD\u5B58\u5B9E\u9A8C\u4E34\u65F6\u6570\u636E\u201D\u529F\u80FD\u4E3A\u4ED8\u8D39\u529F\u80FD\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425\u8FDB\u884C\u5F00\u901A\u3002"),he.createElement(De.Z,null),he.createElement("p",{style:{color:"#666666",fontSize:12}}," ",he.createElement("span",{style:{display:"inline-flex",width:14,height:14,borderRadius:2,background:"#F3F3F3",justifyContent:"center",color:"#666666",fontSize:12,lineHeight:"14px",marginRight:8}},"1")," \u56E0\u5E73\u53F0\u7684\u5B9E\u9A8C\u6570\u636E\u50A8\u5B58\u5BB9\u91CF\u548C\u6210\u672C\u6D88\u8017\u8F83\u5927\uFF0C\u5B9E\u8DF5\u9879\u76EE\u9ED8\u8BA4\u4FDD\u5B58\u5B9E\u9A8C\u73AF\u5883\u4E2D\u4E34\u65F6\u6570\u636E ",he.createElement("a",null,ne),"\u5929\u3002"),he.createElement("p",{style:{color:"#666666",fontSize:12}}," ",he.createElement("span",{style:{display:"inline-flex",width:14,height:14,borderRadius:2,background:"#F3F3F3",justifyContent:"center",color:"#666666",fontSize:12,lineHeight:"14px",marginRight:8}},"2"),"\u82E5\u60A8\u9700\u8981\u4E2A\u6027\u5316\u7684\u6570\u636E\u4FDD\u5B58\u5468\u671F\u670D\u52A1\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63D0\u4F9B\u76F8\u5173\u6280\u672F\u652F\u6301\uFF0C\u5E76\u6839\u636E\u60A8\u7684\u9700\u6C42\u6536\u53D6\u5B9A\u5236\u8D39\u7528\u3002")),he.createElement("div",{style:{textAlign:"center",marginTop:30}},he.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:fe,alt:"\u4E8C\u7EF4\u7801",width:160})))})},Qt=(ne,qt="")=>{const{shixunsDetail:{detail:$t}}=(0,bt.getDvaApp)()._store.getState();if(($t==null?void 0:$t.public)===2||($t==null?void 0:$t.public)===1||($t==null?void 0:$t.shixun_status)===3){let we="";return($t==null?void 0:$t.public)===2&&(we="\u5DF2\u516C\u5F00"),($t==null?void 0:$t.public)===1&&(we="\u5F85\u5BA1\u6838"),($t==null?void 0:$t.shixun_status)===3&&(we="\u5DF2\u5173\u95ED"),ie.default.info({centered:!0,icon:he.createElement(Jt.Z,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:he.createElement("div",{className:"tc",style:{marginLeft:-38}},he.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},he.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",we,"\uFF0C",qt,"\u3002"),he.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),he.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:fe,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0}return($t==null?void 0:$t.shixun_status)===2?(ie.default.confirm({centered:!0,icon:he.createElement(Jt.Z,null),title:"\u63D0\u793A",content:he.createElement("div",null,he.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",qt,"\u3002"),he.createElement("br",null),he.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:()=>{ie.default.confirm({width:440,centered:!0,icon:he.createElement(Jt.Z,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:()=>Rt(void 0,null,function*(){(yield ne({type:"shixunsDetail/cancelRelease",payload:{id:$t==null?void 0:$t.identifier}})).status!==401&&(Ne.ZP.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),ne({type:"shixunsDetail/getShixunsDetail",payload:{id:$t==null?void 0:$t.identifier}}),ne({type:"practiceSetting/getCommonData",payload:{id:$t==null?void 0:$t.identifier}}))})})}}),!0):!1}},88386:function(En,jn,Nt){(function(bt){bt(Nt(4631))})(function(bt){bt.defineOption("placeholder","",function(fe,ve,xe){var Ve=xe&&xe!=bt.Init;if(ve&&!Ve)fe.on("blur",Le),fe.on("change",It),fe.on("swapDoc",It),bt.on(fe.getInputField(),"compositionupdate",fe.state.placeholderCompose=function(){Ne(fe)}),It(fe);else if(!ve&&Ve){fe.off("blur",Le),fe.off("change",It),fe.off("swapDoc",It),bt.off(fe.getInputField(),"compositionupdate",fe.state.placeholderCompose),ie(fe);var he=fe.getWrapperElement();he.className=he.className.replace(" CodeMirror-empty","")}ve&&!fe.hasFocus()&&Le(fe)});function ie(fe){fe.state.placeholder&&(fe.state.placeholder.parentNode.removeChild(fe.state.placeholder),fe.state.placeholder=null)}function De(fe){ie(fe);var ve=fe.state.placeholder=document.createElement("pre");ve.style.cssText="height: 0; overflow: visible",ve.style.direction=fe.getOption("direction"),ve.className="CodeMirror-placeholder CodeMirror-line-like";var xe=fe.getOption("placeholder");typeof xe=="string"&&(xe=document.createTextNode(xe)),ve.appendChild(xe),fe.display.lineSpace.insertBefore(ve,fe.display.lineSpace.firstChild)}function Ne(fe){setTimeout(function(){var ve=!1,xe=fe.getInputField();xe.nodeName=="TEXTAREA"?ve=!xe.value:fe.lineCount()==1&&(ve=!/[^\u200b]/.test(xe.querySelector(".CodeMirror-line").textContent)),ve?De(fe):ie(fe)},20)}function Le(fe){Jt(fe)&&De(fe)}function It(fe){var ve=fe.getWrapperElement(),xe=Jt(fe);ve.className=ve.className.replace(" CodeMirror-empty","")+(xe?" CodeMirror-empty":""),xe?De(fe):ie(fe)}function Jt(fe){return fe.lineCount()===1&&fe.getLine(0)===""}})},82801:function(En,jn,Nt){(function(bt){bt(Nt(4631))})(function(bt){var ie={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},De=bt.Pos;bt.defineOption("autoCloseBrackets",!1,function(nt,et,ht){ht&&ht!=bt.Init&&(nt.removeKeyMap(Le),nt.state.closeBrackets=null),et&&(It(Ne(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(Le))});function Ne(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:ie[et]}var Le={Backspace:ve,Enter:xe};function It(nt){for(var et=0;et=0;gt--){var xt=lt[gt].head;nt.replaceRange("",De(xt.line,xt.ch-1),De(xt.line,xt.ch+1),"+delete")}}function xe(nt){var et=fe(nt),ht=et&&Ne(et,"explode");if(!ht||nt.getOption("disableInput"))return bt.Pass;for(var lt=nt.listSelections(),gt=0;gt0;return{anchor:new De(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new De(nt.head.line,nt.head.ch+(et?1:-1))}}function he(nt,et){var ht=fe(nt);if(!ht||nt.getOption("disableInput"))return bt.Pass;var lt=Ne(ht,"pairs"),gt=lt.indexOf(et);if(gt==-1)return bt.Pass;for(var mt=Ne(ht,"closeBefore"),xt=Ne(ht,"triples"),Mt=lt.charAt(gt+1)==et,jt=nt.listSelections(),Qt=gt%2==0,ne,qt=0;qt=0&&nt.getRange(we,De(we.line,we.ch+3))==et+et+et?ce="skipThree":ce="skip";else if(Mt&&we.ch>1&&xt.indexOf(et)>=0&&nt.getRange(De(we.line,we.ch-2),we)==et+et){if(we.ch>2&&/\bstring/.test(nt.getTokenTypeAt(De(we.line,we.ch-2))))return bt.Pass;ce="addFour"}else if(Mt){var Ge=we.ch==0?" ":nt.getRange(De(we.line,we.ch-1),we);if(!bt.isWordChar(be)&&Ge!=et&&!bt.isWordChar(Ge))ce="both";else return bt.Pass}else if(Qt&&(be.length===0||/\s/.test(be)||mt.indexOf(be)>-1))ce="both";else return bt.Pass;if(!ne)ne=ce;else if(ne!=ce)return bt.Pass}var Oe=gt%2?lt.charAt(gt-1):et,On=gt%2?et:lt.charAt(gt+1);nt.operation(function(){if(ne=="skip")nt.execCommand("goCharRight");else if(ne=="skipThree")for(var Nn=0;Nn<3;Nn++)nt.execCommand("goCharRight");else if(ne=="surround"){for(var Sn=nt.getSelections(),Nn=0;Nn'"]=function(Rt){return Ne(Rt)}),ve.addKeyMap(he)}});var ie=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],De=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Ne(ve){if(ve.getOption("disableInput"))return bt.Pass;for(var xe=ve.listSelections(),Ve=[],he=ve.getOption("autoCloseTags"),Rt=0;RtFt.ch&&(gt=gt.slice(0,gt.length-nt.end+Ft.ch));var jt=gt.toLowerCase();if(!gt||nt.type=="string"&&(nt.end!=Ft.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&<.close||nt.string.indexOf("/")==Ft.ch-nt.start-1||xt&&Jt(xt,jt)>-1||fe(ve,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(ht)||[],gt,Ft,!0))return bt.Pass;var Qt=typeof he=="object"&&he.emptyTags;if(Qt&&Jt(Qt,gt)>-1){Ve[Rt]={text:"/>",newPos:bt.Pos(Ft.line,Ft.ch+2)};continue}var ne=Mt&&Jt(Mt,jt)>-1;Ve[Rt]={indent:ne,text:">"+(ne?` `:"")+"",newPos:ne?bt.Pos(Ft.line+1,0):bt.Pos(Ft.line,Ft.ch+1)}}for(var qt=typeof he=="object"&&he.dontIndentOnAutoClose,Rt=xe.length-1;Rt>=0;Rt--){var $t=Ve[Rt];ve.replaceRange($t.text,xe[Rt].head,xe[Rt].anchor,"+insert");var we=ve.listSelections().slice(0);we[Rt]={head:$t.newPos,anchor:$t.newPos},ve.setSelections(we),!qt&&$t.indent&&(ve.indentLine($t.newPos.line,null,!0),ve.indentLine($t.newPos.line+1,null,!0))}}function Le(ve,xe){for(var Ve=ve.listSelections(),he=[],Rt=xe?"/":""&&(xt+=">"),he[et]=xt}if(ve.replaceSelections(he),Ve=ve.listSelections(),!nt)for(var et=0;et=0&&xe[ht]==Ve;ht--)++et;he=nt.to;for(var ht=1;ht=ht.max))return ht.ch=0,ht.text=ht.cm.getLine(++ht.line),!0}function xe(ht){if(!(ht.line<=ht.min))return ht.text=ht.cm.getLine(--ht.line),ht.ch=ht.text.length,!0}function Ve(ht){for(;;){var lt=ht.text.indexOf(">",ht.ch);if(lt==-1){if(ve(ht))continue;return}if(!fe(ht,lt+1)){ht.ch=lt+1;continue}var gt=ht.text.lastIndexOf("/",lt),mt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,mt?"selfClose":"regular"}}function he(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf("<",ht.ch-1):-1;if(lt==-1){if(xe(ht))continue;return}if(!fe(ht,lt+1)){ht.ch=lt;continue}It.lastIndex=lt,ht.ch=lt;var gt=It.exec(ht.text);if(gt&>.index==lt)return gt}}function Rt(ht){for(;;){It.lastIndex=ht.ch;var lt=It.exec(ht.text);if(!lt){if(ve(ht))continue;return}if(!fe(ht,lt.index+1)){ht.ch=lt.index+1;continue}return ht.ch=lt.index+lt[0].length,lt}}function Ft(ht){for(;;){var lt=ht.ch?ht.text.lastIndexOf(">",ht.ch-1):-1;if(lt==-1){if(xe(ht))continue;return}if(!fe(ht,lt+1)){ht.ch=lt;continue}var gt=ht.text.lastIndexOf("/",lt),mt=gt>-1&&!/\S/.test(ht.text.slice(gt+1,lt));return ht.ch=lt+1,mt?"selfClose":"regular"}}function nt(ht,lt){for(var gt=[];;){var mt=Rt(ht),xt,Mt=ht.line,jt=ht.ch-(mt?mt[0].length:0);if(!mt||!(xt=Ve(ht)))return;if(xt!="selfClose")if(mt[1]){for(var Qt=gt.length-1;Qt>=0;--Qt)if(gt[Qt]==mt[2]){gt.length=Qt;break}if(Qt<0&&(!lt||lt==mt[2]))return{tag:mt[2],from:ie(Mt,jt),to:ie(ht.line,ht.ch)}}else gt.push(mt[2])}}function et(ht,lt){for(var gt=[];;){var mt=Ft(ht);if(!mt)return;if(mt=="selfClose"){he(ht);continue}var xt=ht.line,Mt=ht.ch,jt=he(ht);if(!jt)return;if(jt[1])gt.push(jt[2]);else{for(var Qt=gt.length-1;Qt>=0;--Qt)if(gt[Qt]==jt[2]){gt.length=Qt;break}if(Qt<0&&(!lt||lt==jt[2]))return{tag:jt[2],from:ie(ht.line,ht.ch),to:ie(xt,Mt)}}}}bt.registerHelper("fold","xml",function(ht,lt){for(var gt=new Jt(ht,lt.line,0);;){var mt=Rt(gt);if(!mt||gt.line!=lt.line)return;var xt=Ve(gt);if(!xt)return;if(!mt[1]&&xt!="selfClose"){var Mt=ie(gt.line,gt.ch),jt=nt(gt,mt[2]);return jt&&De(jt.from,Mt)>0?{from:Mt,to:jt.from}:null}}}),bt.findMatchingTag=function(ht,lt,gt){var mt=new Jt(ht,lt.line,lt.ch,gt);if(!(mt.text.indexOf(">")==-1&&mt.text.indexOf("<")==-1)){var xt=Ve(mt),Mt=xt&&ie(mt.line,mt.ch),jt=xt&&he(mt);if(!(!xt||!jt||De(mt,lt)>0)){var Qt={from:ie(mt.line,mt.ch),to:Mt,tag:jt[2]};return xt=="selfClose"?{open:Qt,close:null,at:"open"}:jt[1]?{open:et(mt,jt[2]),close:Qt,at:"close"}:(mt=new Jt(ht,Mt.line,Mt.ch,gt),{open:Qt,close:nt(mt,jt[2]),at:"open"})}}},bt.findEnclosingTag=function(ht,lt,gt,mt){for(var xt=new Jt(ht,lt.line,lt.ch,gt);;){var Mt=et(xt,mt);if(!Mt)break;var jt=new Jt(ht,lt.line,lt.ch,gt),Qt=nt(jt,Mt.tag);if(Qt)return{open:Mt,close:Qt}}},bt.scanForClosingTag=function(ht,lt,gt,mt){var xt=new Jt(ht,lt.line,lt.ch,mt?{from:0,to:mt}:null);return nt(xt,gt)}})},4631:function(En){(function(jn,Nt){En.exports=Nt()})(this,function(){"use strict";var jn=navigator.userAgent,Nt=navigator.platform,bt=/gecko\/\d/i.test(jn),ie=/MSIE \d/.test(jn),De=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jn),Ne=/Edge\/(\d+)/.exec(jn),Le=ie||De||Ne,It=Le&&(ie?document.documentMode||6:+(Ne||De)[1]),Jt=!Ne&&/WebKit\//.test(jn),fe=Jt&&/Qt\/\d+\.\d+/.test(jn),ve=!Ne&&/Chrome\//.test(jn),xe=/Opera\//.test(jn),Ve=/Apple Computer/.test(navigator.vendor),he=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(jn),Rt=/PhantomJS/.test(jn),Ft=!Ne&&/AppleWebKit/.test(jn)&&/Mobile\/\w+/.test(jn),nt=/Android/.test(jn),et=Ft||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(jn),ht=Ft||/Mac/.test(Nt),lt=/\bCrOS\b/.test(jn),gt=/win/i.test(Nt),mt=xe&&jn.match(/Version\/(\d*\.\d*)/);mt&&(mt=Number(mt[1])),mt&&mt>=15&&(xe=!1,Jt=!0);var xt=ht&&(fe||xe&&(mt==null||mt<12.11)),Mt=bt||Le&&It>=9;function jt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Qt=function(it,ot){var dt=it.className,ct=jt(ot).exec(dt);if(ct){var pt=dt.slice(ct.index+ct[0].length);it.className=dt.slice(0,ct.index)+(pt?ct[1]+pt:"")}};function ne(it){for(var ot=it.childNodes.length;ot>0;--ot)it.removeChild(it.firstChild);return it}function qt(it,ot){return ne(it).appendChild(ot)}function $t(it,ot,dt,ct){var pt=document.createElement(it);if(dt&&(pt.className=dt),ct&&(pt.style.cssText=ct),typeof ot=="string")pt.appendChild(document.createTextNode(ot));else if(ot)for(var Et=0;Et=ot)return Ot+(ot-Et);Ot+=Ut-Et,Ot+=dt-Ot%dt,Et=Ut+1}}var Wt=function(){this.id=null,this.f=null,this.time=0,this.handler=Sn(this.onTimeout,this)};Wt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Wt.prototype.set=function(it,ot){this.f=ot;var dt=+new Date+it;(!this.id||dt=ot)return ct+Math.min(Ot,ot-pt);if(pt+=Et-ct,pt+=dt-pt%dt,ct=Et+1,pt>=ot)return ct}}var Fe=[""];function de(it){for(;Fe.length<=it;)Fe.push(Ie(Fe)+" ");return Fe[it]}function Ie(it){return it[it.length-1]}function cn(it,ot){for(var dt=[],ct=0;ct"\x80"&&(it.toUpperCase()!=it.toLowerCase()||Ct.test(it))}function Zt(it,ot){return ot?ot.source.indexOf("\\w")>-1&&Dt(it)?!0:ot.test(it):Dt(it)}function kt(it){for(var ot in it)if(it.hasOwnProperty(ot)&&it[ot])return!1;return!0}var _t=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function tn(it){return it.charCodeAt(0)>=768&&_t.test(it)}function an(it,ot,dt){for(;(dt<0?ot>0:otdt?-1:1;;){if(ot==dt)return ot;var pt=(ot+dt)/2,Et=ct<0?Math.ceil(pt):Math.floor(pt);if(Et==ot)return it(Et)?ot:dt;it(Et)?dt=Et:ot=Et+ct}}function nn(it,ot,dt,ct){if(!it)return ct(ot,dt,"ltr",0);for(var pt=!1,Et=0;Etot||ot==dt&&Ot.to==ot)&&(ct(Math.max(Ot.from,ot),Math.min(Ot.to,dt),Ot.level==1?"rtl":"ltr",Et),pt=!0)}pt||ct(ot,dt,"ltr")}var Pn=null;function je(it,ot,dt){var ct;Pn=null;for(var pt=0;ptot)return pt;Et.to==ot&&(Et.from!=Et.to&&dt=="before"?ct=pt:Pn=pt),Et.from==ot&&(Et.from!=Et.to&&dt!="before"?ct=pt:Pn=pt)}return ct!=null?ct:Pn}var In=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ot="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function dt(ae){return ae<=247?it.charAt(ae):1424<=ae&&ae<=1524?"R":1536<=ae&&ae<=1785?ot.charAt(ae-1536):1774<=ae&&ae<=2220?"r":8192<=ae&&ae<=8203?"w":ae==8204?"b":"L"}var ct=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,Et=/[LRr]/,Ot=/[Lb1n]/,Ut=/[1n]/;function Vt(ae,ke,se){this.level=ae,this.from=ke,this.to=se}return function(ae,ke){var se=ke=="ltr"?"L":"R";if(ae.length==0||ke=="ltr"&&!ct.test(ae))return!1;for(var Xe=ae.length,Je=[],Kn=0;Kn-1&&(ct[ot]=pt.slice(0,Et).concat(pt.slice(Et+1)))}}}function ii(it,ot){var dt=Pi(it,ot);if(dt.length)for(var ct=Array.prototype.slice.call(arguments,2),pt=0;pt0}function cr(it){it.prototype.on=function(ot,dt){ni(this,ot,dt)},it.prototype.off=function(ot,dt){Zi(this,ot,dt)}}function Gr(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function fr(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function Di(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Zr(it){Gr(it),fr(it)}function Mo(it){return it.target||it.srcElement}function Ha(it){var ot=it.which;return ot==null&&(it.button&1?ot=1:it.button&2?ot=3:it.button&4&&(ot=2)),ht&&it.ctrlKey&&ot==1&&(ot=3),ot}var pa=function(){if(Le&&It<9)return!1;var it=$t("div");return"draggable"in it||"dragDrop"in it}(),xa;function _a(it){if(xa==null){var ot=$t("span","\u200B");qt(it,$t("span",[ot,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(xa=ot.offsetWidth<=1&&ot.offsetHeight>2&&!(Le&&It<8))}var dt=xa?$t("span","\u200B"):$t("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return dt.setAttribute("cm-text",""),dt}var Oa;function Go(it){if(Oa!=null)return Oa;var ot=qt(it,document.createTextNode("A\u062EA")),dt=ce(ot,0,1).getBoundingClientRect(),ct=ce(ot,1,2).getBoundingClientRect();return ne(it),!dt||dt.left==dt.right?!1:Oa=ct.right-dt.right<3}var Cn=` b`.split(/\n/).length!=3?function(it){for(var ot=0,dt=[],ct=it.length;ot<=ct;){var pt=it.indexOf(` `,ot);pt==-1&&(pt=it.length);var Et=it.slice(ot,it.charAt(pt-1)=="\r"?pt-1:pt),Ot=Et.indexOf("\r");Ot!=-1?(dt.push(Et.slice(0,Ot)),ot+=Ot+1):(dt.push(Et),ot=pt+1)}return dt}:function(it){return it.split(/\r\n?|\n/)},wt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(ot){return!1}}:function(it){var ot;try{ot=it.ownerDocument.selection.createRange()}catch(dt){}return!ot||ot.parentElement()!=it?!1:ot.compareEndPoints("StartToEnd",ot)!=0},Ue=function(){var it=$t("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),He=null;function wi(it){if(He!=null)return He;var ot=qt(it,$t("span","x")),dt=ot.getBoundingClientRect(),ct=ce(ot,0,1).getBoundingClientRect();return He=Math.abs(dt.left-ct.left)>1}var hi={},Un={};function zi(it,ot){arguments.length>2&&(ot.dependencies=Array.prototype.slice.call(arguments,2)),hi[it]=ot}function hr(it,ot){Un[it]=ot}function Qe(it){if(typeof it=="string"&&Un.hasOwnProperty(it))it=Un[it];else if(it&&typeof it.name=="string"&&Un.hasOwnProperty(it.name)){var ot=Un[it.name];typeof ot=="string"&&(ot={name:ot}),it=Lt(ot,it),it.name=ot.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return Qe("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return Qe("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function on(it,ot){ot=Qe(ot);var dt=hi[ot.name];if(!dt)return on(it,"text/plain");var ct=dt(it,ot);if(Pe.hasOwnProperty(ot.name)){var pt=Pe[ot.name];for(var Et in pt)pt.hasOwnProperty(Et)&&(ct.hasOwnProperty(Et)&&(ct["_"+Et]=ct[Et]),ct[Et]=pt[Et])}if(ct.name=ot.name,ot.helperType&&(ct.helperType=ot.helperType),ot.modeProps)for(var Ot in ot.modeProps)ct[Ot]=ot.modeProps[Ot];return ct}var Pe={};function _e(it,ot){var dt=Pe.hasOwnProperty(it)?Pe[it]:Pe[it]={};Zn(ot,dt)}function fi(it,ot){if(ot===!0)return ot;if(it.copyState)return it.copyState(ot);var dt={};for(var ct in ot){var pt=ot[ct];pt instanceof Array&&(pt=pt.concat([])),dt[ct]=pt}return dt}function Mi(it,ot){for(var dt;it.innerMode&&(dt=it.innerMode(ot),!(!dt||dt.mode==it));)ot=dt.state,it=dt.mode;return dt||{mode:it,state:ot}}function Si(it,ot,dt){return it.startState?it.startState(ot,dt):!0}var We=function(it,ot,dt){this.pos=this.start=0,this.string=it,this.tabSize=ot||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=dt};We.prototype.eol=function(){return this.pos>=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.posot},We.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(it){var ot=this.string.indexOf(it,this.pos);if(ot>-1)return this.pos=ot,!0},We.prototype.backUp=function(it){this.pos-=it},We.prototype.column=function(){return this.lastColumnPos0?null:(Et&&ot!==!1&&(this.pos+=Et[0].length),Et)}},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(it,ot){this.lineStart+=it;try{return ot()}finally{this.lineStart-=it}},We.prototype.lookAhead=function(it){var ot=this.lineOracle;return ot&&ot.lookAhead(it)},We.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Ln(it,ot){if(ot-=it.first,ot<0||ot>=it.size)throw new Error("There is no line "+(ot+it.first)+" in the document.");for(var dt=it;!dt.lines;)for(var ct=0;;++ct){var pt=dt.children[ct],Et=pt.chunkSize();if(ot=it.first&&otdt?mn(dt,Ln(it,dt).text.length):$r(ot,Ln(it,ot.line).text.length)}function $r(it,ot){var dt=it.ch;return dt==null||dt>ot?mn(it.line,ot):dt<0?mn(it.line,0):it}function Kr(it,ot){for(var dt=[],ct=0;ctthis.maxLookAhead&&(this.maxLookAhead=it),ot},ir.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var ot=this.baseTokens[this.baseTokenPos+1];return{type:ot&&ot.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},ir.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ir.fromSaved=function(it,ot,dt){return ot instanceof Xn?new ir(it,fi(it.mode,ot.state),dt,ot.lookAhead):new ir(it,fi(it.mode,ot),dt)},ir.prototype.save=function(it){var ot=it!==!1?fi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Xn(ot,this.maxLookAhead):ot};function pl(it,ot,dt,ct){var pt=[it.state.modeGen],Et={};To(it,ot.text,it.doc.mode,dt,function(ae,ke){return pt.push(ae,ke)},Et,ct);for(var Ot=dt.state,Ut=function(ae){dt.baseTokens=pt;var ke=it.state.overlays[ae],se=1,Xe=0;dt.state=!0,To(it,ot.text,ke.mode,dt,function(Je,Kn){for(var ui=se;XeJe&&pt.splice(se,1,Je,pt[se+1],Fi),se+=2,Xe=Math.min(Je,Fi)}if(Kn)if(ke.opaque)pt.splice(ui,se-ui,Je,"overlay "+Kn),se=ui+2;else for(;uiit.options.maxHighlightLength&&fi(it.doc.mode,ct.state),Et=pl(it,ot,ct);pt&&(ct.state=pt),ot.stateAfter=ct.save(!pt),ot.styles=Et.styles,Et.classes?ot.styleClasses=Et.classes:ot.styleClasses&&(ot.styleClasses=null),dt===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return ot.styles}function qa(it,ot,dt){var ct=it.doc,pt=it.display;if(!ct.mode.startState)return new ir(ct,!0,ot);var Et=oo(it,ot,dt),Ot=Et>ct.first&&Ln(ct,Et-1).stateAfter,Ut=Ot?ir.fromSaved(ct,Ot,Et):new ir(ct,Si(ct.mode),Et);return ct.iter(Et,ot,function(Vt){Re(it,Vt.text,Ut);var ae=Ut.line;Vt.stateAfter=ae==ot-1||ae%5==0||ae>=pt.viewFrom&&aeot.start)return Et}throw new Error("Mode "+it.name+" failed to advance stream.")}var er=function(it,ot,dt){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=ot||null,this.state=dt};function Ca(it,ot,dt,ct){var pt=it.doc,Et=pt.mode,Ot;ot=Wi(pt,ot);var Ut=Ln(pt,ot.line),Vt=qa(it,ot.line,dt),ae=new We(Ut.text,it.options.tabSize,Vt),ke;for(ct&&(ke=[]);(ct||ae.posit.options.maxHighlightLength?(Ut=!1,Ot&&Re(it,ot,ct,ke.pos),ke.pos=ot.length,se=null):se=fo(yo(dt,ke,ct.state,Xe),Et),Xe){var Je=Xe[0].name;Je&&(se="m-"+(se?Je+" "+se:Je))}if(!Ut||ae!=se){for(;VtOt;--Ut){if(Ut<=Et.first)return Et.first;var Vt=Ln(Et,Ut-1),ae=Vt.stateAfter;if(ae&&(!dt||Ut+(ae instanceof Xn?ae.lookAhead:0)<=Et.modeFrontier))return Ut;var ke=re(Vt.text,null,it.options.tabSize);(pt==null||ct>ke)&&(pt=Ut-1,ct=ke)}return pt}function zr(it,ot){if(it.modeFrontier=Math.min(it.modeFrontier,ot),!(it.highlightFrontierdt;ct--){var pt=Ln(it,ct).stateAfter;if(pt&&(!(pt instanceof Xn)||ct+pt.lookAhead=ot:Et.to>ot);(ct||(ct=[])).push(new po(Ot,Et.from,Vt?null:Et.to))}}return ct}function bo(it,ot,dt){var ct;if(it)for(var pt=0;pt=ot:Et.to>ot);if(Ut||Et.from==ot&&Ot.type=="bookmark"&&(!dt||Et.marker.insertLeft)){var Vt=Et.from==null||(Ot.inclusiveLeft?Et.from<=ot:Et.from0&&Ut)for(var Or=0;Or0)){var ke=[Vt,1],se=Ni(ae.from,Ut.from),Xe=Ni(ae.to,Ut.to);(se<0||!Ot.inclusiveLeft&&!se)&&ke.push({from:ae.from,to:Ut.from}),(Xe>0||!Ot.inclusiveRight&&!Xe)&&ke.push({from:Ut.to,to:ae.to}),pt.splice.apply(pt,ke),Vt+=ke.length-3}}return pt}function gi(it){var ot=it.markedSpans;if(ot){for(var dt=0;dtot)&&(!ct||hu(ct,Et.marker)<0)&&(ct=Et.marker)}return ct}function Cu(it,ot,dt,ct,pt){var Et=Ln(it,ot),Ot=xn&&Et.markedSpans;if(Ot)for(var Ut=0;Ut=0&&se<=0||ke<=0&&se>=0)&&(ke<=0&&(Vt.marker.inclusiveRight&&pt.inclusiveLeft?Ni(ae.to,dt)>=0:Ni(ae.to,dt)>0)||ke>=0&&(Vt.marker.inclusiveRight&&pt.inclusiveLeft?Ni(ae.from,ct)<=0:Ni(ae.from,ct)<0)))return!0}}}function Ea(it){for(var ot;ot=du(it);)it=ot.find(-1,!0).line;return it}function Xa(it){for(var ot;ot=tl(it);)it=ot.find(1,!0).line;return it}function sr(it){for(var ot,dt;ot=tl(it);)it=ot.find(1,!0).line,(dt||(dt=[])).push(it);return dt}function Yi(it,ot){var dt=Ln(it,ot),ct=Ea(dt);return dt==ct?ot:Be(ct)}function Br(it,ot){if(ot>it.lastLine())return ot;var dt=Ln(it,ot),ct;if(!sn(it,dt))return ot;for(;ct=tl(dt);)dt=ct.find(1,!0).line;return Be(dt)+1}function sn(it,ot){var dt=xn&&ot.markedSpans;if(dt){for(var ct=void 0,pt=0;ptot.maxLineLength&&(ot.maxLineLength=pt,ot.maxLine=ct)})}var ba=function(it,ot,dt){this.text=it,Xt(this,ot),this.height=dt?dt(this):1};ba.prototype.lineNo=function(){return Be(this)},cr(ba);function Ws(it,ot,dt,ct){it.text=ot,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),gi(it),Xt(it,dt);var pt=ct?ct(it):1;pt!=it.height&&Hn(it,pt)}function xl(it){it.parent=null,gi(it)}var wl={},Xh={};function fh(it,ot){if(!it||/^\s*$/.test(it))return null;var dt=ot.addModeClass?Xh:wl;return dt[it]||(dt[it]=it.replace(/\S+/g,"cm-$&"))}function Ye(it,ot){var dt=we("span",null,null,Jt?"padding-right: .1px":null),ct={pre:we("pre",[dt],"CodeMirror-line"),content:dt,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};ot.measure={};for(var pt=0;pt<=(ot.rest?ot.rest.length:0);pt++){var Et=pt?ot.rest[pt-1]:ot.line,Ot=void 0;ct.pos=0,ct.addToken=Lu,Go(it.display.measure)&&(Ot=ti(Et,it.doc.direction))&&(ct.addToken=as(ct.addToken,Ot)),ct.map=[];var Ut=ot!=it.display.externalMeasured&&Be(Et);Fh(Et,ct,gs(it,Et,Ut)),Et.styleClasses&&(Et.styleClasses.bgClass&&(ct.bgClass=On(Et.styleClasses.bgClass,ct.bgClass||"")),Et.styleClasses.textClass&&(ct.textClass=On(Et.styleClasses.textClass,ct.textClass||""))),ct.map.length==0&&ct.map.push(0,0,ct.content.appendChild(_a(it.display.measure))),pt==0?(ot.measure.map=ct.map,ot.measure.cache={}):((ot.measure.maps||(ot.measure.maps=[])).push(ct.map),(ot.measure.caches||(ot.measure.caches=[])).push({}))}if(Jt){var Vt=ct.content.lastChild;(/\bcm-tab\b/.test(Vt.className)||Vt.querySelector&&Vt.querySelector(".cm-tab"))&&(ct.content.className="cm-tab-wrap-hack")}return ii(it,"renderLine",it,ot.line,ct.pre),ct.pre.className&&(ct.textClass=On(ct.pre.className,ct.textClass||"")),ct}function bl(it){var ot=$t("span","\u2022","cm-invalidchar");return ot.title="\\u"+it.charCodeAt(0).toString(16),ot.setAttribute("aria-label",ot.title),ot}function Lu(it,ot,dt,ct,pt,Et,Ot){if(ot){var Ut=it.splitSpaces?Ah(ot,it.trailingSpace):ot,Vt=it.cm.state.specialChars,ae=!1,ke;if(!Vt.test(ot))it.col+=ot.length,ke=document.createTextNode(Ut),it.map.push(it.pos,it.pos+ot.length,ke),Le&&It<9&&(ae=!0),it.pos+=ot.length;else{ke=document.createDocumentFragment();for(var se=0;;){Vt.lastIndex=se;var Xe=Vt.exec(ot),Je=Xe?Xe.index-se:ot.length-se;if(Je){var Kn=document.createTextNode(Ut.slice(se,se+Je));Le&&It<9?ke.appendChild($t("span",[Kn])):ke.appendChild(Kn),it.map.push(it.pos,it.pos+Je,Kn),it.col+=Je,it.pos+=Je}if(!Xe)break;se+=Je+1;var ui=void 0;if(Xe[0]==" "){var Fi=it.cm.options.tabSize,Vi=Fi-it.col%Fi;ui=ke.appendChild($t("span",de(Vi),"cm-tab")),ui.setAttribute("role","presentation"),ui.setAttribute("cm-text"," "),it.col+=Vi}else Xe[0]=="\r"||Xe[0]==` `?(ui=ke.appendChild($t("span",Xe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ui.setAttribute("cm-text",Xe[0]),it.col+=1):(ui=it.cm.options.specialCharPlaceholder(Xe[0]),ui.setAttribute("cm-text",Xe[0]),Le&&It<9?ke.appendChild($t("span",[ui])):ke.appendChild(ui),it.col+=1);it.map.push(it.pos,it.pos+1,ui),it.pos++}}if(it.trailingSpace=Ut.charCodeAt(ot.length-1)==32,dt||ct||pt||ae||Et||Ot){var kr=dt||"";ct&&(kr+=ct),pt&&(kr+=pt);var ar=$t("span",[ke],kr,Et);if(Ot)for(var Or in Ot)Ot.hasOwnProperty(Or)&&Or!="style"&&Or!="class"&&ar.setAttribute(Or,Ot[Or]);return it.content.appendChild(ar)}it.content.appendChild(ke)}}function Ah(it,ot){if(it.length>1&&!/ /.test(it))return it;for(var dt=ot,ct="",pt=0;ptae&&se.from<=ae));Xe++);if(se.to>=ke)return it(dt,ct,pt,Et,Ot,Ut,Vt);it(dt,ct.slice(0,se.to-ae),pt,Et,null,Ut,Vt),Et=null,ct=ct.slice(se.to-ae),ae=se.to}}}function bh(it,ot,dt,ct){var pt=!ct&&dt.widgetNode;pt&&it.map.push(it.pos,it.pos+ot,pt),!ct&&it.cm.display.input.needsContentAttribute&&(pt||(pt=it.content.appendChild(document.createElement("span"))),pt.setAttribute("cm-marker",dt.id)),pt&&(it.cm.display.input.setUneditable(pt),it.content.appendChild(pt)),it.pos+=ot,it.trailingSpace=!1}function Fh(it,ot,dt){var ct=it.markedSpans,pt=it.text,Et=0;if(!ct){for(var Ot=1;OtVt||ua.collapsed&&or.to==Vt&&or.from==Vt)){if(or.to!=null&&or.to!=Vt&&Je>or.to&&(Je=or.to,ui=""),ua.className&&(Kn+=" "+ua.className),ua.css&&(Xe=(Xe?Xe+";":"")+ua.css),ua.startStyle&&or.from==Vt&&(Fi+=" "+ua.startStyle),ua.endStyle&&or.to==Je&&(Or||(Or=[])).push(ua.endStyle,or.to),ua.title&&((kr||(kr={})).title=ua.title),ua.attributes)for(var Bs in ua.attributes)(kr||(kr={}))[Bs]=ua.attributes[Bs];ua.collapsed&&(!Vi||hu(Vi.marker,ua)<0)&&(Vi=or)}else or.from>Vt&&Je>or.from&&(Je=or.from)}if(Or)for(var zl=0;zl=Ut)break;for(var Yu=Math.min(Ut,Je);;){if(ke){var vu=Vt+ke.length;if(!Vi){var Ml=vu>Yu?ke.slice(0,Yu-Vt):ke;ot.addToken(ot,Ml,se?se+Kn:Kn,Fi,Vt+Ml.length==Je?ui:"",Xe,kr)}if(vu>=Yu){ke=ke.slice(Yu-Vt),Vt=Yu;break}Vt=vu,Fi=""}ke=pt.slice(Et,Et=dt[ae++]),se=fh(dt[ae++],ot.cm.options)}}}function Jh(it,ot,dt){this.line=ot,this.rest=sr(ot),this.size=this.rest?Be(Ie(this.rest))-dt+1:1,this.node=this.text=null,this.hidden=sn(it,ot)}function za(it,ot,dt){for(var ct=[],pt,Et=ot;Et2&&Et.push((Vt.bottom+ae.top)/2-dt.top)}}Et.push(dt.bottom-dt.top)}}function Fc(it,ot,dt){if(it.line==ot)return{map:it.measure.map,cache:it.measure.cache};for(var ct=0;ctdt)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function lf(it,ot){ot=Ea(ot);var dt=Be(ot),ct=it.display.externalMeasured=new Jh(it.doc,ot,dt);ct.lineN=dt;var pt=ct.built=Ye(it,ct);return ct.text=pt.pre,qt(it.display.lineMeasure,pt.pre),ct}function Nh(it,ot,dt,ct){return zu(it,$h(it,ot),dt,ct)}function cu(it,ot){if(ot>=it.display.viewFrom&&ot=dt.lineN&&otot)&&(Et=Vt-Ut,pt=Et-1,ot>=Vt&&(Ot="right")),pt!=null){if(ct=it[ae+2],Ut==Vt&&dt==(ct.insertLeft?"left":"right")&&(Ot=dt),dt=="left"&&pt==0)for(;ae&&it[ae-2]==it[ae-3]&&it[ae-1].insertLeft;)ct=it[(ae-=3)+2],Ot="left";if(dt=="right"&&pt==Vt-Ut)for(;ae=0&&(dt=it[pt]).left==dt.right;pt--);return dt}function Rs(it,ot,dt,ct){var pt=Nc(ot.map,dt,ct),Et=pt.node,Ot=pt.start,Ut=pt.end,Vt=pt.collapse,ae;if(Et.nodeType==3){for(var ke=0;ke<4;ke++){for(;Ot&&tn(ot.line.text.charAt(pt.coverStart+Ot));)--Ot;for(;pt.coverStart+Ut0&&(Vt=ct="right");var se;it.options.lineWrapping&&(se=Et.getClientRects()).length>1?ae=se[ct=="right"?se.length-1:0]:ae=Et.getBoundingClientRect()}if(Le&&It<9&&!Ot&&(!ae||!ae.left&&!ae.right)){var Xe=Et.parentNode.getClientRects()[0];Xe?ae={left:Xe.left,right:Xe.left+yd(it.display),top:Xe.top,bottom:Xe.bottom}:ae=uc}for(var Je=ae.top-ot.rect.top,Kn=ae.bottom-ot.rect.top,ui=(Je+Kn)/2,Fi=ot.view.measure.heights,Vi=0;Vi=ct.text.length?(Vt=ct.text.length,ae="before"):Vt<=0&&(Vt=0,ae="after"),!Ut)return Ot(ae=="before"?Vt-1:Vt,ae=="before");function ke(Kn,ui,Fi){var Vi=Ut[ui],kr=Vi.level==1;return Ot(Fi?Kn-1:Kn,kr!=Fi)}var se=je(Ut,Vt,ae),Xe=Pn,Je=ke(Vt,se,ae=="before");return Xe!=null&&(Je.other=ke(Vt,Xe,ae!="before")),Je}function gh(it,ot){var dt=0;ot=Wi(it.doc,ot),it.options.lineWrapping||(dt=yd(it.display)*ot.ch);var ct=Ln(it.doc,ot.line),pt=ro(ct)+yl(it.display);return{left:dt,right:dt,top:pt,bottom:pt+ct.height}}function Rd(it,ot,dt,ct,pt){var Et=mn(it,ot,dt);return Et.xRel=pt,ct&&(Et.outside=ct),Et}function Tc(it,ot,dt){var ct=it.doc;if(dt+=it.display.viewOffset,dt<0)return Rd(ct.first,0,null,-1,-1);var pt=xi(ct,dt),Et=ct.first+ct.size-1;if(pt>Et)return Rd(ct.first+ct.size-1,Ln(ct,Et).text.length,null,1,1);ot<0&&(ot=0);for(var Ot=Ln(ct,pt);;){var Ut=wn(it,Ot,pt,ot,dt),Vt=kh(Ot,Ut.ch+(Ut.xRel>0||Ut.outside>0?1:0));if(!Vt)return Ut;var ae=Vt.find(1);if(ae.line==pt)return ae;Ot=Ln(ct,pt=ae.line)}}function nr(it,ot,dt,ct){ct-=Hs(ot);var pt=ot.text.length,Et=_n(function(Ot){return zu(it,dt,Ot-1).bottom<=ct},pt,0);return pt=_n(function(Ot){return zu(it,dt,Ot).top>ct},Et,pt),{begin:Et,end:pt}}function df(it,ot,dt,ct){dt||(dt=$h(it,ot));var pt=el(it,ot,zu(it,dt,ct),"line").top;return nr(it,ot,dt,pt)}function Se(it,ot,dt,ct){return it.bottom<=dt?!1:it.top>dt?!0:(ct?it.left:it.right)>ot}function wn(it,ot,dt,ct,pt){pt-=ro(ot);var Et=$h(it,ot),Ot=Hs(ot),Ut=0,Vt=ot.text.length,ae=!0,ke=ti(ot,it.doc.direction);if(ke){var se=(it.options.lineWrapping?cf:Dc)(it,ot,dt,Et,ke,ct,pt);ae=se.level!=1,Ut=ae?se.from:se.to-1,Vt=ae?se.to:se.from-1}var Xe=null,Je=null,Kn=_n(function(No){var or=zu(it,Et,No);return or.top+=Ot,or.bottom+=Ot,Se(or,ct,pt,!1)?(or.top<=pt&&or.left<=ct&&(Xe=No,Je=or),!0):!1},Ut,Vt),ui,Fi,Vi=!1;if(Je){var kr=ct-Je.left=Or.bottom?1:0}return Kn=an(ot.text,Kn,1),Rd(dt,Kn,Fi,Vi,ct-ui)}function Dc(it,ot,dt,ct,pt,Et,Ot){var Ut=_n(function(se){var Xe=pt[se],Je=Xe.level!=1;return Se(Cs(it,mn(dt,Je?Xe.to:Xe.from,Je?"before":"after"),"line",ot,ct),Et,Ot,!0)},0,pt.length-1),Vt=pt[Ut];if(Ut>0){var ae=Vt.level!=1,ke=Cs(it,mn(dt,ae?Vt.from:Vt.to,ae?"after":"before"),"line",ot,ct);Se(ke,Et,Ot,!0)&&ke.top>Ot&&(Vt=pt[Ut-1])}return Vt}function cf(it,ot,dt,ct,pt,Et,Ot){var Ut=nr(it,ot,ct,Ot),Vt=Ut.begin,ae=Ut.end;/\s/.test(ot.text.charAt(ae-1))&&ae--;for(var ke=null,se=null,Xe=0;Xe=ae||Je.to<=Vt)){var Kn=Je.level!=1,ui=zu(it,ct,Kn?Math.min(ae,Je.to)-1:Math.max(Vt,Je.from)).right,Fi=uiFi)&&(ke=Je,se=Fi)}}return ke||(ke=pt[pt.length-1]),ke.fromae&&(ke={from:ke.from,to:ae,level:ke.level}),ke}var Th;function th(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Th==null){Th=$t("pre",null,"CodeMirror-line-like");for(var ot=0;ot<49;++ot)Th.appendChild(document.createTextNode("x")),Th.appendChild($t("br"));Th.appendChild(document.createTextNode("x"))}qt(it.measure,Th);var dt=Th.offsetHeight/50;return dt>3&&(it.cachedTextHeight=dt),ne(it.measure),dt||1}function yd(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var ot=$t("span","xxxxxxxxxx"),dt=$t("pre",[ot],"CodeMirror-line-like");qt(it.measure,dt);var ct=ot.getBoundingClientRect(),pt=(ct.right-ct.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function Sd(it){for(var ot=it.display,dt={},ct={},pt=ot.gutters.clientLeft,Et=ot.gutters.firstChild,Ot=0;Et;Et=Et.nextSibling,++Ot){var Ut=it.display.gutterSpecs[Ot].className;dt[Ut]=Et.offsetLeft+Et.clientLeft+pt,ct[Ut]=Et.clientWidth}return{fixedPos:td(ot),gutterTotalWidth:ot.gutters.offsetWidth,gutterLeft:dt,gutterWidth:ct,wrapperWidth:ot.wrapper.clientWidth}}function td(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function ds(it){var ot=th(it.display),dt=it.options.lineWrapping,ct=dt&&Math.max(5,it.display.scroller.clientWidth/yd(it.display)-3);return function(pt){if(sn(it.doc,pt))return 0;var Et=0;if(pt.widgets)for(var Ot=0;Ot0&&(ae=Ln(it.doc,Vt.line).text).length==Vt.ch){var ke=re(ae,ae.length,it.options.tabSize)-ae.length;Vt=mn(Vt.line,Math.max(0,Math.round((Et-$u(it.display).left)/yd(it.display))-ke))}return Vt}function fu(it,ot){if(ot>=it.display.viewTo||(ot-=it.display.viewFrom,ot<0))return null;for(var dt=it.display.view,ct=0;ctot)&&(pt.updateLineNumbers=ot),it.curOp.viewChanged=!0,ot>=pt.viewTo)xn&&Yi(it.doc,ot)pt.viewFrom?Ns(it):(pt.viewFrom+=ct,pt.viewTo+=ct);else if(ot<=pt.viewFrom&&dt>=pt.viewTo)Ns(it);else if(ot<=pt.viewFrom){var Et=Gl(it,dt,dt+ct,1);Et?(pt.view=pt.view.slice(Et.index),pt.viewFrom=Et.lineN,pt.viewTo+=ct):Ns(it)}else if(dt>=pt.viewTo){var Ot=Gl(it,ot,ot,-1);Ot?(pt.view=pt.view.slice(0,Ot.index),pt.viewTo=Ot.lineN):Ns(it)}else{var Ut=Gl(it,ot,ot,-1),Vt=Gl(it,dt,dt+ct,1);Ut&&Vt?(pt.view=pt.view.slice(0,Ut.index).concat(za(it,Ut.lineN,Vt.lineN)).concat(pt.view.slice(Vt.index)),pt.viewTo+=ct):Ns(it)}var ae=pt.externalMeasured;ae&&(dt=pt.lineN&&ot=ct.viewTo)){var Et=ct.view[fu(it,ot)];if(Et.node!=null){var Ot=Et.changes||(Et.changes=[]);Me(Ot,dt)==-1&&Ot.push(dt)}}}function Ns(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Gl(it,ot,dt,ct){var pt=fu(it,ot),Et,Ot=it.display.view;if(!xn||dt==it.doc.first+it.doc.size)return{index:pt,lineN:dt};for(var Ut=it.display.viewFrom,Vt=0;Vt0){if(pt==Ot.length-1)return null;Et=Ut+Ot[pt].size-ot,pt++}else Et=Ut-ot;ot+=Et,dt+=Et}for(;Yi(it.doc,dt)!=dt;){if(pt==(ct<0?0:Ot.length-1))return null;dt+=ct*Ot[pt-(ct<0?1:0)].size,pt+=ct}return{index:pt,lineN:dt}}function Ja(it,ot,dt){var ct=it.display,pt=ct.view;pt.length==0||ot>=ct.viewTo||dt<=ct.viewFrom?(ct.view=za(it,ot,dt),ct.viewFrom=ot):(ct.viewFrom>ot?ct.view=za(it,ot,ct.viewFrom).concat(ct.view):ct.viewFromdt&&(ct.view=ct.view.slice(0,fu(it,dt)))),ct.viewTo=dt}function eu(it){for(var ot=it.display.view,dt=0,ct=0;ct=it.display.viewTo||Ut.to().line0?ot.blinker=setInterval(function(){it.hasFocus()||xd(it),ot.cursorDiv.style.visibility=(dt=!dt)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(ot.cursorDiv.style.visibility="hidden")}}function Ga(it){it.state.focused||(it.display.input.focus(),fa(it))}function vs(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,xd(it))},100)}function fa(it,ot){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(ii(it,"focus",it,ot),it.state.focused=!0,Oe(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),Jt&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),ha(it))}function xd(it,ot){it.state.delayingBlurEvent||(it.state.focused&&(ii(it,"blur",it,ot),it.state.focused=!1,Qt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function Fr(it){for(var ot=it.display,dt=ot.lineDiv.offsetTop,ct=0;ct.005||ke<-.005)&&(Hn(pt.line,Ot),Dh(pt.line),pt.rest))for(var se=0;seit.display.sizerWidth){var Xe=Math.ceil(Ut/yd(it.display));Xe>it.display.maxLineLength&&(it.display.maxLineLength=Xe,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function Dh(it){if(it.widgets)for(var ot=0;ot=Ot&&(Et=xi(ot,ro(Ln(ot,Vt))-it.wrapper.clientHeight),Ot=Vt)}return{from:Et,to:Math.max(Ot,Et+1)}}function zf(it,ot){if(!ci(it,"scrollCursorIntoView")){var dt=it.display,ct=dt.sizer.getBoundingClientRect(),pt=null;if(ot.top+ct.top<0?pt=!0:ot.bottom+ct.top>(window.innerHeight||document.documentElement.clientHeight)&&(pt=!1),pt!=null&&!Rt){var Et=$t("div","\u200B",null,`position: absolute; top: `+(ot.top-dt.viewOffset-yl(it.display))+`px; height: `+(ot.bottom-ot.top+sl(it)+dt.barHeight)+`px; left: `+ot.left+"px; width: "+Math.max(2,ot.right-ot.left)+"px;");it.display.lineSpace.appendChild(Et),Et.scrollIntoView(pt),it.display.lineSpace.removeChild(Et)}}}function wd(it,ot,dt,ct){ct==null&&(ct=0);var pt;!it.options.lineWrapping&&ot==dt&&(ot=ot.ch?mn(ot.line,ot.sticky=="before"?ot.ch-1:ot.ch,"after"):ot,dt=ot.sticky=="before"?mn(ot.line,ot.ch+1,"before"):ot);for(var Et=0;Et<5;Et++){var Ot=!1,Ut=Cs(it,ot),Vt=!dt||dt==ot?Ut:Cs(it,dt);pt={left:Math.min(Ut.left,Vt.left),top:Math.min(Ut.top,Vt.top)-ct,right:Math.max(Ut.left,Vt.left),bottom:Math.max(Ut.bottom,Vt.bottom)+ct};var ae=ff(it,pt),ke=it.doc.scrollTop,se=it.doc.scrollLeft;if(ae.scrollTop!=null&&(ue(it,ae.scrollTop),Math.abs(it.doc.scrollTop-ke)>1&&(Ot=!0)),ae.scrollLeft!=null&&(ye(it,ae.scrollLeft),Math.abs(it.doc.scrollLeft-se)>1&&(Ot=!0)),!Ot)break}return pt}function cc(it,ot){var dt=ff(it,ot);dt.scrollTop!=null&&ue(it,dt.scrollTop),dt.scrollLeft!=null&&ye(it,dt.scrollLeft)}function ff(it,ot){var dt=it.display,ct=th(it.display);ot.top<0&&(ot.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:dt.scroller.scrollTop,Et=lc(it),Ot={};ot.bottom-ot.top>Et&&(ot.bottom=ot.top+Et);var Ut=it.doc.height+qh(dt),Vt=ot.topUt-ct;if(ot.toppt+Et){var ke=Math.min(ot.top,(ae?Ut:ot.bottom)-Et);ke!=pt&&(Ot.scrollTop=ke)}var se=it.options.fixedGutter?0:dt.gutters.offsetWidth,Xe=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:dt.scroller.scrollLeft-se,Je=Ru(it)-dt.gutters.offsetWidth,Kn=ot.right-ot.left>Je;return Kn&&(ot.right=ot.left+Je),ot.left<10?Ot.scrollLeft=0:ot.leftJe+Xe-3&&(Ot.scrollLeft=ot.right+(Kn?0:10)-Je),Ot}function Wu(it,ot){ot!=null&&(eh(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+ot)}function Bh(it){eh(it);var ot=it.getCursor();it.curOp.scrollToPos={from:ot,to:ot,margin:it.options.cursorScrollMargin}}function Hu(it,ot,dt){(ot!=null||dt!=null)&&eh(it),ot!=null&&(it.curOp.scrollLeft=ot),dt!=null&&(it.curOp.scrollTop=dt)}function va(it,ot){eh(it),it.curOp.scrollToPos=ot}function eh(it){var ot=it.curOp.scrollToPos;if(ot){it.curOp.scrollToPos=null;var dt=gh(it,ot.from),ct=gh(it,ot.to);Gt(it,dt,ct,ot.margin)}}function Gt(it,ot,dt,ct){var pt=ff(it,{left:Math.min(ot.left,dt.left),top:Math.min(ot.top,dt.top)-ct,right:Math.max(ot.right,dt.right),bottom:Math.max(ot.bottom,dt.bottom)+ct});Hu(it,pt.scrollLeft,pt.scrollTop)}function ue(it,ot){Math.abs(it.doc.scrollTop-ot)<2||(bt||xr(it,{top:ot}),me(it,ot,!0),bt&&xr(it),Oo(it,100))}function me(it,ot,dt){ot=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,ot)),!(it.display.scroller.scrollTop==ot&&!dt)&&(it.doc.scrollTop=ot,it.display.scrollbars.setScrollTop(ot),it.display.scroller.scrollTop!=ot&&(it.display.scroller.scrollTop=ot))}function ye(it,ot,dt,ct){ot=Math.max(0,Math.min(ot,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((dt?ot==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-ot)<2)&&!ct)&&(it.doc.scrollLeft=ot,aa(it),it.display.scroller.scrollLeft!=ot&&(it.display.scroller.scrollLeft=ot),it.display.scrollbars.setScrollLeft(ot))}function Te(it){var ot=it.display,dt=ot.gutters.offsetWidth,ct=Math.round(it.doc.height+qh(it.display));return{clientHeight:ot.scroller.clientHeight,viewHeight:ot.wrapper.clientHeight,scrollWidth:ot.scroller.scrollWidth,clientWidth:ot.scroller.clientWidth,viewWidth:ot.wrapper.clientWidth,barLeft:it.options.fixedGutter?dt:0,docHeight:ct,scrollHeight:ct+sl(it)+ot.barHeight,nativeBarWidth:ot.nativeBarWidth,gutterWidth:dt}}var Ze=function(it,ot,dt){this.cm=dt;var ct=this.vert=$t("div",[$t("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=$t("div",[$t("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ct.tabIndex=pt.tabIndex=-1,it(ct),it(pt),ni(ct,"scroll",function(){ct.clientHeight&&ot(ct.scrollTop,"vertical")}),ni(pt,"scroll",function(){pt.clientWidth&&ot(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Le&&It<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ze.prototype.update=function(it){var ot=it.scrollWidth>it.clientWidth+1,dt=it.scrollHeight>it.clientHeight+1,ct=it.nativeBarWidth;if(dt){this.vert.style.display="block",this.vert.style.bottom=ot?ct+"px":"0";var pt=it.viewHeight-(ot?ct:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+pt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ot){this.horiz.style.display="block",this.horiz.style.right=dt?ct+"px":"0",this.horiz.style.left=it.barLeft+"px";var Et=it.viewWidth-it.barLeft-(dt?ct:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Et)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ct==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:dt?ct:0,bottom:ot?ct:0}},Ze.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ze.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ze.prototype.zeroWidthHack=function(){var it=ht&&!he?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Wt,this.disableVert=new Wt},Ze.prototype.enableZeroWidthBar=function(it,ot,dt){it.style.pointerEvents="auto";function ct(){var pt=it.getBoundingClientRect(),Et=dt=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);Et!=it?it.style.pointerEvents="none":ot.set(1e3,ct)}ot.set(1e3,ct)},Ze.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var en=function(){};en.prototype.update=function(){return{bottom:0,right:0}},en.prototype.setScrollLeft=function(){},en.prototype.setScrollTop=function(){},en.prototype.clear=function(){};function fn(it,ot){ot||(ot=Te(it));var dt=it.display.barWidth,ct=it.display.barHeight;Rn(it,ot);for(var pt=0;pt<4&&dt!=it.display.barWidth||ct!=it.display.barHeight;pt++)dt!=it.display.barWidth&&it.options.lineWrapping&&Fr(it),Rn(it,Te(it)),dt=it.display.barWidth,ct=it.display.barHeight}function Rn(it,ot){var dt=it.display,ct=dt.scrollbars.update(ot);dt.sizer.style.paddingRight=(dt.barWidth=ct.right)+"px",dt.sizer.style.paddingBottom=(dt.barHeight=ct.bottom)+"px",dt.heightForcer.style.borderBottom=ct.bottom+"px solid transparent",ct.right&&ct.bottom?(dt.scrollbarFiller.style.display="block",dt.scrollbarFiller.style.height=ct.bottom+"px",dt.scrollbarFiller.style.width=ct.right+"px"):dt.scrollbarFiller.style.display="",ct.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(dt.gutterFiller.style.display="block",dt.gutterFiller.style.height=ct.bottom+"px",dt.gutterFiller.style.width=ot.gutterWidth+"px"):dt.gutterFiller.style.display=""}var bn={native:Ze,null:en};function oi(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Qt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new bn[it.options.scrollbarStyle](function(ot){it.display.wrapper.insertBefore(ot,it.display.scrollbarFiller),ni(ot,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),ot.setAttribute("cm-not-content","true")},function(ot,dt){dt=="horizontal"?ye(it,ot):ue(it,ot)},it),it.display.scrollbars.addClass&&Oe(it.display.wrapper,it.display.scrollbars.addClass)}var Bn=0;function Qn(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Bn},to(it.curOp)}function Gn(it){var ot=it.curOp;ot&&ja(ot,function(dt){for(var ct=0;ct=dt.viewTo)||dt.maxLineChanged&&ot.options.lineWrapping,it.update=it.mustUpdate&&new Ko(ot,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function qi(it){it.updatedDisplay=it.mustUpdate&&Jr(it.cm,it.update)}function mr(it){var ot=it.cm,dt=ot.display;it.updatedDisplay&&Fr(ot),it.barMeasure=Te(ot),dt.maxLineChanged&&!ot.options.lineWrapping&&(it.adjustWidthTo=Nh(ot,dt.maxLine,dt.maxLine.text.length).left+3,ot.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(dt.scroller.clientWidth,dt.sizer.offsetLeft+it.adjustWidthTo+sl(ot)+ot.display.barWidth),it.maxScrollLeft=Math.max(0,dt.sizer.offsetLeft+it.adjustWidthTo-Ru(ot))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=dt.input.prepareSelection())}function Ai(it){var ot=it.cm;it.adjustWidthTo!=null&&(ot.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft=it.display.viewTo)){var dt=+new Date+it.options.workTime,ct=qa(it,ot.highlightFrontier),pt=[];ot.iter(ct.line,Math.min(ot.first+ot.size,it.display.viewTo+500),function(Et){if(ct.line>=it.display.viewFrom){var Ot=Et.styles,Ut=Et.text.length>it.options.maxHighlightLength?fi(ot.mode,ct.state):null,Vt=pl(it,Et,ct,!0);Ut&&(ct.state=Ut),Et.styles=Vt.styles;var ae=Et.styleClasses,ke=Vt.classes;ke?Et.styleClasses=ke:ae&&(Et.styleClasses=null);for(var se=!Ot||Ot.length!=Et.styles.length||ae!=ke&&(!ae||!ke||ae.bgClass!=ke.bgClass||ae.textClass!=ke.textClass),Xe=0;!se&&Xedt)return Oo(it,it.options.workDelay),!0}),ot.highlightFrontier=ct.line,ot.modeFrontier=Math.max(ot.modeFrontier,ct.line),pt.length&&Oi(it,function(){for(var Et=0;Et=dt.viewFrom&&ot.visible.to<=dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo)&&dt.renderedView==dt.view&&eu(it)==0)return!1;Po(it)&&(Ns(it),ot.dims=Sd(it));var pt=ct.first+ct.size,Et=Math.max(ot.visible.from-it.options.viewportMargin,ct.first),Ot=Math.min(pt,ot.visible.to+it.options.viewportMargin);dt.viewFromOt&&dt.viewTo-Ot<20&&(Ot=Math.min(pt,dt.viewTo)),xn&&(Et=Yi(it.doc,Et),Ot=Br(it.doc,Ot));var Ut=Et!=dt.viewFrom||Ot!=dt.viewTo||dt.lastWrapHeight!=ot.wrapperHeight||dt.lastWrapWidth!=ot.wrapperWidth;Ja(it,Et,Ot),dt.viewOffset=ro(Ln(it.doc,dt.viewFrom)),it.display.mover.style.top=dt.viewOffset+"px";var Vt=eu(it);if(!Ut&&Vt==0&&!ot.force&&dt.renderedView==dt.view&&(dt.updateLineNumbers==null||dt.updateLineNumbers>=dt.viewTo))return!1;var ae=Zo(it);return Vt>4&&(dt.lineDiv.style.display="none"),no(it,dt.updateLineNumbers,ot.dims),Vt>4&&(dt.lineDiv.style.display=""),dt.renderedView=dt.view,Vr(ae),ne(dt.cursorDiv),ne(dt.selectionDiv),dt.gutters.style.height=dt.sizer.style.minHeight=0,Ut&&(dt.lastWrapHeight=ot.wrapperHeight,dt.lastWrapWidth=ot.wrapperWidth,Oo(it,400)),dt.updateLineNumbers=null,!0}function Bi(it,ot){for(var dt=ot.viewport,ct=!0;;ct=!1){if(!ct||!it.options.lineWrapping||ot.oldDisplayWidth==Ru(it)){if(dt&&dt.top!=null&&(dt={top:Math.min(it.doc.height+qh(it.display)-lc(it),dt.top)}),ot.visible=ta(it.display,it.doc,dt),ot.visible.from>=it.display.viewFrom&&ot.visible.to<=it.display.viewTo)break}else ct&&(ot.visible=ta(it.display,it.doc,dt));if(!Jr(it,ot))break;Fr(it);var pt=Te(it);Us(it),fn(it,pt),uo(it,pt),ot.force=!1}ot.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(ot.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function xr(it,ot){var dt=new Ko(it,ot);if(Jr(it,dt)){Fr(it),Bi(it,dt);var ct=Te(it);Us(it),fn(it,ct),uo(it,ct),dt.finish()}}function no(it,ot,dt){var ct=it.display,pt=it.options.lineNumbers,Et=ct.lineDiv,Ot=Et.firstChild;function Ut(Kn){var ui=Kn.nextSibling;return Jt&&ht&&it.display.currentWheelTarget==Kn?Kn.style.display="none":Kn.parentNode.removeChild(Kn),ui}for(var Vt=ct.view,ae=ct.viewFrom,ke=0;ke-1&&(Je=!1),Qh(it,se,ae,dt)),Je&&(ne(se.lineNumber),se.lineNumber.appendChild(document.createTextNode(Tr(it.options,ae)))),Ot=se.node.nextSibling}ae+=se.size}for(;Ot;)Ot=Ut(Ot)}function lo(it){var ot=it.gutters.offsetWidth;it.sizer.style.marginLeft=ot+"px"}function uo(it,ot){it.display.sizer.style.minHeight=ot.docHeight+"px",it.display.heightForcer.style.top=ot.docHeight+"px",it.display.gutters.style.height=ot.docHeight+it.display.barHeight+sl(it)+"px"}function aa(it){var ot=it.display,dt=ot.view;if(!(!ot.alignWidgets&&(!ot.gutters.firstChild||!it.options.fixedGutter))){for(var ct=td(ot)-ot.scroller.scrollLeft+it.doc.scrollLeft,pt=ot.gutters.offsetWidth,Et=ct+"px",Ot=0;OtOt.clientWidth,Vt=Ot.scrollHeight>Ot.clientHeight;if(ct&&Ut||pt&&Vt){if(pt&&ht&&Jt){t:for(var ae=ot.target,ke=Et.view;ae!=Ot;ae=ae.parentNode)for(var se=0;se=0&&Ni(it,ct.to())<=0)return dt}return-1};var Lr=function(it,ot){this.anchor=it,this.head=ot};Lr.prototype.from=function(){return Ei(this.anchor,this.head)},Lr.prototype.to=function(){return Ao(this.anchor,this.head)},Lr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function da(it,ot,dt){var ct=it&&it.options.selectionsMayTouch,pt=ot[dt];ot.sort(function(Xe,Je){return Ni(Xe.from(),Je.from())}),dt=Me(ot,pt);for(var Et=1;Et0:Vt>=0){var ae=Ei(Ut.from(),Ot.from()),ke=Ao(Ut.to(),Ot.to()),se=Ut.empty()?Ot.from()==Ot.head:Ut.from()==Ut.head;Et<=dt&&--dt,ot.splice(--Et,2,new Lr(se?ke:ae,se?ae:ke))}}return new na(ot,dt)}function Ls(it,ot){return new na([new Lr(it,ot||it)],0)}function nl(it){return it.text?mn(it.from.line+it.text.length-1,Ie(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Sl(it,ot){if(Ni(it,ot.from)<0)return it;if(Ni(it,ot.to)<=0)return nl(ot);var dt=it.line+ot.text.length-(ot.to.line-ot.from.line)-1,ct=it.ch;return it.line==ot.to.line&&(ct+=nl(ot).ch-ot.to.ch),mn(dt,ct)}function Dl(it,ot){for(var dt=[],ct=0;ct1&&it.remove(Ut.line+1,Kn-1),it.insert(Ut.line+1,Vi)}_i(it,"change",it,ot)}function ul(it,ot,dt){function ct(pt,Et,Ot){if(pt.linked)for(var Ut=0;Ut1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Ie(it.done)}function Oh(it,ot,dt,ct){var pt=it.history;pt.undone.length=0;var Et=+new Date,Ot,Ut;if((pt.lastOp==ct||pt.lastOrigin==ot.origin&&ot.origin&&(ot.origin.charAt(0)=="+"&&pt.lastModTime>Et-(it.cm?it.cm.options.historyEventDelay:500)||ot.origin.charAt(0)=="*"))&&(Ot=Gu(pt,pt.lastOp==ct)))Ut=Ie(Ot.changes),Ni(ot.from,ot.to)==0&&Ni(ot.from,Ut.to)==0?Ut.to=nl(ot):Ot.changes.push(cs(it,ot));else{var Vt=Ie(pt.done);for((!Vt||!Vt.ranges)&&hl(it.sel,pt.done),Ot={changes:[cs(it,ot)],generation:pt.generation},pt.done.push(Ot);pt.done.length>pt.undoDepth;)pt.done.shift(),pt.done[0].ranges||pt.done.shift()}pt.done.push(dt),pt.generation=++pt.maxGeneration,pt.lastModTime=pt.lastSelTime=Et,pt.lastOp=pt.lastSelOp=ct,pt.lastOrigin=pt.lastSelOrigin=ot.origin,Ut||ii(it,"historyAdded")}function zd(it,ot,dt,ct){var pt=ot.charAt(0);return pt=="*"||pt=="+"&&dt.ranges.length==ct.ranges.length&&dt.somethingSelected()==ct.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function ed(it,ot,dt,ct){var pt=it.history,Et=ct&&ct.origin;dt==pt.lastSelOp||Et&&pt.lastSelOrigin==Et&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==Et||zd(it,Et,Ie(pt.done),ot))?pt.done[pt.done.length-1]=ot:hl(ot,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=Et,pt.lastSelOp=dt,ct&&ct.clearRedo!==!1&&pu(pt.undone)}function hl(it,ot){var dt=Ie(ot);dt&&dt.ranges&&dt.equals(it)||ot.push(it)}function nh(it,ot,dt,ct){var pt=ot["spans_"+it.id],Et=0;it.iter(Math.max(it.first,dt),Math.min(it.first+it.size,ct),function(Ot){Ot.markedSpans&&((pt||(pt=ot["spans_"+it.id]={}))[Et]=Ot.markedSpans),++Et})}function dl(it){if(!it)return null;for(var ot,dt=0;dt-1&&(Ie(Ut)[se]=ae[se],delete ae[se])}}return ct}function Pd(it,ot,dt,ct){if(ct){var pt=it.anchor;if(dt){var Et=Ni(ot,pt)<0;Et!=Ni(dt,pt)<0?(pt=ot,ot=dt):Et!=Ni(ot,dt)<0&&(ot=dt)}return new Lr(pt,ot)}else return new Lr(dt||ot,ot)}function nd(it,ot,dt,ct,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),is(it,new na([Pd(it.sel.primary(),ot,dt,pt)],0),ct)}function jd(it,ot,dt){for(var ct=[],pt=it.cm&&(it.cm.display.shift||it.extend),Et=0;Et=ot.ch:Ut.to>ot.ch))){if(pt&&(ii(Vt,"beforeCursorEnter"),Vt.explicitlyCleared))if(Et.markedSpans){--Ot;continue}else break;if(!Vt.atomic)continue;if(dt){var se=Vt.find(ct<0?1:-1),Xe=void 0;if((ct<0?ke:ae)&&(se=le(it,se,-ct,se&&se.line==ot.line?Et:null)),se&&se.line==ot.line&&(Xe=Ni(se,dt))&&(ct<0?Xe<0:Xe>0))return Bt(it,se,ot,ct,pt)}var Je=Vt.find(ct<0?-1:1);return(ct<0?ae:ke)&&(Je=le(it,Je,ct,Je.line==ot.line?Et:null)),Je?Bt(it,Je,ot,ct,pt):null}}return ot}function Kt(it,ot,dt,ct,pt){var Et=ct||1,Ot=Bt(it,ot,dt,Et,pt)||!pt&&Bt(it,ot,dt,Et,!0)||Bt(it,ot,dt,-Et,pt)||!pt&&Bt(it,ot,dt,-Et,!0);return Ot||(it.cantEdit=!0,mn(it.first,0))}function le(it,ot,dt,ct){return dt<0&&ot.ch==0?ot.line>it.first?Wi(it,mn(ot.line-1)):null:dt>0&&ot.ch==(ct||Ln(it,ot.line)).text.length?ot.line=0;--pt)gn(it,{from:ct[pt].from,to:ct[pt].to,text:pt?[""]:ot.text,origin:ot.origin});else gn(it,ot)}}function gn(it,ot){if(!(ot.text.length==1&&ot.text[0]==""&&Ni(ot.from,ot.to)==0)){var dt=Dl(it,ot);Oh(it,ot,dt,it.cm?it.cm.curOp.id:NaN),qn(it,ot,dt,Aa(it,ot));var ct=[];ul(it,function(pt,Et){!Et&&Me(ct,pt.history)==-1&&($n(pt.history,ot),ct.push(pt.history)),qn(pt,ot,null,Aa(pt,ot))})}}function kn(it,ot,dt){var ct=it.cm&&it.cm.state.suppressEdits;if(!(ct&&!dt)){for(var pt=it.history,Et,Ot=it.sel,Ut=ot=="undo"?pt.done:pt.undone,Vt=ot=="undo"?pt.undone:pt.done,ae=0;ae=0;--Je){var Kn=Xe(Je);if(Kn)return Kn.v}}}}function un(it,ot){if(ot!=0&&(it.first+=ot,it.sel=new na(cn(it.sel.ranges,function(pt){return new Lr(mn(pt.anchor.line+ot,pt.anchor.ch),mn(pt.head.line+ot,pt.head.ch))}),it.sel.primIndex),it.cm)){$a(it.cm,it.first,it.first-ot,ot);for(var dt=it.cm.display,ct=dt.viewFrom;ctit.lastLine())){if(ot.from.lineEt&&(ot={from:ot.from,to:mn(Et,Ln(it,Et).text.length),text:[ot.text[0]],origin:ot.origin}),ot.removed=ji(it,ot.from,ot.to),dt||(dt=Dl(it,ot)),it.cm?vi(it.cm,ot,ct):il(it,ot,ct),Ll(it,dt,Ae),it.cantEdit&&Kt(it,mn(it.firstLine(),0))&&(it.cantEdit=!1)}}function vi(it,ot,dt){var ct=it.doc,pt=it.display,Et=ot.from,Ot=ot.to,Ut=!1,Vt=Et.line;it.options.lineWrapping||(Vt=Be(Ea(Ln(ct,Et.line))),ct.iter(Vt,Ot.line+1,function(Je){if(Je==pt.maxLine)return Ut=!0,!0})),ct.sel.contains(ot.from,ot.to)>-1&&li(it),il(ct,ot,dt,ds(it)),it.options.lineWrapping||(ct.iter(Vt,Et.line+ot.text.length,function(Je){var Kn=Ra(Je);Kn>pt.maxLineLength&&(pt.maxLine=Je,pt.maxLineLength=Kn,pt.maxLineChanged=!0,Ut=!1)}),Ut&&(it.curOp.updateMaxLine=!0)),zr(ct,Et.line),Oo(it,400);var ae=ot.text.length-(Ot.line-Et.line)-1;ot.full?$a(it):Et.line==Ot.line&&ot.text.length==1&&!Da(it.doc,ot)?jo(it,Et.line,"text"):$a(it,Et.line,Ot.line+1,ae);var ke=di(it,"changes"),se=di(it,"change");if(se||ke){var Xe={from:Et,to:Ot,text:ot.text,removed:ot.removed,origin:ot.origin};se&&_i(it,"change",it,Xe),ke&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Xe)}it.display.selForContextMenu=null}function si(it,ot,dt,ct,pt){var Et;ct||(ct=dt),Ni(ct,dt)<0&&(Et=[ct,dt],dt=Et[0],ct=Et[1]),typeof ot=="string"&&(ot=it.splitLines(ot)),qe(it,{from:dt,to:ct,text:ot,origin:pt})}function Vn(it,ot,dt,ct){dt1||!(this.children[0]instanceof Wn))){var Ut=[];this.collapse(Ut),this.children=[new Wn(Ut)],this.children[0].parent=this}},collapse:function(it){for(var ot=0;ot50){for(var Ot=pt.lines.length%25+25,Ut=Ot;Ut10);it.parent.maybeSpill()}},iterN:function(it,ot,dt){for(var ct=0;ctit.display.maxLineLength&&(it.display.maxLine=ae,it.display.maxLineLength=ke,it.display.maxLineChanged=!0)}ct!=null&&it&&this.collapsed&&$a(it,ct,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&yt(it.doc)),it&&_i(it,"markerCleared",it,this,ct,pt),ot&&Gn(it),this.parent&&this.parent.clear()}},ge.prototype.find=function(it,ot){it==null&&this.type=="bookmark"&&(it=1);for(var dt,ct,pt=0;pt0||Ot==0&&Et.clearWhenEmpty!==!1)return Et;if(Et.replacedWith&&(Et.collapsed=!0,Et.widgetNode=we("span",[Et.replacedWith],"CodeMirror-widget"),ct.handleMouseEvents||Et.widgetNode.setAttribute("cm-ignore-events","true"),ct.insertLeft&&(Et.widgetNode.insertLeft=!0)),Et.collapsed){if(Cu(it,ot.line,ot,dt,Et)||ot.line!=dt.line&&Cu(it,dt.line,ot,dt,Et))throw new Error("Inserting collapsed marker partially overlapping an existing one");hn()}Et.addToHistory&&Oh(it,{from:ot,to:dt,origin:"markText"},it.sel,NaN);var Ut=ot.line,Vt=it.cm,ae;if(it.iter(Ut,dt.line+1,function(se){Vt&&Et.collapsed&&!Vt.options.lineWrapping&&Ea(se)==Vt.display.maxLine&&(ae=!0),Et.collapsed&&Ut!=ot.line&&Hn(se,0),$s(se,new po(Et,Ut==ot.line?ot.ch:null,Ut==dt.line?dt.ch:null)),++Ut}),Et.collapsed&&it.iter(ot.line,dt.line+1,function(se){sn(it,se)&&Hn(se,0)}),Et.clearOnEnter&&ni(Et,"beforeCursorEnter",function(){return Et.clear()}),Et.readOnly&&(La(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Et.collapsed&&(Et.id=++Ci,Et.atomic=!0),Vt){if(ae&&(Vt.curOp.updateMaxLine=!0),Et.collapsed)$a(Vt,ot.line,dt.line+1);else if(Et.className||Et.startStyle||Et.endStyle||Et.css||Et.attributes||Et.title)for(var ke=ot.line;ke<=dt.line;ke++)jo(Vt,ke,"text");Et.atomic&&yt(Vt.doc),_i(Vt,"markerAdded",Vt,Et)}return Et}var $i=function(it,ot){this.markers=it,this.primary=ot;for(var dt=0;dt=0;Vt--)qe(this,ct[Vt]);Ut?mh(this,Ut):this.cm&&Bh(this.cm)}),undo:dr(function(){kn(this,"undo")}),redo:dr(function(){kn(this,"redo")}),undoSelection:dr(function(){kn(this,"undo",!0)}),redoSelection:dr(function(){kn(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,ot=0,dt=0,ct=0;ct=it.ch)&&ot.push(pt.marker.parent||pt.marker)}return ot},findMarks:function(it,ot,dt){it=Wi(this,it),ot=Wi(this,ot);var ct=[],pt=it.line;return this.iter(it.line,ot.line+1,function(Et){var Ot=Et.markedSpans;if(Ot)for(var Ut=0;Ut=Vt.to||Vt.from==null&&pt!=it.line||Vt.from!=null&&pt==ot.line&&Vt.from>=ot.ch)&&(!dt||dt(Vt.marker))&&ct.push(Vt.marker.parent||Vt.marker)}++pt}),ct},getAllMarks:function(){var it=[];return this.iter(function(ot){var dt=ot.markedSpans;if(dt)for(var ct=0;ctit)return ot=it,!0;it-=Et,++dt}),Wi(this,mn(dt,ot))},indexFromPos:function(it){it=Wi(this,it);var ot=it.ch;if(it.lineot&&(ot=it.from),it.to!=null&&it.to-1){ot.state.draggingText(it),setTimeout(function(){return ot.display.input.focus()},20);return}try{var ke=it.dataTransfer.getData("Text");if(ke){var se;if(ot.state.draggingText&&!ot.state.draggingText.copy&&(se=ot.listSelections()),Ll(ot.doc,Ls(dt,dt)),se)for(var Xe=0;Xe=0;Ut--)si(it.doc,"",ct[Ut].from,ct[Ut].to,"+delete");Bh(it)})}function ka(it,ot,dt){var ct=an(it.text,ot+dt,dt);return ct<0||ct>it.text.length?null:ct}function Ur(it,ot,dt){var ct=ka(it,ot.ch,dt);return ct==null?null:new mn(ot.line,ct,dt<0?"after":"before")}function Vo(it,ot,dt,ct,pt){if(it){ot.doc.direction=="rtl"&&(pt=-pt);var Et=ti(dt,ot.doc.direction);if(Et){var Ot=pt<0?Ie(Et):Et[0],Ut=pt<0==(Ot.level==1),Vt=Ut?"after":"before",ae;if(Ot.level>0||ot.doc.direction=="rtl"){var ke=$h(ot,dt);ae=pt<0?dt.text.length-1:0;var se=zu(ot,ke,ae).top;ae=_n(function(Xe){return zu(ot,ke,Xe).top==se},pt<0==(Ot.level==1)?Ot.from:Ot.to-1,ae),Vt=="before"&&(ae=ka(dt,ae,1))}else ae=pt<0?Ot.to:Ot.from;return new mn(ct,ae,Vt)}}return new mn(ct,pt<0?dt.text.length:0,pt<0?"before":"after")}function es(it,ot,dt,ct){var pt=ti(ot,it.doc.direction);if(!pt)return Ur(ot,dt,ct);dt.ch>=ot.text.length?(dt.ch=ot.text.length,dt.sticky="before"):dt.ch<=0&&(dt.ch=0,dt.sticky="after");var Et=je(pt,dt.ch,dt.sticky),Ot=pt[Et];if(it.doc.direction=="ltr"&&Ot.level%2==0&&(ct>0?Ot.to>dt.ch:Ot.from=Ot.from&&Xe>=ke.begin)){var Je=se?"before":"after";return new mn(dt.line,Xe,Je)}}var Kn=function(Vi,kr,ar){for(var Or=function(Bs,zl){return zl?new mn(dt.line,Ut(Bs,1),"before"):new mn(dt.line,Bs,"after")};Vi>=0&&Vi0==(No.level!=1),ua=or?ar.begin:Ut(ar.end,-1);if(No.from<=ua&&ua0?ke.end:Ut(ke.begin,-1);return Fi!=null&&!(ct>0&&Fi==ot.text.length)&&(ui=Kn(ct>0?0:pt.length-1,ct,ae(Fi)),ui)?ui:null}var Va={selectAll:Ce,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Ae)},killLine:function(it){return Ro(it,function(ot){if(ot.empty()){var dt=Ln(it.doc,ot.head.line).text.length;return ot.head.ch==dt&&ot.head.line0)pt=new mn(pt.line,pt.ch+1),it.replaceRange(Et.charAt(pt.ch-1)+Et.charAt(pt.ch-2),mn(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Ot=Ln(it.doc,pt.line-1).text;Ot&&(pt=new mn(pt.line,1),it.replaceRange(Et.charAt(0)+it.doc.lineSeparator()+Ot.charAt(Ot.length-1),mn(pt.line-1,Ot.length-1),pt,"+transpose"))}}dt.push(new Lr(pt,pt))}it.setSelections(dt)})},newlineAndIndent:function(it){return Oi(it,function(){for(var ot=it.listSelections(),dt=ot.length-1;dt>=0;dt--)it.replaceRange(it.doc.lineSeparator(),ot[dt].anchor,ot[dt].head,"+input");ot=it.listSelections();for(var ct=0;ctit&&Ni(ot,this.pos)==0&&dt==this.button};var Rl,Xs;function Vu(it,ot){var dt=+new Date;return Xs&&Xs.compare(dt,it,ot)?(Rl=Xs=null,"triple"):Rl&&Rl.compare(dt,it,ot)?(Xs=new Ms(dt,it,ot),Rl=null,"double"):(Rl=new Ms(dt,it,ot),Xs=null,"single")}function Gs(it){var ot=this,dt=ot.display;if(!(ci(ot,it)||dt.activeTouch&&dt.input.supportsTouch())){if(dt.input.ensurePolled(),dt.shift=it.shiftKey,vl(dt,it)){Jt||(dt.scroller.draggable=!1,setTimeout(function(){return dt.scroller.draggable=!0},100));return}if(!Ed(ot,it)){var ct=Nl(ot,it),pt=Ha(it),Et=ct?Vu(ct,pt):"single";window.focus(),pt==1&&ot.state.selectingText&&ot.state.selectingText(it),!(ct&&Au(ot,pt,ct,Et,it))&&(pt==1?ct?Ya(ot,ct,Et,it):Mo(it)==dt.scroller&&Gr(it):pt==2?(ct&&nd(ot.doc,ct),setTimeout(function(){return dt.input.focus()},20)):pt==3&&(Mt?ot.display.input.onContextMenu(it):vs(ot)))}}}function Au(it,ot,dt,ct,pt){var Et="Click";return ct=="double"?Et="Double"+Et:ct=="triple"&&(Et="Triple"+Et),Et=(ot==1?"Left":ot==2?"Middle":"Right")+Et,fs(it,_r(Et,pt),pt,function(Ot){if(typeof Ot=="string"&&(Ot=Va[Ot]),!Ot)return!1;var Ut=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),Ut=Ot(it,dt)!=Dn}finally{it.state.suppressEdits=!1}return Ut})}function Do(it,ot,dt){var ct=it.getOption("configureMouse"),pt=ct?ct(it,ot,dt):{};if(pt.unit==null){var Et=lt?dt.shiftKey&&dt.metaKey:dt.altKey;pt.unit=Et?"rectangle":ot=="single"?"char":ot=="double"?"word":"line"}return(pt.extend==null||it.doc.extend)&&(pt.extend=it.doc.extend||dt.shiftKey),pt.addNew==null&&(pt.addNew=ht?dt.metaKey:dt.ctrlKey),pt.moveOnDrag==null&&(pt.moveOnDrag=!(ht?dt.altKey:dt.ctrlKey)),pt}function Ya(it,ot,dt,ct){Le?setTimeout(Sn(Ga,it),0):it.curOp.focus=Ge();var pt=Do(it,dt,ct),Et=it.doc.sel,Ot;it.options.dragDrop&&pa&&!it.isReadOnly()&&dt=="single"&&(Ot=Et.contains(ot))>-1&&(Ni((Ot=Et.ranges[Ot]).from(),ot)<0||ot.xRel>0)&&(Ni(Ot.to(),ot)>0||ot.xRel<0)?Ds(it,ct,ot,pt):vh(it,ct,ot,pt)}function Ds(it,ot,dt,ct){var pt=it.display,Et=!1,Ot=vr(it,function(ae){Jt&&(pt.scroller.draggable=!1),it.state.draggingText=!1,Zi(pt.wrapper.ownerDocument,"mouseup",Ot),Zi(pt.wrapper.ownerDocument,"mousemove",Ut),Zi(pt.scroller,"dragstart",Vt),Zi(pt.scroller,"drop",Ot),Et||(Gr(ae),ct.addNew||nd(it.doc,dt,null,null,ct.extend),Jt&&!Ve||Le&&It==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),Ut=function(ae){Et=Et||Math.abs(ot.clientX-ae.clientX)+Math.abs(ot.clientY-ae.clientY)>=10},Vt=function(){return Et=!0};Jt&&(pt.scroller.draggable=!0),it.state.draggingText=Ot,Ot.copy=!ct.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),ni(pt.wrapper.ownerDocument,"mouseup",Ot),ni(pt.wrapper.ownerDocument,"mousemove",Ut),ni(pt.scroller,"dragstart",Vt),ni(pt.scroller,"drop",Ot),vs(it),setTimeout(function(){return pt.input.focus()},20)}function fl(it,ot,dt){if(dt=="char")return new Lr(ot,ot);if(dt=="word")return it.findWordAt(ot);if(dt=="line")return new Lr(mn(ot.line,0),Wi(it.doc,mn(ot.line+1,0)));var ct=dt(it,ot);return new Lr(ct.from,ct.to)}function vh(it,ot,dt,ct){var pt=it.display,Et=it.doc;Gr(ot);var Ot,Ut,Vt=Et.sel,ae=Vt.ranges;if(ct.addNew&&!ct.extend?(Ut=Et.sel.contains(dt),Ut>-1?Ot=ae[Ut]:Ot=new Lr(dt,dt)):(Ot=Et.sel.primary(),Ut=Et.sel.primIndex),ct.unit=="rectangle")ct.addNew||(Ot=new Lr(dt,dt)),dt=Nl(it,ot,!0,!0),Ut=-1;else{var ke=fl(it,dt,ct.unit);ct.extend?Ot=Pd(Ot,ke.anchor,ke.head,ct.extend):Ot=ke}ct.addNew?Ut==-1?(Ut=ae.length,is(Et,da(it,ae.concat([Ot]),Ut),{scroll:!1,origin:"*mouse"})):ae.length>1&&ae[Ut].empty()&&ct.unit=="char"&&!ct.extend?(is(Et,da(it,ae.slice(0,Ut).concat(ae.slice(Ut+1)),0),{scroll:!1,origin:"*mouse"}),Vt=Et.sel):ph(Et,Ut,Ot,pn):(Ut=0,is(Et,new na([Ot],0),pn),Vt=Et.sel);var se=dt;function Xe(ar){if(Ni(se,ar)!=0)if(se=ar,ct.unit=="rectangle"){for(var Or=[],No=it.options.tabSize,or=re(Ln(Et,dt.line).text,dt.ch,No),ua=re(Ln(Et,ar.line).text,ar.ch,No),Bs=Math.min(or,ua),zl=Math.max(or,ua),Ks=Math.min(dt.line,ar.line),Yu=Math.min(it.lastLine(),Math.max(dt.line,ar.line));Ks<=Yu;Ks++){var vu=Ln(Et,Ks).text,Ml=An(vu,Bs,No);Bs==zl?Or.push(new Lr(mn(Ks,Ml),mn(Ks,Ml))):vu.length>Ml&&Or.push(new Lr(mn(Ks,Ml),mn(Ks,An(vu,zl,No))))}Or.length||Or.push(new Lr(dt,dt)),is(Et,da(it,Vt.ranges.slice(0,Ut).concat(Or),Ut),{origin:"*mouse",scroll:!1}),it.scrollIntoView(ar)}else{var rh=Ot,iu=fl(it,ar,ct.unit),kl=rh.anchor,Za;Ni(iu.anchor,kl)>0?(Za=iu.head,kl=Ei(rh.from(),iu.anchor)):(Za=iu.anchor,kl=Ao(rh.to(),iu.head));var Qs=Vt.ranges.slice(0);Qs[Ut]=Cd(it,new Lr(Wi(Et,kl),Za)),is(Et,da(it,Qs,Ut),pn)}}var Je=pt.wrapper.getBoundingClientRect(),Kn=0;function ui(ar){var Or=++Kn,No=Nl(it,ar,!0,ct.unit=="rectangle");if(No)if(Ni(No,se)!=0){it.curOp.focus=Ge(),Xe(No);var or=ta(pt,Et);(No.line>=or.to||No.lineJe.bottom?20:0;ua&&setTimeout(vr(it,function(){Kn==Or&&(pt.scroller.scrollTop+=ua,ui(ar))}),50)}}function Fi(ar){it.state.selectingText=!1,Kn=1/0,ar&&(Gr(ar),pt.input.focus()),Zi(pt.wrapper.ownerDocument,"mousemove",Vi),Zi(pt.wrapper.ownerDocument,"mouseup",kr),Et.history.lastSelOrigin=null}var Vi=vr(it,function(ar){ar.buttons===0||!Ha(ar)?Fi(ar):ui(ar)}),kr=vr(it,Fi);it.state.selectingText=kr,ni(pt.wrapper.ownerDocument,"mousemove",Vi),ni(pt.wrapper.ownerDocument,"mouseup",kr)}function Cd(it,ot){var dt=ot.anchor,ct=ot.head,pt=Ln(it.doc,dt.line);if(Ni(dt,ct)==0&&dt.sticky==ct.sticky)return ot;var Et=ti(pt);if(!Et)return ot;var Ot=je(Et,dt.ch,dt.sticky),Ut=Et[Ot];if(Ut.from!=dt.ch&&Ut.to!=dt.ch)return ot;var Vt=Ot+(Ut.from==dt.ch==(Ut.level!=1)?0:1);if(Vt==0||Vt==Et.length)return ot;var ae;if(ct.line!=dt.line)ae=(ct.line-dt.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var ke=je(Et,ct.ch,ct.sticky),se=ke-Ot||(ct.ch-dt.ch)*(Ut.level==1?-1:1);ke==Vt-1||ke==Vt?ae=se<0:ae=se>0}var Xe=Et[Vt+(ae?-1:0)],Je=ae==(Xe.level==1),Kn=Je?Xe.from:Xe.to,ui=Je?"after":"before";return dt.ch==Kn&&dt.sticky==ui?ot:new Lr(new mn(dt.line,Kn,ui),ct)}function Ld(it,ot,dt,ct){var pt,Et;if(ot.touches)pt=ot.touches[0].clientX,Et=ot.touches[0].clientY;else try{pt=ot.clientX,Et=ot.clientY}catch(Xe){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ct&&Gr(ot);var Ot=it.display,Ut=Ot.lineDiv.getBoundingClientRect();if(Et>Ut.bottom||!di(it,dt))return Di(ot);Et-=Ut.top-Ot.viewOffset;for(var Vt=0;Vt=pt){var ke=xi(it.doc,Et),se=it.display.gutterSpecs[Vt];return ii(it,dt,it,ke,se.className,ot),Di(ot)}}}function Ed(it,ot){return Ld(it,ot,"gutterClick",!0)}function fc(it,ot){vl(it.display,ot)||jf(it,ot)||ci(it,ot,"contextmenu")||Mt||it.display.input.onContextMenu(ot)}function jf(it,ot){return di(it,"gutterContextMenu")?Ld(it,ot,"gutterContextMenu",!1):!1}function Bc(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),vd(it)}var Ih={toString:function(){return"CodeMirror.Init"}},Oc={},gc={};function gf(it){var ot=it.optionHandlers;function dt(ct,pt,Et,Ot){it.defaults[ct]=pt,Et&&(ot[ct]=Ot?function(Ut,Vt,ae){ae!=Ih&&Et(Ut,Vt,ae)}:Et)}it.defineOption=dt,it.Init=Ih,dt("value","",function(ct,pt){return ct.setValue(pt)},!0),dt("mode",null,function(ct,pt){ct.doc.modeOption=pt,Qr(ct)},!0),dt("indentUnit",2,Qr,!0),dt("indentWithTabs",!1),dt("smartIndent",!0),dt("tabSize",4,function(ct){Ol(ct),vd(ct),$a(ct)},!0),dt("lineSeparator",null,function(ct,pt){if(ct.doc.lineSep=pt,!!pt){var Et=[],Ot=ct.doc.first;ct.doc.iter(function(Vt){for(var ae=0;;){var ke=Vt.text.indexOf(pt,ae);if(ke==-1)break;ae=ke+pt.length,Et.push(mn(Ot,ke))}Ot++});for(var Ut=Et.length-1;Ut>=0;Ut--)si(ct.doc,pt,Et[Ut],mn(Et[Ut].line,Et[Ut].ch+pt.length))}}),dt("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ct,pt,Et){ct.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),Et!=Ih&&ct.refresh()}),dt("specialCharPlaceholder",bl,function(ct){return ct.refresh()},!0),dt("electricChars",!0),dt("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),dt("spellcheck",!1,function(ct,pt){return ct.getInputField().spellcheck=pt},!0),dt("autocorrect",!1,function(ct,pt){return ct.getInputField().autocorrect=pt},!0),dt("autocapitalize",!1,function(ct,pt){return ct.getInputField().autocapitalize=pt},!0),dt("rtlMoveVisually",!gt),dt("wholeLineUpdateBefore",!0),dt("theme","default",function(ct){Bc(ct),ts(ct)},!0),dt("keyMap","default",function(ct,pt,Et){var Ot=vo(pt),Ut=Et!=Ih&&vo(Et);Ut&&Ut.detach&&Ut.detach(ct,Ot),Ot.attach&&Ot.attach(ct,Ut||null)}),dt("extraKeys",null),dt("configureMouse",null),dt("lineWrapping",!1,Ic,!0),dt("gutters",[],function(ct,pt){ct.display.gutterSpecs=Na(pt,ct.options.lineNumbers),ts(ct)},!0),dt("fixedGutter",!0,function(ct,pt){ct.display.gutters.style.left=pt?td(ct.display)+"px":"0",ct.refresh()},!0),dt("coverGutterNextToScrollbar",!1,function(ct){return fn(ct)},!0),dt("scrollbarStyle","native",function(ct){oi(ct),fn(ct),ct.display.scrollbars.setScrollTop(ct.doc.scrollTop),ct.display.scrollbars.setScrollLeft(ct.doc.scrollLeft)},!0),dt("lineNumbers",!1,function(ct,pt){ct.display.gutterSpecs=Na(ct.options.gutters,pt),ts(ct)},!0),dt("firstLineNumber",1,ts,!0),dt("lineNumberFormatter",function(ct){return ct},ts,!0),dt("showCursorWhenSelecting",!1,Us,!0),dt("resetSelectionOnContextMenu",!0),dt("lineWiseCopyCut",!0),dt("pasteLinesPerSelection",!0),dt("selectionsMayTouch",!1),dt("readOnly",!1,function(ct,pt){pt=="nocursor"&&(xd(ct),ct.display.input.blur()),ct.display.input.readOnlyChanged(pt)}),dt("screenReaderLabel",null,function(ct,pt){pt=pt===""?null:pt,ct.display.input.screenReaderLabelChanged(pt)}),dt("disableInput",!1,function(ct,pt){pt||ct.display.input.reset()},!0),dt("dragDrop",!0,yh),dt("allowDropFileTypes",null),dt("cursorBlinkRate",530),dt("cursorScrollMargin",0),dt("cursorHeight",1,Us,!0),dt("singleCursorHeightPerLine",!0,Us,!0),dt("workTime",100),dt("workDelay",100),dt("flattenSpans",!0,Ol,!0),dt("addModeClass",!1,Ol,!0),dt("pollInterval",100),dt("undoDepth",200,function(ct,pt){return ct.doc.history.undoDepth=pt}),dt("historyEventDelay",1250),dt("viewportMargin",10,function(ct){return ct.refresh()},!0),dt("maxHighlightLength",1e4,Ol,!0),dt("moveInputWithCursor",!0,function(ct,pt){pt||ct.display.input.resetPosition()}),dt("tabindex",null,function(ct,pt){return ct.display.input.getField().tabIndex=pt||""}),dt("autofocus",null),dt("direction","ltr",function(ct,pt){return ct.doc.setDirection(pt)},!0),dt("phrases",null)}function yh(it,ot,dt){var ct=dt&&dt!=Ih;if(!ot!=!ct){var pt=it.display.dragFunctions,Et=ot?ni:Zi;Et(it.display.scroller,"dragstart",pt.start),Et(it.display.scroller,"dragenter",pt.enter),Et(it.display.scroller,"dragover",pt.over),Et(it.display.scroller,"dragleave",pt.leave),Et(it.display.scroller,"drop",pt.drop)}}function Ic(it){it.options.lineWrapping?(Oe(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Qt(it.display.wrapper,"CodeMirror-wrap"),Ma(it)),Ir(it),$a(it),vd(it),setTimeout(function(){return fn(it)},100)}function ra(it,ot){var dt=this;if(!(this instanceof ra))return new ra(it,ot);this.options=ot=ot?Zn(ot):{},Zn(Oc,ot,!1);var ct=ot.value;typeof ct=="string"?ct=new ur(ct,ot.mode,null,ot.lineSeparator,ot.direction):ot.mode&&(ct.modeOption=ot.mode),this.doc=ct;var pt=new ra.inputStyles[ot.inputStyle](this),Et=this.display=new Zs(it,ct,pt,ot);Et.wrapper.CodeMirror=this,Bc(this),ot.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),oi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Wt,keySeq:null,specialChars:null},ot.autofocus&&!et&&Et.input.focus(),Le&&It<11&&setTimeout(function(){return dt.display.input.reset(!0)},20),Wd(this),tr(),Qn(this),this.curOp.forceUpdate=!0,Ts(this,ct),ot.autofocus&&!et||this.hasFocus()?setTimeout(function(){dt.hasFocus()&&!dt.state.focused&&fa(dt)},20):xd(this);for(var Ot in gc)gc.hasOwnProperty(Ot)&&gc[Ot](this,ot[Ot],Ih);Po(this),ot.finishInit&&ot.finishInit(this);for(var Ut=0;Ut20*20}ni(ot.scroller,"touchstart",function(Vt){if(!ci(it,Vt)&&!Et(Vt)&&!Ed(it,Vt)){ot.input.ensurePolled(),clearTimeout(dt);var ae=+new Date;ot.activeTouch={start:ae,moved:!1,prev:ae-ct.end<=300?ct:null},Vt.touches.length==1&&(ot.activeTouch.left=Vt.touches[0].pageX,ot.activeTouch.top=Vt.touches[0].pageY)}}),ni(ot.scroller,"touchmove",function(){ot.activeTouch&&(ot.activeTouch.moved=!0)}),ni(ot.scroller,"touchend",function(Vt){var ae=ot.activeTouch;if(ae&&!vl(ot,Vt)&&ae.left!=null&&!ae.moved&&new Date-ae.start<300){var ke=it.coordsChar(ot.activeTouch,"page"),se;!ae.prev||Ot(ae,ae.prev)?se=new Lr(ke,ke):!ae.prev.prev||Ot(ae,ae.prev.prev)?se=it.findWordAt(ke):se=new Lr(mn(ke.line,0),Wi(it.doc,mn(ke.line+1,0))),it.setSelection(se.anchor,se.head),it.focus(),Gr(Vt)}pt()}),ni(ot.scroller,"touchcancel",pt),ni(ot.scroller,"scroll",function(){ot.scroller.clientHeight&&(ue(it,ot.scroller.scrollTop),ye(it,ot.scroller.scrollLeft,!0),ii(it,"scroll",it))}),ni(ot.scroller,"mousewheel",function(Vt){return Ta(it,Vt)}),ni(ot.scroller,"DOMMouseScroll",function(Vt){return Ta(it,Vt)}),ni(ot.wrapper,"scroll",function(){return ot.wrapper.scrollTop=ot.wrapper.scrollLeft=0}),ot.dragFunctions={enter:function(Vt){ci(it,Vt)||Zr(Vt)},over:function(Vt){ci(it,Vt)||(mo(it,Vt),Zr(Vt))},start:function(Vt){return So(it,Vt)},drop:vr(it,Fo),leave:function(Vt){ci(it,Vt)||br(it)}};var Ut=ot.input.getField();ni(Ut,"keyup",function(Vt){return Rr.call(it,Vt)}),ni(Ut,"keydown",vr(it,Pa)),ni(Ut,"keypress",vr(it,Ua)),ni(Ut,"focus",function(Vt){return fa(it,Vt)}),ni(Ut,"blur",function(Vt){return xd(it,Vt)})}var rd=[];ra.defineInitHook=function(it){return rd.push(it)};function rl(it,ot,dt,ct){var pt=it.doc,Et;dt==null&&(dt="add"),dt=="smart"&&(pt.mode.indent?Et=qa(it,ot).state:dt="prev");var Ot=it.options.tabSize,Ut=Ln(pt,ot),Vt=re(Ut.text,null,Ot);Ut.stateAfter&&(Ut.stateAfter=null);var ae=Ut.text.match(/^\s*/)[0],ke;if(!ct&&!/\S/.test(Ut.text))ke=0,dt="not";else if(dt=="smart"&&(ke=pt.mode.indent(Et,Ut.text.slice(ae.length),Ut.text),ke==Dn||ke>150)){if(!ct)return;dt="prev"}dt=="prev"?ot>pt.first?ke=re(Ln(pt,ot-1).text,null,Ot):ke=0:dt=="add"?ke=Vt+it.options.indentUnit:dt=="subtract"?ke=Vt-it.options.indentUnit:typeof dt=="number"&&(ke=Vt+dt),ke=Math.max(0,ke);var se="",Xe=0;if(it.options.indentWithTabs)for(var Je=Math.floor(ke/Ot);Je;--Je)Xe+=Ot,se+=" ";if(XeOt,Vt=Cn(ot),ae=null;if(Ut&&ct.ranges.length>1)if(El&&El.text.join(` `)==ot){if(ct.ranges.length%El.text.length==0){ae=[];for(var ke=0;ke=0;Xe--){var Je=ct.ranges[Xe],Kn=Je.from(),ui=Je.to();Je.empty()&&(dt&&dt>0?Kn=mn(Kn.line,Kn.ch-dt):it.state.overwrite&&!Ut?ui=mn(ui.line,Math.min(Ln(Et,ui.line).text.length,ui.ch+Ie(Vt).length)):Ut&&El&&El.lineWise&&El.text.join(` `)==Vt.join(` `)&&(Kn=ui=mn(Kn.line,0)));var Fi={from:Kn,to:ui,text:ae?ae[Xe%ae.length]:Vt,origin:pt||(Ut?"paste":it.state.cutIncoming>Ot?"cut":"+input")};qe(it.doc,Fi),_i(it,"inputRead",it,Fi)}ot&&!Ut&&Hd(it,ot),Bh(it),it.curOp.updateInput<2&&(it.curOp.updateInput=se),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Rh(it,ot){var dt=it.clipboardData&&it.clipboardData.getData("Text");if(dt)return it.preventDefault(),!ot.isReadOnly()&&!ot.options.disableInput&&Oi(ot,function(){return kd(ot,dt,0,null,"paste")}),!0}function Hd(it,ot){if(!(!it.options.electricChars||!it.options.smartIndent))for(var dt=it.doc.sel,ct=dt.ranges.length-1;ct>=0;ct--){var pt=dt.ranges[ct];if(!(pt.head.ch>100||ct&&dt.ranges[ct-1].head.line==pt.head.line)){var Et=it.getModeAt(pt.head),Ot=!1;if(Et.electricChars){for(var Ut=0;Ut-1){Ot=rl(it,pt.head.line,"smart");break}}else Et.electricInput&&Et.electricInput.test(Ln(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Ot=rl(it,pt.head.line,"smart"));Ot&&_i(it,"electricInput",it,pt.head.line)}}}function Gd(it){for(var ot=[],dt=[],ct=0;ctEt&&(rl(this,Ut.head.line,ct,!0),Et=Ut.head.line,Ot==this.doc.sel.primIndex&&Bh(this));else{var Vt=Ut.from(),ae=Ut.to(),ke=Math.max(Et,Vt.line);Et=Math.min(this.lastLine(),ae.line-(ae.ch?0:1))+1;for(var se=ke;se0&&ph(this.doc,Ot,new Lr(Vt,Xe[Ot].to()),Ae)}}}),getTokenAt:function(ct,pt){return Ca(this,ct,pt)},getLineTokens:function(ct,pt){return Ca(this,mn(ct),pt,!0)},getTokenTypeAt:function(ct){ct=Wi(this.doc,ct);var pt=gs(this,Ln(this.doc,ct.line)),Et=0,Ot=(pt.length-1)/2,Ut=ct.ch,Vt;if(Ut==0)Vt=pt[2];else for(;;){var ae=Et+Ot>>1;if((ae?pt[ae*2-1]:0)>=Ut)Ot=ae;else if(pt[ae*2+1]Vt&&(ct=Vt,Ot=!0),Ut=Ln(this.doc,ct)}else Ut=ct;return el(this,Ut,{top:0,left:0},pt||"page",Et||Ot).top+(Ot?this.doc.height-ro(Ut):0)},defaultTextHeight:function(){return th(this.display)},defaultCharWidth:function(){return yd(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ct,pt,Et,Ot,Ut){var Vt=this.display;ct=Cs(this,Wi(this.doc,ct));var ae=ct.bottom,ke=ct.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Vt.sizer.appendChild(pt),Ot=="over")ae=ct.top;else if(Ot=="above"||Ot=="near"){var se=Math.max(Vt.wrapper.clientHeight,this.doc.height),Xe=Math.max(Vt.sizer.clientWidth,Vt.lineSpace.clientWidth);(Ot=="above"||ct.bottom+pt.offsetHeight>se)&&ct.top>pt.offsetHeight?ae=ct.top-pt.offsetHeight:ct.bottom+pt.offsetHeight<=se&&(ae=ct.bottom),ke+pt.offsetWidth>Xe&&(ke=Xe-pt.offsetWidth)}pt.style.top=ae+"px",pt.style.left=pt.style.right="",Ut=="right"?(ke=Vt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):(Ut=="left"?ke=0:Ut=="middle"&&(ke=(Vt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=ke+"px"),Et&&cc(this,{left:ke,top:ae,right:ke+pt.offsetWidth,bottom:ae+pt.offsetHeight})},triggerOnKeyDown:Xr(Pa),triggerOnKeyPress:Xr(Ua),triggerOnKeyUp:Rr,triggerOnMouseDown:Xr(Gs),execCommand:function(ct){if(Va.hasOwnProperty(ct))return Va[ct].call(null,this)},triggerElectric:Xr(function(ct){Hd(this,ct)}),findPosH:function(ct,pt,Et,Ot){var Ut=1;pt<0&&(Ut=-1,pt=-pt);for(var Vt=Wi(this.doc,ct),ae=0;ae0&&ke(Et.charAt(Ot-1));)--Ot;for(;Ut.5||this.options.lineWrapping)&&Ir(this),ii(this,"refresh",this)}),swapDoc:Xr(function(ct){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),Ts(this,ct),vd(this),this.display.input.reset(),Hu(this,ct.scrollLeft,ct.scrollTop),this.curOp.forceScroll=!0,_i(this,"swapDoc",this,pt),pt}),phrase:function(ct){var pt=this.options.phrases;return pt&&Object.prototype.hasOwnProperty.call(pt,ct)?pt[ct]:ct},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},cr(it),it.registerHelper=function(ct,pt,Et){dt.hasOwnProperty(ct)||(dt[ct]=it[ct]={_global:[]}),dt[ct][pt]=Et},it.registerGlobalHelper=function(ct,pt,Et,Ot){it.registerHelper(ct,pt,Ot),dt[ct]._global.push({pred:Et,val:Ot})}}function Ad(it,ot,dt,ct,pt){var Et=ot,Ot=dt,Ut=Ln(it,ot.line),Vt=pt&&it.direction=="rtl"?-dt:dt;function ae(){var kr=ot.line+Vt;return kr=it.first+it.size?!1:(ot=new mn(kr,ot.ch,ot.sticky),Ut=Ln(it,kr))}function ke(kr){var ar;if(ct=="codepoint"){var Or=Ut.text.charCodeAt(ot.ch+(ct>0?0:-1));isNaN(Or)?ar=null:ar=new mn(ot.line,Math.max(0,Math.min(Ut.text.length,ot.ch+dt*(Or>=55296&&Or<56320?2:1))),-dt)}else pt?ar=es(it.cm,Ut,ot,dt):ar=Ur(Ut,ot,dt);if(ar==null)if(!kr&&ae())ot=Vo(pt,it.cm,Ut,ot.line,Vt);else return!1;else ot=ar;return!0}if(ct=="char"||ct=="codepoint")ke();else if(ct=="column")ke(!0);else if(ct=="word"||ct=="group")for(var se=null,Xe=ct=="group",Je=it.cm&&it.cm.getHelper(ot,"wordChars"),Kn=!0;!(dt<0&&!ke(!Kn));Kn=!1){var ui=Ut.text.charAt(ot.ch)||` `,Fi=Zt(ui,Je)?"w":Xe&&ui==` `?"n":!Xe||/\s/.test(ui)?null:"p";if(Xe&&!Kn&&!Fi&&(Fi="s"),se&&se!=Fi){dt<0&&(dt=1,ke(),ot.sticky="after");break}if(Fi&&(se=Fi),dt>0&&!ke(!Kn))break}var Vi=Kt(it,ot,Et,Ot,!0);return io(Et,Vi)&&(Vi.hitSide=!0),Vi}function ad(it,ot,dt,ct){var pt=it.doc,Et=ot.left,Ot;if(ct=="page"){var Ut=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Vt=Math.max(Ut-.5*th(it.display),3);Ot=(dt>0?ot.bottom:ot.top)+dt*Vt}else ct=="line"&&(Ot=dt>0?ot.bottom+3:ot.top-3);for(var ae;ae=Tc(it,Et,Ot),!!ae.outside;){if(dt<0?Ot<=0:Ot>=pt.height){ae.hitSide=!0;break}Ot+=dt*5}return ae}var ns=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Wt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ns.prototype.init=function(it){var ot=this,dt=this,ct=dt.cm,pt=dt.div=it.lineDiv;pc(pt,ct.options.spellcheck,ct.options.autocorrect,ct.options.autocapitalize);function Et(Ut){for(var Vt=Ut.target;Vt;Vt=Vt.parentNode){if(Vt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Vt.className))break}return!1}ni(pt,"paste",function(Ut){!Et(Ut)||ci(ct,Ut)||Rh(Ut,ct)||It<=11&&setTimeout(vr(ct,function(){return ot.updateFromDOM()}),20)}),ni(pt,"compositionstart",function(Ut){ot.composing={data:Ut.data,done:!1}}),ni(pt,"compositionupdate",function(Ut){ot.composing||(ot.composing={data:Ut.data,done:!1})}),ni(pt,"compositionend",function(Ut){ot.composing&&(Ut.data!=ot.composing.data&&ot.readFromDOMSoon(),ot.composing.done=!0)}),ni(pt,"touchstart",function(){return dt.forceCompositionEnd()}),ni(pt,"input",function(){ot.composing||ot.readFromDOMSoon()});function Ot(Ut){if(!(!Et(Ut)||ci(ct,Ut))){if(ct.somethingSelected())Md({lineWise:!1,text:ct.getSelections()}),Ut.type=="cut"&&ct.replaceSelection("",null,"cut");else if(ct.options.lineWiseCopyCut){var Vt=Gd(ct);Md({lineWise:!0,text:Vt.text}),Ut.type=="cut"&&ct.operation(function(){ct.setSelections(Vt.ranges,0,Ae),ct.replaceSelection("",null,"cut")})}else return;if(Ut.clipboardData){Ut.clipboardData.clearData();var ae=El.text.join(` `);if(Ut.clipboardData.setData("Text",ae),Ut.clipboardData.getData("Text")==ae){Ut.preventDefault();return}}var ke=Rc(),se=ke.firstChild;ct.display.lineSpace.insertBefore(ke,ct.display.lineSpace.firstChild),se.value=El.text.join(` `);var Xe=document.activeElement;Nn(se),setTimeout(function(){ct.display.lineSpace.removeChild(ke),Xe.focus(),Xe==pt&&dt.showPrimarySelection()},50)}}ni(pt,"copy",Ot),ni(pt,"cut",Ot)},ns.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},ns.prototype.prepareSelection=function(){var it=ju(this.cm,!1);return it.focus=document.activeElement==this.div,it},ns.prototype.showSelection=function(it,ot){!it||!this.cm.display.view.length||((it.focus||ot)&&this.showPrimarySelection(),this.showMultipleSelections(it))},ns.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ns.prototype.showPrimarySelection=function(){var it=this.getSelection(),ot=this.cm,dt=ot.doc.sel.primary(),ct=dt.from(),pt=dt.to();if(ot.display.viewTo==ot.display.viewFrom||ct.line>=ot.display.viewTo||pt.line=ot.display.viewFrom&&zc(ot,ct)||{node:Ut[0].measure.map[2],offset:0},ae=pt.lineit.firstLine()&&(ct=mn(ct.line-1,Ln(it.doc,ct.line-1).length)),pt.ch==Ln(it.doc,pt.line).text.length&&pt.lineot.viewTo-1)return!1;var Et,Ot,Ut;ct.line==ot.viewFrom||(Et=fu(it,ct.line))==0?(Ot=Be(ot.view[0].line),Ut=ot.view[0].node):(Ot=Be(ot.view[Et].line),Ut=ot.view[Et-1].node.nextSibling);var Vt=fu(it,pt.line),ae,ke;if(Vt==ot.view.length-1?(ae=ot.viewTo-1,ke=ot.lineDiv.lastChild):(ae=Be(ot.view[Vt+1].line)-1,ke=ot.view[Vt+1].node.previousSibling),!Ut)return!1;for(var se=it.doc.splitLines(Vd(it,Ut,ke,Ot,ae)),Xe=ji(it.doc,mn(Ot,0),mn(ae,Ln(it.doc,ae).text.length));se.length>1&&Xe.length>1;)if(Ie(se)==Ie(Xe))se.pop(),Xe.pop(),ae--;else if(se[0]==Xe[0])se.shift(),Xe.shift(),Ot++;else break;for(var Je=0,Kn=0,ui=se[0],Fi=Xe[0],Vi=Math.min(ui.length,Fi.length);Ject.ch&&kr.charCodeAt(kr.length-Kn-1)==ar.charCodeAt(ar.length-Kn-1);)Je--,Kn++;se[se.length-1]=kr.slice(0,kr.length-Kn).replace(/^\u200b+/,""),se[0]=se[0].slice(Je).replace(/\u200b+$/,"");var No=mn(Ot,Je),or=mn(ae,Xe.length?Ie(Xe).length-Kn:0);if(se.length>1||se[0]||Ni(No,or))return si(it.doc,se,No,or,"+input"),!0},ns.prototype.ensurePolled=function(){this.forceCompositionEnd()},ns.prototype.reset=function(){this.forceCompositionEnd()},ns.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ns.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},ns.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&Oi(this.cm,function(){return $a(it.cm)})},ns.prototype.setUneditable=function(it){it.contentEditable="false"},ns.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||vr(this.cm,kd)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},ns.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},ns.prototype.onContextMenu=function(){},ns.prototype.resetPosition=function(){},ns.prototype.needsContentAttribute=!0;function zc(it,ot){var dt=cu(it,ot.line);if(!dt||dt.hidden)return null;var ct=Ln(it.doc,ot.line),pt=Fc(dt,ct,ot.line),Et=ti(ct,it.doc.direction),Ot="left";if(Et){var Ut=je(Et,ot.ch);Ot=Ut%2?"right":"left"}var Vt=Nc(pt.map,ot.ch,Ot);return Vt.offset=Vt.collapse=="right"?Vt.end:Vt.start,Vt}function pf(it){for(var ot=it;ot;ot=ot.parentNode)if(/CodeMirror-gutter-wrapper/.test(ot.className))return!0;return!1}function Kd(it,ot){return ot&&(it.bad=!0),it}function Vd(it,ot,dt,ct,pt){var Et="",Ot=!1,Ut=it.doc.lineSeparator(),Vt=!1;function ae(Je){return function(Kn){return Kn.id==Je}}function ke(){Ot&&(Et+=Ut,Vt&&(Et+=Ut),Ot=Vt=!1)}function se(Je){Je&&(ke(),Et+=Je)}function Xe(Je){if(Je.nodeType==1){var Kn=Je.getAttribute("cm-text");if(Kn){se(Kn);return}var ui=Je.getAttribute("cm-marker"),Fi;if(ui){var Vi=it.findMarks(mn(ct,0),mn(pt+1,0),ae(+ui));Vi.length&&(Fi=Vi[0].find(0))&&se(ji(it.doc,Fi.from,Fi.to).join(Ut));return}if(Je.getAttribute("contenteditable")=="false")return;var kr=/^(pre|div|p|li|table|br)$/i.test(Je.nodeName);if(!/^br$/i.test(Je.nodeName)&&Je.textContent.length==0)return;kr&&ke();for(var ar=0;ar=9&&ot.hasSelection&&(ot.hasSelection=null),dt.poll()}),ni(pt,"paste",function(Ot){ci(ct,Ot)||Rh(Ot,ct)||(ct.state.pasteIncoming=+new Date,dt.fastPoll())});function Et(Ot){if(!ci(ct,Ot)){if(ct.somethingSelected())Md({lineWise:!1,text:ct.getSelections()});else if(ct.options.lineWiseCopyCut){var Ut=Gd(ct);Md({lineWise:!0,text:Ut.text}),Ot.type=="cut"?ct.setSelections(Ut.ranges,null,Ae):(dt.prevInput="",pt.value=Ut.text.join(` `),Nn(pt))}else return;Ot.type=="cut"&&(ct.state.cutIncoming=+new Date)}}ni(pt,"cut",Et),ni(pt,"copy",Et),ni(it.scroller,"paste",function(Ot){if(!(vl(it,Ot)||ci(ct,Ot))){if(!pt.dispatchEvent){ct.state.pasteIncoming=+new Date,dt.focus();return}var Ut=new Event("paste");Ut.clipboardData=Ot.clipboardData,pt.dispatchEvent(Ut)}}),ni(it.lineSpace,"selectstart",function(Ot){vl(it,Ot)||Gr(Ot)}),ni(pt,"compositionstart",function(){var Ot=ct.getCursor("from");dt.composing&&dt.composing.range.clear(),dt.composing={start:Ot,range:ct.markText(Ot,ct.getCursor("to"),{className:"CodeMirror-composing"})}}),ni(pt,"compositionend",function(){dt.composing&&(dt.poll(),dt.composing.range.clear(),dt.composing=null)})},Js.prototype.createField=function(it){this.wrapper=Rc(),this.textarea=this.wrapper.firstChild},Js.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Js.prototype.prepareSelection=function(){var it=this.cm,ot=it.display,dt=it.doc,ct=ju(it);if(it.options.moveInputWithCursor){var pt=Cs(it,dt.sel.primary().head,"div"),Et=ot.wrapper.getBoundingClientRect(),Ot=ot.lineDiv.getBoundingClientRect();ct.teTop=Math.max(0,Math.min(ot.wrapper.clientHeight-10,pt.top+Ot.top-Et.top)),ct.teLeft=Math.max(0,Math.min(ot.wrapper.clientWidth-10,pt.left+Ot.left-Et.left))}return ct},Js.prototype.showSelection=function(it){var ot=this.cm,dt=ot.display;qt(dt.cursorDiv,it.cursors),qt(dt.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Js.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var ot=this.cm;if(ot.somethingSelected()){this.prevInput="";var dt=ot.getSelection();this.textarea.value=dt,ot.state.focused&&Nn(this.textarea),Le&&It>=9&&(this.hasSelection=dt)}else it||(this.prevInput=this.textarea.value="",Le&&It>=9&&(this.hasSelection=null))}},Js.prototype.getField=function(){return this.textarea},Js.prototype.supportsTouch=function(){return!1},Js.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||Ge()!=this.textarea))try{this.textarea.focus()}catch(it){}},Js.prototype.blur=function(){this.textarea.blur()},Js.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Js.prototype.receivedFocus=function(){this.slowPoll()},Js.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Js.prototype.fastPoll=function(){var it=!1,ot=this;ot.pollingFast=!0;function dt(){var ct=ot.poll();!ct&&!it?(it=!0,ot.polling.set(60,dt)):(ot.pollingFast=!1,ot.slowPoll())}ot.polling.set(20,dt)},Js.prototype.poll=function(){var it=this,ot=this.cm,dt=this.textarea,ct=this.prevInput;if(this.contextMenuPending||!ot.state.focused||wt(dt)&&!ct&&!this.composing||ot.isReadOnly()||ot.options.disableInput||ot.state.keySeq)return!1;var pt=dt.value;if(pt==ct&&!ot.somethingSelected())return!1;if(Le&&It>=9&&this.hasSelection===pt||ht&&/[\uf700-\uf7ff]/.test(pt))return ot.display.input.reset(),!1;if(ot.doc.sel==ot.display.selForContextMenu){var Et=pt.charCodeAt(0);if(Et==8203&&!ct&&(ct="\u200B"),Et==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ot=0,Ut=Math.min(ct.length,pt.length);Ot1e3||pt.indexOf(` `)>-1?dt.value=it.prevInput="":it.prevInput=pt,it.composing&&(it.composing.range.clear(),it.composing.range=ot.markText(it.composing.start,ot.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Js.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Js.prototype.onKeyPress=function(){Le&&It>=9&&(this.hasSelection=null),this.fastPoll()},Js.prototype.onContextMenu=function(it){var ot=this,dt=ot.cm,ct=dt.display,pt=ot.textarea;ot.contextMenuPending&&ot.contextMenuPending();var Et=Nl(dt,it),Ot=ct.scroller.scrollTop;if(!Et||xe)return;var Ut=dt.options.resetSelectionOnContextMenu;Ut&&dt.doc.sel.contains(Et)==-1&&vr(dt,is)(dt.doc,Ls(Et),Ae);var Vt=pt.style.cssText,ae=ot.wrapper.style.cssText,ke=ot.wrapper.offsetParent.getBoundingClientRect();ot.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(it.clientY-ke.top-5)+"px; left: "+(it.clientX-ke.left-5)+`px; z-index: 1000; background: `+(Le?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var se;Jt&&(se=window.scrollY),ct.input.focus(),Jt&&window.scrollTo(null,se),ct.input.reset(),dt.somethingSelected()||(pt.value=ot.prevInput=" "),ot.contextMenuPending=Je,ct.selForContextMenu=dt.doc.sel,clearTimeout(ct.detectingSelectAll);function Xe(){if(pt.selectionStart!=null){var ui=dt.somethingSelected(),Fi="\u200B"+(ui?pt.value:"");pt.value="\u21DA",pt.value=Fi,ot.prevInput=ui?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=Fi.length,ct.selForContextMenu=dt.doc.sel}}function Je(){if(ot.contextMenuPending==Je&&(ot.contextMenuPending=!1,ot.wrapper.style.cssText=ae,pt.style.cssText=Vt,Le&&It<9&&ct.scrollbars.setScrollTop(ct.scroller.scrollTop=Ot),pt.selectionStart!=null)){(!Le||Le&&It<9)&&Xe();var ui=0,Fi=function(){ct.selForContextMenu==dt.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&ot.prevInput=="\u200B"?vr(dt,Ce)(dt):ui++<10?ct.detectingSelectAll=setTimeout(Fi,500):(ct.selForContextMenu=null,ct.input.reset())};ct.detectingSelectAll=setTimeout(Fi,200)}}if(Le&&It>=9&&Xe(),Mt){Zr(it);var Kn=function(){Zi(window,"mouseup",Kn),setTimeout(Je,20)};ni(window,"mouseup",Kn)}else setTimeout(Je,50)},Js.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Js.prototype.setUneditable=function(){},Js.prototype.needsContentAttribute=!1;function Hf(it,ot){if(ot=ot?Zn(ot):{},ot.value=it.value,!ot.tabindex&&it.tabIndex&&(ot.tabindex=it.tabIndex),!ot.placeholder&&it.placeholder&&(ot.placeholder=it.placeholder),ot.autofocus==null){var dt=Ge();ot.autofocus=dt==it||it.getAttribute("autofocus")!=null&&dt==document.body}function ct(){it.value=Ut.getValue()}var pt;if(it.form&&(ni(it.form,"submit",ct),!ot.leaveSubmitMethodAlone)){var Et=it.form;pt=Et.submit;try{var Ot=Et.submit=function(){ct(),Et.submit=pt,Et.submit(),Et.submit=Ot}}catch(Vt){}}ot.finishInit=function(Vt){Vt.save=ct,Vt.getTextArea=function(){return it},Vt.toTextArea=function(){Vt.toTextArea=isNaN,ct(),it.parentNode.removeChild(Vt.getWrapperElement()),it.style.display="",it.form&&(Zi(it.form,"submit",ct),!ot.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var Ut=ra(function(Vt){return it.parentNode.insertBefore(Vt,it.nextSibling)},ot);return Ut}function Yd(it){it.off=Zi,it.on=ni,it.wheelEventPixels=ya,it.Doc=ur,it.splitLines=Cn,it.countColumn=re,it.findColumn=An,it.isWordChar=Dt,it.Pass=Dn,it.signal=ii,it.Line=ba,it.changeEnd=nl,it.scrollbarModel=bn,it.Pos=mn,it.cmpPos=Ni,it.modes=hi,it.mimeModes=Un,it.resolveMode=Qe,it.getMode=on,it.modeExtensions=Pe,it.extendMode=_e,it.copyState=fi,it.startState=Si,it.innerMode=Mi,it.commands=Va,it.keyMap=co,it.keyName=sa,it.isModifierKey=xo,it.lookupKey=Xi,it.normalizeKeyMap=Pr,it.StringStream=We,it.SharedTextMarker=$i,it.TextMarker=ge,it.LineWidget=Jn,it.e_preventDefault=Gr,it.e_stopPropagation=fr,it.e_stop=Zr,it.addClass=Oe,it.contains=be,it.rmClass=Qt,it.keyNames=ao}gf(ra),od(ra);var zh="iter insert remove copy getEditor constructor".split(" ");for(var vc in ur.prototype)ur.prototype.hasOwnProperty(vc)&&Me(zh,vc)<0&&(ra.prototype[vc]=function(it){return function(){return it.apply(this.doc,arguments)}}(ur.prototype[vc]));return cr(ur),ra.inputStyles={textarea:Js,contenteditable:ns},ra.defineMode=function(it){!ra.defaults.mode&&it!="null"&&(ra.defaults.mode=it),zi.apply(this,arguments)},ra.defineMIME=hr,ra.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),ra.defineMIME("text/plain","null"),ra.defineExtension=function(it,ot){ra.prototype[it]=ot},ra.defineDocExtension=function(it,ot){ur.prototype[it]=ot},ra.fromTextArea=Hf,Yd(ra),ra.version="5.58.2",ra})},49047:function(En,jn,Nt){(function(bt){bt(Nt(4631),Nt(29589),Nt(52539))})(function(bt){"use strict";bt.defineMode("markdown",function(ie,De){var Ne=bt.getMode(ie,"text/html"),Le=Ne.name=="null";function It(re){if(bt.findModeByName){var Wt=bt.findModeByName(re);Wt&&(re=Wt.mime||Wt.mimes[0])}var Me=bt.getMode(ie,re);return Me.name=="null"?null:Me}De.highlightFormatting===void 0&&(De.highlightFormatting=!1),De.maxBlockquoteDepth===void 0&&(De.maxBlockquoteDepth=0),De.taskLists===void 0&&(De.taskLists=!1),De.strikethrough===void 0&&(De.strikethrough=!1),De.emoji===void 0&&(De.emoji=!1),De.fencedCodeBlockHighlighting===void 0&&(De.fencedCodeBlockHighlighting=!0),De.fencedCodeBlockDefaultMode===void 0&&(De.fencedCodeBlockDefaultMode="text/plain"),De.xml===void 0&&(De.xml=!0),De.tokenTypeOverrides===void 0&&(De.tokenTypeOverrides={});var Jt={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var fe in Jt)Jt.hasOwnProperty(fe)&&De.tokenTypeOverrides[fe]&&(Jt[fe]=De.tokenTypeOverrides[fe]);var ve=/^([*\-_])(?:\s*\1){2,}\s*$/,xe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ve=/^\[(x| )\](?=\s)/i,he=De.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Rt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ft=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,ht=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,lt=" ";function gt(re,Wt,Me){return Wt.f=Wt.inline=Me,Me(re,Wt)}function mt(re,Wt,Me){return Wt.f=Wt.block=Me,Me(re,Wt)}function xt(re){return!re||!/\S/.test(re.string)}function Mt(re){if(re.linkTitle=!1,re.linkHref=!1,re.linkText=!1,re.em=!1,re.strong=!1,re.strikethrough=!1,re.quote=0,re.indentedCode=!1,re.f==Qt){var Wt=Le;if(!Wt){var Me=bt.innerMode(Ne,re.htmlState);Wt=Me.mode.name=="xml"&&Me.state.tagStart===null&&!Me.state.context&&Me.state.tokenize.isInText}Wt&&(re.f=we,re.block=jt,re.htmlState=null)}return re.trailingSpace=0,re.trailingSpaceNewLine=!1,re.prevLine=re.thisLine,re.thisLine={stream:null},null}function jt(re,Wt){var Me=re.column()===Wt.indentation,ln=xt(Wt.prevLine.stream),Dn=Wt.indentedCode,Ae=Wt.prevLine.hr,pn=Wt.list!==!1,$e=(Wt.listStack[Wt.listStack.length-1]||0)+3;Wt.indentedCode=!1;var An=Wt.indentation;if(Wt.indentationDiff===null&&(Wt.indentationDiff=Wt.indentation,pn)){for(Wt.list=null;An=4&&(Dn||Wt.prevLine.fencedCodeEnd||Wt.prevLine.header||ln))return re.skipToEnd(),Wt.indentedCode=!0,Jt.code;if(re.eatSpace())return null;if(Me&&Wt.indentation<=$e&&(Ie=re.match(he))&&Ie[1].length<=6)return Wt.quote=0,Wt.header=Ie[1].length,Wt.thisLine.header=!0,De.highlightFormatting&&(Wt.formatting="header"),Wt.f=Wt.inline,qt(Wt);if(Wt.indentation<=$e&&re.eat(">"))return Wt.quote=Me?1:Wt.quote+1,De.highlightFormatting&&(Wt.formatting="quote"),re.eatSpace(),qt(Wt);if(!de&&!Wt.setext&&Me&&Wt.indentation<=$e&&(Ie=re.match(xe))){var cn=Ie[1]?"ol":"ul";return Wt.indentation=An+re.current().length,Wt.list=!0,Wt.quote=0,Wt.listStack.push(Wt.indentation),Wt.em=!1,Wt.strong=!1,Wt.code=!1,Wt.strikethrough=!1,De.taskLists&&re.match(Ve,!1)&&(Wt.taskList=!0),Wt.f=Wt.inline,De.highlightFormatting&&(Wt.formatting=["list","list-"+cn]),qt(Wt)}else{if(Me&&Wt.indentation<=$e&&(Ie=re.match(nt,!0)))return Wt.quote=0,Wt.fencedEndRE=new RegExp(Ie[1]+"+ *$"),Wt.localMode=De.fencedCodeBlockHighlighting&&It(Ie[2]||De.fencedCodeBlockDefaultMode),Wt.localMode&&(Wt.localState=bt.startState(Wt.localMode)),Wt.f=Wt.block=ne,De.highlightFormatting&&(Wt.formatting="code-block"),Wt.code=-1,qt(Wt);if(Wt.setext||(!Fe||!pn)&&!Wt.quote&&Wt.list===!1&&!Wt.code&&!de&&!et.test(re.string)&&(Ie=re.lookAhead(1))&&(Ie=Ie.match(Rt)))return Wt.setext?(Wt.header=Wt.setext,Wt.setext=0,re.skipToEnd(),De.highlightFormatting&&(Wt.formatting="header")):(Wt.header=Ie[0].charAt(0)=="="?1:2,Wt.setext=Wt.header),Wt.thisLine.header=!0,Wt.f=Wt.inline,qt(Wt);if(de)return re.skipToEnd(),Wt.hr=!0,Wt.thisLine.hr=!0,Jt.hr;if(re.peek()==="[")return gt(re,Wt,On)}return gt(re,Wt,Wt.inline)}function Qt(re,Wt){var Me=Ne.token(re,Wt.htmlState);if(!Le){var ln=bt.innerMode(Ne,Wt.htmlState);(ln.mode.name=="xml"&&ln.state.tagStart===null&&!ln.state.context&&ln.state.tokenize.isInText||Wt.md_inside&&re.current().indexOf(">")>-1)&&(Wt.f=we,Wt.block=jt,Wt.htmlState=null)}return Me}function ne(re,Wt){var Me=Wt.listStack[Wt.listStack.length-1]||0,ln=Wt.indentation=re.quote?Wt.push(Jt.formatting+"-"+re.formatting[Me]+"-"+re.quote):Wt.push("error"))}if(re.taskOpen)return Wt.push("meta"),Wt.length?Wt.join(" "):null;if(re.taskClosed)return Wt.push("property"),Wt.length?Wt.join(" "):null;if(re.linkHref?Wt.push(Jt.linkHref,"url"):(re.strong&&Wt.push(Jt.strong),re.em&&Wt.push(Jt.em),re.strikethrough&&Wt.push(Jt.strikethrough),re.emoji&&Wt.push(Jt.emoji),re.linkText&&Wt.push(Jt.linkText),re.code&&Wt.push(Jt.code),re.image&&Wt.push(Jt.image),re.imageAltText&&Wt.push(Jt.imageAltText,"link"),re.imageMarker&&Wt.push(Jt.imageMarker)),re.header&&Wt.push(Jt.header,Jt.header+"-"+re.header),re.quote&&(Wt.push(Jt.quote),!De.maxBlockquoteDepth||De.maxBlockquoteDepth>=re.quote?Wt.push(Jt.quote+"-"+re.quote):Wt.push(Jt.quote+"-"+De.maxBlockquoteDepth)),re.list!==!1){var ln=(re.listStack.length-1)%3;ln?ln===1?Wt.push(Jt.list2):Wt.push(Jt.list3):Wt.push(Jt.list1)}return re.trailingSpaceNewLine?Wt.push("trailing-space-new-line"):re.trailingSpace&&Wt.push("trailing-space-"+(re.trailingSpace%2?"a":"b")),Wt.length?Wt.join(" "):null}function $t(re,Wt){if(re.match(Ft,!0))return qt(Wt)}function we(re,Wt){var Me=Wt.text(re,Wt);if(typeof Me!="undefined")return Me;if(Wt.list)return Wt.list=null,qt(Wt);if(Wt.taskList){var ln=re.match(Ve,!0)[1]===" ";return ln?Wt.taskOpen=!0:Wt.taskClosed=!0,De.highlightFormatting&&(Wt.formatting="task"),Wt.taskList=!1,qt(Wt)}if(Wt.taskOpen=!1,Wt.taskClosed=!1,Wt.header&&re.match(/^#+$/,!0))return De.highlightFormatting&&(Wt.formatting="header"),qt(Wt);var Dn=re.next();if(Wt.linkTitle){Wt.linkTitle=!1;var Ae=Dn;Dn==="("&&(Ae=")"),Ae=(Ae+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pn="^\\s*(?:[^"+Ae+"\\\\]+|\\\\\\\\|\\\\.)"+Ae;if(re.match(new RegExp(pn),!0))return Jt.linkHref}if(Dn==="`"){var $e=Wt.formatting;De.highlightFormatting&&(Wt.formatting="code"),re.eatWhile("`");var An=re.current().length;if(Wt.code==0&&(!Wt.quote||An==1))return Wt.code=An,qt(Wt);if(An==Wt.code){var Fe=qt(Wt);return Wt.code=0,Fe}else return Wt.formatting=$e,qt(Wt)}else if(Wt.code)return qt(Wt);if(Dn==="\\"&&(re.next(),De.highlightFormatting)){var de=qt(Wt),Ie=Jt.formatting+"-escape";return de?de+" "+Ie:Ie}if(Dn==="!"&&re.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Wt.imageMarker=!0,Wt.image=!0,De.highlightFormatting&&(Wt.formatting="image"),qt(Wt);if(Dn==="["&&Wt.imageMarker&&re.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Wt.imageMarker=!1,Wt.imageAltText=!0,De.highlightFormatting&&(Wt.formatting="image"),qt(Wt);if(Dn==="]"&&Wt.imageAltText){De.highlightFormatting&&(Wt.formatting="image");var de=qt(Wt);return Wt.imageAltText=!1,Wt.image=!1,Wt.inline=Wt.f=be,de}if(Dn==="["&&!Wt.image)return Wt.linkText&&re.match(/^.*?\]/)||(Wt.linkText=!0,De.highlightFormatting&&(Wt.formatting="link")),qt(Wt);if(Dn==="]"&&Wt.linkText){De.highlightFormatting&&(Wt.formatting="link");var de=qt(Wt);return Wt.linkText=!1,Wt.inline=Wt.f=re.match(/\(.*?\)| ?\[.*?\]/,!1)?be:we,de}if(Dn==="<"&&re.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Wt.f=Wt.inline=ce,De.highlightFormatting&&(Wt.formatting="link");var de=qt(Wt);return de?de+=" ":de="",de+Jt.linkInline}if(Dn==="<"&&re.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Wt.f=Wt.inline=ce,De.highlightFormatting&&(Wt.formatting="link");var de=qt(Wt);return de?de+=" ":de="",de+Jt.linkEmail}if(De.xml&&Dn==="<"&&re.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var cn=re.string.indexOf(">",re.pos);if(cn!=-1){var Ke=re.string.substring(re.start,cn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ke)&&(Wt.md_inside=!0)}return re.backUp(1),Wt.htmlState=bt.startState(Ne),mt(re,Wt,Qt)}if(De.xml&&Dn==="<"&&re.match(/^\/\w*?>/))return Wt.md_inside=!1,"tag";if(Dn==="*"||Dn==="_"){for(var Ht=1,Lt=re.pos==1?" ":re.string.charAt(re.pos-2);Ht<3&&re.eat(Dn);)Ht++;var Ct=re.peek()||" ",Dt=!/\s/.test(Ct)&&(!ht.test(Ct)||/\s/.test(Lt)||ht.test(Lt)),Zt=!/\s/.test(Lt)&&(!ht.test(Lt)||/\s/.test(Ct)||ht.test(Ct)),kt=null,_t=null;if(Ht%2&&(!Wt.em&&Dt&&(Dn==="*"||!Zt||ht.test(Lt))?kt=!0:Wt.em==Dn&&Zt&&(Dn==="*"||!Dt||ht.test(Ct))&&(kt=!1)),Ht>1&&(!Wt.strong&&Dt&&(Dn==="*"||!Zt||ht.test(Lt))?_t=!0:Wt.strong==Dn&&Zt&&(Dn==="*"||!Dt||ht.test(Ct))&&(_t=!1)),_t!=null||kt!=null){De.highlightFormatting&&(Wt.formatting=kt==null?"strong":_t==null?"em":"strong em"),kt===!0&&(Wt.em=Dn),_t===!0&&(Wt.strong=Dn);var Fe=qt(Wt);return kt===!1&&(Wt.em=!1),_t===!1&&(Wt.strong=!1),Fe}}else if(Dn===" "&&(re.eat("*")||re.eat("_"))){if(re.peek()===" ")return qt(Wt);re.backUp(1)}if(De.strikethrough){if(Dn==="~"&&re.eatWhile(Dn)){if(Wt.strikethrough){De.highlightFormatting&&(Wt.formatting="strikethrough");var Fe=qt(Wt);return Wt.strikethrough=!1,Fe}else if(re.match(/^[^\s]/,!1))return Wt.strikethrough=!0,De.highlightFormatting&&(Wt.formatting="strikethrough"),qt(Wt)}else if(Dn===" "&&re.match(/^~~/,!0)){if(re.peek()===" ")return qt(Wt);re.backUp(2)}}if(De.emoji&&Dn===":"&&re.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Wt.emoji=!0,De.highlightFormatting&&(Wt.formatting="emoji");var tn=qt(Wt);return Wt.emoji=!1,tn}return Dn===" "&&(re.match(/^ +$/,!1)?Wt.trailingSpace++:Wt.trailingSpace&&(Wt.trailingSpaceNewLine=!0)),qt(Wt)}function ce(re,Wt){var Me=re.next();if(Me===">"){Wt.f=Wt.inline=we,De.highlightFormatting&&(Wt.formatting="link");var ln=qt(Wt);return ln?ln+=" ":ln="",ln+Jt.linkInline}return re.match(/^[^>]+/,!0),Jt.linkInline}function be(re,Wt){if(re.eatSpace())return null;var Me=re.next();return Me==="("||Me==="["?(Wt.f=Wt.inline=Oe(Me==="("?")":"]"),De.highlightFormatting&&(Wt.formatting="link-string"),Wt.linkHref=!0,qt(Wt)):"error"}var Ge={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Oe(re){return function(Wt,Me){var ln=Wt.next();if(ln===re){Me.f=Me.inline=we,De.highlightFormatting&&(Me.formatting="link-string");var Dn=qt(Me);return Me.linkHref=!1,Dn}return Wt.match(Ge[re]),Me.linkHref=!0,qt(Me)}}function On(re,Wt){return re.match(/^([^\]\\]|\\.)*\]:/,!1)?(Wt.f=Nn,re.next(),De.highlightFormatting&&(Wt.formatting="link"),Wt.linkText=!0,qt(Wt)):gt(re,Wt,we)}function Nn(re,Wt){if(re.match(/^\]:/,!0)){Wt.f=Wt.inline=Sn,De.highlightFormatting&&(Wt.formatting="link");var Me=qt(Wt);return Wt.linkText=!1,Me}return re.match(/^([^\]\\]|\\.)+/,!0),Jt.linkText}function Sn(re,Wt){return re.eatSpace()?null:(re.match(/^[^\s]+/,!0),re.peek()===void 0?Wt.linkTitle=!0:re.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Wt.f=Wt.inline=we,Jt.linkHref+" url")}var Zn={startState:function(){return{f:jt,prevLine:{stream:null},thisLine:{stream:null},block:jt,htmlState:null,indentation:0,inline:we,text:$t,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(re){return{f:re.f,prevLine:re.prevLine,thisLine:re.thisLine,block:re.block,htmlState:re.htmlState&&bt.copyState(Ne,re.htmlState),indentation:re.indentation,localMode:re.localMode,localState:re.localMode?bt.copyState(re.localMode,re.localState):null,inline:re.inline,text:re.text,formatting:!1,linkText:re.linkText,linkTitle:re.linkTitle,linkHref:re.linkHref,code:re.code,em:re.em,strong:re.strong,strikethrough:re.strikethrough,emoji:re.emoji,header:re.header,setext:re.setext,hr:re.hr,taskList:re.taskList,list:re.list,listStack:re.listStack.slice(0),quote:re.quote,indentedCode:re.indentedCode,trailingSpace:re.trailingSpace,trailingSpaceNewLine:re.trailingSpaceNewLine,md_inside:re.md_inside,fencedEndRE:re.fencedEndRE}},token:function(re,Wt){if(Wt.formatting=!1,re!=Wt.thisLine.stream){if(Wt.header=0,Wt.hr=!1,re.match(/^\s*$/,!0))return Mt(Wt),null;if(Wt.prevLine=Wt.thisLine,Wt.thisLine={stream:re},Wt.taskList=!1,Wt.trailingSpace=0,Wt.trailingSpaceNewLine=!1,!Wt.localState&&(Wt.f=Wt.block,Wt.f!=Qt)){var Me=re.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Wt.indentation=Me,Wt.indentationDiff=null,Me>0)return null}}return Wt.f(re,Wt)},innerMode:function(re){return re.block==Qt?{state:re.htmlState,mode:Ne}:re.localState?{state:re.localState,mode:re.localMode}:{state:re,mode:Zn}},indent:function(re,Wt,Me){return re.block==Qt&&Ne.indent?Ne.indent(re.htmlState,Wt,Me):re.localState&&re.localMode.indent?re.localMode.indent(re.localState,Wt,Me):bt.Pass},blankLine:Mt,getType:qt,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Zn},"xml"),bt.defineMIME("text/markdown","markdown"),bt.defineMIME("text/x-markdown","markdown")})},52539:function(En,jn,Nt){(function(bt){bt(Nt(4631))})(function(bt){"use strict";bt.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var ie=0;ie-1&&Ne.substring(Jt+1,Ne.length);if(fe)return bt.findModeByExtension(fe)},bt.findModeByName=function(Ne){Ne=Ne.toLowerCase();for(var Le=0;Le0?Ft.cmdState[Ft.cmdState.length-1]:null}function It(Ft){var nt=Ft.cmdState.pop();nt&&nt.closeBracket()}function Jt(Ft){for(var nt=Ft.cmdState,et=nt.length-1;et>=0;et--){var ht=nt[et];if(ht.name!="DEFAULT")return ht}return{styleIdentifier:function(){return null}}}function fe(Ft,nt,et){return function(){this.name=Ft,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ve={};ve.importmodule=fe("importmodule","tag",["string","builtin"]),ve.documentclass=fe("documentclass","tag",["","atom"]),ve.usepackage=fe("usepackage","tag",["atom"]),ve.begin=fe("begin","tag",["atom"]),ve.end=fe("end","tag",["atom"]),ve.label=fe("label","tag",["atom"]),ve.ref=fe("ref","tag",["atom"]),ve.eqref=fe("eqref","tag",["atom"]),ve.cite=fe("cite","tag",["atom"]),ve.bibitem=fe("bibitem","tag",["atom"]),ve.Bibitem=fe("Bibitem","tag",["atom"]),ve.RBibitem=fe("RBibitem","tag",["atom"]),ve.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function xe(Ft,nt){Ft.f=nt}function Ve(Ft,nt){var et;if(Ft.match(/^\\[a-zA-Z@]+/)){var ht=Ft.current().slice(1);return et=ve.hasOwnProperty(ht)?ve[ht]:ve.DEFAULT,et=new et,Ne(nt,et),xe(nt,Rt),et.style}if(Ft.match(/^\\[$&%#{}_]/)||Ft.match(/^\\[,;!\/\\]/))return"tag";if(Ft.match("\\["))return xe(nt,function(gt,mt){return he(gt,mt,"\\]")}),"keyword";if(Ft.match("\\("))return xe(nt,function(gt,mt){return he(gt,mt,"\\)")}),"keyword";if(Ft.match("$$"))return xe(nt,function(gt,mt){return he(gt,mt,"$$")}),"keyword";if(Ft.match("$"))return xe(nt,function(gt,mt){return he(gt,mt,"$")}),"keyword";var lt=Ft.next();if(lt=="%")return Ft.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(et=Le(nt),et)et.closeBracket(lt),xe(nt,Rt);else return"error";return"bracket"}else return lt=="{"||lt=="["?(et=ve.DEFAULT,et=new et,Ne(nt,et),"bracket"):/\d/.test(lt)?(Ft.eatWhile(/[\w.%]/),"atom"):(Ft.eatWhile(/[\w\-_]/),et=Jt(nt),et.name=="begin"&&(et.argument=Ft.current()),et.styleIdentifier())}function he(Ft,nt,et){if(Ft.eatSpace())return null;if(et&&Ft.match(et))return xe(nt,Ve),"keyword";if(Ft.match(/^\\[a-zA-Z@]+/))return"tag";if(Ft.match(/^[a-zA-Z]+/))return"variable-2";if(Ft.match(/^\\[$&%#{}_]/)||Ft.match(/^\\[,;!\/]/)||Ft.match(/^[\^_&]/))return"tag";if(Ft.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ft.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ht=Ft.next();return ht=="{"||ht=="}"||ht=="["||ht=="]"||ht=="("||ht==")"?"bracket":ht=="%"?(Ft.skipToEnd(),"comment"):"error"}function Rt(Ft,nt){var et=Ft.peek(),ht;return et=="{"||et=="["?(ht=Le(nt),ht.openBracket(et),Ft.eat(et),xe(nt,Ve),"bracket"):/[ \t\r]/.test(et)?(Ft.eat(et),null):(xe(nt,Ve),It(nt),Ve(Ft,nt))}return{startState:function(){var Ft=De.inMathMode?function(nt,et){return he(nt,et)}:Ve;return{cmdState:[],f:Ft}},copyState:function(Ft){return{cmdState:Ft.cmdState.slice(),f:Ft.f}},token:function(Ft,nt){return nt.f(Ft,nt)},blankLine:function(Ft){Ft.f=Ve,Ft.cmdState.length=0},lineComment:"%"}}),bt.defineMIME("text/x-stex","stex"),bt.defineMIME("text/x-latex","stex")})},29589:function(En,jn,Nt){(function(bt){bt(Nt(4631))})(function(bt){"use strict";var ie={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},De={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};bt.defineMode("xml",function(Ne,Le){var It=Ne.indentUnit,Jt={},fe=Le.htmlMode?ie:De;for(var ve in fe)Jt[ve]=fe[ve];for(var ve in Le)Jt[ve]=Le[ve];var xe,Ve;function he(ce,be){function Ge(Nn){return be.tokenize=Nn,Nn(ce,be)}var Oe=ce.next();if(Oe=="<")return ce.eat("!")?ce.eat("[")?ce.match("CDATA[")?Ge(nt("atom","]]>")):null:ce.match("--")?Ge(nt("comment","-->")):ce.match("DOCTYPE",!0,!0)?(ce.eatWhile(/[\w\._\-]/),Ge(et(1))):null:ce.eat("?")?(ce.eatWhile(/[\w\._\-]/),be.tokenize=nt("meta","?>"),"meta"):(xe=ce.eat("/")?"closeTag":"openTag",be.tokenize=Rt,"tag bracket");if(Oe=="&"){var On;return ce.eat("#")?ce.eat("x")?On=ce.eatWhile(/[a-fA-F\d]/)&&ce.eat(";"):On=ce.eatWhile(/[\d]/)&&ce.eat(";"):On=ce.eatWhile(/[\w\.\-:]/)&&ce.eat(";"),On?"atom":"error"}else return ce.eatWhile(/[^&<]/),null}he.isInText=!0;function Rt(ce,be){var Ge=ce.next();if(Ge==">"||Ge=="/"&&ce.eat(">"))return be.tokenize=he,xe=Ge==">"?"endTag":"selfcloseTag","tag bracket";if(Ge=="=")return xe="equals",null;if(Ge=="<"){be.tokenize=he,be.state=mt,be.tagName=be.tagStart=null;var Oe=be.tokenize(ce,be);return Oe?Oe+" tag error":"tag error"}else return/[\'\"]/.test(Ge)?(be.tokenize=Ft(Ge),be.stringStartCol=ce.column(),be.tokenize(ce,be)):(ce.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ft(ce){var be=function(Ge,Oe){for(;!Ge.eol();)if(Ge.next()==ce){Oe.tokenize=Rt;break}return"string"};return be.isInAttribute=!0,be}function nt(ce,be){return function(Ge,Oe){for(;!Ge.eol();){if(Ge.match(be)){Oe.tokenize=he;break}Ge.next()}return ce}}function et(ce){return function(be,Ge){for(var Oe;(Oe=be.next())!=null;){if(Oe=="<")return Ge.tokenize=et(ce+1),Ge.tokenize(be,Ge);if(Oe==">")if(ce==1){Ge.tokenize=he;break}else return Ge.tokenize=et(ce-1),Ge.tokenize(be,Ge)}return"meta"}}function ht(ce,be,Ge){this.prev=ce.context,this.tagName=be,this.indent=ce.indented,this.startOfLine=Ge,(Jt.doNotIndent.hasOwnProperty(be)||ce.context&&ce.context.noIndent)&&(this.noIndent=!0)}function lt(ce){ce.context&&(ce.context=ce.context.prev)}function gt(ce,be){for(var Ge;;){if(!ce.context||(Ge=ce.context.tagName,!Jt.contextGrabbers.hasOwnProperty(Ge)||!Jt.contextGrabbers[Ge].hasOwnProperty(be)))return;lt(ce)}}function mt(ce,be,Ge){return ce=="openTag"?(Ge.tagStart=be.column(),xt):ce=="closeTag"?Mt:mt}function xt(ce,be,Ge){return ce=="word"?(Ge.tagName=be.current(),Ve="tag",ne):Jt.allowMissingTagName&&ce=="endTag"?(Ve="tag bracket",ne(ce,be,Ge)):(Ve="error",xt)}function Mt(ce,be,Ge){if(ce=="word"){var Oe=be.current();return Ge.context&&Ge.context.tagName!=Oe&&Jt.implicitlyClosed.hasOwnProperty(Ge.context.tagName)&<(Ge),Ge.context&&Ge.context.tagName==Oe||Jt.matchClosing===!1?(Ve="tag",jt):(Ve="tag error",Qt)}else return Jt.allowMissingTagName&&ce=="endTag"?(Ve="tag bracket",jt(ce,be,Ge)):(Ve="error",Qt)}function jt(ce,be,Ge){return ce!="endTag"?(Ve="error",jt):(lt(Ge),mt)}function Qt(ce,be,Ge){return Ve="error",jt(ce,be,Ge)}function ne(ce,be,Ge){if(ce=="word")return Ve="attribute",qt;if(ce=="endTag"||ce=="selfcloseTag"){var Oe=Ge.tagName,On=Ge.tagStart;return Ge.tagName=Ge.tagStart=null,ce=="selfcloseTag"||Jt.autoSelfClosers.hasOwnProperty(Oe)?gt(Ge,Oe):(gt(Ge,Oe),Ge.context=new ht(Ge,Oe,On==Ge.indented)),mt}return Ve="error",ne}function qt(ce,be,Ge){return ce=="equals"?$t:(Jt.allowMissing||(Ve="error"),ne(ce,be,Ge))}function $t(ce,be,Ge){return ce=="string"?we:ce=="word"&&Jt.allowUnquoted?(Ve="string",ne):(Ve="error",ne(ce,be,Ge))}function we(ce,be,Ge){return ce=="string"?we:ne(ce,be,Ge)}return{startState:function(ce){var be={tokenize:he,state:mt,indented:ce||0,tagName:null,tagStart:null,context:null};return ce!=null&&(be.baseIndent=ce),be},token:function(ce,be){if(!be.tagName&&ce.sol()&&(be.indented=ce.indentation()),ce.eatSpace())return null;xe=null;var Ge=be.tokenize(ce,be);return(Ge||xe)&&Ge!="comment"&&(Ve=null,be.state=be.state(xe||Ge,ce,be),Ve&&(Ge=Ve=="error"?Ge+" error":Ve)),Ge},indent:function(ce,be,Ge){var Oe=ce.context;if(ce.tokenize.isInAttribute)return ce.tagStart==ce.indented?ce.stringStartCol+1:ce.indented+It;if(Oe&&Oe.noIndent)return bt.Pass;if(ce.tokenize!=Rt&&ce.tokenize!=he)return Ge?Ge.match(/^(\s*)/)[0].length:0;if(ce.tagName)return Jt.multilineTagIndentPastTag!==!1?ce.tagStart+ce.tagName.length+2:ce.tagStart+It*(Jt.multilineTagIndentFactor||1);if(Jt.alignCDATA&&/$/,blockCommentStart:"",configuration:Jt.htmlMode?"html":"xml",helperType:Jt.htmlMode?"html":"xml",skipAttribute:function(ce){ce.state==$t&&(ce.state=ne)},xmlCurrentTag:function(ce){return ce.tagName?{name:ce.tagName,close:ce.type=="closeTag"}:null},xmlCurrentContext:function(ce){for(var be=[],Ge=ce.context;Ge;Ge=Ge.prev)Ge.tagName&&be.push(Ge.tagName);return be.reverse()}}}),bt.defineMIME("text/xml","xml"),bt.defineMIME("application/xml","xml"),bt.mimeModes.hasOwnProperty("text/html")||bt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},28734:function(En){(function(jn,Nt){En.exports=Nt()})(this,function(){"use strict";return function(jn,Nt){var bt=Nt.prototype,ie=bt.format;bt.format=function(De){var Ne=this,Le=this.$locale();if(!this.isValid())return ie.bind(this)(De);var It=this.$utils(),Jt=(De||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(fe){switch(fe){case"Q":return Math.ceil((Ne.$M+1)/3);case"Do":return Le.ordinal(Ne.$D);case"gggg":return Ne.weekYear();case"GGGG":return Ne.isoWeekYear();case"wo":return Le.ordinal(Ne.week(),"W");case"w":case"ww":return It.s(Ne.week(),fe==="w"?1:2,"0");case"W":case"WW":return It.s(Ne.isoWeek(),fe==="W"?1:2,"0");case"k":case"kk":return It.s(String(Ne.$H===0?24:Ne.$H),fe==="k"?1:2,"0");case"X":return Math.floor(Ne.$d.getTime()/1e3);case"x":return Ne.$d.getTime();case"z":return"["+Ne.offsetName()+"]";case"zzz":return"["+Ne.offsetName("long")+"]";default:return fe}});return ie.bind(this)(Jt)}}})},96036:function(En){(function(jn,Nt){En.exports=Nt()})(this,function(){"use strict";return function(jn,Nt,bt){var ie=Nt.prototype,De=function(fe){return fe&&(fe.indexOf?fe:fe.s)},Ne=function(fe,ve,xe,Ve,he){var Rt=fe.name?fe:fe.$locale(),Ft=De(Rt[ve]),nt=De(Rt[xe]),et=Ft||nt.map(function(lt){return lt.slice(0,Ve)});if(!he)return et;var ht=Rt.weekStart;return et.map(function(lt,gt){return et[(gt+(ht||0))%7]})},Le=function(){return bt.Ls[bt.locale()]},It=function(fe,ve){return fe.formats[ve]||function(xe){return xe.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Ve,he,Rt){return he||Rt.slice(1)})}(fe.formats[ve.toUpperCase()])},Jt=function(){var fe=this;return{months:function(ve){return ve?ve.format("MMMM"):Ne(fe,"months")},monthsShort:function(ve){return ve?ve.format("MMM"):Ne(fe,"monthsShort","months",3)},firstDayOfWeek:function(){return fe.$locale().weekStart||0},weekdays:function(ve){return ve?ve.format("dddd"):Ne(fe,"weekdays")},weekdaysMin:function(ve){return ve?ve.format("dd"):Ne(fe,"weekdaysMin","weekdays",2)},weekdaysShort:function(ve){return ve?ve.format("ddd"):Ne(fe,"weekdaysShort","weekdays",3)},longDateFormat:function(ve){return It(fe.$locale(),ve)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};ie.localeData=function(){return Jt.bind(this)()},bt.localeData=function(){var fe=Le();return{firstDayOfWeek:function(){return fe.weekStart||0},weekdays:function(){return bt.weekdays()},weekdaysShort:function(){return bt.weekdaysShort()},weekdaysMin:function(){return bt.weekdaysMin()},months:function(){return bt.months()},monthsShort:function(){return bt.monthsShort()},longDateFormat:function(ve){return It(fe,ve)},meridiem:fe.meridiem,ordinal:fe.ordinal}},bt.months=function(){return Ne(Le(),"months")},bt.monthsShort=function(){return Ne(Le(),"monthsShort","months",3)},bt.weekdays=function(fe){return Ne(Le(),"weekdays",null,null,fe)},bt.weekdaysShort=function(fe){return Ne(Le(),"weekdaysShort","weekdays",3,fe)},bt.weekdaysMin=function(fe){return Ne(Le(),"weekdaysMin","weekdays",2,fe)}}})},55183:function(En){(function(jn,Nt){En.exports=Nt()})(this,function(){"use strict";var jn="week",Nt="year";return function(bt,ie,De){var Ne=ie.prototype;Ne.week=function(Le){if(Le===void 0&&(Le=null),Le!==null)return this.add(7*(Le-this.week()),"day");var It=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var Jt=De(this).startOf(Nt).add(1,Nt).date(It),fe=De(this).endOf(jn);if(Jt.isBefore(fe))return 1}var ve=De(this).startOf(Nt).date(It).startOf(jn).subtract(1,"millisecond"),xe=this.diff(ve,jn,!0);return xe<0?De(this).startOf("week").week():Math.ceil(xe)},Ne.weeks=function(Le){return Le===void 0&&(Le=null),this.week(Le)}}})},172:function(En){(function(jn,Nt){En.exports=Nt()})(this,function(){"use strict";return function(jn,Nt){Nt.prototype.weekYear=function(){var bt=this.month(),ie=this.week(),De=this.year();return ie===1&&bt===11?De+1:bt===0&&ie>=52?De-1:De}}})},6833:function(En){(function(jn,Nt){En.exports=Nt()})(this,function(){"use strict";return function(jn,Nt){Nt.prototype.weekday=function(bt){var ie=this.$locale().weekStart||0,De=this.$W,Ne=(Dex&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x=a.length?a.push(x):a.splice(y,0,x):Be("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Ao(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Be("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Ei(){var a=qa.pop();return a===void 0?[]:a}function bi(a){a.length=0,qa.push(a)}function Wi(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(mn(a)&&a.constructor)return Wi(a.constructor);return typeof a}function $r(a){var y=a;return mn(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function Kr(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function Xn(a,y,x){Object.defineProperty(ta.prototype,a,{get:y,set:x})}function ir(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;bx;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var pl=We.navigator!==void 0&&0this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;xthis.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},qo.prototype.Ad=function(){return this.next()},qo.prototype.first=function(){var a=this.Bb;this.qa=a.Ja;var y=a.s;return this.Za=a=y.length-1,0<=a?(y=y[a],this.key=a,this.value=y):null},qo.prototype.any=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(a(y[x]))return!0;return!1},qo.prototype.all=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(!a(y[x]))return!1;return!0},qo.prototype.each=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)a(y[x]);return this},qo.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new xn,a.s=x,a.xb(),a.iterator},qo.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new xn,a.s=x,a.xb(),a.iterator},qo.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},qo.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},_e.Object.defineProperties(qo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),qo.prototype.first=qo.prototype.first,qo.prototype.hasNext=qo.prototype.Ad,qo.prototype.next=qo.prototype.next,qo.prototype.reset=qo.prototype.reset,qo.className="ListIteratorBackwards";function xn(a){po(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Be("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}wt=xn.prototype,wt.xb=function(){var a=this.Ja;a++,999999999a||a>=y.length)&&Ki(a,"0 <= i < length",xn,"elt:i"),y[a]},wt.get=function(a){return this.M(a)},wt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Ki(a,"0 <= i < length",xn,"setElt:i"),this._isFrozen&&xi(this,a),x[a]=y},wt.set=function(a,y){this.cd(a,y)},wt.first=function(){var a=this.s;return a.length===0?null:a[0]},wt.jc=function(){var a=this.s,y=a.length;return 0a&&Ki(a,">= 0",xn,"insertAt:i"),this._isFrozen&&xi(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},wt.remove=function(a){if(a===null)return!1;this._isFrozen&&xi(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},wt.delete=function(a){return this.remove(a)},wt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Ki(a,"0 <= i < length",xn,"removeAt:i"),this._isFrozen&&xi(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},wt.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&xi(this);for(var b=a,z=y+1;z=z)return this;if((0>y||y>=b-1)&&Ki(y,"0 <= from < length",xn,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a=b)for(x=E.slice(y),x.sort(a),a=y;a=this.s.length)return To;var a=this.Sa;return a!==null?(a.reset(),a):new zr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return To;var a=this.Hg;return a!==null?(a.reset(),a):new qo(this)}}}),xn.prototype.reverse=xn.prototype.reverse,xn.prototype.sortRange=xn.prototype.zi,xn.prototype.sort=xn.prototype.sort,xn.prototype.toSet=xn.prototype.Iv,xn.prototype.toArray=xn.prototype.Fa,xn.prototype.removeRange=xn.prototype.removeRange,xn.prototype.removeAt=xn.prototype.mb,xn.prototype.delete=xn.prototype.delete,xn.prototype.remove=xn.prototype.remove,xn.prototype.insertAt=xn.prototype.Gb,xn.prototype.pop=xn.prototype.pop,xn.prototype.last=xn.prototype.jc,xn.prototype.first=xn.prototype.first,xn.prototype.set=xn.prototype.set,xn.prototype.setElt=xn.prototype.cd,xn.prototype.get=xn.prototype.get,xn.prototype.elt=xn.prototype.M,xn.prototype.indexOf=xn.prototype.indexOf,xn.prototype.has=xn.prototype.has,xn.prototype.contains=xn.prototype.contains,xn.prototype.clear=xn.prototype.clear,xn.prototype.addAll=xn.prototype.addAll,xn.prototype.push=xn.prototype.push,xn.prototype.add=xn.prototype.add,xn.prototype.thaw=xn.prototype.ka,xn.prototype.freeze=xn.prototype.freeze,xn.className="List";function La(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}La.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},La.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},La.prototype.Ad=function(){return this.next()},La.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},La.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},La.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},La.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},La.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new xn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},La.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new xn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},La.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},La.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},_e.Object.defineProperties(La.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),La.prototype.first=La.prototype.first,La.prototype.hasNext=La.prototype.Ad,La.prototype.next=La.prototype.next,La.prototype.reset=La.prototype.reset,La.className="SetIterator";function hn(a){po(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Be("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}wt=hn.prototype,wt.xb=function(){var a=this.Ja;a++,999999999=this.Sb)return To;var a=this.Sa;return a!==null?(a.reset(),a):new La(this)}}}),hn.prototype.toList=hn.prototype.Hv,hn.prototype.toArray=hn.prototype.Fa,hn.prototype.clear=hn.prototype.clear,hn.prototype.retainAll=hn.prototype.pA,hn.prototype.removeAll=hn.prototype.hp,hn.prototype.delete=hn.prototype.delete,hn.prototype.remove=hn.prototype.remove,hn.prototype.first=hn.prototype.first,hn.prototype.containsAny=hn.prototype.Ty,hn.prototype.containsAll=hn.prototype.Sy,hn.prototype.has=hn.prototype.has,hn.prototype.contains=hn.prototype.contains,hn.prototype.addAll=hn.prototype.addAll,hn.prototype.add=hn.prototype.add,hn.prototype.thaw=hn.prototype.ka,hn.prototype.freeze=hn.prototype.freeze;var $s=1;hn.className="Set",hn.uniqueHash=po,hn.hashIdUnique=Fs,hn.hashId=Ia;function wa(a){this.ma=a,this.qa=a.Ja,this.sa=null}wa.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},wa.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},wa.prototype.Ad=function(){return this.next()},wa.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},wa.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},wa.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},wa.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},wa.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new xn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},wa.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new xn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},wa.prototype.de=function(){this.value=this.key=null,this.qa=-1},wa.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},_e.Object.defineProperties(wa.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),wa.prototype.first=wa.prototype.first,wa.prototype.hasNext=wa.prototype.Ad,wa.prototype.next=wa.prototype.next,wa.prototype.reset=wa.prototype.reset,wa.className="MapKeySetIterator";function bo(a){hn.call(this),po(this),this._isFrozen=!0,this.ma=a}Pe(bo,hn),wt=bo.prototype,wt.freeze=function(){return this},wt.ka=function(){return this},wt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},wt.add=function(){Be("This Set is read-only: "+this.toString())},wt.contains=function(a){return this.ma.contains(a)},wt.has=function(a){return this.contains(a)},wt.remove=function(){Be("This Set is read-only: "+this.toString())},wt.delete=function(a){return this.remove(a)},wt.clear=function(){Be("This Set is read-only: "+this.toString())},wt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},bo.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},bo.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},bo.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},bo.prototype.map=function(a){for(var y=new hn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},bo.prototype.filter=function(a){for(var y=new hn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},bo.prototype.copy=function(){return new bo(this.ma)},bo.prototype.Iv=function(){var a=new hn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},bo.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},bo.prototype.Hv=function(){var a=new xn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},_e.Object.defineProperties(bo.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?To:new wa(this.ma)}}}),bo.prototype.toList=bo.prototype.Hv,bo.prototype.toArray=bo.prototype.Fa,bo.prototype.toSet=bo.prototype.Iv,bo.prototype.first=bo.prototype.first,bo.prototype.clear=bo.prototype.clear,bo.prototype.delete=bo.prototype.delete,bo.prototype.remove=bo.prototype.remove,bo.prototype.has=bo.prototype.has,bo.prototype.contains=bo.prototype.contains,bo.prototype.add=bo.prototype.add,bo.prototype.thaw=bo.prototype.ka,bo.prototype.freeze=bo.prototype.freeze,bo.className="MapKeySet";function Aa(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Aa.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Aa.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Aa.prototype.Ad=function(){return this.next()},Aa.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Aa.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Aa.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Aa.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Aa.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new xn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Aa.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new xn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Aa.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Aa.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},_e.Object.defineProperties(Aa.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Aa.prototype.first=Aa.prototype.first,Aa.prototype.hasNext=Aa.prototype.Ad,Aa.prototype.next=Aa.prototype.next,Aa.prototype.reset=Aa.prototype.reset,Aa.className="MapValueSetIterator";function al(a,y){this.key=a,this.value=y,this.ll=this.va=null}al.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},al.className="KeyValuePair";function oa(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}oa.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},oa.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},oa.prototype.Ad=function(){return this.next()},oa.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},oa.prototype.any=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},oa.prototype.all=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},oa.prototype.each=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y),y=y.va;return this},oa.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new xn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},oa.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new xn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},oa.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},oa.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},_e.Object.defineProperties(oa.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),oa.prototype.first=oa.prototype.first,oa.prototype.hasNext=oa.prototype.Ad,oa.prototype.next=oa.prototype.next,oa.prototype.reset=oa.prototype.reset,oa.className="MapIterator";function gi(a){po(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Be("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}wt=gi.prototype,wt.xb=function(){var a=this.Ja;a++,999999999=this.count)return To;var a=this.Sa;return a!==null?(a.reset(),a):new oa(this)}},iteratorKeys:{get:function(){return 0>=this.count?To:new wa(this)}},iteratorValues:{get:function(){if(0>=this.count)return To;var a=this.jf;return a!==null?(a.reset(),a):new Aa(this)}}}),gi.prototype.toKeySet=gi.prototype.Lf,gi.prototype.toArray=gi.prototype.Fa,gi.prototype.clear=gi.prototype.clear,gi.prototype.delete=gi.prototype.delete,gi.prototype.remove=gi.prototype.remove,gi.prototype.get=gi.prototype.get,gi.prototype.getValue=gi.prototype.I,gi.prototype.has=gi.prototype.has,gi.prototype.contains=gi.prototype.contains,gi.prototype.first=gi.prototype.first,gi.prototype.addAll=gi.prototype.addAll,gi.prototype.set=gi.prototype.set,gi.prototype.add=gi.prototype.add,gi.prototype.thaw=gi.prototype.ka,gi.prototype.freeze=gi.prototype.freeze,gi.className="Map";function Xt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Be("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var os,uu,hu,Ys,du;Xt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Xt.prototype.h=function(a,y){return this.x=a,this.y=y,this},Xt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Xt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Xt.prototype.copy=function(){var a=new Xt;return a.x=this.x,a.y=this.y,a},wt=Xt.prototype,wt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},wt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},wt.freeze=function(){return this._isFrozen=!0,this},wt.ka=function(){return Object.isFrozen(this)&&Be("cannot thaw constant: "+this),this._isFrozen=!1,this};function tl(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new Xt(x,b)}return new Xt}function kh(a){return a.x.toString()+" "+a.y.toString()}wt.toString=function(){return"Point("+this.x+","+this.y+")"},wt.D=function(a){return a instanceof Xt?this.x===a.x&&this.y===a.y:!1},wt.hi=function(a,y){return this.x===a&&this.y===y},wt.Xa=function(a){return Se.B(this.x,a.x)&&Se.B(this.y,a.y)},wt.add=function(a){return this.x+=a.x,this.y+=a.y,this},wt.re=function(a){return this.x-=a.x,this.y-=a.y,this},wt.offset=function(a,y){return this.x+=a,this.y+=y,this},Xt.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},wt=Xt.prototype,wt.scale=function(a,y){return this.x*=a,this.y*=y,this},wt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},wt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},wt.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0y?270:0;if(y===0)return 0a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}wt.Ry=function(a,y){return Se.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},wt.fA=function(a,y,x,E){return Se.qh(a,y,x,E,this.x,this.y,this),this},wt.gA=function(a,y){return Se.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},wt.uA=function(a,y,x,E){return Se.No(this.x,this.y,a,y,x,E,this),this},wt.vA=function(a,y){return Se.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},wt.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},wt.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},wt.transform=function(a){return a.Ga(this),this};function Ea(a,y){return y.Cd(a),a}function Xa(a,y,x,E,b,z){var tt=b-x,rt=z-E,at=tt*tt+rt*rt;x-=a,E-=y;var st=-x*tt-E*rt;return 0>=st||st>=at?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/at)}function sr(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Yi(a,y,x,E){return a=x-a,y=E-y,a===0?0y?270:0:y===0?0a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}wt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Xt.alloc=function(){var a=Br.pop();return a===void 0?new Xt:a},Xt.allocAt=function(a,y){var x=Br.pop();return x===void 0?new Xt(a,y):(x.x=a,x.y=y,x)},Xt.free=function(a){Br.push(a)},Xt.prototype.isReal=Xt.prototype.w,Xt.prototype.setSpot=Xt.prototype.yi,Xt.prototype.setRectSpot=Xt.prototype.xi,Xt.prototype.snapToGridPoint=Xt.prototype.vA,Xt.prototype.snapToGrid=Xt.prototype.uA,Xt.prototype.projectOntoLineSegmentPoint=Xt.prototype.gA,Xt.prototype.projectOntoLineSegment=Xt.prototype.fA,Xt.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return Se.Rl(a,y,x,E,b,z,tt,rt)},Xt.prototype.compareWithLineSegmentPoint=Xt.prototype.Ry,Xt.compareWithLineSegment=function(a,y,x,E,b,z){return Se.Fl(a,y,x,E,b,z)},Xt.prototype.direction=Xt.prototype.direction,Xt.prototype.directionPoint=Xt.prototype.ab,Xt.prototype.normalize=Xt.prototype.normalize,Xt.prototype.distanceSquared=Xt.prototype.zd,Xt.prototype.distanceSquaredPoint=Xt.prototype.Bf,Xt.prototype.scale=Xt.prototype.scale,Xt.prototype.rotate=Xt.prototype.rotate,Xt.prototype.offset=Xt.prototype.offset,Xt.prototype.subtract=Xt.prototype.re,Xt.prototype.add=Xt.prototype.add,Xt.prototype.equalsApprox=Xt.prototype.Xa,Xt.prototype.equalTo=Xt.prototype.hi,Xt.prototype.equals=Xt.prototype.D,Xt.prototype.set=Xt.prototype.set,Xt.prototype.setTo=Xt.prototype.sg;var Br=[];Xt.className="Point",Xt.parse=tl,Xt.stringify=kh,Xt.distanceLineSegmentSquared=Xa,Xt.distanceSquared=sr,Xt.direction=Yi,Xt.Origin=os=new Xt(0,0).ja(),Xt.InfiniteTopLeft=uu=new Xt(-1/0,-1/0).ja(),Xt.InfiniteBottomRight=hu=new Xt(1/0,1/0).ja(),Xt.SixPoint=Ys=new Xt(6,6).ja(),Xt.NoPoint=du=new Xt(NaN,NaN).ja(),Xt.parse=tl,Xt.stringify=kh,Xt.distanceLineSegmentSquared=Xa,Xt.distanceSquared=sr,Xt.direction=Yi;function sn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):Be("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var pr,ro,Ra,Ma,ba,Ws,xl;sn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},sn.prototype.h=function(a,y){return this.width=a,this.height=y,this},sn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},sn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},sn.prototype.copy=function(){var a=new sn;return a.width=this.width,a.height=this.height,a},wt=sn.prototype,wt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},wt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},wt.freeze=function(){return this._isFrozen=!0,this},wt.ka=function(){return Object.isFrozen(this)&&Be("cannot thaw constant: "+this),this._isFrozen=!1,this};function wl(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new sn(x,b)}return new sn}function Xh(a){return a.width.toString()+" "+a.height.toString()}wt.toString=function(){return"Size("+this.width+","+this.height+")"},wt.D=function(a){return a instanceof sn?this.width===a.width&&this.height===a.height:!1},wt.hi=function(a,y){return this.width===a&&this.height===y},wt.Xa=function(a){return Se.B(this.width,a.width)&&Se.B(this.height,a.height)},wt.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},wt.w=function(){return isFinite(this.width)&&isFinite(this.height)},sn.alloc=function(){var a=fh.pop();return a===void 0?new sn:a},sn.free=function(a){fh.push(a)},sn.prototype.isReal=sn.prototype.w,sn.prototype.inflate=sn.prototype.Bc,sn.prototype.equalsApprox=sn.prototype.Xa,sn.prototype.equalTo=sn.prototype.hi,sn.prototype.equals=sn.prototype.D,sn.prototype.set=sn.prototype.set,sn.prototype.setTo=sn.prototype.sg;var fh=[];sn.className="Size",sn.parse=wl,sn.stringify=Xh,sn.ZeroSize=pr=new sn(0,0).ja(),sn.OneSize=ro=new sn(1,1).ja(),sn.SixSize=Ra=new sn(6,6).ja(),sn.EightSize=Ma=new sn(8,8).ja(),sn.TenSize=ba=new sn(10,10).ja(),sn.InfiniteSize=Ws=new sn(1/0,1/0).ja(),sn.NoSize=xl=new sn(NaN,NaN).ja(),sn.parse=wl,sn.stringify=Xh;function Ye(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof Xt?(x=a.x,a=a.y,y instanceof Xt?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof sn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Be("Incorrect second argument supplied to Rect constructor "+y)):Be("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}wt=Ye.prototype,wt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},wt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function bl(a,y,x){a.width=y,a.height=x}wt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},wt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},wt.dd=function(a){return this.x=a.x,this.y=a.y,this},wt.tA=function(a){return this.width=a.width,this.height=a.height,this},Ye.prototype.copy=function(){var a=new Ye;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},wt=Ye.prototype,wt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},wt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},wt.freeze=function(){return this._isFrozen=!0,this},wt.ka=function(){return Object.isFrozen(this)&&Be("cannot thaw constant: "+this),this._isFrozen=!1,this};function Lu(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new Ye(x,b,z,tt)}return new Ye}function Ah(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}wt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},wt.D=function(a){return a instanceof Ye?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},wt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},wt.Xa=function(a){return Se.B(this.x,a.x)&&Se.B(this.y,a.y)&&Se.B(this.width,a.width)&&Se.B(this.height,a.height)};function as(a,y){return Se.$(a.x,y.x)&&Se.$(a.y,y.y)&&Se.$(a.width,y.width)&&Se.$(a.height,y.height)}wt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},wt.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},wt.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},wt.offset=function(a,y){return this.x+=a,this.y+=y,this},wt.Bc=function(a,y){return bh(this,y,a,y,a)},wt.Co=function(a){return bh(this,a.top,a.right,a.bottom,a.left)},wt.Fv=function(a){return bh(this,-a.top,-a.right,-a.bottom,-a.left)},wt.Hz=function(a,y,x,E){return bh(this,a,y,x,E)};function bh(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}wt.Ex=function(a){return Fh(this,a.x,a.y,a.width,a.height)},wt.Uu=function(a,y,x,E){return Fh(this,a,y,x,E)};function Fh(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}wt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},wt.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function Jh(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}wt.Ye=function(a){return za(this,a.x,a.y,0,0)},wt.ed=function(a){return za(this,a.x,a.y,a.width,a.height)},wt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),za(this,a,y,x,E)};function za(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}wt.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function Ps(a,y,x,E,b,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=b&&b+tt<=a+x&&y<=z&&z+rt<=y+E}function to(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}wt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},wt.Mz=function(){return this.width===0&&this.height===0},Ye.alloc=function(){var a=ps.pop();return a===void 0?new Ye:a},Ye.allocAt=function(a,y,x,E){var b=ps.pop();return b===void 0?new Ye(a,y,x,E):b.h(a,y,x,E)},Ye.free=function(a){ps.push(a)},_e.Object.defineProperties(Ye.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new Xt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new sn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Xt(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),Ye.prototype.isEmpty=Ye.prototype.Mz,Ye.prototype.isReal=Ye.prototype.w,Ye.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return Se.Fx(a,y,x,E,b,z,tt,rt)},Ye.prototype.setSpot=Ye.prototype.yi,Ye.prototype.union=Ye.prototype.Kv,Ye.prototype.unionRect=Ye.prototype.ed,Ye.prototype.unionPoint=Ye.prototype.Ye,Ye.prototype.intersects=Ye.prototype.Vu,Ye.prototype.intersectsRect=Ye.prototype.Yc,Ye.prototype.intersect=Ye.prototype.Uu,Ye.prototype.intersectRect=Ye.prototype.Ex,Ye.prototype.grow=Ye.prototype.Hz,Ye.prototype.subtractMargin=Ye.prototype.Fv,Ye.prototype.addMargin=Ye.prototype.Co,Ye.prototype.inflate=Ye.prototype.Bc,Ye.prototype.offset=Ye.prototype.offset,Ye.prototype.contains=Ye.prototype.contains,Ye.prototype.containsRect=Ye.prototype.Re,Ye.prototype.containsPoint=Ye.prototype.ca,Ye.prototype.equalsApprox=Ye.prototype.Xa,Ye.prototype.equalTo=Ye.prototype.hi,Ye.prototype.equals=Ye.prototype.D,Ye.prototype.setSize=Ye.prototype.tA,Ye.prototype.setPoint=Ye.prototype.dd,Ye.prototype.set=Ye.prototype.set,Ye.prototype.setTo=Ye.prototype.sg;var Bo=null,ja=null,ps=[];Ye.className="Rect",Ye.parse=Lu,Ye.stringify=Ah,Ye.contains=Ps,Ye.intersects=to,Ye.ZeroRect=Bo=new Ye(0,0,0,0).ja(),Ye.NoRect=ja=new Ye(NaN,NaN,NaN,NaN).ja(),Ye.parse=Lu,Ye.stringify=Ah,Ye.contains=Ps,Ye.intersects=to;function _i(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):Be("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}_i.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},_i.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},_i.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},_i.prototype.copy=function(){var a=new _i;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},wt=_i.prototype,wt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},wt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},wt.freeze=function(){return this._isFrozen=!0,this},wt.ka=function(){return Object.isFrozen(this)&&Be("cannot thaw constant: "+this),this._isFrozen=!1,this};function ac(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new _i;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new _i(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new _i(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new _i(x,b):new _i(x,b,z,tt)}return new _i}function Qh(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}wt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},wt.D=function(a){return a instanceof _i?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},wt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},wt.Xa=function(a){return Se.B(this.top,a.top)&&Se.B(this.right,a.right)&&Se.B(this.bottom,a.bottom)&&Se.B(this.left,a.left)},wt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},_i.alloc=function(){var a=_h.pop();return a===void 0?new _i:a},_i.free=function(a){_h.push(a)},_i.prototype.isReal=_i.prototype.w,_i.prototype.equalsApprox=_i.prototype.Xa,_i.prototype.equalTo=_i.prototype.hi,_i.prototype.equals=_i.prototype.D,_i.prototype.set=_i.prototype.set,_i.prototype.setTo=_i.prototype.sg;var Fl=null,sc=null,_h=[];_i.className="Margin",_i.parse=ac,_i.stringify=Qh,_i.ZeroMargin=Fl=new _i(0,0,0,0).ja(),_i.TwoMargin=sc=new _i(2,2,2,2).ja(),_i.parse=ac,_i.stringify=Qh;function mi(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var ms,bs,_u,Id,Iu,eo,qu,ml,vl,yl,qh,$u,sl,Ru,lc,sf,Fc,lf,Nh,cu,$h,zu,uc,Nc,uf,Rs,ag,hf,hc,vd,Pl,ll,Hs,el,dc,tu;mi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},mi.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},mi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},mi.prototype.copy=function(){var a=new mi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},wt=mi.prototype,wt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},wt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},wt.freeze=function(){return this._isFrozen=!0,this},wt.ka=function(){return Object.isFrozen(this)&&Be("cannot thaw constant: "+this),this._isFrozen=!1,this};function Cs(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function gh(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return ms;if(a==="TopLeft")return bs;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return _u;if(a==="TopRight")return Id;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Iu;if(a==="Center")return eo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return qu;if(a==="BottomLeft")return ml;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return vl;if(a==="BottomRight")return yl;if(a==="TopSide")return qh;if(a==="LeftSide")return $u;if(a==="RightSide")return sl;if(a==="BottomSide")return Ru;if(a==="TopBottomSides")return lc;if(a==="LeftRightSides")return sf;if(a==="TopLeftSides")return Fc;if(a==="TopRightSides")return lf;if(a==="BottomLeftSides")return Nh;if(a==="BottomRightSides")return cu;if(a==="NotTopSide")return $h;if(a==="NotLeftSide")return zu;if(a==="NotRightSide")return uc;if(a==="NotBottomSide")return Nc;if(a==="AllSides")return uf;if(a==="Default")return Rs;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},wt=nr.prototype,wt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},wt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},wt.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},wt.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},wt.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},wt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,at=this.m22,st=this.dx,ut=this.dy,ft=y*z+x*rt+st,vt=y*tt+x*at+ut,St=E*z+x*rt+st,Pt=E*tt+x*at+ut;return x=y*z+b*rt+st,y=y*tt+b*at+ut,z=E*z+b*rt+st,E=E*tt+b*at+ut,b=Math.min(ft,St),ft=Math.max(ft,St),St=Math.min(vt,Pt),vt=Math.max(vt,Pt),b=Math.min(b,x),ft=Math.max(ft,x),St=Math.min(St,y),vt=Math.max(vt,y),b=Math.min(b,z),ft=Math.max(ft,z),St=Math.min(St,E),vt=Math.max(vt,E),a.h(b,St,ft-b,vt-St),a},nr.alloc=function(){var a=df.pop();return a===void 0?new nr:a},nr.free=function(a){df.push(a)},nr.prototype.transformRect=nr.prototype.pp,nr.prototype.transformPoint=nr.prototype.Ga,nr.prototype.scale=nr.prototype.scale,nr.prototype.translate=nr.prototype.translate,nr.prototype.rotate=nr.prototype.rotate,nr.prototype.invert=nr.prototype.Vj,nr.prototype.multiplyInverted=nr.prototype.bv,nr.prototype.multiply=nr.prototype.multiply,nr.prototype.reset=nr.prototype.reset,nr.prototype.isIdentity=nr.prototype.ws,nr.prototype.equals=nr.prototype.D,nr.prototype.setTransform=nr.prototype.setTransform,nr.prototype.set=nr.prototype.set;var df=[];nr.className="Transform",nr.xF="54a702f3e53909c447824c6706603faf4c";var Se={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Se.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Se.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5a&&-5e-8=b&&(b=1e-6),aut-st)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,rt,at,st,ut,ft){if(Se.Yb(a,y,tt,rt,ft,x,E)&&Se.Yb(a,y,tt,rt,ft,b,z))return Se.Yb(a,y,tt,rt,ft,st,ut);var vt=(a+x)/2,St=(y+E)/2,Pt=(x+b)/2,At=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(vt+Pt)/2,x=(St+At)/2,Pt=(Pt+b)/2,At=(At+z)/2;var Yt=(E+Pt)/2,zt=(x+At)/2;return Se.cs(a,y,vt,St,E,x,Yt,zt,at,st,ut,ft)||Se.cs(Yt,zt,Pt,At,b,z,tt,rt,at,st,ut,ft)},ax:function(a,y,x,E,b,z,tt,rt,at){var st=(x+b)/2,ut=(E+z)/2;return at.h((((a+x)/2+st)/2+(st+(b+tt)/2)/2)/2,(((y+E)/2+ut)/2+(ut+(z+rt)/2)/2)/2),at},My:function(a,y,x,E,b,z,tt,rt){var at=(x+b)/2,st=(E+z)/2;return Yi(((a+x)/2+at)/2,((y+E)/2+st)/2,(at+(b+tt)/2)/2,(st+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,at,st){if(Se.Yb(a,y,tt,rt,at,x,E)&&Se.Yb(a,y,tt,rt,at,b,z))za(st,a,y,0,0),za(st,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,vt=(x+b)/2,St=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+vt)/2,x=(ft+St)/2,vt=(vt+b)/2,St=(St+z)/2;var Pt=(E+vt)/2,At=(x+St)/2;Se.Dl(a,y,ut,ft,E,x,Pt,At,at,st),Se.Dl(Pt,At,vt,St,b,z,tt,rt,at,st)}return st},Qe:function(a,y,x,E,b,z,tt,rt,at,st){if(Se.Yb(a,y,tt,rt,at,x,E)&&Se.Yb(a,y,tt,rt,at,b,z))st.length===0&&(st.push(a),st.push(y)),st.push(tt),st.push(rt);else{var ut=(a+x)/2,ft=(y+E)/2,vt=(x+b)/2,St=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+vt)/2,x=(ft+St)/2,vt=(vt+b)/2,St=(St+z)/2;var Pt=(E+vt)/2,At=(x+St)/2;Se.Qe(a,y,ut,ft,E,x,Pt,At,at,st),Se.Qe(Pt,At,vt,St,b,z,tt,rt,at,st)}return st},jv:function(a,y,x,E,b,z,tt,rt,at,st){if(Se.Yb(a,y,b,z,st,x,E))return Se.Yb(a,y,b,z,st,rt,at);var ut=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var vt=(ut+x)/2,St=(ft+E)/2;return Se.jv(a,y,ut,ft,vt,St,tt,rt,at,st)||Se.jv(vt,St,x,E,b,z,tt,rt,at,st)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,rt){if(Se.Yb(a,y,b,z,tt,x,E))za(rt,a,y,0,0),za(rt,b,z,0,0);else{var at=(a+x)/2,st=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(at+x)/2,ft=(st+E)/2;Se.iv(a,y,at,st,ut,ft,tt,rt),Se.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(Se.Yb(a,y,b,z,tt,x,E))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(b),rt.push(z);else{var at=(a+x)/2,st=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(at+x)/2,ft=(st+E)/2;Se.ep(a,y,at,st,ut,ft,tt,rt),Se.ep(ut,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,at,st,ut,ft,vt,St){if(Se.Yb(a,y,tt,rt,vt,x,E)&&Se.Yb(a,y,tt,rt,vt,b,z))return!Se.Rl(a,y,tt,rt,at,st,ut,ft)||(vt=(a-tt)*(st-ft)-(y-rt)*(at-ut),vt===0)?!1:(St.h(((a*rt-y*tt)*(at-ut)-(a-tt)*(at*ft-st*ut))/vt,((a*rt-y*tt)*(st-ft)-(y-rt)*(at*ft-st*ut))/vt),!0);var Pt=(a+x)/2,At=(y+E)/2,Yt=(x+b)/2,zt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Pt+Yt)/2,x=(At+zt)/2,Yt=(Yt+b)/2,zt=(zt+z)/2;var te=(E+Yt)/2,ee=(x+zt)/2,oe=1/0,pe=!1,Ee=0,Tn=0;return Se.Eo(a,y,Pt,At,E,x,te,ee,at,st,ut,ft,vt,St)&&(a=(St.x-at)*(St.x-at)+(St.y-st)*(St.y-st),a=ut)return St;if((at>ut?at-ut:ut-at)<(st>ft?st-ft:ft-st)){if(ya)return St}else if(aa)return St;0vt&&St--}else{Pt=(a+x)/2,At=(y+E)/2;var Yt=(x+b)/2,zt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Pt+Yt)/2,x=(At+zt)/2,Yt=(Yt+b)/2,zt=(zt+z)/2;var te=(E+Yt)/2,ee=(x+zt)/2;St+=Se.Fo(a,y,Pt,At,E,x,te,ee,at,st,ut,ft,vt),St+=Se.Fo(te,ee,Yt,zt,b,z,tt,rt,at,st,ut,ft,vt)}return St},qh:function(a,y,x,E,b,z,tt){return Se.$(a,x)?(yy?(tt.h(a,y),!1):(tt.h(a,z),!0)):Se.$(y,E)?(aa?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005y?(at.h(a,y),!1):(at.h(a,x),!0)):(tt=(E-y)/(x-a),Se.$(rt,tt)?(Se.qh(a,y,x,E,b,z,at),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),Se.$(tt,0)?(aa?(at.h(a,y),!1):(at.h(b,y),!0)):Se.qh(a,y,x,E,b,tt*(b-a)+y,at))))},MA:function(a,y,x,E,b){return Se.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,rt,at,st){function ut(Yt,zt){var te=(Yt-a)*(Yt-a)+(zt-y)*(zt-y);te(x>a?x-a:a-x)){if(vt=1-(x-b)*(x-b)/(vt*vt),0>vt)return at;vt=Math.sqrt(vt),E=-st*vt+z,ut(x,st*vt+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(vt*vt)+x*x/(st*st),rt=2*x*(y-x*a)/(st*st)-2*x*z/(st*st)-2*b/(vt*vt),vt=rt*rt-4*E*(2*x*a*z/(st*st)-2*y*z/(st*st)+z*z/(st*st)+b*b/(vt*vt)-1+(y-x*a)*(y-x*a)/(st*st)),0>vt)return at;vt=Math.sqrt(vt),st=(-rt+vt)/(2*E),ut(st,x*st-x*a+y),vt=(-rt-vt)/(2*E),ut(vt,x*vt-x*a+y)}return at},Ff:function(a,y,x,E,b,z,tt,rt,at){var st=1e21,ut=a,ft=y;if(Se.Ve(a,y,a,E,b,z,tt,rt,at)){var vt=(at.x-b)*(at.x-b)+(at.y-z)*(at.y-z);vtst},us:function(a,y,x){return Se.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,rt){var at=a+x,st=y+E;return b===tt?(z=y):z===rt?(b=a):!!(Ps(a,y,x,E,b,z)||Ps(a,y,x,E,tt,rt)||Se.Rl(a,y,at,y,b,z,tt,rt)||Se.Rl(at,y,at,st,b,z,tt,rt)||Se.Rl(at,st,a,st,b,z,tt,rt)||Se.Rl(a,st,a,y,b,z,tt,rt))},Rl:function(a,y,x,E,b,z,tt,rt){return a===x&&y===E&&b===tt&&z===rt?a===b&&y===z:0>=Se.Fl(a,y,x,E,b,z)*Se.Fl(a,y,x,E,tt,rt)&&0>=Se.Fl(b,z,tt,rt,a,y)*Se.Fl(b,z,tt,rt,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var rt=E>b?-1:1;z=[];var at=tt/2,st=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return at=st+rt*Math.min(E,at),rt=a+x*Math.cos(st),st=y+x*Math.sin(st),a+=x*Math.cos(at),y+=x*Math.sin(at),x=(rt+a)/2,at=(st+y)/2,z.push([rt,st,x,at,x,at,a,y]),z;for(;1e-5x,z=0>E;if(ast&&(y=.5*(rt+at),!(y===rt||y===at));++st){var ut=a/(y+b),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0ut)at=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,za?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case wn.u:var y=new Ye(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case wn.F:if(y=new Ye(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case wn.o:y="",x=this.figures.s;for(var E=x.length,b=0;b=oe-1?!0:st[At+1].match(pe)!==null}function E(){return At++,st[At]}function b(Hi){var Ri=parseFloat(E()),qr=parseFloat(E());Yt===Yt.toLowerCase()&&(Ri=ee.x+Ri,qr=ee.y+qr),Hi.h(Ri,qr)}function z(){return b(ee),ee}function tt(){return b(te),te}function rt(){var Hi=zt.toLowerCase();return Hi!=="c"&&Hi!=="s"&&Hi!=="q"&&Hi!=="t"?ee:new Xt(2*ee.x-te.x,2*ee.y-te.y)}y===void 0&&(y=!1);var at=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(at,"$1 $2"),a=a.replace(at,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var st=a.split(" ");for(a=0;a=oe-1);)if(zt=Yt,Yt=E(),Yt!=="")switch(Yt.toUpperCase()){case"X":St=!0,ft=ut=!1;break;case"M":for(Pt=z(),a.mc===null||St===!0?(Kg(a,Pt.x,Pt.y,ut,!ft,vt),St=!1):a.moveTo(Pt.x,Pt.y),at.assign(ee);!x();)Pt=z(),a.lineTo(Pt.x,Pt.y);break;case"L":for(;!x();)Pt=z(),a.lineTo(Pt.x,Pt.y);break;case"H":for(;!x();)ee=new Xt((Yt===Yt.toLowerCase()?ee.x:0)+parseFloat(E()),ee.y),a.lineTo(ee.x,ee.y);break;case"V":for(;!x();)ee=new Xt(ee.x,(Yt===Yt.toLowerCase()?ee.y:0)+parseFloat(E())),a.lineTo(ee.x,ee.y);break;case"C":for(;!x();){Pt=new Xt,b(Pt);var Ee=tt(),Tn=z();Gc(a,Pt.x,Pt.y,Ee.x,Ee.y,Tn.x,Tn.y)}break;case"S":for(;!x();)Pt=rt(),Ee=tt(),Tn=z(),Gc(a,Pt.x,Pt.y,Ee.x,Ee.y,Tn.x,Tn.y);break;case"Q":for(;!x();)Pt=tt(),Ee=z(),Gm(a,Pt.x,Pt.y,Ee.x,Ee.y);break;case"T":for(;!x();)te=Pt=rt(),Ee=z(),Gm(a,Pt.x,Pt.y,Ee.x,Ee.y);break;case"B":for(;!x();){Pt=parseFloat(E()),Ee=parseFloat(E()),Tn=parseFloat(E());var ei=parseFloat(E()),Yn=parseFloat(E()),vn=Yn,rn=!1;x()||(vn=parseFloat(E()),x()||(rn=parseFloat(E())!==0)),Yt===Yt.toLowerCase()&&(Tn+=ee.x,ei+=ee.y),a.arcTo(Pt,Ee,Tn,ei,Yn,vn,rn)}break;case"A":for(;!x();)Pt=Math.abs(parseFloat(E())),Ee=Math.abs(parseFloat(E())),Tn=parseFloat(E()),Yn=ei=!1,rn=vn=0,vn=E(),vn.length===1?(ei=!!parseFloat(vn),Yn=!!parseFloat(E()),vn=parseFloat(E())):vn.length===2?(ei=!!parseFloat(vn[0]),Yn=!!parseFloat(vn[1]),vn=parseFloat(E())):(ei=!!parseFloat(vn[0]),Yn=!!parseFloat(vn[1]),vn=parseFloat(vn.slice(2))),rn=parseFloat(E()),Yt===Yt.toLowerCase()&&(vn=ee.x+vn,rn=ee.y+rn),ee.h(vn,rn),Px(a,Pt,Ee,Tn,ei,Yn,vn,rn);break;case"Z":wx(a),ee.assign(at);break;case"F":for(Pt="",Ee=1;st[At+Ee];)if(st[At+Ee]==="0")vt=!0,Ee++;else if(st[At+Ee].match(/[Uu]/)!==null)Ee++;else if(st[At+Ee].match(pe)===null)Ee++;else{Pt=st[At+Ee];break}Pt.match(/[Mm]/)?ut=!0:0tt&&(tt+=360),Pt.startAngle+=tt),0>a&&(Pt.startAngle=180-Pt.startAngle,Pt.sweepAngle=-Pt.sweepAngle),0>E&&(Pt.startAngle=-Pt.startAngle,Pt.sweepAngle=-Pt.sweepAngle),Pt.radiusX*=Math.sqrt(a*a+x*x),Pt.radiusY!==void 0&&(Pt.radiusY*=Math.sqrt(y*y+E*E));break;case eu:if(tt=Pt.endX,rt=Pt.endY,Pt.endX=tt*a+rt*x+b,Pt.endY=tt*y+rt*E+z,Pt.radiusX===0||Pt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Pt.xAxisRotation+=tt),0>a&&(Pt.xAxisRotation=180-Pt.xAxisRotation,Pt.isClockwiseArc=!Pt.isClockwiseArc),0>E&&(Pt.xAxisRotation=-Pt.xAxisRotation,Pt.isClockwiseArc=!Pt.isClockwiseArc),Pt.radiusX*=Math.sqrt(a*a+x*x),Pt.radiusY*=Math.sqrt(y*y+E*E);break;default:Be("Unknown Segment type: "+Pt.type)}}}}return this._isInvalidBounds=!0,this},wt.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case wn.j:return Se.Yb(x,E,b,z,y,a.x,a.y);case wn.u:var tt=Ye.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),Ye.free(tt),a;case wn.F:tt=Math.min(x,b)-y;var rt=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),rt=a.y-(rt+y),1>=tt*tt/(x*x)+rt*rt/(y*y));case wn.o:return Th(this,a,y,!0,!1);default:return!1}};function Th(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,at,st,ut,ft,vt=a.figures.s,St=vt.length,Pt=0;Pt=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(zrt)return 0}else if(yz)return 0}else if(btt)return 0}else if(stb)return 0;return 0a?a=0:1=z)return E=z-tt,E=ut===0?0:E/ut,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=ut}}return y},wt.wx=function(a){if(0>a?a=0:1=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=st}}return NaN},wt.Qu=function(a,y){if(0>a?a=0:1=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],b=ut[2*a+2],a=ut[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=ut}}return y},wt.xx=function(a){if(this.type===wn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=Xt.alloc();return Se.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Xt.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===wn.u){tt=this.startX,rt=this.startY;var at=this.endX;if(b=this.endY,tt!==at||rt!==b){y=at-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),at),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),at=Math.abs(E-at),rt=Math.abs(a-rt),b=Math.abs(a-b);var st=Math.min(tt,at,rt,b);if(st===rt)return E/z;if(st===at)return(y+a)/z;if(st===b)return(2*y+x-E)/z;if(st===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Xt.alloc(),b=1/0,rt=tt=0,at=y.length;for(var ut=st=0,ft=0;fta?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;ba&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Ja&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===Ja&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Ir.prototype.copy=function(){var a=new Ir;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},wt=Ir.prototype,wt.Xa=function(a){if(!(a instanceof Ir)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case $a:case jo:return Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY);case Ns:return Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY)&&Se.B(this.point1X,a.point1X)&&Se.B(this.point1Y,a.point1Y)&&Se.B(this.point2X,a.point2X)&&Se.B(this.point2Y,a.point2Y);case Gl:return Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY)&&Se.B(this.point1X,a.point1X)&&Se.B(this.point1Y,a.point1Y);case Ja:return Se.B(this.startAngle,a.startAngle)&&Se.B(this.sweepAngle,a.sweepAngle)&&Se.B(this.centerX,a.centerX)&&Se.B(this.centerY,a.centerY)&&Se.B(this.radiusX,a.radiusX)&&Se.B(this.radiusY,a.radiusY);case eu:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Se.B(this.xAxisRotation,a.xAxisRotation)&&Se.B(this.endX,a.endX)&&Se.B(this.endY,a.endY)&&Se.B(this.radiusX,a.radiusX)&&Se.B(this.radiusY,a.radiusY);default:return!1}},wt.qb=function(a){a.classType===Ir&&(this.type=a)},wt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case $a:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case jo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ns:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Gl:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ja:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case eu:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},wt.freeze=function(){return this._isFrozen=!0,this},wt.ka=function(){return this._isFrozen=!1,this},wt.close=function(){return this.isClosed=!0,this};function Nl(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=Se.jx(0,0,x=St?tt=Math.PI:1<=St&&(tt=0),!at&&0tt&&(tt+=2*Math.PI),at=y>z?1:y/z,St=y>z?z/y:1,y=Se.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=nr.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(at,St),wn.Ha(y,z),nr.free(z),a.ae=y,a.ae}_e.Object.defineProperties(Ir.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&xi(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&xi(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&xi(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&xi(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&xi(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&xi(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&xi(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&xi(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&xi(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Ki(a,">= zero",Ir,"radiusX"),this._isFrozen&&xi(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Ki(a,">= zero",Ir,"radiusY"),this._isFrozen&&xi(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&xi(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&xi(this,a),360a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&xi(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&xi(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&xi(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Ir.prototype.equalsApprox=Ir.prototype.Xa;var $a=new Re(Ir,"Move",0),jo=new Re(Ir,"Line",1),Ns=new Re(Ir,"Bezier",2),Gl=new Re(Ir,"QuadraticBezier",3),Ja=new Re(Ir,"Arc",4),eu=new Re(Ir,"SvgArc",4);Ir.className="PathSegment",Ir.Move=$a,Ir.Line=jo,Ir.Bezier=Ns,Ir.QuadraticBezier=Gl,Ir.Arc=Ja,Ir.SvgArc=eu;function Us(){this.H=null,this.xu=new Xt(0,0).freeze(),this.mt=new Xt(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}Us.prototype.copy=function(){var a=new Us;return this.clone(a)},Us.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},Us.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},Us.prototype.So=function(a,y){var x=this.diagram;return x===null||_r(x,a,y),y},Us.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(_r(x,a,y),y.assign(x.Ps(y))),y},_e.Object.defineProperties(Us.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),Us.prototype.getMultiTouchDocumentPoint=Us.prototype.Bz,Us.prototype.getMultiTouchViewPoint=Us.prototype.So,Us.className="InputEvent";function ju(){this.H=null,this.xa="",this.ar=this.Lr=null}ju.prototype.copy=function(){var a=new ju;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},ju.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},_e.Object.defineProperties(ju.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}}),ju.className="DiagramEvent";function ca(){this.Fm=$o,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}ca.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},ca.prototype.copy=function(){var a=new ca;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=mn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=mn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=mn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=mn(y)&&typeof y.J=="function"?y.J():y,a},ca.prototype.qb=function(a){a.classType===ca&&(this.change=a)},ca.prototype.toString=function(){var a="";return a=this.change===Tl?a+"* ":this.change===$o?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===Tl?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=$r(this.object)),this.oldValue!==null&&(a+=" old: "+$r(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+$r(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},ca.prototype.I=function(a){return a?this.oldValue:this.newValue},ca.prototype.Dz=function(a){return a?this.oldParam:this.newParam},ca.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},ca.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},ca.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},ca.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},_e.Object.defineProperties(ca.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===Tl&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),ca.prototype.redo=ca.prototype.redo,ca.prototype.canRedo=ca.prototype.canRedo,ca.prototype.undo=ca.prototype.undo,ca.prototype.canUndo=ca.prototype.canUndo,ca.prototype.getParam=ca.prototype.Dz,ca.prototype.getValue=ca.prototype.I,ca.prototype.clear=ca.prototype.clear;var Tl=new Re(ca,"Transaction",-1),$o=new Re(ca,"Property",0),ha=new Re(ca,"Insert",1),Ga=new Re(ca,"Remove",2);ca.className="ChangedEvent",ca.Transaction=Tl,ca.Property=$o,ca.Insert=ha,ca.Remove=Ga;function vs(){this.o=new xn().freeze(),this.xa="",this.j=!1}vs.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},_e.Object.defineProperties(vs.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}}),vs.prototype.optimize=vs.prototype.ak,vs.prototype.redo=vs.prototype.redo,vs.prototype.canRedo=vs.prototype.canRedo,vs.prototype.undo=vs.prototype.undo,vs.prototype.canUndo=vs.prototype.canUndo,vs.prototype.clear=vs.prototype.clear,vs.className="Transaction";function fa(){this.Pt=new hn,this.Jd=!1,this.u=new xn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new xn().freeze(),this.hl=new xn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}fa.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;Ea.transactionLevel&&Tr("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}wt.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},fa.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Tr("Change not within a transaction: "+x.toString()))}},fa.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},_e.Object.defineProperties(fa.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexb||Math.abs(y.y-a.y)>E},_e.Object.defineProperties(Fr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof ge&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),Fr.prototype.startTransaction=Fr.prototype.Ea,Fr.className="Tool";function ta(){Fr.call(this),this.name="ToolManager",this.hb=new xn,this.ob=new xn,this.Hb=new xn,this.F=this.V=850,this.o=new sn(2,2).ja(),this.Ha=5e3,this.ia=wd,this.u=Wu,this.Mp=this.j=null,this.zj=-1}Pe(ta,Fr),ta.prototype.initializeStandardTools=function(){},ta.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Wr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},ta.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Bh&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Hu){y.bubbles=!0;return}if(this.gestureBehavior===Bh)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;Eb.right&&(x.x-=E.width+5/y.scale),x.xb.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.yx.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=Bn(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,at=null;x.toNode===null&&(rt=Bn(a,x.i(x.pointsCount-1),!0),rt!==null&&(at=rt.part)),b.isValidLink(tt,z,at,rt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=at,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):Jr(b,tt,z,at,rt):Jr(b,null,null,null,null)}}}}va.prototype.doDragOver=function(){};function Gn(a,y){var x=a.diagram;a.dragsLink&&Qn(a,!0),ue(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;pi(a,b,z),z=oi(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Ai!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof zn&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Ai!==null){for(a=Ye.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof zn&&Ti(x,E,a);Ye.free(a)}}}function pi(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Gi||(x=a.mouseDrop,x!==null&&x(y))}function Ti(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof yn},!0,function(b){return b instanceof yn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}va.prototype.doDropOnto=function(){},va.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(ye(this,!1),so(a,this.copiedParts),en(this,this.copiedParts,!1),Cr(a,this.copiedParts)):this.mayMove()?(Te(this),en(this,this.draggedParts,!0)):this.mayDragOut()?(ye(this,!1),en(this,this.copiedParts,!1)):Te(this),Rn(this,a.lastInput.documentPoint))}},va.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(Te(this),ye(this,!0),so(a,this.copiedParts),en(this,this.copiedParts,!1),Cr(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,Te(this),this.mayMove()&&(en(this,this.draggedParts,!0),Rn(this,a.lastInput.documentPoint))),this.Ym=!0,Gn(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&qi(this),a.Ya(),Cr(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},va.prototype.simulatedMouseMove=function(a,y,x){if(Ai===null)return!1;var E=Ai.diagram;x instanceof ge||(x=null);var b=Ui;return x!==b&&(b!==null&&b!==E&&(b.ug(),Ai.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),Ui=x,x!==null&&x!==E&&(me(),b=x.toolManager.findTool("Dragging"),b!==null&&(eh.contains(b)||eh.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0tt&&(tt=st),ut>rt&&(rt=ut))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,rt-b),E=z.x+z.width/2,b=z.y+z.height/2,Ye.free(z),z=a.Fr,tt=new gi,rt=Xt.alloc(),at=y.iterator;at.next();)st=at.value,st instanceof yn&&st.canCopy()&&(ut=x.I(st),ut!==null&&(ut.points=st.points,Yc(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)st=y.value,st.Zc()&&st.canCopy()&&(at=x.I(st),at!==null&&(st=st.location,rt.h(z.x-(E-st.x),z.y-(b-st.y)),at.location=rt,at.Va(),tt.add(at,a.Pd(rt))));Xt.free(rt),a.copiedParts=tt,Gt(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Yc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}va.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},va.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Xt},_e.Object.defineProperties(va.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),va.prototype.getDraggingSource=va.prototype.Az;var Ai=null,Ui=null;va.className="DraggingTool",eh=new xn,Xn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),ta.prototype.doCancel=function(){Ai!==null&&Ai.doCancel(),Fr.prototype.doCancel.call(this)};function Oi(){Fr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new yn,y=new Qi;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Qi,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new zn,y=new Qi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=ro,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new zn,y=new Qi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=ro,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new gi,this.Of=this.gj=this.Pf=null}Pe(Oi,Fr),Oi.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},Oi.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=sn.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,sn.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=eo,z=Xt.alloc(),x.location=y.ga(eo,z),Xt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},Oi.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=ro,y.fromSpot=ms,y.toSpot=ms),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},Oi.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},Oi.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof zn){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Oi.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof zn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof zn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},Oi.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof zn){var at=tt.ga(eo,Xt.alloc()),st=x.x-at.x,ut=x.y-at.y;Xt.free(at),at=st*st+ut*ut,atx){if(this.originalLink!==null&&a===this.originalFromNode&&y===this.originalFromPort)return!0;if(y=y.portId,y===null&&(y=""),a.Mo(y).count>=x)return!1}return!0},Oi.prototype.isValidTo=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.toLinkable!==!0))return!1;var x=y.toMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalToNode&&y===this.originalToPort)return!0;if(y=y.portId,y===null&&(y=""),a.Sd(y).count>=x)return!1}return!0},Oi.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},Oi.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof zn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof zn))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},Oi.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},Oi.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new hn;return E.add(a),vr(this,x,y,E)};function vr(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),vr(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),vr(a,y.labeledLink,x,E))))}Oi.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==kd){if(E===pc){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!Xr(this,a,y,x,!0)}if(E===Rc){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!Xr(this,a,y,x,!0)}if(E===Rh)return a===y?a=!0:(E=new hn,E.add(y),a=dr(this,E,a,y,x)),!a;if(E===Hd)return!Xr(this,a,y,x,!1);if(E===Gd)return a===y?a=!0:(E=new hn,E.add(y),a=Oo(this,E,a,y,x)),!a}return!0};function Xr(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&Xr(a,tt,x,E,b)))return!0}return!1}function dr(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&dr(a,y,tt,E,b)))return!0}return!1}function Oo(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&Oo(a,y,rt,E,b))return!0}}return!1}_e.Object.defineProperties(Oi.prototype,{portGravity:{get:function(){return this.te},set:function(a){0<=a&&(this.te=a)}},isUnconnectedLinkValid:{get:function(){return this.Ha},set:function(a){this.Ha=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.Ci},set:function(a){this.Ci=a}},temporaryFromNode:{get:function(){return this.Bi},set:function(a){(this.Bi=a)&&(this.j=a.port)}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(this.j!==null){var y=this.j.panel;if(y!==null){var x=y.O.indexOf(this.j);y.mb(x),y.Gb(x,a)}}this.j=a}},temporaryToNode:{get:function(){return this.Di},set:function(a){(this.Di=a)&&(this.o=a.port)}},temporaryToPort:{get:function(){return this.o},set:function(a){if(this.o!==null){var y=this.o.panel;if(y!==null){var x=y.O.indexOf(this.o);y.mb(x),y.Gb(x,a)}}this.o=a}},originalLink:{get:function(){return this.Hb},set:function(a){this.Hb=a}},originalFromNode:{get:function(){return this.hb},set:function(a){this.hb=a}},originalFromPort:{get:function(){return this.ob},set:function(a){this.ob=a}},originalToNode:{get:function(){return this.Oc},set:function(a){this.Oc=a}},originalToPort:{get:function(){return this.Pc},set:function(a){this.Pc=a}},isForwards:{get:function(){return this.ia},set:function(a){this.ia=a}},validPortsCache:{get:function(){return this.hy}},targetPort:{get:function(){return this.Pf},set:function(a){this.Pf=a}},linkValidation:{get:function(){return this.gj},set:function(a){this.gj=a}},portTargeted:{get:function(){return this.Of},set:function(a){this.Of=a}}}),Oi.className="LinkingBaseTool";function Hr(){Oi.call(this),this.name="Linking",this.V={},this.F=null,this.K=Ko,this.Xd=null}Pe(Hr,Oi),Hr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.xs()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:this.findLinkablePort()!==null},Hr.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof zn)))return null;var x=this.direction;if(x===Ko||x===Fa){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===Ko||x===Zo)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Hr.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof zn&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof zn&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},Hr.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},Hr.prototype.doStop=function(){Oi.prototype.doStop.call(this),this.startObject=null},Hr.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof zn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=rt,b=tt):(y=rt,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Hr.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof yn)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},Hr.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Hr.prototype.doNoLink=function(){},_e.Object.defineProperties(Hr.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}});var Ko=new Re(Hr,"Either",0),Fa=new Re(Hr,"ForwardsOnly",0),Zo=new Re(Hr,"BackwardsOnly",0);Hr.className="LinkingTool",Hr.Either=Ko,Hr.ForwardsOnly=Fa,Hr.BackwardsOnly=Zo;function Vr(){Oi.call(this),this.name="Relinking";var a=new Qi;a.figure="Diamond",a.desiredSize=Ma,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Qi,a.figure="Diamond",a.desiredSize=Ma,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Ye}Pe(Vr,Oi),Vr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof yn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Vr.prototype.makeAdornment=function(a,y){var x=new Wr;return x.type=dn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Vr.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!a.lastInput.left)return!1;var y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");return y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")),y!==null},Vr.prototype.doActivate=function(){var a=this.diagram;if(this.originalLink===null){var y=this.handle;if(y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"))),y===null)return;var x=y.part;if(!(x instanceof Wr&&x.adornedPart instanceof yn))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0y.firstPickIndex+1&&x=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof dn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Po.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Po.prototype.doActivate=function(){var a=this.diagram;this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null&&(this.adornedObject=this.handle.part.adornedObject,this.adornedObject!==null&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.gv())),this.Tn.set(this.adornedObject.part.location),this.Dw.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt=this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))},Po.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Po.prototype.stopTransaction=function(){var a=this.diagram,y=Fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Po.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Po.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Xt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Xt.free(b)}},Po.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,Xt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Xt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Po.prototype.resize=function(a){var y=this.diagram,x=this.adornedObject;if(x!==null){if(x.desiredSize=a.size,a=x.part,a.Va(),x=x.ga(this.handle.alignment.gv()),a instanceof Gi){var E=new xn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new ot;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Po.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=eo);var tt=this.adornedObject.naturalBounds,rt=tt.x,at=tt.y,st=tt.x+tt.width,ut=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var vt=tt.height;0>=ft&&(ft=1),0>=vt&&(vt=1),ft=vt/ft}return vt=Xt.alloc(),Se.No(a.x,a.y,rt,at,b.width,b.height,vt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(vt.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=Math.max(st-a.x,x.width),a.y=Math.max(vt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=st-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(vt.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=Math.max(st-a.x,x.width),a.height=Math.max(Math.min(vt.y-at,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=st-a.width)):(a.x=Math.max(vt.x,st-E.width),a.x=Math.min(a.x,st-x.width),a.width=st-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=at+.5*(ut-at-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(vt.x-rt,E.width),x.width),a.y=Math.max(vt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(vt.x-rt,E.width),x.width),a.height=Math.max(Math.min(vt.y-at,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(vt.x-rt,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=at+.5*(ut-at-a.height))):0>=y.y?(a.y=Math.max(vt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(vt.y-at,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(st-rt-a.width))),Xt.free(vt),a},Po.prototype.computeReshape=function(){var a=Je;return this.adornedObject instanceof Qi&&(a=Lv(this.adornedObject)),!(a===Kn||this.diagram.lastInput.shift)},Po.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),y=this.minSize;return!isNaN(y.width)&&y.width>a.width&&(a.width=y.width),!isNaN(y.height)&&y.height>a.height&&(a.height=y.height),a},Po.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.widthx?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},Na.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Xt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Na.prototype.stopTransaction=function(){var a=this.diagram,y=Fr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Na.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Na.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Na.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var y=this.computeRotate(a.lastInput.documentPoint);this.rotate(y),a.Ya(),this.transactionResult=this.name,a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},Na.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},Na.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},_e.Object.defineProperties(Na.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Wr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Wr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),Na.className="RotatingTool",Xn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function Ka(){Fr.call(this),this.name="ClickSelecting"}Pe(Ka,Fr),Ka.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},Ka.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},Ka.className="ClickSelectingTool";function ts(){Fr.call(this),this.name="Action",this.pk=null}Pe(ts,Fr),ts.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},ts.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionDown!==null&&y.actionDown(a,y))}else this.canStart()&&this.doActivate()},ts.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionMove!==null&&y.actionMove(a,y))}},ts.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;if(y===null)return;a.targetObject=y,y.actionUp!==null&&y.actionUp(a,y),this.standardMouseClick(function(x){for(;x.panel!==null&&(!x.isActionable||x!==y);)x=x.panel;return x},function(x){return x===y})}this.stopTool()},ts.prototype.doCancel=function(){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionCancel!==null&&y.actionCancel(a,y),this.stopTool())},ts.prototype.doStop=function(){this.pk=null},ts.className="ActionTool";function Zs(){Fr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Xt(0,0)}Pe(Zs,Fr),Zs.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},Zs.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Zs.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof yi)x.Zc()&&(wh(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);mn(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Xt.allocAt(a.x,a.y);this.isGridSnapEnabled&&Il(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Xt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},_e.Object.defineProperties(Zs.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}}),Zs.className="ClickCreatingTool";function ys(){Fr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new yi;a.layerName="Tool",a.selectable=!1;var y=new Qi;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Pe(ys,Fr),ys.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestampb.right&&(x.x-=E.width+5/y.scale),x.xb.bottom&&(x.y-=E.height+5/y.scale),x.ya.lastInput.clickCount)):!1},Qr.prototype.doStart=function(){nh=this,this.textBlock!==null&&this.doActivate()},Qr.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof Xo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Gu;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Ye(this.textBlock.ga(bs),this.textBlock.ga(yl));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},Qr.prototype.doCancel=function(){this.stopTool()},Qr.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Qr.prototype.doMouseDown=function(){this.isActive&&this.acceptText(ul)},Qr.prototype.acceptText=function(a){switch(a){case ul:this.qa===hl?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Gu||this.qa===ed||this.qa===Oh)&&(this.qa=zd,Da(this));break;case il:case gu:case Ts:(gu!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Gu||this.qa===ed||this.qa===Oh)&&(this.qa=zd,Da(this))}};function Da(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=hl,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=ed,a.doError(b,z))}}Qr.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},Qr.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},Qr.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=pu,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},Qr.prototype.doStop=function(){nh=null},Qr.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},Qr.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},_e.Object.defineProperties(Qr.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),Qr.prototype.measureTemporaryTextBlock=Qr.prototype.Lx;var il=new Re(Qr,"LostFocus",0),ul=new Re(Qr,"MouseDown",1),Ts=new Re(Qr,"Tab",2),gu=new Re(Qr,"Enter",3),Cl=new Re(Qr,"SingleClick",0),Eu=new Re(Qr,"SingleClickSelected",1),cs=new Re(Qr,"DoubleClick",2),pu=new Re(Qr,"StateNone",0),Gu=new Re(Qr,"StateActive",1),Oh=new Re(Qr,"StateEditing",2),zd=new Re(Qr,"StateValidating",3),ed=new Re(Qr,"StateInvalid",4),hl=new Re(Qr,"StateValidated",5),nh=null;Qr.className="TextEditingTool",Qr.LostFocus=il,Qr.MouseDown=ul,Qr.Tab=Ts,Qr.Enter=gu,Qr.SingleClick=Cl,Qr.SingleClickSelected=Eu,Qr.DoubleClick=cs,Qr.StateNone=pu,Qr.StateActive=Gu,Qr.StateEditing=Oh,Qr.StateValidating=zd,Qr.StateInvalid=ed,Qr.StateValidated=hl,Xn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function dl(a){Tt||(Ku(),Tt=!0),this.H=$i,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Bt,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new hn,this.ce=new Ce,this.ce.Yd=this,this.Ei=new hn,this.pu=new hn,this.Sr=new hn,this.pr=new hn,a&&Object.assign(this,a)}dl.prototype.Xe=function(a){this.H=a},dl.prototype.canStart=function(){return!0};function Mu(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ur(a.H),a.zb=!0)}function mu(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===Bt?(y.isViewportUnconstrained=!0,y.vc.clear(),y.add(x,"position",x.position.copy().offset(0,-200),x.position),y.add(x,"opacity",0,1)):a.Pk===le&&y.vc.clear(),a.Qw=!!(a.Pk===Kt&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),ze(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==rl&&E!==null&&(delete E.start.scale,delete E.end.scale),We.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&ur(x),Fo(x),a.zb=!1,y.start(),y.bc&&(ph(a),x.Ya(),un(y,0),Ro(x,!0),ku(a),x.R("AnimationStarting",a)))}))}}function ih(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pd(a,y,x,E){a.isTicking||ih(a)||y instanceof yn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}wt=dl.prototype,wt.fv=function(a){return this.ce.fv(a)},wt.Xu=function(a){return this.ce.Xu(a)};function nd(a,y){function x(){if(0z?z+=360:at+=360),z=b(x,z,at-z,E)%360,tt=b(x,tt,st-tt,E),rt=b(x,rt,ut-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function Ku(){function a(x,E,b,z,tt,rt){x.position=new Xt(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new gi;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tta&&Ki(a,">= 1",dl,"duration"),this.Dg=a}},isAnimating:{get:function(){return this.bc}},isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Pk},set:function(a){this.Pk=a}}}),dl.prototype.stopAnimation=dl.prototype.Cc;var yt=null,Tt=!1,Bt=new Re(dl,"Default",1),Kt=new Re(dl,"AnimateLocations",2),le=new Re(dl,"None",3);dl.className="AnimationManager",dl.defineAnimationEffect=function(a,y){Tt||(Ku(),Tt=!0),yt.add(a,y)},dl.Default=Bt,dl.AnimateLocations=Kt,dl.None=le;function Ce(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=qn,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=os,this.vc=new gi,this.Tt=new gi,this.yl=new hn,this.Ut=new hn,this.dw=od,a&&Object.assign(this,a)}Ce.prototype.suspend=function(){this.Xk=!0},Ce.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,kn(this,!0),ph(this.Yd),Ro(this.H),ku(this.Yd),this.H.redraw()};function ze(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,ba.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function un(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof se&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var at=yt,st;for(st in tt)st==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||at.get(st)===null||at.get(st)(z,rt[st],tt[st],a.Lp,y,x,a)}}}wt.stop=function(){return this.bc?(this.Ml(!0),this):this},wt.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,ph(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=yt;E.next();){var tt=E.key,rt=E.value,at=b?rt.end:rt.start,st=b?rt.start:rt.end,ut=rt.Ku,ft;for(ft in st)if(z.get(ft)!==null){var vt=ft;!rt.Hu||vt!=="position:nodeCollapse"&&vt!=="position:placeholder"||(vt="position"),z.get(vt)(tt,at[ft],ut[ft]!==void 0?ut[ft]:rt.Hu?at[ft]:st[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&ut.location!==void 0&&tt instanceof yi&&(tt.location=ut.location),rt.nv&&tt instanceof yi&&tt.Zb(!1)}if(y.As.clear(),Yr(y,!1),y.Ya(),y.N(),Ro(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ro(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),ku(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),ze(this,null),x.Ml(this),y.$b())}},wt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof Gi&&(E=y.placeholder),E!==null?(x=E.ga(bs),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Xt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Gi)for(a=a.memberParts;a.next();)E=a.value,E instanceof zn&&this.Cj(E,y)},wt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Gi&&(x=y.placeholder),x!==null){var E=x.ga(bs);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof Gi)for(a=a.memberParts;a.next();)E=a.value,E instanceof zn&&this.Aj(E,y)}},wt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},_e.Object.defineProperties(Ce.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Ki(a,">= 1",Ce,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function vi(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Ce.className="Animation",Ce.EaseLinear=function(a,y,x,E){return x*a/E+y},Ce.EaseInOutQuad=qn,Ce.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Ce.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Ce.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Ce.EaseOutExpo=vi;function si(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}si.className="AnimationState";function Vn(a,y,x){this.xd=null,this.rf=a,this.so=x||$n,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Mn))}Vn.prototype.copy=function(){var a=new Vn(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function ri(a,y){a=a.uk,a!==null&&(a.duration&&(y.duration=a.duration),a.finished&&(y.finished=a.finished),a.easing&&(y.easing=a.easing))}_e.Object.defineProperties(Vn.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var $n=new Re(Vn,"Default",1),Mn=new Re(Vn,"Immediate",2),Wn=new Re(Vn,"Bundled",3);Vn.className="AnimationTrigger",Vn.Default=$n,Vn.Immediate=Mn,Vn.Bundled=Wn;function Fn(a){po(this),this.H=null,this.Pa=new xn,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}wt=Fn.prototype,wt.clear=function(){for(var a=this.Pa,y=0;y=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var at=rt.value;at instanceof Gi?b++:at instanceof zn?E++:at instanceof yn?z++:at instanceof Wr?tt++:x++}if(rt="",0x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Za(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Za(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),Za(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},wt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb($o,a,this,y,x,E,b)},wt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&kl(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),Li(this,a,y),a},wt.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,kl(y),a};function Li(a,y,x){if(y=Ci(a,y,x),x instanceof Gi&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;ttE&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var rt=y+1,at=NaN;rtE)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(at)&&at=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(at=NaN;++rta||1=a)return y;for(var x=this.Wa.iterator;x.next();)y+=` `+x.value.toString(a-1);return y};function wr(a,y){if(ra){if(y!=null||Be("Diagram setup requires an argument DIV."),a.Ka!==null&&Be("Diagram has already completed setup."),typeof y=="string"?a.Ka=We.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Be("No DIV or DIV id supplied: "+y),a.Ka===null&&Be("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Be("Invalid div id; div already has a Diagram associated with it."),!a.ol&&We.ResizeObserver){var x=ji(function(){a.$b()},250);a.ol=new We.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}We.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=We.go;var b=new xh(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",We.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),cl(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new xh(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,ra){b=Hn("div");var z=Hn("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=br,b.addEventListener("pointerdown",rr),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=ji(function(){a.Yh=null,a.N()},300),a.Ov=ji(function(){Fo(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=co(a,tt,!0);rt.bubbles=!0;var at=0,st=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(at=0Math.abs(tt.deltaY)?-at:-st):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(at=0Math.abs(tt.wheelDeltaY)?-at:-st):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0rt||Math.abs(st.y-tt.screenY)>rt)?a.yq++:a.yq=1,at.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Xi(at,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.oj;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType){if(rt[1]!==null&&rt[1].pointerId===tt.pointerId){rt[1]=tt;return}if(rt[0]===null)rt[0]=tt;else return}else rt[0]=tt;if(rt[0].pointerId===tt.pointerId){rt=Pr(a,tt,!1,!1,!1,rt[1]!==null);var at=We.document.elementFromPoint(tt.clientX,tt.clientY)||null;at!==null&&at.shadowRoot!==void 0&&at.shadowRoot!==null&&(at=at.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var st=a,ut=tt;at&&at.H&&(ut=tt,st=at.H),rt.targetDiagram=st,xo(a,ut,rt),rt.targetObject=null,a.doMouseMove(),Xi(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",at=a.Yt;if(rt&&a.qu)delete at[tt.pointerId],tt.preventDefault();else if(at=a.oj,at[0]===null||at[0].pointerId!==tt.pointerId&&at[0].pointerType===tt.pointerType)at[1]!==null&&at[1].pointerId===tt.pointerId&&(at[1]=null);else{at[0]=null,at=Pr(a,tt,!1,!0,!0,!1);var st=We.document.elementFromPoint(tt.clientX,tt.clientY)||null;st!==null&&st.shadowRoot!==void 0&&st.shadowRoot!==null&&(st=st.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),st!==null&&st.H instanceof ge&&st.H!==a&&xo(st.H,tt,at),st===null&&(st=tt.target),xo(a,tt,at),at.clickCount=a.yq,at.targetDiagram=Qo(tt,st),at.targetObject=null,a.doMouseUp(),Xi(at,tt),rt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var rt=a.Yt;rt[tt.pointerId]&&delete rt[tt.pointerId],rt=a.oj,rt[0]!==null&&rt[0].pointerId===tt.pointerId&&(rt[0]=null),rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var rt=a.oj;rt[0]!==null&&rt[0].pointerId===tt.pointerId?(rt[0]=null,a.wq=!1):rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null)},a.Vp=E.Z["d"+vc[1]+vc[2]+"wI"+Vd.slice(1,5)]["b"+Tx.slice(1,y)](E.Z,mc,y,y),E.Vc(!0),Dr(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}ge.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},ge.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function Dr(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(We,"resize",a.Ov,!1)}function ur(a){30Pt&&(this.position=Yt.h(-(y.scrollWidth-this.Aa)+zt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rtAt&&(this.position=Yt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Xt.free(Yt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,Pt=b.right,z=E.bottom,At=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,vt>=at&&tt>=ft&&ut<=Pt&&(x.style.width="1px"),St>=st&&rt>=E&&z<=At&&(x.style.height="1px"))}},ge.prototype.computeBounds=function(a){return a===void 0&&(a=new Ye),Ur(this),Mr(this,a)};function Mr(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;zx&&(y=x),ya.maxScale&&(y=a.maxScale),y):y===Md?(y=at>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),ya.maxScale&&(y=a.maxScale),y):a.scale}ge.prototype.zoomToFit=function(){var a=this.sj;this.sj=od,this.scale=Co(this,El),a!==od&&(tr(this,!1),Wo(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},wt=ge.prototype,wt.BA=function(a,y){y===void 0&&(y=El);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===El||y===Md)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===Md?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new Xt(a.x,a.y)}},wt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Xt(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},wt.zz=function(a){if(a instanceof se){this.eq=a;var y=Xt.alloc();this.fq=this.op(a.ga(bs,y)),Xt.free(y)}else this.eq=null,this.fq=du};function Wo(a,y,x,E,b,z){var tt=Xt.allocAt(a.pa.x,a.pa.y),rt=tt.x,at=tt.y;if(a.eq!==null){var st=Xt.alloc();st=a.eq.ga(bs,st),rt=st.x-a.fq.x/a.scale,at=st.y-a.fq.y/a.scale,b=ms,Xt.free(st)}(z||a.scrollMode===od)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(at=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,xy.left?rt=y.left:rty.top?at=y.top:aty;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new hn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof Gi&&E.U&65536&&(E.U=E.U^65536)})}}wt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Gi||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Gi&&x.isVisible()&&Vo(this,x);for(a.reset();a.next();)x=a.value,x instanceof yn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Wr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Vo(a,y){for(var x=Ei(),E=Ei(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof Gi?(Uu(z)||Vl(z)||vf(z))&&Vo(a,z):z instanceof yn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;bpe&&(zt=Tn.left,te=Tn.right),Yt.height>Ee&&(ee=Tn.top,oe=Tn.bottom)):(zt=Tn.left,te=Tn.right,ee=Tn.top,oe=Tn.bottom);var ei=Yt.width+zt+te,Yn=Yt.height+ee+oe;Tn=a.scale;var vn=ei>at/Tn,rn=Yn>st/Tn;if(!(z||a.gf||a.Be||vn||rn))return!0;zt=Yt.x-zt,at=ut.x,te=Yt.right+te,st=ut.right+tt,ee=Yt.y-ee;var Hi=ut.y;Yt=Yt.bottom+oe,ut=ut.bottom+rt;var Ri="1px";if(oe="1px",a.scrollMode===od&&(vn||rn)&&(vn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(vn=1,zt+1st+1&&(vn=Math.max((te-st)*Tn+a.Aa,vn)),pe+tt+1ut+1&&(vn=Math.max((Yt-ut)*Tn+a.ya,vn)),Ee+rt+1st+1&&(tt=Math.max((te-st)*Tn+a.Aa,tt)),pe+1ut+1&&(rt=Math.max((Yt-ut)*Tn+tt,rt)),Ee+1st+1&&(y=a.position.x*Tn)),a.tn)switch(a.bu){case"negative":y=-(Pt.scrollWidth-y-Pt.clientWidth);break;case"reverse":y=Pt.scrollWidth-y-Pt.clientWidth}return Pt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Ee+1ut+1&&(Pt.scrollTop=a.position.y*Tn)),at=a.Aa,st=a.ya,Pt.style.width=at+(a.gf?a.Db:0)+"px",Pt.style.height=st+(a.Be?a.Db:0)+"px",x!==at||E!==st||a.animationManager.zb?(x=Ye.allocAt(b,ft,vt,St),a.onViewportBoundsChanged(x,a.viewportBounds,Tn,z),Ye.free(x),!1):!0}wt=ge.prototype,wt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Be("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&Be('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(ha,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},wt.oi=function(a){this.partManager.oi(a);var y=this;Yf(a,function(x){Rl(y,x)}),(a instanceof Wr||a instanceof Gi&&a.placeholder!==null)&&a.v(),a.data!==null&&Yf(a,function(x){sy(y.partManager,x)}),Vl(a)!==!0&&vf(a)!==!0||this.De.add(a),RS(a,!0,this),jS(a)?(a.actualBounds.w()&&this.N(Xf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Xf(a,a.actualBounds)),this.$b()},wt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Yf(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),jS(a)?(a.actualBounds.w()&&this.N(Xf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Xf(a,a.actualBounds)),this.$b()},wt.remove=function(a){ia(this,a,!0)};function ia(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Ga,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}wt.Is=function(a,y){if(y===void 0&&(y=!1),Ni(a))for(var x=a.length,E=0;EE&&this.Ya(),this},wt.Cy=function(a,y){Er(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Ga,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;zE&&this.Ya(),this},wt.kA=function(a){if(a.diagram!==this&&Be("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Ga,"layers",this,a,null,x,null),this.N(),this.Ya()}}},wt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},wt.Yw=function(a){return this.pf===null&&(this.pf=new xn),this.pf.add(a),this.model.Pe(a),this},wt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},wt.Pe=function(a){return this.zg===null&&(this.zg=new xn),this.zg.add(a),this},wt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},wt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Tl&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;Eft.Pa.indexOf(St)&&ft.oi(vt,St,Pt):(St.isSelected=!1,St.isHighlighted=!1,St.Wb(),ft.pc(Pt?vt:-1,St,Pt)))}else ft instanceof ge?typeof vt=="number"&&St instanceof Fn&&(y?(St.Xe(this),this.Wa.Gb(vt,St)):this.Wa.mb(vt)):Be("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Tl&&Be("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},ge.prototype.Ea=function(a){return this.undoManager.Ea(a)},ge.prototype.eb=function(a){return this.undoManager.eb(a)},ge.prototype.Kf=function(){return this.undoManager.Kf()},ge.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},ge.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},ge.prototype.rp=function(){this.partManager.rp()};function Rr(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Gs(a),a.N(),a.Ee=!0,E.zb&&(ih(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Gs(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,at=a.zoomPoint.y,st=a.contentAlignment;isNaN(rt)&&(st.$c()?st.Hf($u)?rt=0:st.Hf(sl)&&(rt=z-1):rt=st.sb()?st.x*(z-1):z/2),isNaN(at)&&(st.$c()?st.Hf(qh)?at=0:st.Hf(Ru)&&(at=tt-1):at=st.sb()?st.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),xa.maxScale&&(x=a.maxScale),z=Xt.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+at/y-at/x),a.position=z,Xt.free(z),a.Ca=x,Gs(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),tr(a,!1),E.zb&&(ih(E)||E.ce.add(E.H,"scale",y,a.Ca))}}ge.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==rl||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof ta&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),zf(b,this)),this.vb||this.invalidateViewport(a,y),Ua(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function Ua(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=sn.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,at=0;atut||(pv(st.figure)?z=z*ut/Se.vx(z,ut):b=b*ut/Se.vx(b,ut))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=Ye.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Ye.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Ye.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Xt.alloc(),Se.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),sn.free(E),x.part.location=y,Xt.free(y)}}ge.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||Mu(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)fl(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Ur(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||mu(z),a.aa=x}}}function fl(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)fl(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),Vo(a,y),b.isValidLayout=!0):a.xh=!0)}}wt.yz=function(){for(var a=new xn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function vh(a){function y(b){var z=b.toLowerCase(),tt=new xn;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new gi,E=new gi;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function Cd(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Ld(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Be("Unknown DiagramEvent name: "+y)}wt.Bj=function(a,y){return a=Ld(this,a),a!==null&&a.add(y),this},wt.am=function(a,y){a=Ld(this,a),a!==null&&a.remove(y)},wt.R=function(a,y,x){var E=Ld(this,a),b=new ju;if(b.diagram=this,a=Cd(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=Ye.allocAt(0,0,E.width*b,E.height*b);var z=Xt.allocAt(0,0);if(a.x>=E.x&&a.xE.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.yE.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(os)||(y=new Xt(y.x+z.x/b,y.y+z.y/b)),Ye.free(E),Xt.free(z),y},wt=ge.prototype,wt.Cs=function(){return null},wt.av=function(){return null},wt.bs=function(a,y){this.pj.add(a,y)},wt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Gi&&(y.$p=null)})};function gc(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-st>at?y(x,b,rt):We.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var rt=a,at=x.callbackTimeout||300,st=+new Date;return We.requestAnimationFrame(function(){E()}),null}wt.Wz=function(a){return ra?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},wt.Jx=function(a){return a===void 0&&(a={}),gc(this,this.Xz,a)},wt.Xz=function(a,y,x){var E=gf(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case Vd+"data":b=E.getImageData(0,0,x.width,x.height);break;case Vd:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&Be('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function gf(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Be("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new sn(1/0,1/0):new sn(2e3,2e3));var rt=y.position||null,at=y.parts||null,st=y.padding===void 0?1:y.padding,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var vt=y.document||document,St=y.elementFinished||null,Pt=y.showTemporary;Pt===void 0&&(Pt=!ft),y=y.showGrid,y===void 0&&(y=Pt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof st=="number"?st=new _i(st):st instanceof _i||Be("MakeImage padding must be a Margin or a number."),st.left=Math.max(st.left,0),st.right=Math.max(st.right,0),st.top=Math.max(st.top,0),st.bottom=Math.max(st.bottom,0),a.ib.Vc(!0),ft=new xh(null,vt,void 0,!0);var At=ft.context;if(!(b||z||at||rt))return ft.width=a.Aa+Math.ceil(st.left+st.right),ft.height=a.ya+Math.ceil(st.top+st.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=vt,E.hs=St,es(a,E.context,st,new sn(ft.width,ft.height),a.Ca,a.pa,at,ut,Pt,y),E.context):(a.Xm=!1,es(a,At,st,new sn(ft.width,ft.height),a.Ca,a.pa,at,ut,Pt,y),a.Xm=!0,ft.context);var Yt=a.Pp,zt=a.documentBounds.copy();if(zt.Fv(a.yb),Pt)for(var te=a.Wa.s,ee=te.length,oe=0;oeYt?(z=Yt,b=zt.width,zt=zt.height):(b=tt.width,zt=tt.height)):(b=zt.width*z,zt=zt.height*z):(z=Yt,b=zt.width,zt=zt.height),st!==null?(b+=rt,zt+=ee):st=new _i(0),tt!==null&&(Yt=tt.width,tt=tt.height,isNaN(Yt)&&(Yt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Yt)&&(b=Math.min(b,Yt)),isFinite(tt)&&(zt=Math.min(zt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(zt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=vt,E.hs=St,es(a,E.context,st,new sn(Math.ceil(b),Math.ceil(zt)),z,te,at,ut,Pt,y),E.context):(a.Xm=!1,es(a,At,st,new sn(Math.ceil(b),Math.ceil(zt)),z,te,at,ut,Pt,y),a.Xm=!0,ft.context)}_e.Object.defineProperties(ge.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof pt||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new bd(this,We.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new bd(this,We.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(We,"resize",this.Ov,!1),this.removeEventListener(We,"wheel",this.$j,!0),$i===this&&($i=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),wr(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1a&&Ki(a,">= 0",ge,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Ki(a,">= 0",ge,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",ge,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||Es(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Be("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=jr(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Mu(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=Ms(this.cc.type);for(var b=0;bthis.scale&&(this.scale=a)):Ki(a,"> 0",ge,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0 0",ge,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),tr(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new _i(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&Be("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)kp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==ad&&a!==ns&&a!==zc&&Be("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new sn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new _i(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),_e.Object.defineProperties(ge,{licenseKey:{get:function(){return pf.jc()},set:function(a){pf.add(a.replace(/\s/g,""))}},version:{get:function(){return Kd}}}),ge.prototype.makeImageData=ge.prototype.Jx,ge.prototype.makeImage=ge.prototype.Wz,ge.prototype.cacheGroupExternalLinks=ge.prototype.Fu,ge.prototype.addRenderer=ge.prototype.bs,ge.prototype.makeSVG=ge.prototype.av,ge.prototype.makeSvg=ge.prototype.Cs,ge.prototype.stopAutoScroll=ge.prototype.ug,ge.prototype.doAutoScroll=ge.prototype.gs,ge.prototype.isUnoccupied=ge.prototype.Yj,ge.prototype.raiseDiagramEvent=ge.prototype.R,ge.prototype.removeDiagramListener=ge.prototype.am,ge.prototype.addDiagramListener=ge.prototype.Bj,ge.prototype.findTreeRoots=ge.prototype.yz,ge.prototype.layoutDiagram=ge.prototype.Uz,ge.prototype.findTopLevelGroups=ge.prototype.qz,ge.prototype.findTopLevelNodesAndLinks=ge.prototype.rz,ge.prototype.ensureBounds=ge.prototype.Va,ge.prototype.findLinksByExample=ge.prototype.ls,ge.prototype.findNodesByExample=ge.prototype.ms,ge.prototype.findLinkForData=ge.prototype.Kc,ge.prototype.findNodeForData=ge.prototype.ii,ge.prototype.findPartForData=ge.prototype.Lc,ge.prototype.findLinkForKey=ge.prototype.findLinkForKey,ge.prototype.findNodeForKey=ge.prototype.Vb,ge.prototype.findPartForKey=ge.prototype.findPartForKey,ge.prototype.rebuildParts=ge.prototype.Wd,ge.prototype.transformViewToDoc=ge.prototype.Ps,ge.prototype.transformRectDocToView=ge.prototype.zA,ge.prototype.transformDocToView=ge.prototype.op,ge.prototype.centerRect=ge.prototype.es,ge.prototype.scrollToRect=ge.prototype.tv,ge.prototype.scroll=ge.prototype.scroll,ge.prototype.highlightCollection=ge.prototype.Jz,ge.prototype.highlight=ge.prototype.Iz,ge.prototype.selectCollection=ge.prototype.rA,ge.prototype.select=ge.prototype.select,ge.prototype.updateAllRelationshipsFromData=ge.prototype.rp,ge.prototype.updateAllTargetBindings=ge.prototype.updateAllTargetBindings,ge.prototype.commit=ge.prototype.commit,ge.prototype.rollbackTransaction=ge.prototype.Kf,ge.prototype.commitTransaction=ge.prototype.eb,ge.prototype.startTransaction=ge.prototype.Ea,ge.prototype.raiseChanged=ge.prototype.g,ge.prototype.raiseChangedEvent=ge.prototype.cb,ge.prototype.removeChangedListener=ge.prototype.ik,ge.prototype.addChangedListener=ge.prototype.Pe,ge.prototype.removeModelChangedListener=ge.prototype.mA,ge.prototype.addModelChangedListener=ge.prototype.Yw,ge.prototype.findLayer=ge.prototype.Qj,ge.prototype.removeLayer=ge.prototype.kA,ge.prototype.addLayerAfter=ge.prototype.Cy,ge.prototype.addLayerBefore=ge.prototype.Ww,ge.prototype.addLayer=ge.prototype.Al,ge.prototype.moveParts=ge.prototype.moveParts,ge.prototype.copyParts=ge.prototype.Kj,ge.prototype.removeParts=ge.prototype.Is,ge.prototype.remove=ge.prototype.remove,ge.prototype.add=ge.prototype.add,ge.prototype.clearDelayedGeometries=ge.prototype.bx,ge.prototype.setProperties=ge.prototype.nm,ge.prototype.attach=ge.prototype.Du,ge.prototype.set=ge.prototype.set,ge.prototype.resetInputOptions=ge.prototype.Sx,ge.prototype.setInputOption=ge.prototype.sA,ge.prototype.getInputOption=ge.prototype.Ql,ge.prototype.resetRenderingHints=ge.prototype.Tx,ge.prototype.setRenderingHint=ge.prototype.Xx,ge.prototype.getRenderingHint=ge.prototype.Gf,ge.prototype.maybeUpdate=ge.prototype.bd,ge.prototype.requestUpdate=ge.prototype.$b,ge.prototype.delayInitialization=ge.prototype.Xy,ge.prototype.isUpdateRequested=ge.prototype.Pz,ge.prototype.invalidateDocumentBounds=ge.prototype.Ya,ge.prototype.findObjectsNear=ge.prototype.og,ge.prototype.findPartsNear=ge.prototype.mz,ge.prototype.findObjectsIn=ge.prototype.Cf,ge.prototype.findPartsIn=ge.prototype.ux,ge.prototype.findObjectsAt=ge.prototype.ji,ge.prototype.findPartsAt=ge.prototype.lz,ge.prototype.findObjectAt=ge.prototype.ic,ge.prototype.findPartAt=ge.prototype.Ol,ge.prototype.focusObject=ge.prototype.zz,ge.prototype.alignDocument=ge.prototype.Jy,ge.prototype.zoomToRect=ge.prototype.BA,ge.prototype.zoomToFit=ge.prototype.zoomToFit,ge.prototype.diagramScroll=ge.prototype.kx,ge.prototype.focus=ge.prototype.focus;var yh=new gi,Ic=null,ra=We.document!==void 0,Wd=null,rd="",rl=new Re(ge,"None",0),El=new Re(ge,"Uniform",1),Md=new Re(ge,"UniformToFill",2),kd=new Re(ge,"CycleAll",10),Rh=new Re(ge,"CycleNotDirected",11),Hd=new Re(ge,"CycleNotDirectedFast",12),Gd=new Re(ge,"CycleNotUndirected",13),pc=new Re(ge,"CycleDestinationTree",14),Rc=new Re(ge,"CycleSourceTree",15),od=new Re(ge,"DocumentScroll",1),Ad=new Re(ge,"InfiniteScroll",2),ad=new Re(ge,"TreeParentCollapsed",21),ns=new Re(ge,"AllParentsCollapsed",22),zc=new Re(ge,"AnyParentsCollapsed",23),pf=new xn,Kd="2.3.10",Vd="image",mc=null,Wf=!1;function Js(){if(ra){var a=We.document.createElement("canvas"),y=a.getContext("2d"),x=ir("7ca11abfd022028846");y[x]=ir("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Ln.Dx+"4ae6247590da4bb21c324ba3a84e385776",nr.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Se.za],b=1;5>b;b++)y[ir("7ca11abfd7330390")](ir(E[b-1]),10,15*b);for(y[x]=ir("39f046ebb36e4b"),x=1;5>x;x++)y[ir("7ca11abfd7330390")](ir(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(nr.prototype.Cd=nr.prototype.Eu),mc=a}}ge.className="Diagram",ge.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=We.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof ge?y.H:null},ge.inherit=function(a,y){function x(){}if(Object.getPrototypeOf(a).prototype)throw Error(`Used go.Diagram.inherit defining already defined class `+a);x.prototype=y.prototype,a.prototype=new x,a.prototype.constructor=a},ge.useDOM=function(a){ra=a?We.document!==void 0:!1},ge.isUsingDOM=function(){return ra},ge.None=rl,ge.Uniform=El,ge.UniformToFill=Md,ge.CycleAll=kd,ge.CycleNotDirected=Rh,ge.CycleNotDirectedFast=Hd,ge.CycleNotUndirected=Gd,ge.CycleDestinationTree=pc,ge.CycleSourceTree=Rc,ge.DocumentScroll=od,ge.InfiniteScroll=Ad,ge.TreeParentCollapsed=ad,ge.AllParentsCollapsed=ns,ge.AnyParentsCollapsed=zc;function Hf(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Yd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=We[ir("76a715b2f73f148a")][ir("72ba13b5")]||"";if(a.Rc=!0,ra){var E=ge[ir("76a115b6ed251eaf4692")];if(E)for(var b=pf.iterator;b.next()&&(E=b.value,E=ir(E).split(ir("39e9")),!(6>E.length));){var z=ir(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=ir(Ln[ir("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=We[ir("74a900bae4370f8b51")][ir("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[ir("73a612b6fb191d")](ir("3aad1ab6e022098b4dc4")),z=ir(E[2]),-1tt&&z!==ir("7da71ca0ad381e90")&&(tt=y[ir("73a612b6fb191d")](ir("76a715b2ef3e149757"))),0>tt&&(tt=y[ir("73a612b6fb191d")](ir("76a715b2ef3e149757"))),0>tt&&(tt=y[ir("73a612b6fb191d")](ir("2bfa41fdb3784bca12"))),0>tt&&(tt=x[ir("73a612b6fb191d")](ir("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&ttrt),!a.Rc)))break;if(z[0]==="#"){tt=We.document.createElement("div");for(var at=E[0].replace(/[A-Za-z]/g,"");4>at.length;)at+="9";if(rt=at,at=at.substr(at.length-4),E="",E+=["gsh","gsf"][parseInt(at.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(at.substr(0,1),10)%4],tt[ir("79a417a0f0181a8946")]=E,We.document[ir("78a712aa")]){We.document[ir("78a712aa")][ir("7bb806b6ed32388c4a875b")](tt),at=We.getComputedStyle(tt).getPropertyValue(ir("78a704b7e62456904c9b12701b6532a8"));var st=We.getComputedStyle(tt).getPropertyValue(ir("75b817b0ea2202"));if(We.document[ir("78a712aa")][ir("68ad1bbcf533388c4a875b")](tt),at){if(tt=We[ir("77a902b0eb1b1e804a8a")],st==="0."+parseInt(rt,10)%100||at.indexOf(parseInt(z[1]+z[2],16))!==-1&&at.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(ir("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;zE.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Ot(E)},x.autoScale=El,x.vb=!1,y&&Object.assign(x,y),x}Pe(pt,ge),pt.prototype.computePixelRatio=function(){return 1},pt.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(zo(this),this.ql===null){var x=new xh(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Et(this)}finally{this.ta=a,this.ib=y}}}ge.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&Be("No div specified"),this.ta===null&&Be("No canvas specified"),!(this.ta instanceof bd)&&(Ov(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){zo(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?Et(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;Ea&&(a=0),this.ia!==a&&(this.ia=a)}}}),pt.className="Overview";function Ut(){va.call(this),this.j=null}Pe(Ut,va),Ut.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestampy.maxScale||(y.scale=a))},Vt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==rl?!1:(a=y.scale*a,ay.maxScale?!1:y.allowZoom)},Vt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===rl&&(a=y.scale*a,ay.maxScale||(y.scale=a))},Vt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==rl?!1:(a=y.scale*a,ay.maxScale?!1:y.allowZoom)},Vt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;ay.maxScale||(y.scale=a)},Vt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return ay.maxScale?!1:y.allowZoom},Vt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Mu(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Bo):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),mu(y)},Vt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Vt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(at){this.cg=null}a===null&&(0a&&(a+=360)),a},wt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},wt.qs=function(a,y){return y===void 0&&(y=new Xt),y.assign(a),this.oe.Cd(y),y},wt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},wt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,at=-z.m12*tt,st=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),vt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Se.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*st+ft,a=a*at+y*ut+vt,y=x*rt+E*st+ft,x=x*at+E*ut+vt,b.h(0,0),E=this.naturalBounds,x=Se.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},se.prototype.measure=function(a,y,x,E){if(Uu(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var rt=this instanceof dn;switch(ru(this,!0)){case Je:tt=b=0,rt&&(y=a=1/0);break;case Xe:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case ui:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case Fi:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var at=this.minSize;b>rt.width&&at.widthrt.height&&at.heighta.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||Be("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Ud(this,!1),Ye.free(z)},wt=se.prototype,wt.eh=function(){};function zl(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=ru(a,!0),x===E&&z===b&&(y=Je),y){case Je:(x>E||z>b)&&(Ss(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Xe:Ss(a,!0),a.measure(E,b,0,0);break;case ui:Ss(a,!0),a.measure(E,z,0,0);break;case Fi:Ss(a,!0),a.measure(x,b,0,0)}}}wt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||zv(x,!0),this.N(),as(a,y)||(x.oh(),this.Pn(x)))},wt.Pn=function(a){this.portId!==null&&(zv(a,!0),a instanceof zn&&KS(a,this))},wt.gc=function(a,y){if(!rh(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof dn&&Hc(this),tt=this.Ib;if(z){var rt=this.Ib,at=this.dc,st=this.areaBackground,ut=this.Ma;st===null&&ut===null||a.yc(),st!==null&&(Za(this,a,st,!0,!0,at,rt),st instanceof wo&&st.type===sh?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(st)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),ut!==null&&(Za(this,a,ut,!0,!1,at,rt),ut instanceof wo&&ut.type===sh?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(ut)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,rt=this.panel,this.l&4096&&Qs(this),st=this.part,at=!1;var ft=0;st&&y.Gf("drawShadows")&&(at=st.isShadowed)&&(ut=st.shadowOffset,ft=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var vt;if(!(vt=y.$i||!ut)){var St=this.naturalBounds;vt=this.wh;var Pt=vt.m11,At=vt.m21,Yt=vt.dx,zt=vt.m12,te=vt.m22,ee=vt.dy,oe,pe=oe=0;vt=oe*Pt+pe*At+Yt;var Ee=oe*zt+pe*te+ee;oe=St.width+ft,pe=0;var Tn=oe*Pt+pe*At+Yt;oe=oe*zt+pe*te+ee,pe=Math.min(vt,Tn);var ei=Math.min(Ee,oe),Yn=Math.max(vt+0,Tn)-pe,vn=Math.max(Ee+0,oe)-ei;vt=pe,Ee=ei,oe=St.width+ft,pe=St.height+ft,Tn=oe*Pt+pe*At+Yt,oe=oe*zt+pe*te+ee,pe=Math.min(vt,Tn),ei=Math.min(Ee,oe),Yn=Math.max(vt+Yn,Tn)-pe,vn=Math.max(Ee+vn,oe)-ei,vt=pe,Ee=ei,oe=0,pe=St.height+ft,Tn=oe*Pt+pe*At+Yt,oe=oe*zt+pe*te+ee,pe=Math.min(vt,Tn),ei=Math.min(Ee,oe),Yn=Math.max(vt+Yn,Tn)-pe,vn=Math.max(Ee+vn,oe)-ei,vt=pe,Ee=ei,ft=y.viewportBounds,St=ft.x,Pt=ft.y,vt=!(vt>ft.width+St||St>Yn+vt||Ee>ft.height+Pt||Pt>vn+Ee)}if(vt){if(vt=(this.l&256)!==0,a.clipInsteadOfFill&&(vt=!1),this instanceof Xo&&(a.font=this.font),vt){if(Ee=rt.se()?rt.naturalBounds:rt.actualBounds,Yn=Math.max(tt.x,Ee.x),vn=Math.max(tt.y,Ee.y),ft=Math.min(tt.right,Ee.right)-Yn,St=Math.min(tt.bottom,Ee.bottom)-vn,Pt=this.tb,Pt!==null&&(Yn=Pt.x,vn=Pt.y,ft=Pt.width,St=Pt.height),Yn>tt.width+tt.x||tt.x>Ee.width+Ee.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Yn,vn,ft,St),a.clip()}if(ut){if(!st.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}at&&(Ee=st.shadowOffset,a.Ev(Ee.x*y.scale*this.scale*y.Mb,Ee.y*y.scale*this.scale*y.Mb,st.shadowBlur),yc(a),a.shadowColor=st.shadowColor)}at&&this.shadowVisible===!0?yc(a):at&&this.shadowVisible===!1&&Zd(a),st=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Yu(this,a,st,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),at&&Ks(this,rt)&&this.shadowVisible===null&&Zd(a),this.Ma!==null&&(a.yc(),vu(this,a,st,tt)),at&&(this.Ma!==null||this.areaBackground!==null||Ks(this,rt))?(jh(this,!0),this.shadowVisible===null&&Zd(a)):jh(this,!1),this.hh(a,y),at&&this.l&512&&yc(a),ut&&at&&Zd(a),vt&&(a.restore(),a.Vc(this instanceof dn)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function Ks(a,y){return y===null?!1:(Hc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===dn.Auto||y.type===dn.Spot)&&y.Pb()!==a)}wt.Dv=function(){};function Yu(a,y,x,E){Za(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof wo&&a.areaBackground.type===sh?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function vu(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,at=x.height+b;Za(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof wo&&a.Ma.type===sh?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,at),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,at)}function Ml(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;ttb)&&Be("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&Be("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new er;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);ss(a,b)}else ss(a,y);else Be('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function jc(a,y){Fg.add(a,y)}function fm(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}_e.Object.defineProperties(se.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new lg),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new lg),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new lg),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(or(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",y,a))}},enabledChanged:{get:function(){return this.A!==null?this.A.Hb:null},set:function(a){var y=this.enabledChanged;y!==a&&(or(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Zl},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new mf),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Zl&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new mf),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1a||1=a&&Be("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Zy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Qi&&this.qc(),this.g("desiredSize",E,a),ol(this)&&(a=this.part,a!==null&&(ua(this,a,"width"),ua(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new sn(a,this.jd.height).freeze(),this.v(),this instanceof Qi&&this.qc(),this.g("desiredSize",y,a),ol(this)&&(a=this.part,a!==null&&ua(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new sn(this.jd.width,a).freeze(),this.v(),this instanceof Qi&&this.qc(),this.g("desiredSize",y,a),ol(this)&&(a=this.part,a!==null&&ua(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:pr},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),or(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Ws},set:function(a){var y=this.maxSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=1/0),isNaN(a.height)&&(a.height=1/0),a.freeze(),or(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new _i(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&Qs(this),this.Ab}},oe:{get:function(){return this.l&4096&&Qs(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(or(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Je},set:function(a){this.reshapingBehavior!==a&&(or(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&Be("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Kl(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Ki(a,">= 0",se,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Ki(a,">= 1",se,"columnSpan"),or(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Ki(a,">= 0",se,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Ki(a,">= 1",se,"rowSpan"),or(this),this.A.Bi=a,this.v(),this.g("rowSpan",y,a))}},spanAllocation:{get:function(){return this.A!==null?this.A.Di:null},set:function(a){var y=this.spanAllocation;y!==a&&(or(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof zn||Be("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Gv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,US(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ms},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Gf(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Ki(a,">= 0",se,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Gf(this))}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:0},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",y,a),Gf(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&Ki(a,">= 0",se,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ms},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Gf(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Ki(a,">= 0",se,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Gf(this))}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:0},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength",y,a),Gf(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&Ki(a,">= 0",se,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",y,a))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(a){var y=this.cursor;y!==a&&(or(this),this.A.j=a,this.g("cursor",y,a))}},click:{get:function(){return this.A!==null?this.A.zh:null},set:function(a){var y=this.click;y!==a&&(or(this),this.A.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.A!==null?this.A.Fh:null},set:function(a){var y=this.doubleClick;y!==a&&(or(this),this.A.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.A!==null?this.A.Bh:null},set:function(a){var y=this.contextClick;y!==a&&(or(this),this.A.Bh=a,this.g("contextClick",y,a))}},mouseEnter:{get:function(){return this.A!==null?this.A.Mh:null},set:function(a){var y=this.mouseEnter;y!==a&&(or(this),this.A.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.A!==null?this.A.Ph:null},set:function(a){var y=this.mouseLeave;y!==a&&(or(this),this.A.Ph=a,this.g("mouseLeave",y,a))}},mouseOver:{get:function(){return this.A!==null?this.A.Qh:null},set:function(a){var y=this.mouseOver;y!==a&&(or(this),this.A.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.A!==null?this.A.Oh:null},set:function(a){var y=this.mouseHover;y!==a&&(or(this),this.A.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.A!==null?this.A.Nh:null},set:function(a){var y=this.mouseHold;y!==a&&(or(this),this.A.Nh=a,this.g("mouseHold",y,a))}},mouseDragEnter:{get:function(){return this.A!==null?this.A.Of:null},set:function(a){var y=this.mouseDragEnter;y!==a&&(or(this),this.A.Of=a,this.g("mouseDragEnter",y,a))}},mouseDragLeave:{get:function(){return this.A!==null?this.A.Xd:null},set:function(a){var y=this.mouseDragLeave;y!==a&&(or(this),this.A.Xd=a,this.g("mouseDragLeave",y,a))}},mouseDrop:{get:function(){return this.A!==null?this.A.Lh:null},set:function(a){var y=this.mouseDrop;y!==a&&(or(this),this.A.Lh=a,this.g("mouseDrop",y,a))}},actionDown:{get:function(){return this.A!==null?this.A.V:null},set:function(a){var y=this.actionDown;y!==a&&(or(this),this.A.V=a,this.g("actionDown",y,a))}},actionMove:{get:function(){return this.A!==null?this.A.ia:null},set:function(a){var y=this.actionMove;y!==a&&(or(this),this.A.ia=a,this.g("actionMove",y,a))}},actionUp:{get:function(){return this.A!==null?this.A.Ha:null},set:function(a){var y=this.actionUp;y!==a&&(or(this),this.A.Ha=a,this.g("actionUp",y,a))}},actionCancel:{get:function(){return this.A!==null?this.A.F:null},set:function(a){var y=this.actionCancel;y!==a&&(or(this),this.A.F=a,this.g("actionCancel",y,a))}},toolTip:{get:function(){return this.A!==null?this.A.$h:null},set:function(a){var y=this.toolTip;y!==a&&(or(this),this.A.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.A!==null?this.A.Ch:null},set:function(a){var y=this.contextMenu;y!==a&&(or(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),se.prototype.trigger=se.prototype.Jv,se.prototype.findBindingPanel=se.prototype.ih,se.prototype.findTemplateBinder=se.prototype.pz,se.prototype.setProperties=se.prototype.nm,se.prototype.apply=se.prototype.apply,se.prototype.attach=se.prototype.Du,se.prototype.set=se.prototype.set,se.prototype.isEnabledObject=se.prototype.If,se.prototype.isVisibleObject=se.prototype.Ed,se.prototype.isContainedBy=se.prototype.rg,se.prototype.getNearestIntersectionPoint=se.prototype.rs,se.prototype.getLocalPoint=se.prototype.qs,se.prototype.getDocumentScale=se.prototype.Df,se.prototype.getDocumentAngle=se.prototype.li,se.prototype.getDocumentBounds=se.prototype.mi,se.prototype.getDocumentPoint=se.prototype.ga,se.prototype.intersectsRect=se.prototype.Yc,se.prototype.containedInRect=se.prototype.fh,se.prototype.containsRect=se.prototype.Re,se.prototype.containsPoint=se.prototype.ca,se.prototype.raiseChanged=se.prototype.g,se.prototype.raiseChangedEvent=se.prototype.cb,se.prototype.addCopyProperty=se.prototype.Vw;var Fg=null;se.className="GraphObject",Fg=new gi,jc("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=ah(dn,dn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof dn){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},ah(Qi,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new mi(0,0,2.76142374915397,2.761423749153969),spot2:new mi(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof dn&&(x=E.fb("ButtonBorder"),x instanceof Qi)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof dn&&(x=E.fb("ButtonBorder"),x instanceof Qi&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof dn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Qi){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof dn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Qi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof dn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Qi){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof dn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Qi))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),jc("TreeExpanderButton",function(){var a=ah("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},ah(Qi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ma},new ls("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new ls("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Wr&&(x=x.adornedPart),x instanceof zn){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),jc("SubGraphExpanderButton",function(){var a=ah("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},ah(Qi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ma},new ls("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof Wr&&(x=x.adornedPart),x instanceof Gi){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),jc("ToolTip",function(){return ah(Wr,dn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Xt(0,3),shadowBlur:5},ah(Qi,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new mi(0,0,4,6),spot2:new mi(1,1,-4,-4)}))}),jc("ContextMenu",function(){return ah(Wr,dn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Xt(0,3),shadowBlur:5},new ls("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),jc("ContextMenuButton",function(){var a=ah("Button");a.stretch=ui;var y=a.fb("ButtonBorder");return y instanceof Qi&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new mi(0,0,2,3),y.spot2=new mi(1,1,-2,-2)),a}),jc("PanelExpanderButton",function(a){var y=fm(a,"COLLAPSIBLE"),x=ah("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},ah(Qi,{name:"ButtonIcon",strokeWidth:2},new ls("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Qi&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),jc("CheckBoxButton",function(a){var y=fm(a);return a=ah("Button",{desiredSize:new sn(14,14)},ah(Qi,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Xe,geometryStretch:Kn,visible:!1},y!==""?new ls("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof dn){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),jc("CheckBox",function(a){a=fm(a),a=ah("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new _i(0,1,0,0)});var y=ah(dn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new _i(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),se.None=Je=new Re(se,"None",0),se.Default=Vi=new Re(se,"Default",0),se.Vertical=Fi=new Re(se,"Vertical",4),se.Horizontal=ui=new Re(se,"Horizontal",5),se.Fill=Xe=new Re(se,"Fill",3),se.Uniform=Kn=new Re(se,"Uniform",1),se.UniformToFill=kr=new Re(se,"UniformToFill",2),se.FlipVertical=ar=new Re(se,"FlipVertical",1),se.FlipHorizontal=Or=new Re(se,"FlipHorizontal",2),se.FlipBoth=No=new Re(se,"FlipBoth",3),se.make=ah,se.getBuilders=function(){var a=new gi,y;for(y in Fg)if(y!==y.toLowerCase()){var x=Fg.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},se.defineBuilder=jc,se.build=function(a,y,x){for(var E=[],b=2;ba&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},Kf.className="STransform";function ug(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}ug.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},ug.className="SGradient";function bd(a,y,x){this.ownerDocument=a=y===void 0?We.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new bu(this,x)}bd.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},bd.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),mn(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},bd.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},bd.prototype.focus=function(){this.Oa.focus()},bd.prototype.mx=function(){this.ownerDocument=null},_e.Object.defineProperties(bd.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}}),bd.className="SVGSurface";function bu(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Kf,this.j=gm(this),this.Nj=gm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=$s++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function Xy(a,y,x,E,b,z,tt){a.Nj===void 0?vp(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}wt=bu.prototype,wt.arc=function(a,y,x,E,b,z,tt,rt){var at=2*Math.PI,st=at-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),vt=a+ut,St=y+ft,Pt=z?0:1;E=z?E-b:b-E,(1e-6E&&(E=E%at+at),E>st?(this.path.push(["A",x,x,0,1,Pt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,Pt,vt,St])):1e-6=Math.PI),Pt,a+x*Math.cos(b),y+x*Math.sin(b)])},wt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},wt.Se=function(a){this.addPath(this.path,this.rb,a||0)},wt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},wt.clearRect=function(){},wt.clip=function(){this.Yl.clipPath=!0},wt.closePath=function(){this.path.push(["z"])},wt.createLinearGradient=function(a,y,x,E){var b=new ug("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},wt.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+$s++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(Vd,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},wt.createRadialGradient=function(a,y,x,E,b,z){var tt=new ug("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function Jy(a,y,x,E,b,z,tt,rt,at){E=rt/E,b=at/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}wt.drawImage=function(a,y,x,E,b,z,tt,rt,at){var st="";a instanceof HTMLCanvasElement&&(st=a.toDataURL()),a instanceof HTMLImageElement&&(st=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=ut,at=b=a),E=E||0,b=b||0,rt=rt||0,at=at||0,Jy(this,y,x,E,b,z||0,tt||0,rt,at),z={x:0,y:0,width:ut||E,height:a||b,href:st},Se.$(E,rt)&&Se.$(b,at)?st.toLowerCase().indexOf(".svg")===-1&&st.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),Ng(this,Vd,z,this.rb),this.addElement(Vd,z)},wt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},wt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},wt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},Ng(this,"fill",a,this.rb),this.addElement("rect",a)},wt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},Ng(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},wt.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},Ng(this,"fill",y,this.rb),this.addElement("text",y,a[0])},wt.lineTo=function(a,y){this.path.push(["L",a,y])},wt.moveTo=function(a,y){this.path.push(["M",a,y])},wt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},wt.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},wt.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},wt.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;yut.offset?1:-1}),b=0;bx?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},wt.jk=function(){this.Hm||this.stroke()},wt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},wt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},wt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},wt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},wt.Hs=function(){},_e.Object.defineProperties(Vf.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var mx=Object.freeze([]);Vf.className="CanvasSurfaceContext";function yp(){this.F=this.o=this.u=this.j=0}yp.className="ColorNumbers";function wo(a,y){Og||(hv(),Og=!0),po(this),this._isFrozen=!1,a===void 0?(this.na=Wc,this.xk="black"):typeof a=="string"?(this.na=Wc,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===xc?(this.Qd=_u,this.Lk=vl):this.Lk=a===sh?this.Qd=eo:this.Qd=ms,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}wo.prototype.copy=function(){var a=new wo;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},wt=wo.prototype,wt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},wt.ka=function(){return Object.isFrozen(this)&&Be("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},wt.qb=function(a){a.classType===wo&&(this.type=a)},wt.toString=function(){var a="Brush(";if(this.type===Wc)a+=this.color;else if(a=this.type===xc?a+"Linear ":this.type===sh?a+"Radial ":this.type===Ig?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},wt.addColorStop=function(a,y){return this._isFrozen&&xi(this),(typeof a!="number"||!isFinite(a)||1a)&&Ki(a,"0 <= loc <= 1",wo,"addColorStop:loc"),this.we===null&&(this.we=new gi),this.we.add(a,y),this.na===Wc&&(this.type=xc),this.xe=null,this},wt.Vz=function(a,y){if(this._isFrozen&&xi(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Rg:y,this.type===Wc)Sc(this.color),this.color=Dg(a,y);else if((this.type===xc||this.type===sh)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Sc(x.value),this.addColorStop(x.key,Dg(a,y));return this};function $y(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Rg:x,Sc(a),Dg(y,x)}wt.Wy=function(a,y){if(this._isFrozen&&xi(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Rg:y,this.type===Wc)Sc(this.color),this.color=Dg(-a,y);else if((this.type===xc||this.type===sh)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Sc(x.value),this.addColorStop(x.key,Dg(-a,y));return this};function tS(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Rg:x,Sc(a),Dg(-y,x)}function ov(a,y,x){Sc(a),a=_o.j;var E=_o.u,b=_o.o,z=_o.F;return Sc(y),x===void 0&&(x=.5),"rgba("+Math.round((_o.j-a)*x+a)+", "+Math.round((_o.u-E)*x+E)+", "+Math.round((_o.o-b)*x+b)+", "+Math.round((_o.F-z)*x+z)+")"}wt.Gx=function(){if(this.type===Wc)return Tg(this.color);if((this.type===xc||this.type===sh)&&this.colorStops!==null){var a=this.colorStops;if(this.type===sh)return Tg(a.first().value);if(a.get(.5)!==null)return Tg(a.get(.5));if(a.count===2)return a=a.Fa(),Tg(ov(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);b>z&&rt=b&&rtE&&(z=x,x=E,E=z,z=b),b=E-x,Tg(ov(a.get(x),a.get(E),1-z/b))}return!1};function Tg(a){return a?a instanceof wo?a.Gx():(Sc(a),128>(299*_o.j+587*_o.u+114*_o.o)/1e3):!1}function Dg(a,y){switch(y){case Rg:y=100*sv(_o.j);var x=100*sv(_o.u),E=100*sv(_o.o);return Yl.j=.4124564*y+.3575761*x+.1804375*E,Yl.u=.2126729*y+.7151522*x+.072175*E,Yl.o=.0193339*y+.119192*x+.9503041*E,Yl.F=_o.F,y=uv(Yl.j/Bg[0]),x=uv(Yl.u/Bg[1]),E=uv(Yl.o/Bg[2]),Xd.j=116*x-16,Xd.u=500*(y-x),Xd.o=200*(x-E),Xd.F=Yl.F,Xd.j=Math.min(100,Math.max(0,Xd.j+100*a)),a=(Xd.j+16)/116,y=a-Xd.o/200,Yl.j=Bg[0]*eS(Xd.u/500+a),Yl.u=Bg[1]*(Xd.j>mm*dv?Math.pow(a,3):Xd.j/mm),Yl.o=Bg[2]*eS(y),Yl.F=Xd.F,a=-.969266*Yl.j+1.8760108*Yl.u+.041556*Yl.o,y=.0556434*Yl.j+-.2040259*Yl.u+1.0572252*Yl.o,_o.j=255*lv((3.2404542*Yl.j+-1.5371385*Yl.u+-.4985314*Yl.o)/100),_o.u=255*lv(a/100),_o.o=255*lv(y/100),_o.F=Yl.F,_o.j=Math.round(_o.j),255<_o.j?_o.j=255:0>_o.j&&(_o.j=0),_o.u=Math.round(_o.u),255<_o.u?_o.u=255:0>_o.u&&(_o.u=0),_o.o=Math.round(_o.o),255<_o.o?_o.o=255:0>_o.o&&(_o.o=0),"rgba("+_o.j+", "+_o.u+", "+_o.o+", "+_o.F+")";case nS:return av(),Zu.o=Math.min(100,Math.max(0,Zu.o+100*a)),"hsla("+Zu.j+", "+Zu.u+"%, "+Zu.o+"%, "+Zu.F+")";default:Be("Unknown color space: "+y)}}function Sc(a){Og||(hv(),Og=!0);var y=cv;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,_o.j=a[0],_o.u=a[1],_o.o=a[2],_o.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,_o.j=0,_o.u=0,_o.o=0,_o.F=1)}}function av(){var a=_o.j/255,y=_o.u/255,x=_o.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}Zu.j=Math.round(tt),Zu.u=Math.round(100*a),Zu.o=Math.round(100*b),Zu.F=_o.F}function sv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function uv(a){return a>dv?Math.pow(a,1/3):(mm*a+16)/116}function eS(a){var y=a*a*a;return y>dv?y:(116*a-16)/mm}function hg(a,y){typeof a!="string"&&(a instanceof wo||Be("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){cv=ra?new xh(null,void 0,{willReadFrequently:!0}).context:null}_e.Object.defineProperties(wo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&xi(this,a),this.na=a,this.start.Mc()&&(a===xc?this.start=_u:a===sh&&(this.start=eo)),this.end.Mc()&&(a===xc?this.end=vl:a===sh&&(this.end=eo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&xi(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&xi(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&xi(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&xi(this,a),0>a&&Ki(a,">= zero",wo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&xi(this,a),0>a&&Ki(a,">= zero",wo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&xi(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&xi(this,a),this.cr=a,this.xe=null}}}),wo.prototype.isDark=wo.prototype.Gx,wo.prototype.darkenBy=wo.prototype.Wy,wo.prototype.lightenBy=wo.prototype.Vz,wo.prototype.addColorStop=wo.prototype.addColorStop;var dv=216/24389,mm=24389/27,Bg=[95.047,100,108.883],cv=null,_o=new yp,Zu=new yp,Yl=new yp,Xd=new yp,Og=!1;wo.className="Brush";var Wc;wo.Solid=Wc=new Re(wo,"Solid",0);var xc;wo.Linear=xc=new Re(wo,"Linear",1);var sh;wo.Radial=sh=new Re(wo,"Radial",2);var Ig;wo.Pattern=Ig=new Re(wo,"Pattern",4);var Rg;wo.Lab=Rg=new Re(wo,"Lab",5);var nS;wo.HSL=nS=new Re(wo,"HSL",6),wo.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},wo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Og||(hv(),Og=!0);var y=cv;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},wo.lighten=function(a){return $y(a)},wo.lightenBy=$y,wo.darken=function(a){return tS(a)},wo.darkenBy=tS,wo.mix=ov,wo.isDark=Tg;function ks(){this.xa="Base"}ks.prototype.measure=function(){},ks.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},ks.prototype.arrange=function(){},ks.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},ks.prototype.iA=function(a){a.Uj()},ks.prototype.gc=function(){},_e.Object.defineProperties(ks.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return dn}}}),ks.prototype.remeasureObject=ks.prototype.iA,ks.prototype.arrangeElement=ks.prototype.Ly,ks.prototype.measureElement=ks.prototype.Yz,ks.className="PanelLayout";function vm(){this.xa="Base"}Pe(vm,ks),vm.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=wc(a);for(var at=0;atei&&(Is=Math.max(ei-Nf,0));var Y0=rn.oa===0;rn.oc=rn.oc+Is,rn.actual=rn.oa+Is,ei=Math.max(ei-(Is+(Y0?Nf:0)),0)}if(Su.columnSpan===1&&(Hl===Je||Hl===Fi)){rn=a.Eb(Wl);var am=rn.Wc();Is=Math.max($f-rn.actual,0),Is+am>Tn&&(Is=Math.max(Tn-am,0));var Wy=rn.oa===0;rn.oc=rn.oc+Is,rn.actual=rn.oa+Is,Tn=Math.max(Tn-(Is+(Wy?am:0)),0)}Ff&&Su.Uj()}}}}}bi(te);var ic=0,Lc=0;z=a.columnCount;for(var Cg=0;Cg=a.rowCount);ef++)rn=a.Fb(Qa.row+ef),Is=0,Is=Hl===Xe||Hl===Fi?Math.max(rn.minimum,pd[Qa.row+ef]===0?rn.maximum:Math.min(pd[Qa.row+ef],rn.maximum)):Math.max(rn.minimum,isNaN(rn.Hc)?rn.maximum:Math.min(rn.Hc,rn.maximum)),kc.height+=Is,Ou+=rn.minimum;for(var Mh=1;Mh=a.columnCount);Mh++)rn=a.Eb(Qa.column+Mh),Is=0,Is=Hl===Xe||Hl===ui?Math.max(rn.minimum,ch[Qa.column+Mh]===0?rn.maximum:Math.min(ch[Qa.column+Mh],rn.maximum)):Math.max(rn.minimum,isNaN(rn.Hc)?rn.maximum:Math.min(rn.Hc,rn.maximum)),kc.width+=Is,J0+=rn.minimum;qs.width+=kc.width,qs.height+=kc.height;var fp=Qa.margin,If=fp.right+fp.left,lm=fp.top+fp.bottom;Qa.measure(qs.width,qs.height,J0,Ou);for(var gp=Qa.measuredBounds,Od=Math.max(gp.width+If,0),ig=Math.max(gp.height+lm,0),Rf=0,pp=0;pp=a.rowCount);pp++)rn=a.Fb(Qa.row+pp),Rf+=rn.total||0;if(Rf=nf)&&!(Qa.row+Ac>=a.rowCount);Ac++){rn=a.Fb(Qa.row+Ac);var of=rn.oa||0,rg=rf(Qa,rn,oc);rn.actual=Math.min(rn.maximum,of+rg),rn.oa!==of&&(nf-=rn.oa-of)}for(;0md&&(rn.actual=Math.min(rn.maximum,md+nf),rn.oa!==md&&(nf-=rn.oa-md)),rn.index===0)break;rn=a.Fb(rn.index-1)}}for(var Mg=0,af=0;af=a.columnCount);af++)rn=a.Eb(Qa.column+af),Mg+=rn.total||0;if(Mg=kg)&&!(Qa.column+og>=a.columnCount);og++){rn=a.Eb(Qa.column+og);var um=rn.oa||0,Ky=bc(Qa,rn,Gy);rn.actual=Math.min(rn.maximum,um+Ky),rn.oa!==um&&(kg-=rn.oa-um)}for(;0Q0&&(rn.actual=Math.min(rn.maximum,Q0+kg),rn.oa!==Q0&&(kg-=rn.oa-Q0)),rn.index===0)break;rn=a.Eb(rn.index-1)}}}}bi(ee),sn.free(kc),sn.free(qs),pd!==void 0&&bi(pd),ch!==void 0&&bi(ch);var Ag=0,bg=0,_0=a.desiredSize,gx=a.maxSize;Hl=ru(a,!0);var hm=Lc=ic=0,dm=0;z=a.columnCount;for(var q0=0;q0=a.rowCount);rn++){var Hi=a.Fb(te+rn);Hi.oa!==0&&(zt.height+=Hi.total)}for(rn=1;rn=a.columnCount);rn++)Hi=a.Eb(oe+rn),Hi.oa!==0&&(zt.width+=Hi.total);var Ri=pe.oa+zt.width,qr=ee.oa+zt.height;rn=rt,Hi=at;var Uo=Ri,Os=qr,js=rt,jl=at,Is=Ri,_c=qr;rt+Ri>x.width&&(Is=Math.max(x.width-rt,0)),at+qr>x.height&&(_c=Math.max(x.height-at,0));var us=Yn.alignment;if(us.Xb()){us=a.defaultAlignment,us.sb()||(us=eo);var cd=us.x,Wl=us.y,qc=us.offsetX;us=us.offsetY;var Qu=pe.alignment,Lh=ee.alignment;Qu.sb()&&(cd=Qu.x,qc=Qu.offsetX),Lh.sb()&&(Wl=Lh.y,us=Lh.offsetY)}else cd=us.x,Wl=us.y,qc=us.offsetX,us=us.offsetY;(isNaN(cd)||isNaN(Wl))&&(Wl=cd=.5,us=qc=0),Qu=vn.width,Lh=vn.height;var Tu=Yn.margin,Su=Tu.left+Tu.right,Ff=Tu.top+Tu.bottom,fd=sd(Yn,ee,pe,!1);!isNaN(Yn.desiredSize.width)||fd!==Xe&&fd!==ui||(Qu=Math.max(Ri-Su,0)),!isNaN(Yn.desiredSize.height)||fd!==Xe&&fd!==Fi||(Lh=Math.max(qr-Ff,0)),Ri=Yn.maxSize,qr=Yn.minSize,Qu=Math.min(Ri.width,Qu),Lh=Math.min(Ri.height,Lh),Qu=Math.max(qr.width,Qu),Lh=Math.max(qr.height,Lh),Ri=Lh+Ff,rn+=Uo*cd-(Qu+Su)*cd+qc+Tu.left,Hi+=Os*Wl-Ri*Wl+us+Tu.top,Yn.visible&&(Ps(js,jl,Is,_c,rn,Hi,vn.width,vn.height)?Yn.arrange(rn,Hi,Qu,Lh):Yn.arrange(rn,Hi,Qu,Lh,new Ye(js,jl,Is,_c)))}}}for(sn.free(zt),a=0;a=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,at=z.height,st=Math.ceil(rt/b),ut=Math.ceil(at/E),ft=a.gridOrigin,vt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,at),y.clip(),y.Se();for(var St=[],Pt=a.O.s,At=Pt.length,Yt=0;Ytee)){zt=pv(zt.figure);for(var oe=0;oeee&&te.push(pe))}}}}for(Pt=a.O.s,At=Pt.length,Yt=0;Ytb*zt*x))){if(ee=Ee.segmentIndex,(!isFinite(ee)||isNaN(ee))&&(ee=0),0>ee&&(ee=zt-Math.min(-ee,zt)),ee=Math.round(ee%zt),zt=Ee.opacity,oe=1,zt!==1){if(zt===0)continue;oe=y.globalAlpha,y.globalAlpha=oe*zt}pe=St[Yt];var Tn=!1,ei=Ee.strokeDashArray;if(ei!==null&&(Tn=!0,y.js(ei,Ee.strokeDashOffset)),Ee.figure==="LineV"&&Ee.stroke!==null&&0y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;bft)te.measure(1/0,1/0,0,0),ee=te.measuredBounds,x.ed(ee),St.push(ee);else{var oe=te.segmentIndex,pe=te.segmentFraction,Ee=te.alignmentFocus;Ee.Mc()&&(Ee=eo);var Tn=te.segmentOrientation,ei=te.segmentOffset;if(isNaN(oe)){var Yn=at.ua;ee=Ei(),Yn.Qu(pe,ee);var vn=Xt.allocAt(ee[0],ee[1]);if(vn.add(at.i(0)),Yn.type===wn.j?vn.offset(-Yn.startX,-Yn.startY):(Yn=Yn.figures.first(),Yn!==null&&vn.offset(-Yn.startX,-Yn.startY)),Yn=ee[2],Tn!==Zl){var rn=at.computeAngle(te,Tn,Yn);te.Kb=rn}rn=vn.x-y.x;var Hi=vn.y-y.y;Xt.free(vn),bi(ee)}else if(oe<-ft||oe>=ft)ee=Xt.alloc(),at.vg(),at.computeMidPoint(ee),Yn=at.midAngle,Tn!==Zl&&(rn=at.computeAngle(te,Tn,Yn),te.Kb=rn),rn=ee.x-y.x,Hi=ee.y-y.y,Xt.free(ee);else{if(rn=0,0<=oe?(Hi=ut.M(oe),ee=oeRi+10?0<=oe?Yn.ab(Hi):Hi.ab(Yn):Ri>vn+10?0<=oe?ee.ab(rn):rn.ab(ee):0<=oe?Yn.ab(rn):rn.ab(Yn)}else Yn=0<=oe?Hi.ab(ee):ee.ab(Hi);Tn!==Zl&&(rn=at.computeAngle(te,Tn,Yn),te.Kb=rn),rn=Hi.x+(ee.x-Hi.x)*pe-y.x,Hi=Hi.y+(ee.y-Hi.y)*pe-y.y}te.measure(1/0,1/0,0,0),ee=te.measuredBounds,vn=te.naturalBounds;var qr=0;te instanceof Qi&&(qr=te.strokeWidth),Ri=vn.width+qr;var Uo=vn.height+qr;Pt.reset(),Pt.translate(-ee.x,-ee.y),Pt.scale(te.scale,te.scale),Pt.rotate(Tn===Zl?te.angle:Yn,Ri/2,Uo/2),Tn!==Tp&&Tn!==Bp||Pt.rotate(90,Ri/2,Uo/2),Tn!==Dp&&Tn!==Op||Pt.rotate(-90,Ri/2,Uo/2),Tn===i0&&(45Yn||225Yn)&&Pt.rotate(-Yn,Ri/2,Uo/2),vn=new Ye(0,0,Ri,Uo),At.xi(vn,Ee),Pt.Ga(At),Ee=-At.x+qr/2*te.scale,te=-At.y+qr/2*te.scale,Yt.assign(ei),qr=isNaN(ei.x);var Os=isNaN(ei.y);if(qr||Os){Ri=Ri/2+3,Uo=Uo/2+3;var js=45<=Yn&&135>=Yn,jl=225<=Yn&&315>=Yn;Tn===Zl&&(js||jl)?(Yt.x=Os?Ri:ei.y,Yt.y=qr?Uo:ei.x,js?0<=oe||isNaN(oe)&&.5>pe||!qr||(Yt.y=-Uo):jl&&((0<=oe||isNaN(oe)&&.5>pe)&&qr&&(Yt.y=-Uo),Os&&(Yt.x=-Ri))):(qr&&(Yt.x=0<=oe||isNaN(oe)&&.5>pe?Ri:-Ri),Os&&(Yt.y=-Uo),Yt.rotate(Yn))}else Yt.rotate(Yn);rn+=Yt.x,Hi+=Yt.y,vn.set(ee),vn.h(rn+Ee,Hi+te,ee.width,ee.height),St.push(vn),x.ed(vn)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),bl(b,x.width||0,x.height||0),nr.free(Pt),Xt.free(At),Xt.free(Yt)}}}},km.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Wr||a instanceof yn){var E=a,b=null;a instanceof Wr&&(b=a,E=b.adornedPart);var z=a instanceof Wr?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt=x)Pt=Xt.alloc(),St=ft,Yt=Pt,St.vg(),St.computeMidPoint(Yt),St=ft.midAngle,st!==Zl&&(ft=ft.computeAngle(tt,st,St),tt.angle=ft),ft=Pt.x,Yt=Pt.y,Xt.free(Pt);else{if(At=0,0<=rt?(Pt=y.s[rt],Yt=rtte+10?0<=rt?St.ab(Pt):Pt.ab(St):te>zt+10?0<=rt?Yt.ab(At):At.ab(Yt):0<=rt?St.ab(At):At.ab(St)}else St=0<=rt?Pt.ab(Yt):Yt.ab(Pt);st!==Zl&&(ft=ft.computeAngle(tt,st,St),tt.angle=ft),ft=Pt.x+(Yt.x-Pt.x)*at,Yt=Pt.y+(Yt.y-Pt.y)*at}if(vt.ys())tt.location=new Xt(ft,Yt);else{vt.Mc()&&(vt=eo),Pt=nr.alloc(),Pt.reset(),Pt.scale(tt.scale,tt.scale),Pt.rotate(tt.angle,0,0);var ee=tt.naturalBounds;At=Ye.allocAt(0,0,ee.width,ee.height),zt=Xt.alloc(),zt.xi(At,vt),Pt.Ga(zt),vt=-zt.x,te=-zt.y;var oe=ee.width,pe=ee.height;ee=Xt.alloc(),ee.assign(ut);var Ee=isNaN(ut.x),Tn=isNaN(ut.y);if(Ee||Tn){oe=oe/2+3,pe=pe/2+3;var ei=45<=St&&135>=St,Yn=225<=St&&315>=St;st===Zl&&(ei||Yn)?(ee.x=Tn?oe:ut.y,ee.y=Ee?pe:ut.x,ei?0<=rt||isNaN(rt)&&.5>at||!Ee||(ee.y=-pe):Yn&&((0<=rt||isNaN(rt)&&.5>at)&&Ee&&(ee.y=-pe),Tn&&(ee.x=-oe))):(Ee&&(ee.x=0<=rt||isNaN(rt)&&.5>at?oe:-oe),Tn&&(ee.y=-pe),ee.rotate(St))}else ee.rotate(St);ft+=ee.x,Yt+=ee.y,Pt.pp(At),vt+=At.x,te+=At.y,rt=Xt.allocAt(ft+vt,Yt+te),tt.move(rt),Xt.free(rt),Xt.free(ee),Xt.free(zt),Ye.free(At),nr.free(Pt)}}b!==null?b.Ul(!1):E.Ul(!1),E=TS(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Xt.free(E)}};function iS(a,y,x,E){if(Uu(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Wr&&a.type===dn.Link&&a.adornedObject instanceof Qi&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof yn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Wr&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),Ss(E,!1)}}function xp(){this.xa="Base"}Pe(xp,ks),xp.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var at=rt.margin,st=at.right+at.left,ut=at.top+at.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,vt=new Ye(-at.left,-at.top,Math.max(ft.width+st,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(vt),b.assign(vt);for(var St=rt.geometry,Pt=rt.strokeWidth,At=St.flattenedSegments,Yt=St.flattenedLengths,zt=St.flattenedTotalLength,te=At.length,ee=0,oe=0,pe=Ei(),Ee=0;EeRi&&(Ri+=360),ei.push(Ri)}ee=rn,oe=Hi}pe.push(ei)}if(a.graduatedIntervals===null){for(var qr=[],Uo=a.O.s,Os=Uo.length,js=0;js_c)){for(var us=0;us_c&&Is.push(Wl)}}}}}a.graduatedIntervals=qr}var qc=a.graduatedIntervals,Qu=a.O.s,Lh=Qu.length,Tu=0,Su=0,Ff=zt;a.graduatedMarks=[];for(var fd,ap=0;apom*Hl*zt/a.graduatedRange&&Du.graduatedSkip===null)){var Pg=Yt[0][0],Td=0,xu=0;Su=zt*Du.graduatedStart-1e-4,Ff=zt*Du.graduatedEnd+1e-4;var $f=om*Hl,Bu=a.graduatedTickBase;if(Bua.graduatedMin+$f&&(Bu-=Math.floor((Bu-a.graduatedMin)/$f)*$f);for(var Y0=qc[ap],am=Bu,Wy=1e-6*a.graduatedMax,ic=1;Bu<=a.graduatedMax+Wy;ic++){t:{for(var Lc=Y0.length,Cg=0;Cg-sp){var Df=!1;break t}}Df=!0}if(Df&&(Bu>a.graduatedMax&&(Bu=a.graduatedMax),Du.graduatedSkip===null||Du instanceof Xo&&!Du.graduatedSkip(Bu,Du)||Du instanceof Qi&&!Du.graduatedSkip(Bu,Du))&&(Tu=(Bu-a.graduatedMin)*zt/a.graduatedRange,Tu>zt&&(Tu=zt),Su<=Tu&&Tu<=Ff)){for(var rc=pe[Td][xu],$c=Yt[Td][xu];TdPg&&xuEc&&.4995Ec?0Ec||.9995Lg){var up=1-Math.abs(.5-Ec);rc=(gd*up+Bd*(1-up))%360;break t}}}rc=gd}if(Du instanceof Xo){var Uh="";Du.graduatedFunction!==null?(Uh=Du.graduatedFunction(Bu,Du),Uh=Uh!=null?Uh.toString():""):Uh=(+Bu.toFixed(2)).toString(),Uh!==""&&fd.push({$l:lp,angle:rc,text:Uh})}else fd.push({$l:lp,angle:rc})}Bu=am+ic*$f}}}a.graduatedMarks.push(fd)}bi(pe);var qs=a.graduatedMarks;if(qs!==null)for(var sm=E.length,ql=0;qlZh;Zh++){switch(Zh){case 0:Pu.h(kc,pd);break;case 1:Pu.h(kc+hp,pd);break;case 2:Pu.h(kc,pd+ng);break;case 3:Pu.h(kc+hp,pd+ng)}Pu.rotate(Qa+hs.angle),Pu.offset(X0,cp),dp===0&&Zh===0?ch.h(Pu.x,Pu.y,0,0):ch.Ye(Pu),Pu.offset(-X0,-cp),Pu.rotate(-Qa-hs.angle)}Xt.free(Pu),Mc.graduatedBounds!==null&&Mc.graduatedBounds.push(ch),za(tf,ch.x,ch.y,ch.width,ch.height)}else if(hs instanceof Xo){var Eh=a,J0=b;Eh.temporaryTextBlock===null&&(Eh.temporaryTextBlock=new Xo);var Ou=Eh.temporaryTextBlock;yS(Ou,hs);var ef=hs.alignmentFocus;ef.Mc()&&(ef=_u);for(var Mh=hs.segmentOrientation,fp=hs.segmentOffset,If=new Ye,lm=0,gp=0,Od=0,ig=0,Rf=0,pp=$l.length,nf=0;nfOd||225Od)&&md.rotate(-Od,of/2,rg/2);var Mg=Ye.allocAt(0,0,of,rg),af=Xt.alloc();af.xi(Mg,ef),md.Ga(af);var kg=-af.x,Gy=-af.y,bc=Xt.alloc();bc.assign(fp),isNaN(bc.x)&&(bc.x=of/2+3),isNaN(bc.y)&&(bc.y=-(rg/2+3)),bc.rotate(Od),lm+=bc.x+kg,gp+=bc.y+Gy;var og=new Ye(lm,gp,rf.width,rf.height),um=new Ye(rf.x,rf.y,rf.width,rf.height),Ky=new Ye(Ac.x,Ac.y,Ac.width,Ac.height);oc.Sz=ig,oc.lineCount=Ou.lineCount,oc.lines=[Ou.Cb,Ou.Ih,Ou.df,Ou.Le,Ou.Qc,Ou.Qb,Ou.ze],oc.actualBounds=og,oc.measuredBounds=um,oc.naturalBounds=Ky,nf===0?If.assign(og):If.ed(og),Xt.free(bc),Xt.free(af),Ye.free(Mg),nr.free(md)}Eh.graduatedBounds!==null&&Eh.graduatedBounds.push(If),za(J0,If.x,If.y,If.width,If.height)}Ss(hs,!1)}}},xp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,E!==null&&E.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var at=y.length,st=0;st=tt&&(tt=1);for(var rt=z.actualBounds,at=a.O.s,st=a.graduatedMarks,ut=at.length,ft=0;fta.graduatedTickUnit*vt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&vt.graduatedSkip===null)){var At=vt.measuredBounds,Yt=vt.strokeWidth*vt.scale,zt=vt.alignmentFocus;zt.Mc()&&(zt=_u);for(var te=0;tett.height)continue}else if(st.position>tt.width)continue;var ut=st.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=st.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){Za(a,y,ft,!1,!1,tt,z),ft=!1;var vt=st.separatorDashArray;vt===null&&(vt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),vt!==null&&(ft=!0,y.js(vt,0)),y.beginPath(),vt=st.position+ut,x?vt>tt.height&&(ut-=vt-tt.height):vt>tt.width&&(ut-=vt-tt.width),st=st.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(st+=ut.top,vt=tt.width-ut.right,y.moveTo(ut.left,st),y.lineTo(vt,st)):(st+=ut.left,vt=tt.height-ut.bottom,y.moveTo(st,ut.top),y.lineTo(st,vt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function Am(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,at=oS(a,!0),st=oS(a,!1),ut=0;utvt)){var St=ft.Wc(),Pt=ft.separatorStrokeWidth;isNaN(Pt)&&(Pt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var At=ft.separatorStroke;At===null&&(At=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(At===null||ft.index===(x?at:st))&&(Pt=0),St-=Pt,Pt=ft.position+Pt,St+=ft.actual,Pt+St>vt&&(St=vt-Pt),0>=St||(vt=a.yb,Za(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(vt.left,Pt+vt.top,tt.width-(vt.left+vt.right),St):y.fillRect(Pt+vt.left,vt.top,St,tt.height-(vt.top+vt.bottom)))}}}}function oS(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;EE&&b.set(Pt),Xt.free(Pt)),Xt.free(ut),z&&b.transform(tt),st},wt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;xx||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Xe:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case ui:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case Fi:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},wt.gh=function(a){var y=this.naturalBounds,x=wc(this);if(Ps(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Xt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Ea(b.set(a),z.transform),z.ca(b)))return Xt.free(b),!0}return Xt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},wt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;Evt.width||ft.y>vt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof dn?ut:null,vt=nr.alloc(),vt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,vt):Bs(ft,a,E,vt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),nr.free(vt))}}return z===void 0&&nr.free(tt),E}return z===void 0&&nr.free(tt),!1};function mv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[z];if(tt.visible){var rt=tt.actualBounds,at=a.naturalBounds;rt.x>at.width||rt.y>at.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof dn&&mv(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}wt.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),at=rt?a:Ea(Xt.allocAt(a.x,a.y),this.transform),st=rt?y:Ea(Xt.allocAt(y.x,y.y),this.transform),ut=at.Bf(st),ft=0Yt.width||At.y>Yt.height||0>At.x+At.width||0>At.y+At.height))&&(Pt.se()?(At=Pt.transform,Ea(at.set(a),At),Ea(st.set(y),At)):(at.set(a),st.set(y)),At=Pt,Pt=Pt instanceof dn?Pt:null,(Pt!==null?Pt.og(at,st,x,E,b,z):At.tx(at,st,b))&&(x!==null&&(At=x(At)),At===null||E!==null&&!E(At)||z.add(At)))}}Xt.free(at),Xt.free(st)}return b?ft:tt}return!1};function vv(a){var y=null;return a instanceof Qi&&(y=a.spot1,y===Rs&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=bs),y}function yv(a){var y=null;return a instanceof Qi&&(y=a.spot2,y===Rs&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=yl),y}wt.add=function(a){for(var y=[],x=0;x=b.count&&a>=b.count)return;b.mb(z),E=z}else Be("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Uu(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof dn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Fm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof zn&&(x.Te=!0),x.Te&&x instanceof zn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Ga,"elements",this,y,null,E,null),x.cb(ha,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}wt.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;ba&&Ki(a,">= 0",dn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new xs;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(ha,"rowdefs",this,null,x,null,a)}return y[a]},wt.oA=function(a){if(0>a&&Ki(a,">= 0",dn,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Ga,"rowdefs",this,x,null,a,null),this.v()}}};function hS(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof xs?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}wt.Eb=function(a){0>a&&Ki(a,">= 0",dn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new xs;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(ha,"coldefs",this,null,x,null,a)}return y[a]},wt.jA=function(a){if(0>a&&Ki(a,">= 0",dn,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Ga,"coldefs",this,x,null,a,null),this.v()}}};function dS(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof xs?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}wt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Nm(y,a),this},wt.Hy=function(a,y){return(a=this.Fb(a))&&Nm(a,new xs(y)),this},wt.By=function(a,y){return(a=this.Eb(a))&&Nm(a,new xs(y)),this},wt.nz=function(a){if(0>a||this.type!==dn.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;ba||this.type!==dn.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;ba;)this.pc(this.O.length-1,!1);fS(this,this.itemArray)};function fS(a,y){var x=wp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;Ex)){var b=wv(a,y);if(b=Pv(a,b),b!==null){if(wh(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new gi),a.ge.add(y,b)),z=x+wp(a),a.Gb(z,b),E&&(b.ub=y,xv(a,z,x),b.ub=null),b.data=y}}}function xv(a,y,x){for(a=a.O;ya&&Ki(a,">= 0",dn,"padding"),a=new _i(a)):(0>a.left&&Ki(a.left,">= 0",dn,"padding:value.left"),0>a.right&&Ki(a.right,">= 0",dn,"padding:value.right"),0>a.top&&Ki(a.top,">= 0",dn,"padding:value.top"),0>a.bottom&&Ki(a.bottom,">= 0",dn,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:Fl},set:function(a){typeof a=="number"&&(a=new _i(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new lh),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof wo)&&(a instanceof wo&&a.freeze(),this.T===null&&(this.T=new lh),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new lh),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;ba)&&Be("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new lh),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&Be("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new lh),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof yi&&!(this instanceof Wr);wh(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof yn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof yi&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new lg),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&ly(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&sy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||fS(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new gi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof yi||a.isPanelMain)&&Be("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););or(this),this.A.Pc=a,this.g("itemTemplateMap",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv()}}},itemCategoryProperty:{get:function(){return this.A!==null?this.A.Oc:"category"},set:function(a){var y=this.itemCategoryProperty;y!==a&&(or(this),this.A.Oc=a,this.g("itemCategoryProperty",y,a))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("isAtomic",y,a))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this instanceof Gi&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&Fm(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),_e.Object.defineProperties(dn,{Position:{get:function(){return Wh.I("Position")}},Horizontal:{get:function(){return Wh.I("Horizontal")}},Vertical:{get:function(){return Wh.I("Vertical")}},Spot:{get:function(){return Wh.I("Spot")}},Auto:{get:function(){return Wh.I("Auto")}},Table:{get:function(){return Wh.I("Table")}},Viewbox:{get:function(){return Wh.I("Viewbox")}},TableRow:{get:function(){return Wh.I("TableRow")}},TableColumn:{get:function(){return Wh.I("TableColumn")}},Link:{get:function(){return Wh.I("Link")}},Grid:{get:function(){return Wh.I("Grid")}},Graduated:{get:function(){return Wh.I("Graduated")}}}),dn.prototype.rebuildItemElements=dn.prototype.mv,dn.prototype.findItemPanelForData=dn.prototype.sx,dn.prototype.updateTargetBindings=dn.prototype.La,dn.prototype.copyTemplate=dn.prototype.Uy,dn.prototype.graduatedValueForPoint=dn.prototype.Gz,dn.prototype.graduatedPointForValue=dn.prototype.Fz,dn.prototype.findColumnForLocalX=dn.prototype.fz,dn.prototype.findRowForLocalY=dn.prototype.nz,dn.prototype.addColumnDefinition=dn.prototype.By,dn.prototype.addRowDefinition=dn.prototype.Hy,dn.prototype.addRowColumnDefinition=dn.prototype.Gy,dn.prototype.removeColumnDefinition=dn.prototype.jA,dn.prototype.getColumnDefinition=dn.prototype.Eb,dn.prototype.removeRowDefinition=dn.prototype.oA,dn.prototype.getRowDefinition=dn.prototype.Fb,dn.prototype.removeAt=dn.prototype.mb,dn.prototype.remove=dn.prototype.remove,dn.prototype.insertAt=dn.prototype.Gb,dn.prototype.elt=dn.prototype.M,dn.prototype.add=dn.prototype.add,dn.prototype.findObject=dn.prototype.fb,dn.prototype.findInVisualTree=dn.prototype.Nl,dn.prototype.walkVisualTreeFrom=dn.prototype.qm,dn.prototype.findMainElement=dn.prototype.Pb;var gS=!1,pS=null,Wh=new gi;dn.className="Panel",dn.definePanelLayout=Fd,Fd("Position",new vm),Fd("Vertical",new Sm),Fd("Auto",new wm),Fd("Link",new km);function Pc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Pc.prototype.copy=function(){var a=new Pc;return a.lq=this.lq,a.F=this.F,a.ia=this.ia,a.V=this.V,a.u=this.u,a.j=this.j,a.o=this.o,a.Zh=this.Zh,a},Pc.className="GradPanelSettings";function lh(){this.Pc=[],this.Oc=[],this.j=this.ob=Dm,this.hb=this.Hb=0,this.Qp=Fl,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}lh.prototype.copy=function(a){for(var y=new lh,x=this.Pc,E=x.length,b=y.Pc,z=0;za&&Ki(a,">= 0",xs,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Ki(a,">= 0",xs,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Ki(a,">= 0",xs,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Ki(a,">= 0",xs,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new _i(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&hg(a,"RowColumnDefinition.separatorStroke"),a instanceof wo&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;bb)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],at=x[1],st,ut,ft,vt,St,Pt,At=0,Yt=Ei(),zt=2;ztft&&(ft=1),b=x=ft,st=tt/2,ut=st!==0,zt=0,Pt=Yt[zt],ft=Pt[0],St=Pt[1],vt=Pt[2],Pt=Pt[3];for(var te=0;.1<=At;){if(te===0&&(ut?(b=x,b-=st,At-=st,ut=!1):b=x,b===0&&(b=1)),b>At){bi(Yt);return}b>Pt?(te=b-Pt,b=Pt):te=0;var ee=Math.sqrt(b*b/(1+vt*vt));if(0>ft&&(ee=-ee),rt+=ee,at+=vt*ee,a.translate(rt,at),a.rotate(St),a.translate(-(tt/2),-(z/2)),te===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-St),a.translate(-rt,-at),At-=b,Pt-=b,te!==0){if(zt++,zt===Yt.length){bi(Yt);return}Pt=Yt[zt],ft=Pt[0],St=Pt[1],vt=Pt[2],Pt=Pt[3],b=te}}bi(Yt)}}wt.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&Za(this,a,E,!0,!1,tt,z);var rt=this.part,at=this.ig;if(x===null||at!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(at=rt.type===dn.Link&&rt instanceof Wr&&rt.category==="Selection"&&rt.adornedObject instanceof Qi&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),at===0&&(x=null),x!==null&&at!==0&&(Za(this,a,x,!1,!1,tt,z),a.lineWidth=at,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,at=this.strokeDashArray,at!==null&&(tt=!0,a.js(at,this.strokeDashOffset)),b.type===wn.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===wn.u){var st=b.startX;at=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(st,ut);var vt=Math.min(at,ft);st=Math.abs(ut-st),at=Math.abs(ft-at),a.beginPath(),a.rect(b,vt,st,at),E!==null&&a.ng(E),x!==null&&(rt&&z&&Zd(a),a.jk(),rt&&z&&yc(a)),a.Se()}else if(b.type===wn.F)st=b.startX,at=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-st)/2,vt=Math.abs(ft-at)/2,st=Math.min(st,ut)+b,at=Math.min(at,ft)+vt,a.beginPath(),a.moveTo(st,at-vt),a.bezierCurveTo(st+Se.wg*b,at-vt,st+b,at-Se.wg*vt,st+b,at),a.bezierCurveTo(st+b,at+Se.wg*vt,st+Se.wg*b,at+vt,st,at+vt),a.bezierCurveTo(st-Se.wg*b,at+vt,st-b,at+Se.wg*vt,st-b,at),a.bezierCurveTo(st-b,at-Se.wg*vt,st-Se.wg*b,at-vt,st,at-vt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&Zd(a),a.jk(),rt&&z&&yc(a)),a.Se();else if(b.type===wn.o)for(b=b.figures,at=b.length,vt=0;vtAt.sweepAngle,St!==null?St.endX:st.startX,St!==null?St.endY:st.startY)}else if(St=Nl(At,st),Yt=St.length,Yt===0)a.lineTo(At.centerX,At.centerY);else for(var zt=0;zt(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(Ye.free(z),Se.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===wn.u){y=x.startX;var tt=x.startY,rt=x.endX;if(x=x.endY,z.x=Math.min(y,rt),z.y=Math.min(tt,x),z.width=Math.abs(rt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Ye.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Ye.free(z),a}if(x.type===wn.F){tt=x.startX,b=x.startY,rt=x.endX;var at=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,at),tt=Math.abs(rt-tt)/2,b=Math.abs(at-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return Ye.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Ye.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===wn.o)return Ye.free(z),this.fill===null?yd(x,a.x,a.y,b):Th(x,a,b,1=this.strokeWidth)ut=Se.Ve(st.startX,st.startY,st.endX,st.endY,z,tt,rt,at,b);else{if(st.startX===st.endX?(E=ft,ut=0):(y=(st.endY-st.startY)/(st.endX-st.startX),ut=ft/Math.sqrt(1+y*y),E=ut*y),y=Ei(),a=new Xt,Se.Ve(st.startX+E,st.startY+ut,st.endX+E,st.endY+ut,z,tt,rt,at,a)&&y.push(a),a=new Xt,Se.Ve(st.startX-E,st.startY-ut,st.endX-E,st.endY-ut,z,tt,rt,at,a)&&y.push(a),a=new Xt,Se.Ve(st.startX+E,st.startY+ut,st.startX-E,st.startY-ut,z,tt,rt,at,a)&&y.push(a),a=new Xt,Se.Ve(st.endX+E,st.endY+ut,st.endX-E,st.endY-ut,z,tt,rt,at,a)&&y.push(a),rt=y.length,rt===0)return bi(y),!1;for(ut=!0,at=1/0,E=0;EMath.abs(x)){if(at=tt-ut-x*(z-E),0>a*a*x*x+st*st-at*at){b.x=NaN,b.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+st*st-at*at),rt=(-(a*a*x*at)+a*st*ft)/(st*st+a*a*x*x)+E,a=(-(a*a*x*at)-a*st*ft)/(st*st+a*a*x*x)+E,st=x*(rt-E)+at+ut,at=x*(a-E)+at+ut,Math.abs((z-rt)*(z-rt))+Math.abs((tt-st)*(tt-st))rt){b.x=NaN,b.y=NaN,ut=!1;break t}at=Math.sqrt(rt),rt=ut+at,at=ut-at,Math.abs(rt-tt)Math.abs(Pt)?(At*=.5/Pt,Pt=.5):At!==0&&.5>Math.abs(At)&&(Pt*=.5/At,At=.5),zt-=Pt,te-=At;St.contains(zt,te);)zt-=Pt,te-=At;for(b.x=rt,b.y=at,At=0;Atx?a-x:x-a)<(y>E?y-E:E-y)?(a=ya||Se.$(at.y,a))&&(at.yy||Se.$(at.x,y))&&(at.x=a&&E<=y):(a=E&&x<=a)}wt.tx=function(a,y,x){function E(Yt,zt){for(var te=Yt.length,ee=0;eeb)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5=b||sr(y,z,0,-ft)>=b||sr(y,z,0,ft)>=b||sr(y,z,ut,0)>=b)}else if(y.type===wn.o){if(st=y.bounds,z=st.x,rt=st.y,at=st.x+st.width,st=st.y+st.height,a.x>at&&a.xst&&a.yb&&Xa(a.x,a.y,z,rt,at,rt)>b&&Xa(a.x,a.y,at,st,z,st)>b&&Xa(a.x,a.y,at,st,at,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?yd(y,a.x,a.y,z):Th(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;yb)return!1;for(rt=z.segments.s,at=rt.length,st=0;stb)return!1;break;case Ns:var vt=Ei();if(Se.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,vt),tt=E(vt,a),bi(vt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Gl:if(vt=Ei(),Se.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,vt),tt=E(vt,a),bi(vt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Ja:case eu:vt=ft.type===Ja?Nl(ft,z):fu(ft,z,tt,ut);var St=vt.length;if(St===0){if(tt=ft.type===Ja?ft.centerX:ft.endX,ut=ft.type===Ja?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var Pt=Ei(),At=0;At= 0",Qi,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Ki(a,'"butt", "round", or "square"',Qi,"strokeCap"):(Uf(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?Ki(a,'"miter", "bevel", or "round"',Qi,"strokeJoin"):(Uf(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){Uf(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;ba?a=0:1a?a=0:1(ft*ft+ut*ut)*vt*vt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof bu&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case Or:a.translate(b,0),a.scale(-1,1);break;case ar:a.translate(0,z),a.scale(1,-1);break;case No:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,vt=(y+tt+ft)*ut,z>vt&&(E=this.verticalAlignment,E=E.y*z-E.y*vt+E.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,at,st);else if(this.Qc!==null&&this.Qb!==null)for(vt=0;vtb&&(St=b),E+=y,this.Oj(this.Qb[vt],a,0,E,b,tt,St,x,rt,at,st),E+=tt+ft}switch(this.flip){case Or:a.scale(-1,1),a.translate(-b,0);break;case ar:a.scale(1,-1),a.translate(0,-z);break;case No:a.scale(-1,-1),a.translate(-b,-z)}}},wt.Oj=function(a,y,x,E,b,z,tt,rt,at,st,ut){var ft=0;if(rt)at==="left"?ft=0:at==="right"?ft=b-tt:at==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(at==="left"?ft=0:at==="right"?ft=b:at==="center"&&(ft=b/2),b=Im!==null?Im(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),at==="right"?ft-=tt:at==="center"&&(ft-=tt/2),st){rt=Rm!==null?Rm(this,z):.8*z,at=x+ft,st=E+rt,b=x+ft+tt,rt=E+rt;var vt=a;y.beginPath(),y.lineWidth=vt,y.moveTo(at,st),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof bu&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof bu&&y.ad.classList.add("gojs-td"))}},wt.kk=function(a,y,x){if(!se.prototype.kk.call(this,a,y,x))return!1;if(Za(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x=this.Qb.length))){for(this.l|=16777216,st=this.Qb[at],y=Math.max(1,a-y);Hh(st)>y&&1a.maxLines&&(a.l|=16777216))}function kv(a,y,x,E){var b=a.formatting===Ep;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,Lp(a)+rt);var at=a.overflow===zm?SS(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===Av){a.Le=1;var st=Hh(y);if(at===0||st<=x)a.Cb=Math.max(a.Cb,st),Cp(a,y,a.Cb),E!==null&&E.h(st,rt);else{for(z=jg(a,tt),tt=tt.substr(z.length),y=jg(a,tt),st=Hh(z+y);0x&&1x;){var ft=1;for(st=Hh(y.substr(0,ft)),ut=0;st<=x;)ft++,ut=st,st=Hh(y.substr(0,ft));if(ft===1){var vt=st;z=Math.max(z,st)}else vt=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),Cp(a,y.substr(0,ft),vt),at++,y=y.substr(ft),a.Gc+at>a.maxLines)break}for(ut=jg(a,tt),st=Hh(y+ut);0a.maxLines))break}a.Le=Math.min(a.maxLines,at),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function jg(a,y){if(a.wrap===PS)return y.substr(0,1);for(var x=y.length,E=0,b=Sx;E=y.length?y:y.substr(0,E)}function Hh(a){return ou===null?8*a.length:ou.measureText(a).width}function Lp(a){if(a.df!==null)return a.df;var y=a.Ae;if(ou===null){var x=16;return a.df=x}return Nv[y]!==void 0&&5e3>LS?x=Nv[y]:(x=1.3*ou.measureText("M").width,Nv[y]=x,LS++),a.df=x}function SS(a){if(ou===null)return 6;if(jm[a]!==void 0&&5e3>Tv)var y=jm[a];else y=ou.measureText(Mp).width,jm[a]=y,Tv++;return y}function xS(a,y){var x=a.ec.replace(/\r\n/g,` `).replace(/\r/g,` `),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,Lp(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(` `,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,rt=!1;!rt;){if(tt=x.indexOf(` `,z),tt===-1&&(tt=x.length,rt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==Av){a.Le=0;var at=sn.alloc();kv(a,z,y,at),b+=at.height,sn.free(at),a.Gc+=a.Le}else kv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}_e.Object.defineProperties(Xo.prototype,{font:{get:function(){return this.Ae},set:function(a){var y=this.Ae;y!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;a!=null?a=a.toString():a="",y!==a&&(this.ec=a,this.v(),this.g("text",y,a),this.Uc=!0)}},textAlign:{get:function(){return this.da!==null?this.da.Or:"start"},set:function(a){var y=this.textAlign;y===a||a!=="start"&&a!=="end"&&a!=="left"&&a!=="right"&&a!=="center"||(Nd(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Je},set:function(a){var y=this.flip;y!==a&&(Nd(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:hc},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Nd(this),this.da.Yr=a,Kl(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=sn.alloc();kv(this,this.ec,999999,a);var y=a.width;sn.free(a),a=xS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),bl(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:bv},set:function(a){var y=this.wrap;y!==a&&(Nd(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Fv},set:function(a){var y=this.overflow;y!==a&&(Nd(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&hg(a,"TextBlock.stroke"),a instanceof wo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Lp(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(Nd(this),this.da.Qr=a,this.g("textEditor",y,a))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(a){var y=this.errorFunction;y!==a&&(Nd(this),this.da.Hd=a,this.g("errorFunction",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new Qd),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1a?a=0:1=a&&Ki(a,"> 0",Xo,"maxLines"),Nd(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var Im=null,Rm=null,Av=new Re(Xo,"None",0),wS=new Re(Xo,"WrapFit",1),bv=new Re(Xo,"WrapDesiredSize",2),PS=new Re(Xo,"WrapBreakAll",3),Fv=new Re(Xo,"OverflowClip",0),zm=new Re(Xo,"OverflowEllipsis",1),Ep=new Re(Xo,"FormatTrim",0),CS=new Re(Xo,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Nv=new er,LS=0,jm=new er,Tv=0,Mp="...",ES="",ou=null,Wm=!1;Xo.className="TextBlock";function Dv(){this.nc=!1,this.Hd=null,this.Xf=Je,this.gq=Ep,this.Jq=1/0,this.$q=Fv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=hc,this.$r=bv}Dv.prototype.copy=function(){var a=new Dv;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},Xo.getEllipsis=function(){return Mp},Xo.setEllipsis=function(a){Mp=a,jm=new er,Tv=0},Xo.getBaseline=function(){return Im},Xo.setBaseline=function(a){Im=a},Xo.getUnderline=function(){return Rm},Xo.setUnderline=function(a){Rm=a},Xo.isValidFont=function(a){if(Wm||(ou=ra?new xh(null).context:null,Wm=!0),ou===null)return!0;var y=ou.font;if(a===y||a==="10px sans-serif")return!0;ou.font="10px sans-serif",ou.font=a;var x=ou.font;if(x!=="10px sans-serif")return ou.font=y,!0;ou.font="19px serif";var E=ou.font;return ou.font=a,x=ou.font,ou.font=y,x!==E},Xo.FormatNone=CS,Xo.FormatTrim=Ep,Xo.None=Av,Xo.OverflowClip=Fv,Xo.OverflowEllipsis=zm,Xo.WrapBreakAll=PS,Xo.WrapDesiredSize=bv,Xo.WrapFit=wS;function Qd(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Qd.prototype.copy=function(){var a=new Qd;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Qd.className="GradElementSettings";function au(a,y){se.call(this),this.Eg=null,this.qo="",this.Xg=ja,this.Nk=Xe,this.Zg=this.Hd=null,this.Mk=eo,this.Xf=Je,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var Wg;Pe(au,se),au.prototype.cloneProtected=function(a){se.prototype.cloneProtected.call(this,a),a.qo=this.qo,a.element=this.Eg,a.Xg=this.Xg.J(),a.Nk=this.Nk,a.Xf=this.Xf,a.Hd=this.Hd,a.Zg=this.Zg,a.Mk=this.Mk.J(),a.en=this.en,a.rl=this.rl},au.prototype.qb=function(a){a===Je||a===Kn||a===kr?this.imageStretch=a:se.prototype.qb.call(this,a)},au.prototype.toString=function(){return"Picture("+this.source+")#"+Ia(this)};function Hg(a){a===void 0&&(a=""),a!==""?Wg[a]&&(delete Wg[a],Hm--):(Wg=new er,Hm=0)}function MS(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var rt=tt.length,at=0;at=E.width&&(z=z+Pt.offsetX+(ft*Pt.x-E.width*Pt.x)),vt>=E.height&&(tt=tt+Pt.offsetY+(vt*Pt.y-E.height*Pt.y)),at=Math.min(E.width,ft),rt=Math.min(E.height,vt);break;case Xe:ft=E.width,vt=E.height;break;case Kn:case kr:St===Kn?(St=Math.min(E.height/vt,E.width/ft),ft*=St,vt*=St):St===kr&&(St=Math.max(E.height/vt,E.width/ft),ft*=St,vt*=St,ft>=E.width&&(z=(z+Pt.offsetX+(ft*Pt.x-E.width*Pt.x)/ft)*at),vt>=E.height&&(tt=(tt+Pt.offsetY+(vt*Pt.y-E.height*Pt.y)/vt)*rt),at*=1/(ft/E.width),rt*=1/(vt/E.height),ft=E.width,vt=E.height)}St=this.Df()*y.scale;var At=ft*St*vt*St,Yt=at*rt/At,zt=x.__goCache;St=null;var te=xx;if(!b){if(x.sq&&zt!==void 0&&4te*te)for(zt.gi===null&&(AS(zt,4,st,ut,x),AS(zt,16,st,ut,x)),b=zt.gi,st=b.length,ut=0;uta)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=Se.Mf[E];if(b!==void 0)return b;var z=a*Se.wg;return b=new wn().add(new ds(a,0,!0).add(new Ir(jo,y-a,0)).add(new Ir(Ns,y,a,y-z,0,y,z)).add(new Ir(jo,y,x-a)).add(new Ir(Ns,y-a,x,y,x-z,y-z,x)).add(new Ir(jo,a,x)).add(new Ir(Ns,0,x-a,z,x,0,x-z)).add(new Ir(jo,0,a)).add(new Ir(Ns,a,0,0,z,z,0).close())),1b.x&&a.y>b.y&&a.rightb.x&&y.y>b.y&&y.right=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(su(this),this.P.oq=a,this.g("highlightedChanged",y,a))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(a){var y=this.selectionObjectName;y!==a&&(su(this),this.P.vr=a,this.Ug=null,this.g("selectionObjectName",y,a))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(a){var y=this.selectionAdornmentTemplate;y!==a&&(su(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof yn?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(su(this),this.P.ur=a,this.g("selectionChanged",y,a))}},resizeAdornmentTemplate:{get:function(){return this.P!==null?this.P.fr:null},set:function(a){var y=this.resizeAdornmentTemplate;y!==a&&(su(this),this.P.fr=a,this.g("resizeAdornmentTemplate",y,a))}},resizeObjectName:{get:function(){return this.P!==null?this.P.hr:""},set:function(a){var y=this.resizeObjectName;y!==a&&(su(this),this.P.hr=a,this.g("resizeObjectName",y,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},resizeCellSize:{get:function(){return this.P!==null?this.P.gr:xl},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),su(this),this.P.gr=a,this.g("resizeCellSize",y,a))}},rotateAdornmentTemplate:{get:function(){return this.P!==null?this.P.ir:null},set:function(a){var y=this.rotateAdornmentTemplate;y!==a&&(su(this),this.P.ir=a,this.g("rotateAdornmentTemplate",y,a))}},rotateObjectName:{get:function(){return this.P!==null?this.P.jr:""},set:function(a){var y=this.rotateObjectName;y!==a&&(su(this),this.P.jr=a,this.g("rotateObjectName",y,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:Rs},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),su(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&Be("Cannot make a Group a member of itself: "+this.toString()),Be("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Yv(y,this):this instanceof Gi&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Vv(a,this):this instanceof Gi&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof Gi){for(x=new hn,Sf(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof zn)for(E=E.linksConnected;E.next();)Vg(E.value)}if(this instanceof zn){for(x=this.linksConnected;x.next();)Vg(x.value);x=this.labeledLink,x!==null&&Vg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Li(y,-1,a))}}else Be("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(su(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof zn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(su(this),this.P.Cq=a,this.g("layoutConditions",y,a))}},dragComputation:{get:function(){return this.P!==null?this.P.Up:null},set:function(a){var y=this.dragComputation;y!==a&&(su(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Ys},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),su(this),this.P.zr=a,this.N(),this.g("shadowOffset",y,a))}},shadowColor:{get:function(){return this.P!==null?this.P.yr:"gray"},set:function(a){var y=this.shadowColor;y!==a&&(su(this),this.P.yr=a,this.N(),this.g("shadowColor",y,a))}},shadowBlur:{get:function(){return this.P!==null?this.P.Vg:4},set:function(a){var y=this.shadowBlur;y!==a&&(su(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),yi.prototype.invalidateLayout=yi.prototype.C,yi.prototype.findCommonContainingGroup=yi.prototype.px,yi.prototype.isMemberOf=yi.prototype.Td,yi.prototype.findTopLevelPart=yi.prototype.sz,yi.prototype.findSubGraphLevel=yi.prototype.oz,yi.prototype.ensureBounds=yi.prototype.Va,yi.prototype.getDocumentBounds=yi.prototype.mi,yi.prototype.findObject=yi.prototype.fb,yi.prototype.moveTo=yi.prototype.moveTo,yi.prototype.invalidateAdornments=yi.prototype.Wb,yi.prototype.clearAdornments=yi.prototype.Ej,yi.prototype.removeAdornment=yi.prototype.Jf,yi.prototype.addAdornment=yi.prototype.bh,yi.prototype.findAdornment=yi.prototype.Pj,yi.prototype.updateTargetBindings=yi.prototype.La;var WS=!1;yi.className="Part",yi.LayoutNone=0,yi.LayoutAdded=1,yi.LayoutRemoved=2,yi.LayoutShown=4,yi.LayoutHidden=8,yi.LayoutNodeSized=16,yi.LayoutGroupLayout=32,yi.LayoutNodeReplaced=64,yi.LayoutStandard=127,yi.LayoutAll=16777215;function Wr(a,y){a===void 0||a instanceof ks||typeof a=="string"?yi.call(this,a):(yi.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}Pe(Wr,yi),Wr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Wr.prototype.updateRelationshipsFromData=function(){},Wr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof yn&&y instanceof Qi){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;Ea&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new hn;x.add(this),XS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===ad),y.Ue=!1}};function XS(a,y,x,E,b,z,tt){if(1a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new hn;x.add(this),QS(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===ad),y.Ue=!1}};function QS(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,at=x?a.Mo():a.Sd(),st={};at.next();){var ut=at.value;if(ut.isTreeLink&&(rt||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!rt){ut.Zb(!0),ut.oh();var ft=x?ut.Oo():ut.Po();st.vv=a,ft.all(function(vt){return function(St){return St===vt.vv||!St.isTreeExpanded}}(st))&&b.Cj(ut,z)}(2b&&(b=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},_e.Object.defineProperties(Ul.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new _i(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ul.className="Placeholder";function yn(a){yi.call(this,dn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Zl,this.Om=0,this.Qm=Zl,this.Rm=NaN,this.qj=Qv,this.po=.5,this.wd=null,this.Nb=new xn().freeze(),this.Tg=this.Mg=null,this.ml=new Ye,this.ua=new wn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Xt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Pe(yn,yi),yn.prototype.cloneProtected=function(a){yi.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},wt=yn.prototype,wt.Af=function(a){yi.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&Fu(y),a=a.toPort,a!==null&&Fu(a)},wt.qb=function(a){a.classType===yn?(a.value&2)===2?this.routing=a:a===Xu||a===Uc||a===Ug?this.curve=a:a===Fp||a===t0||a===e0?this.adjusting=a:a!==Qv&&a!==Zl&&Be("Unknown Link enum value for a Link property: "+a):yi.prototype.qb.call(this,a)},wt.Xc=function(){this.ba===null&&(this.ba=new mp)},wt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Vl(a)||vf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Vl(a)||vf(a)))},wt.zv=function(){return!1},wt.Av=function(){},wt.Zc=function(){return!1},yn.prototype.computeAngle=function(a,y,x){return yn.computeAngle(y,x)},yn.computeAngle=function(a,y){switch(a){default:case Zl:a=0;break;case Np:a=y;break;case Tp:a=y+90;break;case Dp:a=y-90;break;case _v:a=y+180;break;case n0:a=Se.bp(y),90a&&(a-=180);break;case Bp:a=Se.bp(y+90),90a&&(a-=180);break;case Op:a=Se.bp(y-90),90a&&(a-=180);break;case i0:if(a=Se.bp(y),45a||225a)return 0;90a&&(a-=180)}return Se.bp(a)};function Vg(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&Yv(x,a),a.Ah=y,y!==null&&Vv(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}wt=yn.prototype,wt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&yi.prototype.oh.call(this)},wt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},wt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function $S(a,y){a.wd===null&&(a.wd=new hn),a.wd.add(y),a.v()}wt.Vo=function(a){if(yi.prototype.Vo.call(this,a),Jf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Um(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Um(x,this,E)}Ap(this)}},wt.Wo=function(a){if(yi.prototype.Wo.call(this,a),Jf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Zm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Zm(x,this,E)}bp(this)}},wt.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},yn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},yn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?yi.prototype.move.call(this,a,!1):(a=Xt.allocAt(x.x+E,x.y+b),yi.prototype.move.call(this,a,!1),Xt.free(a)),Yc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},yn.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},yn.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},yn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(du),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Xu))return this.ua.Pu(.5,a),a.add(this.i(0)),x=this.ua.figures.first(),a.offset(-x.startX,-x.startY),a;if(this.computeCurve()===Xu){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return Se.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),Se.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;Ex/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},yn.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Xu))return this.ua.wx(.5);if(this.computeCurve()===Xu&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),Se.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},wt=yn.prototype,wt.i=function(a){return this.Nb.s[a]},wt.dd=function(a,y){this.Nb.cd(a,y)},wt.L=function(a,y,x){this.Nb.cd(a,new Xt(y,x))},wt.Kz=function(a,y){this.Nb.Gb(a,y)},wt.m=function(a,y,x){this.Nb.Gb(a,new Xt(y,x))},wt.ne=function(a){this.Nb.add(a)},wt.yf=function(a,y){this.Nb.add(new Xt(a,y))},wt.pv=function(a){this.Nb.mb(a)},wt.Fj=function(){this.Nb.clear()};function Yc(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new xn,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Xt(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Kl(a)),E?Jm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&mh(tt.animationManager,a,b),a.g("points",z,b)}}wt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},wt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;ttst&&(ft=-ft),At=(0>at?-1:1)*ft+St,Yt=ut*(At-St)+Pt),St=z.x+2*rt/3,Pt=z.y+2*at/3;var zt=St,te=Pt;Se.B(at,0)?te=0at?-1:1)*ft+St,te=ut*(zt-St)+Pt),this.Fj(),this.ne(z),this.yf(At,Yt),this.yf(zt,te),this.ne(vt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,vt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,vt),b=this.getLinkPoint(z,vt,x,!1,!1,a,y),this.hasCurviness()?(vt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+vt/2,y=E.y+x/2,z=a,rt=y,Se.B(x,0)?rt=0tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=vt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=Ye.alloc(),y.mi(rt),at=rt.ca(b),vt.mi(rt),st=rt.ca(E),(at||st)&&(tt=y.ga(_m(tt),new Xt),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=vt.ga(_m(x),new Xt),this.dd(1,this.getLinkPointFromPoint(z,vt,x,E,!1,x))),Ye.free(rt))}else{ft=this.isAvoiding,vt&&(ut&&ft||st)&&this.Fj();var ee=st?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),St=At=Pt=0,(ut||!rt||st)&&(Yt=this.computeEndSegmentLength(a,y,tt,!0),St=this.getLinkDirection(a,y,ft,tt,!0,ut,E,b),st&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(St-=ut?90:30,0>ee&&(St-=180)),0>St?St+=360:360<=St&&(St-=360),st&&(Yt+=Math.abs(ee)*(ut?1:2)),St===0?Pt=Yt:St===90?At=Yt:St===180?Pt=-Yt:St===270?At=-Yt:(Pt=Yt*Math.cos(St*Math.PI/180),At=Yt*Math.sin(St*Math.PI/180)),tt.Mc()&&st&&(Yt=y.ga(eo,Xt.alloc()),zt=Xt.allocAt(Yt.x+1e3*Pt,Yt.y+1e3*At),this.getLinkPointFromPoint(a,y,Yt,zt,!0,ft),Xt.free(Yt),Xt.free(zt))),Yt=this.getLinkPoint(E,b,x,!1,ut,a,y);var oe=te=zt=0;if(ut||!at||st){var pe=this.computeEndSegmentLength(E,b,x,!1);oe=this.getLinkDirection(E,b,Yt,x,!1,ut,a,y),st&&(at||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(oe+=ut?0:30,0>ee&&(oe+=180)),0>oe?oe+=360:360<=oe&&(oe-=360),st&&(pe+=Math.abs(ee)*(ut?1:2)),oe===0?zt=pe:oe===90?te=pe:oe===180?zt=-pe:oe===270?te=-pe:(zt=pe*Math.cos(oe*Math.PI/180),te=pe*Math.sin(oe*Math.PI/180)),x.Mc()&&st&&(x=b.ga(eo,Xt.alloc()),tt=Xt.allocAt(x.x+1e3*zt,x.y+1e3*te),this.getLinkPointFromPoint(E,b,x,tt,!1,Yt),Xt.free(x),Xt.free(tt))}x=ft,(ut||!rt||st)&&(x=new Xt(ft.x+Pt,ft.y+At)),tt=Yt,(ut||!at||st)&&(tt=new Xt(Yt.x+zt,Yt.y+te)),!vt&&!ut&&rt&&3Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}yn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Xt),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,at=-a.m21*b,st=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*at+ut,E=E.x*rt+E.y*st+ft,tt=x.x*tt+x.y*at+ut,x=x.x*rt+x.y*st+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function Qm(a,y){var x=y.Zn;return x===null&&(x=new pg,x.port=y,x.node=y.part,y.Zn=x),s1(x,a)}yn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Xt),x.sb()&&!Yg(x))return y.ga(x,rt),rt;if(x.$c()){var at=Qm(this,y);if(at!==null){if(rt.assign(at.Zo),b&&this.routing===e1){var st=Qm(this,tt);if(st!==null&&at.Gl=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(qh)||x.Hf(Ru))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),Xt.free(at),Xt.free(st)}}return rt}}return x=y.ga(_m(x),Xt.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=Uv(x,tt.copy()))):(at=this.computeSpot(!E,tt),z=Xt.alloc(),tt=tt.ga(_m(at),z),b&&(tt=Uv(x,tt)),Xt.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Xt.free(x),rt},yn.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var at=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?Uv(at,rt.copy()):x):(x=Xt.alloc(),rt=rt.ga(eo,x),Xt.free(x)),x=Math.abs(rt.x-at.x)>Math.abs(rt.y-at.y)?rt.x>=at.x?0:180:rt.y>=at.y?90:270,Xt.free(at),at=x}return E.Mc()&&tt.Td(a)&&(at+=180,360<=at&&(at-=360)),Yg(E)||(a=y.li(),a===0)||(45<=a&&135>a?at+=90:135<=a&&225>a?at+=180:225<=a&&315>a&&(at+=270),360<=at&&(at-=360)),at},yn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=Qm(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},yn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=eo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Rs?ms:y)):(a=y||this.toPort,a===null?a=eo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Rs?ms:y)),a};function Yg(a){return a===ms||a.x===.5&&a.y===.5}function _m(a){return a.x===.5&&a.y===.5?a:eo}yn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Zl&&4vt.width||ft.y>vt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=nr.alloc(),ft.set(tt),ut instanceof dn)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof Qi)if(rt=a,vt=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),vt)t:{var St=rt,Pt=ft;if(ut.fh(St,Pt))rt=!0;else{if(Pt===void 0&&(Pt=ut.transform,St.Re(ut.actualBounds))){rt=!0;break t}rt=St.left,vt=St.right;var At=St.top;St=St.bottom;var Yt=Xt.alloc(),zt=Xt.alloc(),te=Xt.alloc(),ee=nr.alloc();ee.set(Pt),ee.bv(ut.transform),ee.Vj(),zt.x=vt,zt.y=At,zt.transform(ee),Yt.x=rt,Yt.y=At,Yt.transform(ee),Pt=!1,Zf(ut,Yt,zt,te)?Pt=!0:(Yt.x=vt,Yt.y=St,Yt.transform(ee),Zf(ut,Yt,zt,te)?Pt=!0:(zt.x=rt,zt.y=St,zt.transform(ee),Zf(ut,Yt,zt,te)?Pt=!0:(Yt.x=rt,Yt.y=At,Yt.transform(ee),Zf(ut,Yt,zt,te)&&(Pt=!0)))),nr.free(ee),Xt.free(Yt),Xt.free(zt),Xt.free(te),rt=Pt}}else rt=ut.fh(rt,ft)}else rt=Bs(ut,a,E,ft);rt&&(vt=ut,y!==null&&(vt=y(ut)),vt&&(x===null||x(vt))&&b.add(vt)),nr.free(ft)}}}return z===void 0&&nr.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&nr.free(tt),!1},yn.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?Xu:this.curve},yn.prototype.computeCorner=function(){if(this.curve===Xu)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},yn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;Eat?-Math.PI/2:Math.PI/2;else ut=Math.atan(at/Math.abs(rt)),0>rt&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;rt=E.x-tt;var vt=E.y-ft;for(at=Math.sqrt(rt*rt+vt*vt),Se.$(rt,0)?vt=0>vt?-Math.PI/2:Math.PI/2:(vt=Math.atan(vt/Math.abs(rt)),0>rt&&(vt=Math.PI-vt)),st=at/st,ut=vt-ut,this.dd(a,y),a+=1;aat?-Math.PI/2:Math.PI/2:(at=Math.atan(at/Math.abs(rt)),0>rt&&(at=Math.PI-at)),rt=at+ut,y*=st,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case e0:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,st=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,ut=y.y,at=E.x,vt=E.y;var St=1;if(at-rt!==0){var Pt=(vt-ut)/(at-rt);St=Math.sqrt(1+1/(Pt*Pt))}else Pt=9e9;for(this.dd(a,y),a+=1;ay?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),at=z.actualBounds.copy();if(rt.w()&&at.w()){rt.Bc(Ip,Ip),at.Bc(Ip,Ip),rt.Ye(a),at.Ye(x);var st=Xt.alloc(),ut=Xt.alloc();y===0?x.x>a.x||E===270&&x.ya.x||E===90&&x.y>a.y&&at.right>a.x?(st.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=st.x,ut.y=x.y):E===270&&x.ya.y?(st.x=a.xat.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):at.right,ut.x=st.x,ut.y=x.y):E===0&&a.xat.top&&a.yrt.bottom)&&(E===180&&(at.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.ya.y&&(E===180||E===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,at.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y=rt.left&&x.x<=a.x||a.x<=at.right&&a.x>=x.x?(E===90||E===270)&&(st.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=E===270||(E===0||E===180)&&x.ya.y&&at.lefta.y?(st.x=a.x>at.right?this.computeMidOrthoPosition(a.x,a.y,at.right,x.y,!1):a.x>at.left&&(E===270&&a.yat.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):at.left,ut.x=st.x,ut.y=x.y):E===180&&a.x>at.right&&a.y>at.top&&a.yrt.bottom)&&(E===0&&(at.ca(a)||rt.ca(x))?st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.ya.y&&(E===0||E===270)&&(st.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,at.top),!0)),ut.x=x.x,ut.y=st.y),st.y>rt.top&&st.y=a.x||a.x>=at.left&&a.x<=x.x?(E===90||E===270)&&(st.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(st.x,x.y)):(st.y=E===270||(E===0||E===180)&&x.ya.y||E===180&&x.xa.y||E===0&&x.x>a.x&&at.bottom>a.y?(st.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(st.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=st.y):E===180&&x.xa.x?(st.y=a.yat.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):at.bottom,ut.x=x.x,ut.y=st.y):E===90&&a.yat.left&&a.xrt.right)&&(E===270&&(at.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.xa.x&&(E===270||E===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,at.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x=rt.top&&x.y<=a.y||a.y<=at.bottom&&a.y>=x.y?(E===0||E===180)&&(st.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=E===180||(E===90||E===270)&&x.xa.x&&at.top=a.x?(st.y=a.y>at.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,at.bottom,!0):a.y>at.top&&(E===180&&a.xat.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):at.top,ut.x=x.x,ut.y=st.y):E===270&&a.y>at.bottom&&a.x>at.left&&a.xrt.right)&&(E===90&&(at.ca(a)||rt.ca(x))?st.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.xa.x&&(E===90||E===180)&&(st.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,at.left),x.y,!1)),ut.x=st.x,ut.y=x.y),st.x>rt.left&&st.x=a.y||a.y>=at.top&&a.y<=x.y?(E===0||E===180)&&(st.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,st.y)):(st.x=E===180||(E===90||E===270)&&x.x=Xg&&(r1(St),rt.Bc(St.Ho*St.Hx,St.Go*St.Ix),o1(St,a,y,ft,E,rt,!1),at=_d(St,ft.x,ft.y)),!St.abort&&atthis.pointsCount?(y===0||y===180?(rt.x=a.x,rt.y=ft.y):(rt.x=ft.x,rt.y=a.y),this.L(2,rt.x,rt.y),this.m(3,rt.x,rt.y)):(tt=this.i(3),y===0||y===180?Se.B(rt.x,tt.x)?(rt=y===0?Math.max(rt.x,a.x):Math.min(rt.x,a.x),this.L(2,rt,a.y),this.L(3,rt,tt.y)):Se.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=St.Go/2&&(this.L(2,rt.x,a.y),this.L(3,tt.x,a.y)),this.m(2,rt.x,a.y)):this.L(2,a.x,rt.y):(y===90||y===270)&&(Se.B(rt.y,tt.y)?(rt=y===90?Math.max(rt.y,a.y):Math.min(rt.y,a.y),this.L(2,a.x,rt),this.L(3,tt.x,rt)):Se.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=St.Ho/2&&(this.L(2,a.x,rt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,rt.y)):this.L(2,rt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Pt!==null&&(E===0||E===180?this.yf(z.x,Pt.y):this.yf(Pt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(st.copy()),this.ne(ut.copy())),Xt.free(st),Xt.free(ut)}},yn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Zv(a){if(a.diagram===null||!a.isAvoiding||!Ed(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=fc(a.diagram,!0,a.containingGroup,null);for(var E=1;EQf&&_d(y,ut,ft)!==st-1&&(_d(y,x-rt,E)===st-1?(b=180,ut=x-rt,ft=E):_d(y,x+rt,E)===st-1?(b=0,ut=x+rt,ft=E):_d(y,x,E-at)===st-1?(b=270,ut=x,ft=E-at):_d(y,x,E+at)===st-1&&(b=90,ut=x,ft=E+at));st>Qf&&_d(y,ut,ft)===st-1;)x=ut,E=ft,b===0?ut+=rt:b===90?ft+=at:b===180?ut-=rt:ft-=at,--st;z?st>Qf&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/at)*at+at/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/at)*at+at/2),st>Qf&&(z=b,tt=x,ut=E,b===0?(z=90,ut+=at):b===90?(z=180,tt-=rt):b===180?(z=270,ut-=at):b===270&&(z=0,tt+=rt),_d(y,tt,ut)===st-1?Xv(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=at):b===90?(z=0,tt+=rt):b===180?(z=90,ut+=at):b===270&&(z=180,tt-=rt),_d(y,tt,ut)===st-1&&Xv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}yn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Xa(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;ttthis.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E=y&&(E=y-1),at=this.i(E),z.x=Math.min(at.x,z.x),z.y=Math.min(at.y,z.y);E=z.x,at=z.y}else{for(at=0;atYt?Pt>St?(z.x=zt-ee,z.y=St-ee,b.x=zt+At,b.y=St+At):(z.x=zt-ee,z.y=St+ee,b.x=zt+At,b.y=St-At):Pt>St?(z.x=zt+ee,z.y=St-ee,b.x=zt-At,b.y=St+At):(z.x=zt+ee,z.y=St+ee,b.x=zt-At,b.y=St-At)),Se.$(Yt,zt)&&Se.$(St,Pt)&&(St>vt?(te>zt?(z.x=zt-ee,z.y=St-ee,b.x=zt+At):(z.x=zt+ee,z.y=St-ee,b.x=zt-At),b.y=St+At):(te>zt?(z.x=zt-ee,z.y=St+ee,b.x=zt+At):(z.x=zt+ee,z.y=St+ee,b.x=zt-At),b.y=St-At)),(Se.$(Yt,zt)&&Se.$(zt,te)||Se.$(vt,St)&&Se.$(St,Pt))&&(Yt=.5*(Yt+te),vt=.5*(vt+Pt),z.x=Yt,z.y=vt,b.x=Yt,b.y=vt),(ft===1||ft===2&&Se.$(tt.x,this.i(0).x)&&Se.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+st.x),x.y=.5*(tt.y+st.y)),Gc(rt,x.x-E,x.y-at,z.x-E,z.y-at,st.x-E,st.y-at),y.set(z),x.set(b),tt=st}}st=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=dg(this,ut.copy(),!1,os)),st=.5*(st+ut.x),tt=.5*(tt+ut.y),Gc(rt,b.x-E,b.y-at,st-E,tt-at,ut.x-E,ut.y-at),Xt.free(y),Xt.free(x),Xt.free(z),Xt.free(b)}else for(x=3;x=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=dg(this,tt.copy(),!1,os)),Gc(rt,z.x-E,z.y-at,b.x-E,b.y-at,tt.x-E,tt.y-at);else{for(z=Xt.alloc(),z.assign(this.i(0)),b=Xt.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,st=0;ft=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=dg(this,ut.copy(),!1,os)),cg(this,rt,-E,-at,z,ut,x);else if(st===0)for(ft=1;ftz.x?oe=vt.x-Pt:oe=vt.x+Pt,zt.y>vt.y?te=vt.y+ee:te=vt.y-ee,zt=Xt.allocAt(oe,pe),cg(this,rt,ft,Yt,z,zt,At),Xt.free(zt),Gm(rt,vt.x+ft,vt.y+Yt,St+ft,te+Yt),z.h(St,te)}else Se.B(z.x,vt.x)&&Se.B(vt.y,zt.y)?(Pt=Math.min(tt,Math.abs(vt.y-b.y)/2),Pt=ee=Math.min(Pt,Math.abs(zt.x-vt.x)/2),Se.B(ee,0)?(cg(this,rt,ft,Yt,z,vt,At),z.assign(vt)):(oe=vt.x,pe=vt.y,St=oe,te=pe,vt.y>z.y?pe=vt.y-Pt:pe=vt.y+Pt,zt.x>vt.x?St=vt.x+ee:St=vt.x-ee,zt=Xt.allocAt(oe,pe),cg(this,rt,ft,Yt,z,zt,At),Xt.free(zt),Gm(rt,vt.x+ft,vt.y+Yt,St+ft,te+Yt),z.h(St,te))):(cg(this,rt,ft,Yt,z,vt,At),z.assign(vt));b.assign(ut),ft=st}Xt.free(z)}Km=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=at,this.computeShortLength(!0)!==0&&(b=dg(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=dg(this,rt,!1,z)),a.type=wn.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function qm(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Se.$(a,0)?y:Se.$(y,0)?a:Math.sqrt(a*a+y*y)))}function dg(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=qm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=qm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function Jv(a,y,x,E){for(var b=a.pointsCount,z=y;Se.$(y.x,z.x)&&Se.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!Se.$(y.x,z.x)&&!Se.$(y.y,z.y))return x-1;for(var tt=z;Se.$(y.x,z.x)&&Se.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||Se.$(y.y,z.y)&&Se.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}yn.prototype.computeJumpLength=function(){return 10};function cg(a,y,x,E,b,z,tt){if(!tt&&Jf(a)){tt=a.computeJumpLength();var rt=tt/2,at=[],st=0;if(a.isVisible()&&(st=Ex(a,b,z,at)),0ft-tt);)st--,ft=Math.max(ut-rt,z.x);ut=z.y-tt+E,ft+=x,St=z.y+E,a.curve===Uc?Kg(y,ft,St,!1):Gc(y,vt,ut,ft,ut,ft,St)}else if(Se.B(b.x,z.x))if(b.yut-tt);)st--,ut=Math.max(ft-rt,z.y);ft=z.x-tt+x,St=z.x+x,ut+=E,a.curve===Uc?Kg(y,St,ut,!1):Gc(y,ft,vt,ft,ut,St,ut)}}}y.lineTo(z.x+x,z.y+E)}function Ex(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rttt.x&&ut.x>=st.x||st.xtt.y&&ut.y>=st.y||st.ytt&&Math.min(Pt,At)ut&&!Se.B(Pt,At)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(Se.B(ft,St)&&Se.B(Pt,At)&&Math.min(ut,vt)Pt&&Math.min(tt,Yt)ft&&!Se.B(tt,Yt)){rt.x=Pt,rt.y=ft,ut=!0;break t}rt.x=0,rt.y=0,ut=!1}ut&&(b?x.push(rt.x):x.push(rt.y)),tt=st}Xt.free(rt)}function Jf(a){return a=a.curve,a===Ug||a===Uc}function $m(a,y){(y||Jf(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}yn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rta&&Ki(a,">= 0",yn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Rs},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&Fu(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Ki(a,">= 0",yn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0=E&&(z=E-1);var rt=this.i(z-1),at=this.i(z);Se.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,at.x,at.y,.5,a),y=Math.min(at.x,y),x=Math.min(at.y,x),b=at}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;bE&&(E=-E)):Se.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;Ethis.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Yg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Yg(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),$m(this,y===Uc||y===Ug||a===Uc||a===Ug),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),$m(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),yn.prototype.invalidateOtherJumpOvers=yn.prototype.Xo,yn.prototype.findClosestSegment=yn.prototype.ez,yn.prototype.updateRoute=yn.prototype.vg,yn.prototype.invalidateRoute=yn.prototype.bb,yn.prototype.rollbackRoute=yn.prototype.rv,yn.prototype.commitRoute=yn.prototype.zf,yn.prototype.startRoute=yn.prototype.uh,yn.prototype.clearPoints=yn.prototype.Fj,yn.prototype.removePoint=yn.prototype.pv,yn.prototype.addPointAt=yn.prototype.yf,yn.prototype.addPoint=yn.prototype.ne,yn.prototype.insertPointAt=yn.prototype.m,yn.prototype.insertPoint=yn.prototype.Kz,yn.prototype.setPointAt=yn.prototype.L,yn.prototype.setPoint=yn.prototype.dd,yn.prototype.getPoint=yn.prototype.i,yn.prototype.getOtherPort=yn.prototype.Cz,yn.prototype.getOtherNode=yn.prototype.To;var fg=null,gg=null,Qv=new Re(yn,"Normal",1),kx=new Re(yn,"Orthogonal",2),Ax=new Re(yn,"AvoidsNodes",6),e1=new Re(yn,"AvoidsNodesStraight",7),Zl=new Re(yn,"None",0),Xu=new Re(yn,"Bezier",9),Uc=new Re(yn,"JumpGap",10),Ug=new Re(yn,"JumpOver",11),Fp=new Re(yn,"End",17),t0=new Re(yn,"Scale",18),e0=new Re(yn,"Stretch",19),Np=new Re(yn,"OrientAlong",21),Tp=new Re(yn,"OrientPlus90",22),Dp=new Re(yn,"OrientMinus90",23),_v=new Re(yn,"OrientOpposite",24),n0=new Re(yn,"OrientUpright",25),Bp=new Re(yn,"OrientPlus90Upright",26),Op=new Re(yn,"OrientMinus90Upright",27),i0=new Re(yn,"OrientUpright45",28),n1=16,i1=14,Ip=8;yn.className="Link",yn.Normal=Qv,yn.Orthogonal=kx,yn.AvoidsNodes=Ax,yn.AvoidsNodesStraight=e1,yn.None=Zl,yn.Bezier=Xu,yn.JumpGap=Uc,yn.JumpOver=Ug,yn.End=Fp,yn.Scale=t0,yn.Stretch=e0,yn.OrientAlong=Np,yn.OrientPlus90=Tp,yn.OrientMinus90=Dp,yn.OrientOpposite=_v,yn.OrientUpright=n0,yn.OrientPlus90Upright=Bp,yn.OrientMinus90Upright=Op,yn.OrientUpright45=i0,yn.EndSegmentStep=8,yn.CurvinessStart=n1,yn.SpacingMin=i1,yn.OrthoShortCut=Ip;function r0(a,y,x,E){po(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}r0.prototype.Sl=function(){if(!this.qq){var a=this.links;0=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di=Qf&&(x[E]=qv)}Rp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+xthis.Fn||y+Ea&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===Zc)return!1}return!0};function qd(a,y,x,E,b,z,tt,rt,at){if(!(ytt||xat)){var st=y|0,ut=x|0,ft=a.ac[st][ut];if(ft>=Qf&&ft=a.ac[st][ut]);)a.ac[st][ut]=ft,ft+=1,b?ut+=E:st+=E;if(st=b?ut:st,b)if(0st;x+=E)qd(a,y,x,1,!b,z,tt,rt,at),qd(a,y,x,-1,!b,z,tt,rt,at);else if(0st;y+=E)qd(a,y,x,1,!b,z,tt,rt,at),qd(a,y,x,-1,!b,z,tt,rt,at)}}function o0(a,y,x,E,b,z,tt,rt,at){y|=0,x|=0;var st=Zc,ut=Qf;for(a.ac[y][x]=ut;st===Zc&&y>z&&yrt&&xz&&yrt&&x=Math.abs(rt-st)&&1>=Math.abs(at-ut))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var vt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,vt-=a.Od,vt/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,E|0)),vt=Math.min(a.ei,Math.max(0,vt|0)),E=a.ac,rt|=0,at|=0,st|=0,ut|=0;var St=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][at]===Zc?(o0(a,rt,at,St,x,z,y,ft,vt),o0(a,rt,at,1,!x,z,y,ft,vt),o0(a,rt,at,-1,!x,z,y,ft,vt)):o0(a,rt,at,St,x,rt,at,rt,at),E[st][ut]===Zc?(a0(a,st,ut,b===0||b===90?1:-1,b===90||b===270,z,y,ft,vt),a0(a,st,ut,1,!(b===90||b===270),z,y,ft,vt),a0(a,st,ut,-1,!(b===90||b===270),z,y,ft,vt)):a0(a,st,ut,St,x,st,ut,st,ut),x=Ei(),tt&&a1(a,st,ut,b,rt,at,x))for((x[0]!==st||x[1]!==ut)&&(x.unshift(ut),x.unshift(st)),(x[x.length-2]!==rt||x[x.length-1]!==at)&&(x.push(rt),x.push(at)),a=Qf,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],st=x[z+1];y>b?b++:ytt?tt++:stb)ut--;else break;else if(ft>z)ft--;else break;var vt=rt[ut][ft];if(vt===0||vt===$v)break;at=ut,st=ft}for(;;){if(ut=E,ft=at,vt=st,E===0?vtz&&(ut=270,vt--):E===90?ftb&&(ut=180,ft--):E===180?vtz&&(ut=270,vt--):ftb&&(ut=180,ft--),ft=rt[ft][vt],ut!==E&&ft!==0&&ft!==$v){if(tt.push(at),tt.push(st),a1(a,at,st,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[at][st]=$v,E===0){if(at===y)return!1;at--}else if(E===90){if(st===x)return!1;st--}else if(E===180){if(at===y)return!1;at++}else{if(st===x)return!1;st++}}}_e.Object.defineProperties(Rp.prototype,{bounds:{get:function(){return new Ye(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90180+a&&x<=360-a?270:0;case 13:return 180a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}pg.prototype.Sl=function(){this.pe.length=0};function s1(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof Gi?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var rt=a.port.ga(bs,Xt.alloc()),at=a.port.ga(yl,Xt.alloc());for(b=Ye.allocAt(rt.x,rt.y,0,0),b.Ye(at),Xt.free(rt),Xt.free(at),rt=Xt.allocAt(b.x+b.width/2,b.y+b.height/2),at=a.port.li(),tt=tt.iterator;tt.next();){var st=tt.value;if(st.isVisible()&&st.fromPort!==st.toPort){var ut=st.fromPort===a.port||st.fromNode!==null&&st.fromNode.Td(E),ft=st.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?st.toPort:st.fromPort,ut!==null)){var vt=ut.part;if(vt!==null){var St=vt.findVisibleNode();St!==null&&St!==vt&&(vt=St,ut=vt.port),ut=st.computeOtherPoint(vt,ut),vt=rt.ab(ut),vt-=at,0>vt?vt+=360:360<=vt&&(vt-=360),ft=bx(b,ft,vt,st.isOrthogonal),ft===0?(ft=4,180vt&&(vt+=360)),St=a.pe[z],St===void 0?(St=new ty(st,vt,ft),a.pe[z]=St):(St.link=st,St.angle=vt,St.Nc=ft),St.hv.set(ut),z++}}}}for(Xt.free(rt),a.pe.sort(pg.prototype.j),at=a.pe.length,E=-1,z=rt=0;zMath.abs(At)?(te=Math.abs(At)/vt,vt=Math.abs(At)):te=1;break;case 2:St>Math.abs(ee)?(te=Math.abs(ee)/St,St=Math.abs(ee)):te=1;break;case 1:ft>Math.abs(At)?(te=Math.abs(At)/ft,ft=Math.abs(At)):te=1;break;default:case 4:ut>Math.abs(ee)?(te=Math.abs(ee)/ut,ut=Math.abs(ee)):te=1}zt=0}var Ee=oe.Zo;if(E===Kv){switch(oe=oe.link.computeThickness(),oe*=te,Ee.set(pe),Pt){case 8:Ee.x=pe.x+At/2+vt/2-zt-oe/2;break;case 2:Ee.y=pe.y+ee/2+St/2-zt-oe/2;break;case 1:Ee.x=pe.x+At/2-ft/2+zt+oe/2;break;default:case 4:Ee.y=pe.y+ee/2-ut/2+zt+oe/2}zt+=oe}else{var Tn=.5;E===Xm&&(Tn=(oe.Uo+1)/(oe.Gl+1)),Ee.x=pe.x+At*Tn,Ee.y=pe.y+ee*Tn}}}for(Xt.free(rt),Xt.free(at),Xt.free(tt),Xt.free(st),pe=a.pe,z=0;zy.Nc?1:a.angley.angle?1:0},pg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ms,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},Sa.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof yn)&&(zp(rt),this.rh(rt))){var at=rt.measuredBounds,st=at.width;at=at.height,rt.moveTo(x,E),rt instanceof Gi&&(rt.rh=!1),x+=Math.max(st,50)+20,z=Math.max(z,Math.max(at,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},Sa.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Gi&&a.rh)};function xf(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var at=x.value;E&&!at.isTopLevel||b!==null&&!b(at)||!at.canLayout()||(z&&at instanceof zn?at.isLinkLabel||(at instanceof Gi&&at.layout===null?xf(a,y,at.memberParts,!1,b,z,tt,rt):(zp(at),y.add(at))):tt&&at instanceof yn?y.add(at):!rt||!at.Zc()||at instanceof zn||(zp(at),y.add(at)))}}function zp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Sa.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Ye),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Sa.prototype.ex=function(a){var y=new hn;return a instanceof ge?(xf(this,y,a.nodes,!0,null,!0,!0,!0),xf(this,y,a.links,!0,null,!0,!0,!0),xf(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Gi?xf(this,y,a.memberParts,!1,null,!0,!0,!0):xf(this,y,a.iterator,!1,null,!0,!0,!0),y},Sa.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(bs),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},_e.Object.defineProperties(Sa.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,a!==null&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.sn},set:function(a){this.sn!==a&&(this.sn=a)}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a,a||(this.xn=!0)}},isViewportSized:{get:function(){return this.yn},set:function(a){this.yn!==a&&(this.yn=a)&&this.C()}},isRouting:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a)}},isRealtime:{get:function(){return this.un},set:function(a){this.un!==a&&(this.un=a)}},isValidLayout:{get:function(){return this.xn},set:function(a){this.xn!==a&&(this.xn=a,a||(a=this.diagram,a!==null&&(a.xh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,a!==null&&(a.layout=this))}},boundsComputation:{get:function(){return this.Em},set:function(a){this.Em!==a&&(this.Em=a,this.C())}},arrangementOrigin:{get:function(){return this.Am},set:function(a){this.Am.D(a)||(this.Am.assign(a),this.C())}}}),Sa.prototype.collectParts=Sa.prototype.ex,Sa.prototype.getLayoutBounds=Sa.prototype.ni,Sa.prototype.invalidateLayout=Sa.prototype.C,Sa.className="Layout";function Jo(a){po(this),this.Sc=a,this.wf=new hn,this.ye=new hn,this.Es=new gi,this.zs=new gi}Jo.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new hn,this.ye=new hn,this.Es=new gi,this.zs=new gi},Jo.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1y?1:0):1:y!==null?-1:0}_e.Object.defineProperties(As.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=Ye.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),Ye.free(x),!(a instanceof Gi)&&(a=a.locationObject.ga(eo),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new hn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new hn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new hn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new xn,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),As.prototype.deleteDestinationEdge=As.prototype.Jl,As.prototype.addDestinationEdge=As.prototype.zl,As.prototype.deleteSourceEdge=As.prototype.Kl,As.prototype.addSourceEdge=As.prototype.Cl,As.className="LayoutVertex",As.standardComparer=ry,As.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x "+(this.qd?this.qd.toString():"null"))),y},Nu.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Nu.prototype.commit=function(){},Nu.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},_e.Object.defineProperties(Nu.prototype,{network:{get:function(){return this.nb},set:function(a){this.nb=a}},data:{get:function(){return this.ub},set:function(a){this.ub!==a&&(this.ub=a)}},link:{get:function(){return this.$k},set:function(a){this.$k!==a&&(this.$k=a)}},fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}}}),Nu.prototype.getOtherVertex=Nu.prototype.Ax,Nu.className="LayoutEdge";function _s(a){Sa.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new sn(NaN,NaN).freeze(),this.tf=new sn(10,10).freeze(),this.Jb=jp,this.Rb=l0,this.nd=Wp,this.hd=u1,a&&Object.assign(this,a)}Pe(_s,Sa),_s.prototype.cloneProtected=function(a){Sa.prototype.cloneProtected.call(this,a),a.zo=this.zo,a.yo=this.yo,a.yg.assign(this.yg),a.tf.assign(this.tf),a.Jb=this.Jb,a.Rb=this.Rb,a.nd=this.nd,a.hd=this.hd},_s.prototype.qb=function(a){a.classType===_s?a===Wp||a===h0||a===oy||a===u0?this.sorting=a:a===l0||a===ld?this.arrangement=a:a===jp||a===s0?this.alignment=a:Be("Unknown enum value: "+a):Sa.prototype.qb.call(this,a)},_s.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof Gi)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case u0:b.reverse();break;case Wp:b.sort(this.comparer);break;case h0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case s0:var rt=y,at=x,st=Ye.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ftz-1||0tt)&&(E.push(new Ye(0,At,tt+rt,zt)),Yt=0,Pt=St,At+=zt,zt=0),zt=Math.max(zt,Ee),vt){case ld:oe=-oe.width;break;default:oe=0}switch(ee.moveTo(Pt+oe,At),vt){case ld:Pt-=pe;break;default:Pt+=pe}Yt++}E.push(new Ye(0,At,tt+rt,zt)),Ye.free(st);break;case jp:for(at=tt,ut=z,ft=y,vt=x,tt=Ye.alloc(),St=Math.max(this.cellSize.width,1),z=At=st=0,rt=Xt.alloc(),Pt=0;Pt=st&&(at-=st),st=ee=0,pe=Math.max(this.cellSize.height,1),oe=z=0,Ee=!0,Yt=Xt.alloc(),Tn=0;Tnut-1||0at){for(E.push(new Ye(0,Ee?te-z:te,at+ft,oe+z+vt)),ei=0;eist&&(z.width+=z.x-st,z.x=st);Ye.free(tt)}for(rt=z=tt=b=0;rty?1:0}_e.Object.defineProperties(_s.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0ft)){var At=ft+wp(Pt);Pt.pc(At,!0),xv(Pt,At,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},Lo.prototype.updateAllTargetBindings=function(a){a===void 0&&(a="");for(var y=this.parts.iterator;y.next();)y.value.La(a);for(y=this.nodes.iterator;y.next();)y.value.La(a);for(y=this.links.iterator;y.next();)y.value.La(a)},Lo.prototype.rp=function(){for(var a=this.H.model,y=new hn,x=a.nodeDataArray,E=0;E=E)return"[]";var b=new yo;b.add("["),x&&1E)return;Ao(a.Tc,E)}ws(a,"nodeDataArray",Ga,"nodeDataArray",a,y,null,E,null),a.qp(y)}wt.nA=function(a){if(Ni(a))for(var y=a.length,x=0;xy&&(y=a.length),ma(a,y,x),ws(this,"",ha,"",a,null,x,null,y)},wt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Be("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Ao(a,y),ws(this,"",Ga,"",a,x,null,y,null)},wt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=rs(a,y),y===void 0))return"";if(typeof y=="string")return y;Be("getCategoryForNodeData found a non-string category for "+a+": "+y)},wt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=rs(a,x);E===void 0&&(E=""),E!==y&&(ga(a,x,y),ws(this,"nodeCategory",$o,x,a,E,y))}else ga(a,x,y)}},wt.lm=function(a,y){this.jm(y,this.Ro(a))},wt.Tl=function(){return!1},wt.Wj=function(){return!1},wt.ri=function(){return!1},wt.xs=function(){return!1},wt.Xj=function(){return!1};function hy(){return new ai}function Gp(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return Gp(a,y.constructor);return typeof y}function dy(a){return Gh[a]?Gh[a]:We.go!==void 0&&We.go[a]?We.go[a]:null}function rs(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function ga(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}_e.Object.defineProperties(ai.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&Be("Model.nodeKeyProperty may not be the empty string"),0"+Ju(this,b,!1)}return y},wt.Qv=function(a,y){this.linkKeyProperty===""&&Be("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ai.prototype.Qv.call(this,a,y),E=this,b=new hn,z=new hn,tt=new hn,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===ha?b.add(ut.newValue):ut.change===Ga&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof ai||E.lb(ut.object)||A1(E,ut.object).each(function(ft){z.add(ft)})))});var at=this.il;at.clear(),b.each(function(ut){at.add(E.Ac(ut)),y||z.add(ut)});var st=this.kl;return st.clear(),tt.each(function(ut){st.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Ga){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,mn(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}ai.prototype.changeState.call(this,a,y)}},wt=Nr.prototype,wt.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),ga(x,this.nodeKeyProperty,a),this.xf(x))}return a}},wt.yx=function(a){return Ju(this,a,!0)},wt.wv=function(a,y){Qg(this,a,y,!0)},wt.Bx=function(a){return Ju(this,a,!1)},wt.Bv=function(a,y){Qg(this,a,y,!1)};function Ju(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=rs(y,a),a!==void 0))){if(Pf(a))return a;Be((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Qg(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=rs(y,b);z!==x&&(hd(a,z,y),ga(y,b,x),a.hc(x)===null&&ud(a,x,y),ws(a,E?"linkFromKey":"linkToKey",$o,b,y,z,x),typeof b=="string"&&a.La(y,b))}else ga(y,b,x)}}wt.zx=function(a){return p0(this,a,!0)},wt.xv=function(a,y){_g(this,a,y,!0)},wt.Cx=function(a){return p0(this,a,!1)},wt.Cv=function(a,y){_g(this,a,y,!1)};function p0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=rs(y,a),y===void 0?"":y)}function _g(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=rs(y,b);z===void 0&&(z=""),z!==x&&(ga(y,b,x),ws(a,E?"linkFromPortId":"linkToPortId",$o,b,y,z,x),typeof b=="string"&&a.La(y,b))}else ga(y,b,x)}}wt.Ef=function(a){if(a===null)return m0;var y=this.je;return y===""?m0:(a=rs(a,y),a===void 0?m0:a)},wt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=rs(a,x);if(E===void 0&&(E=m0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;zb||(E.splice(b,1),this.Jc(a)&&(hd(this,y,a),ws(this,"linkLabelKeys",Ga,x,a,y,null,b,null)))}else E!==void 0&&Be(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},wt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=rs(a,y),y!==void 0)){if(Pf(y))return y;Be("Key value for link data "+a+" is not a number or a string: "+y)}}},wt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=rs(a,x);E!==y&&this.jh(y)===null&&(ga(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),ws(this,"linkKey",$o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else ga(a,x,y)}},wt.jh=function(a){return a===null&&Be("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Pf(a)?this.wb.I(a):null},wt.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){ga(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;ga(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ga(a,y,x)}}}}},wt.Jc=function(a){return a===null?!1:this.$f.contains(a)},wt.fi=function(a){a!==null&&(Fs(a),this.Jc(a)||b1(this,a,!0))};function b1(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&Be("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),ws(a,"linkDataArray",ha,"linkDataArray",a,null,y,null,E),cy(a,y)}wt.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;xE)return;a.md.splice(E,1)}if(ws(a,"linkDataArray",Ga,"linkDataArray",a,y,null,E,null),x=Ju(a,y,!0),hd(a,x,y),x=Ju(a,y,!1),hd(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new xn;y.addAll(a.iterator),a=new xn;var x=new xn,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,at=this.nodeDiameterFormula,st=this.radius;(!isFinite(st)||0>=st)&&(st=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var vt=this.sweepAngle;if((!isFinite(vt)||360vt)&&(vt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===Vh&&at===mg?rt=Kh:rt===Vh&&at!==mg&&(rt=this.arrangement),(this.direction===_f||this.direction===qg)&&this.sorting!==$g){for(at=0;!(at>=E.length)&&(a.add(E.M(at)),!(at+1>=E.length));at+=2)x.add(E.M(at+1));this.direction===_f?(this.arrangement===Vh&&a.reverse(),E=new xn,E.addAll(a),E.addAll(x)):(this.arrangement===Vh&&x.reverse(),E=new xn,E.addAll(x),E.addAll(a))}at=E.length;for(var St=z=b=0;Stvt&&(St===0||St===E.length-1)&&(At/=2),b+=At,z++}if(isNaN(st)||rt===Vh){if(isNaN(y)&&(y=6),rt!==Kh&&rt!==Vh){for(z=-1/0,tt=0;ttst?(st=b,z=st*ut):tt=St/(360<=vt?at:at-1)}if(this.kw=rt,this.lc=st,this.Zm=ut,this.lw=ft,this.Wp=vt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,st=this.lw,ut=this.Wp,ft=this.Ti,vt=this.me,at=this.Jp,this.direction!==_f&&this.direction!==qg||E!==Vh)if(this.direction===_f||this.direction===qg){switch(tt=0,E){case Cf:tt=180*y0(this,rt,vt,st,at)/Math.PI;break;case Kh:at=y=0,tt=a.first(),tt!==null&&(y=Ef(tt,Math.PI/2)),tt=x.first(),tt!==null&&(at=Ef(tt,Math.PI/2)),tt=180*y0(this,rt,vt,st,ft+(y+at)/2)/Math.PI;break;case Xc:tt=ut/y.length}if(this.direction===_f){switch(E){case Cf:Up(this,a,st,Lf);break;case Kh:Yp(this,a,st,Lf);break;case Xc:Vp(this,a,ut/2,st,Lf)}switch(E){case Cf:Up(this,x,st+tt,_l);break;case Kh:Yp(this,x,st+tt,_l);break;case Xc:Vp(this,x,ut/2,st+tt,_l)}}else{switch(E){case Cf:Up(this,x,st,Lf);break;case Kh:Yp(this,x,st,Lf);break;case Xc:Vp(this,x,ut/2,st,Lf)}switch(E){case Cf:Up(this,a,st+tt,_l);break;case Kh:Yp(this,a,st+tt,_l);break;case Xc:Vp(this,a,ut/2,st+tt,_l)}}}else switch(E){case Cf:Up(this,y,st,this.direction);break;case Kh:Yp(this,y,st,this.direction);break;case Xc:Vp(this,y,ut,st,this.direction);break;case Vh:T1(this,y,ut,st,this.direction)}else T1(this,y,ut,st-ut/2,_l)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Vp(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,at=0;atx){for(z=E+(b===_l?z:-z);0>z;)z+=360;z%=360,180=ut.length-1));ft++)O1(a,at,st,ut,ft,b,z)||I1(a,at,st,ut,ft,b,z),at=z.x,st=z.y;if(Xt.free(z),a.mj++,!(23Math.abs(St)?Math.abs(at-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0Math.abs(vt)?0:vt,at=Math.abs(z)>Math.abs(ft)?0ft:0a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10=ft.length-1));vt++)O1(a,at,st,ft,vt,b,ut)||I1(a,at,st,ft,vt,b,ut),at=ut.x,st=ut.y;if(Xt.free(ut),a.mj++,!(23a.mj?a.lc-z/(2*Math.PI):a.lc-(0rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=st,!1;ut=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=st,!1;ut=!0}return st=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*at,0>x!==ut&&(st=-st),Math.abs(x-st)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=st,!1):(tt.x=z,tt.y=st,!0)}function I1(a,y,x,E,b,z,tt){var rt=a.lc,at=a.me,st=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===_l)){if(z=x-a,z<-at){if(z=x+a,z>at){tt.x=st,tt.y=z;return}E=!0}}else if(z=x+a,z>at){if(z=x-a,z<-at){tt.x=st,tt.y=z;return}E=!0}st=Math.sqrt(1-Math.min(1,z*z/(at*at)))*rt,0>y!==E&&(st=-st),tt.x=st,tt.y=z}Wa.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Wa.prototype.commitNodes=function(){var a=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,y=a?this.group.location.copy():null,x=this.actualCenter;a?x=new Xt(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},Wa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,rt=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),at=0,st=0;st<=z;st++){E!==void 0&&b!==void 0?at=E+st*b/z:at=st*Math.PI/(2*z);var ut=Math.sin(at);tt+=Math.sqrt(1-a*a*ut*ut)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function v0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function y0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var rt=0;;rt++){var at=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*at*at)*a,tt>=b)return rt*a}}Wa.prototype.sort=function(a){switch(this.sorting){case S0:break;case x0:a.reverse();break;case w0:a.sort(this.comparer);break;case P0:a.sort(this.comparer),a.reverse();break;case $g:return this.ak(Dx(a));default:Be("Invalid sorting type.")}return a};function Dx(a){for(var y=[],x=0;xb&&(b=rt,z=tt)}else for(tt=0;ttb&&(b=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}Wa.prototype.ak=function(a){for(var y=[],x=0;xy[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;xy[x[Pt]].indexOf(x[Pt===x.length-1?0:Pt+1])&&St.push(Pt===x.length-1?0:Pt+1);if(St.length===0)for(Pt=0;Ptx.indexOf(Ee)||pex.indexOf(Ee)||pe=At?pe+1:pe)),zt+=pe=At&&pe++,ee>=At&&ee++,pe>ee&&(oe=ee,ee=pe,pe=oe),ee-pe<(x.length+2)/2==(peSt||St===ut||(Pt=St>ut?St-ut:ut-St,ft+=Sttt-Pt?1:-1);x.splice(0>ft?ut:ut+1,0,at),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Vh&&a!==Kh&&a!==Cf&&a!==Xc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==_l&&a!==Lf&&a!==_f&&a!==qg||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==S0&&a!==x0&&a!==w0&&!P0&&a!==$g||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==C0&&a!==mg||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var Kh=new Re(Wa,"ConstantSpacing",0),Cf=new Re(Wa,"ConstantDistance",1),Xc=new Re(Wa,"ConstantAngle",2),Vh=new Re(Wa,"Packed",3),_l=new Re(Wa,"Clockwise",4),Lf=new Re(Wa,"Counterclockwise",5),_f=new Re(Wa,"BidirectionalLeft",6),qg=new Re(Wa,"BidirectionalRight",7),S0=new Re(Wa,"Forwards",8),x0=new Re(Wa,"Reverse",9),w0=new Re(Wa,"Ascending",10),P0=new Re(Wa,"Descending",11),$g=new Re(Wa,"Optimized",12),C0=new Re(Wa,"Pythagorean",13),mg=new Re(Wa,"Circular",14);Wa.className="CircularLayout",Wa.ConstantSpacing=Kh,Wa.ConstantDistance=Cf,Wa.ConstantAngle=Xc,Wa.Packed=Vh,Wa.Clockwise=_l,Wa.Counterclockwise=Lf,Wa.BidirectionalLeft=_f,Wa.BidirectionalRight=qg,Wa.Forwards=S0,Wa.Reverse=x0,Wa.Ascending=w0,Wa.Descending=P0,Wa.Optimized=$g,Wa.Pythagorean=C0,Wa.Circular=mg;function Zp(){this.Pl=-1/0,this.tm=this.mk=null}Zp.prototype.compare=function(a,y){if(0this.Pl||Math.abs(a)a&&0rt?(b=vt.x+vt.width/2,z=vt.y+vt.height/2,st[0]=new Xt(vt.x+vt.width+E.width,vt.y),st[1]=new Xt(vt.x,vt.y+vt.height+E.height),rt=2):(at=z1(st,rt,b,z,vt.width,vt.height,E),ft=st[at],St=new Xt(ft.x+vt.width+E.width,ft.y),vt=new Xt(ft.x,ft.y+vt.height+E.height),at+1this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1=tt))){for(var st=rt=0,ut=at.count-tt;utSt&&(St=1),rt=Se.sqrt((rt+St+st*st*4/(tt*tt))/St),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new Ye(z-vt.x-tt,at-vt.y-rt,ut+2*tt,ft+2*rt),b.focus=new Xt(vt.x+tt,vt.y+rt)}}return a.network=E,x}function Ix(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new Ye(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Xt(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Rx(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0=ft.Vd?at++:(rt=!0,st++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(at!==0){for(0>1)+st)*(rt%2===0?1:-1),at.centerX=E+ut*Math.cos(ft),at.centerY=b+ut*Math.sin(ft),rt++}}}}function z1(a,y,x,E,b,z,tt){var rt=9e19,at=-1,st=0;t:for(;stut.y&&a[vt].x-ut.xut.x&&a[vt].y-ut.yy+z?(x=E+b-tt,a=a-y-z,Se.sqrt(x*x+a*a)):a+xtt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,Se.sqrt(x*x+a*a)):a+xy+z?a-(y+z):a+x=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,tt=1;ttz-x)?y.sort(function(At,Yt){return At===null||Yt===null||At===Yt?0:At.centerX-Yt.centerX}):y.sort(function(At,Yt){return At===null||Yt===null||At===Yt?0:At.centerY-Yt.centerY}),x=a.Zf;var st=E=rt=0;for(z=0;zx||st-at>x){if(b)break}else if(ut-St>x||St-ut>x){if(!b)break}else{var Pt=j1(tt,vt);1>Pt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new E0),Pt=E.random(),rt=E.random(),at>st?(E=Math.abs(vt.bounds.right-tt.bounds.x),E=(1+E)*Pt):atSt?(st=Math.abs(vt.bounds.bottom-tt.bounds.y),st=(1+st)*rt):atft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new E0),rt=ft.random(),ft=ft.random(),E=(E>at?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,st=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(at-E)/ft*rt,st=(ut-tt)/ft*rt),x.forceX+=E,x.forceY+=st,z.forceX-=E,z.forceY-=st;for(b=E=0;ba.epsilonDistance*a.epsilonDistance}gl.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},gl.prototype.moveFixedVertex=function(){},gl.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},gl.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Rs,y.toSpot=Rs)}},gl.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Ye.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Ye.free(x)}x=Ye.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}Ye.free(x)},gl.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},gl.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},gl.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},gl.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},gl.prototype.electricalFieldX=function(){return 0},gl.prototype.electricalFieldY=function(){return 0},gl.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},gl.prototype.gravitationalFieldX=function(){return 0},gl.prototype.gravitationalFieldY=function(){return 0},gl.prototype.isFixed=function(a){return a.isFixed},_e.Object.defineProperties(gl.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0At&&0At&&0a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]tt)for(var ut=tt+1;utat;ut--)ft=E[ut],ft.near===st&&ft.Dj===st.Dj||rt++;var vt;if(0<=x)for(at=E[tt].sourceEdgesArrayAccess,st=0;stAt||ft===At&&St>Pt)&&rt++,Ytft||At===ft&&Pt>St)&&rt++}}}if(0>=x){for(at=E[tt].destinationEdgesArrayAccess,st=0;stAt||ft===At&&ut>Yt)&&rt++,Ptft||At===ft&&Yt>ut)&&rt++)}for(z[tt*b+tt]=rt,at=tt+1;at=x){for(rt=E[tt].destinationEdgesArrayAccess,ee=E[at].destinationEdgesArrayAccess,st=0;st=x&&(at=rt.sourceEdgesArrayAccess);var st=null;0<=x&&(st=rt.destinationEdgesArrayAccess);var ut=0,ft=0,vt=rt.near;if(vt!==null&&vt.layer===rt.layer&&(ut+=vt.column-1,ft++),at!==null)for(vt=0;vt=x&&(at=rt.sourceEdgesArrayAccess);var st=null;0<=x&&(st=rt.destinationEdgesArrayAccess);var ut=0,ft=[],vt=rt.near;if(vt!==null&&vt.layer===rt.layer&&(ft[ut]=vt.column-1,ut++),rt=void 0,at!==null)for(vt=0;vt>1,z[tt]=ut&1?ft[st]:ft[st-1]+ft[st]>>1)}return kf(a,y,E),z}function _p(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,at=rt.toVertex,st=y.layer-at.layer;rt=a.linkMinLength(rt),st===rt&&_p(a,at,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,at=rt.fromVertex,st=at.layer-y.layer,rt=a.linkMinLength(rt),st===rt&&_p(a,at,x,E,b,z)}}function my(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)my(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,E,b,z)}}Eo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Sy:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;jx(a)!==null;){for(b=V1(a);b!==null;)E[x]=b,x--,b.valid=!1,b=V1(a);for(b=Y1(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Y1(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var at=0,st=rt.destinationEdges;st.next();)st.value.toVertex.valid&&at++;st=0;for(var ut=rt.sourceEdges;ut.next();)ut.value.fromVertex.valid&&st++;(b===null||zy.toVertex.index&&(a.gm(y),y.rev=!0);break;case F0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&vy(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.LlE){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;xtt&&_p(a,rt,0,-1,!0,!1)}for(_p(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,at=null,tt=a.network.vertexes.iterator;tt.next();){var st=tt.value;if(st.component===1){var ut=0,ft=!1,vt=st.sourceEdgesArrayAccess;b=vt.length;for(var St=0;Stz)&&!ut&&(rt=tt,z=st)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else rt.component=0}}}function Q1(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}Eo.prototype.initializeIndices=function(){switch(this.Qk){default:case Cy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case T0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&_1(this,x);break;case Py:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&q1(this,x)}};function _1(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;Ez.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;xz.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x=tt;E--)z=Ph(this,E,-1)||z;for(b=this.countCrossings(),b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ph(this,E,1)||z;for(b=this.countCrossings(),b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ph(this,E,1)||z;for(b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ph(this,E,-1)||z;for(b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ph(this,E,0)||z;for(b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ph(this,E,0)||z;b>=a?hh(this,y):(a=b,y=lu(this))}break;default:case D0:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())=tt;E--)z=Ph(this,E,-1)||z;for(b=this.countCrossings(),b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ph(this,E,1)||z;for(b=this.countCrossings(),b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ph(this,E,1)||z;for(b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ph(this,E,-1)||z;for(b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Ph(this,E,0)||z;for(b>=a?hh(this,y):(a=b,y=lu(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Ph(this,E,0)||z;b>=a?hh(this,y):(a=b,y=lu(this))}}hh(this,y)};function k0(a,y,x){var E=Mf(a,y),b=a.tc[y],z=K1(a,y,x),tt=py(a,y,x);for(x=0;xz+1&&(vt+=4*(te-z),St+=4*(te-(z+1)))}for(oe=E[z].destinationEdges.iterator,oe.reset();oe.next();)if(te=oe.value,ee=te.toVertex,te.valid&&ee.layer===y){for(te=0;E[te]!==ee;)te++;te===z+1&&(St+=1)}for(oe=E[z+1].sourceEdges.iterator,oe.reset();oe.next();)if(te=oe.value,ee=te.fromVertex,te.valid&&ee.layer===y){for(te=0;E[te]!==ee;)te++;tez+1&&(vt+=4*(te-(z+1)),St+=4*(te-z))}for(oe=E[z+1].destinationEdges.iterator,oe.reset();oe.next();)if(te=oe.value,ee=te.toVertex,te.valid&&ee.layer===y){for(te=0;E[te]!==ee;)te++;te===z&&(vt+=1)}te=ee=0,oe=tt[E[z].index];var pe=rt[E[z].index],Ee=tt[E[z+1].index],Tn=rt[E[z+1].index];oe!==-1&&(ee+=Math.abs(oe-Pt),te+=Math.abs(oe-zt)),pe!==-1&&(ee+=Math.abs(pe-Pt),te+=Math.abs(pe-zt)),Ee!==-1&&(ee+=Math.abs(Ee-At),te+=Math.abs(Ee-Yt)),Tn!==-1&&(ee+=Math.abs(Tn-At),te+=Math.abs(Tn-Yt)),(St>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=ep(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=ep(this,y,-1)||x;x=ep(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)yy(this,y,1);for(y=this.Md-1;0<=y;y--)yy(this,y,-1);yy(this,this.Md,0)}if(a&&($1(this,-1),$1(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=ep(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=ep(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=ep(this,y,0)||x}}else Kx(this)};function ep(a,y,x){for(var E=!1;Wx(a,y,x);)E=!0;return E}function Wx(a,y,x){var E,b=Mf(a,y),z=a.tc[y],tt=py(a,y,-1);if(0x)for(E=0;EE-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?St=ut-1:St=ut,ft=E+1>=z||b[E+1].column-ut-1>vt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var Pt=vt=0,At=0;if(0>=x)for(var Yt=b[E].sourceEdges.iterator;Yt.next();){var zt=Yt.value,te=zt.fromVertex;if(zt.valid&&te.layer!==y){var ee=gy(zt),oe=zt.portFromColOffset;zt=zt.portToColOffset,te=te.column,vt+=(Math.abs(ut+zt-(te+oe))+1)*ee,Pt+=(Math.abs(St+zt-(te+oe))+1)*ee,At+=(Math.abs(ft+zt-(te+oe))+1)*ee}}if(0<=x)for(Yt=b[E].destinationEdges.iterator;Yt.next();)zt=Yt.value,te=zt.toVertex,zt.valid&&te.layer!==y&&(ee=gy(zt),oe=zt.portFromColOffset,zt=zt.portToColOffset,te=te.column,vt+=(Math.abs(ut+oe-(te+zt))+1)*ee,Pt+=(Math.abs(St+oe-(te+zt))+1)*ee,At+=(Math.abs(ft+oe-(te+zt))+1)*ee);zt=oe=ee=0,Yt=tt[b[E].index],te=rt[b[E].index],Yt!==-1&&(ee+=Math.abs(Yt-ut),oe+=Math.abs(Yt-St),zt+=Math.abs(Yt-ft)),te!==-1&&(ee+=Math.abs(te-ut),oe+=Math.abs(te-St),zt+=Math.abs(te-ft)),Pt=tt[x]?ut=at:st<=tt[x]&&(ut=st));ut!==rt&&(z=!0,E[x].column=ut)}kf(a,y,E),a.normalize()}function Hx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Gx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var rt=E.column-a.nodeMinColumnSpace(E,!0),at=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&at>=y&&(b[E.layer]=!0),rt<=x&&at>=x&&(z[E.layer]=!0)}for(rt=!0,x=!1,E=0;E<=a.Ia;E++)rt=rt&&!(b[E]&&z[E]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function $1(a,y){for(var x=0;x<=a.Ra;x++)for(;Hx(a,x););for(a.normalize(),x=0;xz?hh(a,b):tty)for(x=a.Ra;0<=x;x--)for(b=lu(a),z=M0(a),E=z+1;zz?hh(a,b):ttx)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(my(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;zx)for(tt=a.Ra;0x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Kx(a){for(var y=Ei(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new hn,Vx(y,x);var z=null,tt=null,rt=null,at=null,st=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,vt=(a.ve&8)!==0;for(st&&(a.verticalAlignment(y,x,!0),z=A0(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=A0(a,y,!1,!1)),E=He(y),b=E.next();!b.done;b=E.next())b.value.reverse();vt&&(a.verticalAlignment(y,x,!1),at=A0(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=A0(a,y,!0,!0)),bi(y),a.u(z,tt,rt,at),a.network.vertexes.each(function(St){var Pt=Ei();st&&Pt.push(z.get(St)),ut&&Pt.push(tt.get(St)),ft&&Pt.push(rt.get(St)),vt&&Pt.push(at.get(St)),Pt.sort(function(Yt,zt){return Yt-zt});var At=Pt.length;At=(Pt[Math.floor((At-1)/2)]+Pt[Math.ceil((At-1)/2)])/2,bi(Pt),St.zc=At})}function Vx(a,y){for(var x=a.length,E=1;Eut)&&y.add(ft);z++}b=ut}}}Eo.prototype.verticalAlignment=function(a,y,x){Yx(a),a=He(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=He(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?My(z):Xx(z),rt=tt.length;if(0=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0a&&Be("Could not determine previous vertex in layer"),y[x][a-1]}Eo.prototype.u=function(a){for(var y=[],x=0;xtt;tt++)if(y[tt]){var rt=Ux(this,y[tt],E,b,tt);rttt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(at){return function(st){st.value+=at.delta}}(z)));bi(E),bi(b)};function Ux(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var at=rt.key;rt=rt.value,at=a.K===90||a.K===270?at.width:at.height,rttt&&(tt=rt+at)}),x[b]=z,E[b]=tt,tt-z}Eo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=b0(this,!0),y=b0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function b0(a,y){return a.K===270?y?Pl:el:a.K===90?y?el:Pl:a.K===180?y?ll:Hs:y?Hs:ll}Eo.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(At++,oe,ft+Ee),y.m(At++,oe,ft),y.m(At++,oe,ft-ee)):(y.m(At++,oe,pe+Ee),y.m(At++,oe,pe),y.m(At++,oe,pe-ee)):this.K===270?pe<=ft.bounds.y?(ft=ft.bounds.y,y.m(At++,oe,ft-ee),y.m(At++,oe,ft),y.m(At++,oe,ft+Ee)):(y.m(At++,oe,pe-ee),y.m(At++,oe,pe),y.m(At++,oe,pe+Ee)):this.K===0&&(oe>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(At++,ft+Ee,pe),y.m(At++,ft,pe),y.m(At++,ft-ee,pe)):(y.m(At++,oe+Ee,pe),y.m(At++,oe,pe),y.m(At++,oe-ee,pe)));else{y.m(At++,zt,te);var Tn=0;this.K===180||this.K===0?((this.K===180?oe>=ft.bounds.right:oe<=ft.bounds.x)&&(Tn=(this.K===0?-ee:Ee)/2),y.m(At++,zt+Tn,pe)):((this.K===270?pe>=ft.bounds.bottom:pe<=ft.bounds.y)&&(Tn=(this.K===90?-ee:Ee)/2),y.m(At++,oe,te+Tn)),y.m(At++,oe,pe)}}else ee=Math.max(10,this.he[Yt.layer]),Ee=Math.max(10,this.Ld[Yt.layer]),vt?this.K===180?(y.m(At++,oe-ee-Pt,pe),y.m(At++,Math.min(oe-ee+Pt/2,oe),pe),y.m(At++,oe,pe),y.m(At++,oe,pe),y.m(At++,Math.max(oe+Ee-Pt/2,oe),pe),y.m(At++,oe+Ee+Pt,pe)):this.K===90?(y.m(At++,oe,pe+Ee+Pt),y.m(At++,oe,Math.max(pe+Ee-Pt/2,pe)),y.m(At++,oe,pe),y.m(At++,oe,pe),y.m(At++,oe,Math.min(pe-ee+Pt/2,pe)),y.m(At++,oe,pe-ee-Pt)):this.K===270?(y.m(At++,oe,pe-ee-Pt),y.m(At++,oe,Math.min(pe-ee+Pt/2,pe)),y.m(At++,oe,pe),y.m(At++,oe,pe),y.m(At++,oe,Math.max(pe+Ee-Pt/2,pe)),y.m(At++,oe,pe+Ee+Pt)):(y.m(At++,oe+Ee+Pt,pe),y.m(At++,Math.max(oe+Ee-Pt/2,oe),pe),y.m(At++,oe,pe),y.m(At++,oe,pe),y.m(At++,Math.min(oe-ee+Pt/2,oe),pe),y.m(At++,oe-ee-Pt,pe)):y.m(At++,oe,pe)}ft=Yt}(rt===null||st!==ms||St)&&(zt=y.i(At-1).x,te=y.i(At-1).y,oe=y.i(At).x,pe=y.i(At).y,St?(Pt=this.Ld[ut.layer],this.K===180||this.K===0?(St=te,St>=ut.bounds.y&&St<=ut.bounds.bottom&&(this.K===180?oe>=ut.bounds.x:oe<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-Pt:Pt),St=ut.bounds.x&&St<=ut.bounds.right&&(this.K===270?pe>=ut.bounds.y:pe<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-Pt:Pt),St=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(At-2,ft,te),y.L(At-1,ft+Ee,te)):this.K===90&&pe<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(At-2,zt,ft),y.L(At-1,zt,ft-ee)):this.K===270&&pe>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(At-2,zt,ft),y.L(At-1,zt,ft+Ee)):this.K===0&&oe<=ut.bounds.right&&(ft=ut.bounds.x,y.L(At-2,ft,te),y.L(At-1,ft-ee,te))):(ee=Math.max(10,this.he[ut.layer]),Ee=Math.max(10,this.Ld[ut.layer]),St=0,this.K===180||this.K===0?((this.K===180?oe<=ut.bounds.x:oe>=ut.bounds.right)&&(St=(this.K===0?Ee:-ee)/2),y.m(At++,oe+St,te)):((this.K===270?pe<=ut.bounds.y:pe>=ut.bounds.bottom)&&(St=(this.K===90?Ee:-ee)/2),y.m(At++,zt,pe+St)),y.m(At++,oe,pe)))}else{for(;ut!==null&&ut!==ft;){for(ee=Yt=null,ut=ut.destinationEdges.iterator;ut.next()&&(zt=ut.value,zt.link!==x.link||(Yt=zt.toVertex,ee=zt.fromVertex,ee.node!==null&&(ee=null),Yt.node!==null)););if(Yt===null)break;Yt!==ft&&(zt=y.i(At-1).x,te=y.i(At-1).y,oe=Yt.centerX,pe=Yt.centerY,St?this.K===180||this.K===0?(ee!==null?ee.centerY:te)!==pe&&(ee=this.Ta[Yt.layer]+this.Rf.x,At===y.firstPickIndex+1&&(ee=this.K===0?Math.max(ee,zt):Math.min(ee,zt)),y.m(At++,ee,te),y.m(At++,ee,pe)):(ee!==null?ee.centerX:zt)!==oe&&(ee=this.Ta[Yt.layer]+this.Rf.y,At===y.firstPickIndex+1&&(ee=this.K===90?Math.max(ee,te):Math.min(ee,te)),y.m(At++,zt,ee),y.m(At++,oe,ee)):(ee=Math.max(10,this.he[Yt.layer]),Ee=Math.max(10,this.Ld[Yt.layer]),vt?this.K===180?(y.m(At++,oe+Ee+Pt,pe),y.m(At++,Math.max(oe+Ee-Pt/2,oe),pe),y.m(At++,oe,pe),y.m(At++,oe,pe),y.m(At++,Math.min(oe-ee+Pt/2,oe),pe),y.m(At++,oe-ee-Pt,pe)):this.K===90?(y.m(At++,oe,pe-ee-Pt),y.m(At++,oe,Math.min(pe-ee+Pt/2,pe)),y.m(At++,oe,pe),y.m(At++,oe,pe),y.m(At++,oe,Math.max(pe+Ee-Pt/2,pe)),y.m(At++,oe,pe+Ee+Pt)):this.K===270?(y.m(At++,oe,pe+Ee+Pt),y.m(At++,oe,Math.max(pe+Ee-Pt/2,pe)),y.m(At++,oe,pe),y.m(At++,oe,pe),y.m(At++,oe,Math.min(pe-ee+Pt/2,pe)),y.m(At++,oe,pe-ee-Pt)):(y.m(At++,oe-ee-Pt,pe),y.m(At++,Math.min(oe-ee+Pt/2,oe),pe),y.m(At++,oe,pe),y.m(At++,oe,pe),y.m(At++,Math.max(oe+Ee-Pt/2,oe),pe),y.m(At++,oe+Ee+Pt,pe)):this.K===180?(y.m(At++,oe+Ee,pe),y.m(At++,oe-ee,pe)):this.K===90?(y.m(At++,oe,pe-ee),y.m(At++,oe,pe+Ee)):this.K===270?(y.m(At++,oe,pe+Ee),y.m(At++,oe,pe-ee)):(y.m(At++,oe-ee,pe),y.m(At++,oe+Ee,pe)))),ut=Yt}St&&(zt=y.i(At-1).x,te=y.i(At-1).y,oe=y.i(At).x,pe=y.i(At).y,this.K===180||this.K===0?te!==pe&&(ee=this.K===0?Math.min(Math.max((oe+zt)/2,this.Ta[ft.layer]+this.Rf.x),oe):Math.max(Math.min((oe+zt)/2,this.Ta[ft.layer]+this.Rf.x),oe),y.m(At++,ee,te),y.m(At++,ee,pe)):zt!==oe&&(ee=this.K===90?Math.min(Math.max((pe+te)/2,this.Ta[ft.layer]+this.Rf.y),pe):Math.max(Math.min((pe+te)/2,this.Ta[ft.layer]+this.Rf.y),pe),y.m(At++,zt,ee),y.m(At++,oe,ee)))}E!==null&&vt&&4<=y.pointsCount&&(tt!==null&&(tt=st===ms?y.getLinkPointFromPoint(b,tt,tt.ga(eo),y.i(3),!0):y.i(0),st===ms&&(st=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+st.x)/2,st.y),y.L(2,E.x,(st.y+E.y)/2)):(y.L(1,st.x,(tt.y+st.y)/2),y.L(2,(st.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=at===ms?y.getLinkPointFromPoint(z,rt,rt.ga(eo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),at===ms&&(rt=y.i(y.pointsCount-3),at=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,at.x,(rt.y+at.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+at.x)/2,at.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Eo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new xn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0z.y&&(ut=st.y>z.y?0:tt.xz.x&&(ut=st.x>z.x?0:tt.yy.layer?1:a.rdy.rd?1:a.Icy.Ic?1:0:0},wt.Ux=function(a,y){return a instanceof Af&&y instanceof Af&&a!==y?a.firsty.first||a.jy.j||a.rdy.rd?1:a.Icy.Ic?1:0:0},wt.Js=function(a,y){return a instanceof Af&&y instanceof Af&&a!==y?a.jcy.jc||a.jy.j||a.rdy.rd?1:a.Icy.Ic?1:0:0},wt.B=function(a,y){return a-=y,-1a},wt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Be("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y=b)for(E=a.slice(x),E.sort(y),y=x;y=a.He.length){for(var E=[],b=0;ba&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var F0=new Re(Eo,"CycleDepthFirst",0),Sy=new Re(Eo,"CycleGreedy",1),qp=new Re(Eo,"CycleFromLayers",2),N0=new Re(Eo,"LayerOptimalLinkLength",0),xy=new Re(Eo,"LayerLongestPathSink",1),wy=new Re(Eo,"LayerLongestPathSource",2),T0=new Re(Eo,"InitDepthFirstOut",0),Py=new Re(Eo,"InitDepthFirstIn",1),Cy=new Re(Eo,"InitNaive",2),Ly=new Re(Eo,"AggressiveNone",0),D0=new Re(Eo,"AggressiveLess",1),Ey=new Re(Eo,"AggressiveMore",2),Zx=8;Eo.className="LayeredDigraphLayout",Eo.CycleDepthFirst=F0,Eo.CycleGreedy=Sy,Eo.CycleFromLayers=qp,Eo.LayerOptimalLinkLength=N0,Eo.LayerLongestPathSink=xy,Eo.LayerLongestPathSource=wy,Eo.InitDepthFirstOut=T0,Eo.InitDepthFirstIn=Py,Eo.InitNaive=Cy,Eo.AggressiveNone=Ly,Eo.AggressiveLess=D0,Eo.AggressiveMore=Ey,Eo.PackNone=0,Eo.PackExpand=1,Eo.PackStraighten=2,Eo.PackMedian=4,Eo.PackAll=15,Eo.AlignNone=0,Eo.AlignUpperLeft=1,Eo.AlignUpperRight=2,Eo.AlignLowerLeft=4,Eo.AlignLowerRight=8,Eo.AlignAll=15;function Af(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Af.className="SegInfo";function np(a){Jo.call(this,a)}Pe(np,Jo),np.prototype.createVertex=function(){return new dh(this)},np.prototype.createEdge=function(){return new $p(this)},np.className="LayeredDigraphNetwork";function dh(a){As.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}Pe(dh,As);function ix(a,y){return a.index-y.index}function B0(a,y){if(!a.$n){for(var x=[],E=He(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=He(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Be("Unable to find destination edge to given vertex")}function My(a){if(!a.co){for(var y=[],x=He(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(ix),a.co=y}return a.co}function Xx(a){if(!a.ao){for(var y=[],x=He(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(ix),a.ao=y}return a.ao}dh.prototype.Cl=function(a){As.prototype.Cl.call(this,a),this.bo=this.co=null},dh.prototype.Kl=function(a){As.prototype.Kl.call(this,a),this.bo=this.co=null},dh.prototype.zl=function(a){As.prototype.zl.call(this,a),this.$n=this.ao=null},dh.prototype.Jl=function(a){As.prototype.Jl.call(this,a),this.$n=this.ao=null},_e.Object.defineProperties(dh.prototype,{layer:{get:function(){return this.Ig},set:function(a){this.Ig!==a&&(this.Ig=a)}},column:{get:function(){return this.Ag},set:function(a){this.Ag!==a&&(this.Ag=a)}},index:{get:function(){return this.Za},set:function(a){this.Za!==a&&(this.Za=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),dh.prototype.deleteDestinationEdge=dh.prototype.Jl,dh.prototype.addDestinationEdge=dh.prototype.zl,dh.prototype.deleteSourceEdge=dh.prototype.Kl,dh.prototype.addSourceEdge=dh.prototype.Cl,dh.className="LayeredDigraphVertex";function $p(a){Nu.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Pe($p,Nu),_e.Object.defineProperties($p.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},valid:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},rev:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},forest:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),$p.className="LayeredDigraphEdge";function Sr(a){Sa.call(this),this.Ub=new hn,this.Wn=z0,this.ud=$d,this.vo=W0,this.Bq=Ry,this.$v=[],this.td=!0,this.Rb=H0,this.$d=new sn(10,10).freeze();var y=new wg(this);this.W=new Ch(y),this.Y=new Ch(y),this.ru=[],a&&Object.assign(this,a)}Pe(Sr,Sa),Sr.prototype.cloneProtected=function(a){Sa.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},Sr.prototype.qb=function(a){a.classType===Sr?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:Be("Unknown enum value: "+a):Sa.prototype.qb.call(this,a)},Sr.prototype.createNetwork=function(){return new wg(this)},Sr.prototype.makeNetwork=function(a){function y(E){if(E instanceof zn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof yn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof ge?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Gi?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Sr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==G0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof ge&&(y=a),this.path===z0&&y!==null?this.ud=y.isTreePathToChildren?$d:Sg:this.ud=this.path===z0?$d:this.path,0y.level)return!1;a.removeChild(x.parent,x)}return!0}Sr.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;bb?hx(this,a,tt,Ri,zt,te):dx(this,a,tt,Ri,zt,te),Ri=te.x,zt=te.width,te=te.height;break;case Qc:for(oe=0;oeft&&(eijs&&(yg(a,-js,0,Hi,qr-1),R0(oe,-js,0),R0(pe,-js,0),js=0)}Uo.S.h(js,Yn),zt=Math.max(zt,Ee),te=Math.max(te,ee+(vn===0?0:Pt)+Os.height),ei=Ee}else 0ft&&(Ynjs&&(yg(a,0,-js,Hi,qr-1),R0(oe,0,-js),R0(pe,0,-js),js=0)),Uo.S.h(ei,js),te=Math.max(te,Tn),zt=Math.max(zt,ee+(vn===0?0:Pt)+Os.width),Yn=Tn;rn++}switch(0st&&(st=0),135At&&(At=0),at===Cc&&(rt+=vt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>zt&&(zt=Ny(at,E-zt,0),tt=zt.x,rt=zt.y,zt=E,st=0):zt=by(a,zt,st),0>st&&(tt-=st,st=0),135te&&(te=Ny(at,0,Yt-te),tt=te.x,rt=te.y,te=Yt,At=0):te=Fy(a,te,At),0>At&&(rt-=At,At=0),tt+=E+x),0b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].yb[0].x?b[3].assign(b[2]):b[2].assign(b[3])),vn[0].h(st+E,0),vn[1].h(vn[0].x,Yt),vn[2].yb[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].xb[0].y?b[3].assign(b[2]):b[2].assign(b[3])),vn[0].h(0,At+Yt),vn[1].h(E,vn[0].y),vn[2].xE?hx(a,y,b,rn,ee,oe):dx(a,y,b,rn,ee,oe),rn=oe.x,ee=oe.width,oe=oe.height;break;case Qc:for(vt=0;vtvt&&(Eevt&&(Tnft&&(ft=0),135zt&&(zt=0)),y.la.h(ft,zt),y.Da.h(ee,oe)}}Sr.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function hx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ye(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Ye(E,0,b,z);for(var rt=y.nodeSpacing,at=y.rowSpacing,st=Yh(y)===90,ut=0,ft=0,vt=0,St=0;Stst&&(b-=st),z=Math.max(z,Math.max(St,vt)+a+tt.height),0>x.S.x&&(E=O0(y,x.S.x,!1,E,rt))):(x.S.h(b+a,E+rt/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Pt,ft)+a+tt.width),vt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,vt+tt.height),0>vt&&(z-=vt),0>x.S.y&&(E=O0(y,x.S.y,!0,E,rt)))),new Ye(E,0,b,z)}function dx(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Ye(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Ye(E,0,b,z);for(var rt=y.nodeSpacing,at=y.rowSpacing,st=Yh(y)===270,ut=0,ft=0,vt=0,St=0;Stft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(St,vt))+a+ut.height),0>at.S.x&&(E=O0(y,at.S.x,!1,E,rt))):(at.S.h(-b-ut.width-a,E+rt/2-at.focus.y-at.la.y),b=Math.max(b,Math.abs(Math.min(Pt,ft))+a+ut.width),vt=E+rt/2-at.focus.y-at.la.y,z=Math.max(z,vt+ut.height),0>vt&&(z-=vt),0>at.S.y&&(E=O0(y,at.S.y,!0,E,rt)))),y=0;yy&&(y=x+a.width),0>x&&(y-=x),y;case tc:return a.width>y?a.width:y;case ec:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Jc:case nc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Qc:return a.width-a.focus.x+a.nodeSpacing/2+y;case Cc:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Fy(a,y,x){switch(a.alignment){case xg:case rp:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case tc:return a.height>y?a.height:y;case ec:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Jc:case nc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Qc:return a.height-a.focus.y+a.nodeSpacing/2+y;case Cc:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a){case rp:y/=2,x/=2;break;case xg:y/=2,x/=2;break;case tc:x=y=0;break;case ec:break;default:Be("Unhandled alignment value "+a.toString())}return new Xt(y,x)}function qf(a,y,x,E,b,z){y=Ny(y,x,E),yg(a,y.x,y.y,b,z)}function yg(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function I0(a,y,x,E){var b=y.parent;switch(a.ud){case $d:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Sg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Be("Unhandled path value "+a.ud.toString())}}function R0(a,y,x){for(var E=0;Eft.length||St===null||2>St.length))for(b=x=0;xst&&z.yz.y&&sty.length||x===null||2>x.length)E=null;else{for(ut=yu(a,y.length+x.length),E=z=at=0;zat;)st=x[z++],ut[E++].h(st.x+b,st.y);for(x=yu(a,E),at=0;atft.length||z===null||2>z.length)b=null;else{for(ut=yu(a,ft.length+z.length),b=st=x=0;xz;)at=ft[x++],ut[b++].h(at.x,at.y);for(z=yu(a,b),x=0;xft.length||St===null||2>St.length))for(b=x=0;xat&&z.xz.x&&aty.length||x===null||2>x.length)E=null;else{for(ut=yu(a,y.length+x.length),E=z=at=0;zat;)st=x[z++],ut[E++].h(st.x,st.y+b);for(x=yu(a,E),at=0;atft.length||z===null||2>z.length)b=null;else{for(ut=yu(a,ft.length+z.length),b=st=x=0;xz;)at=ft[x++],ut[b++].h(at.x,at.y);for(z=yu(a,b),x=0;x=a?0:135>=a?90:225>=a?180:315>=a?270:0}Sr.prototype.computeLayerSpacing=function(a){var y=Yh(a);y=y===90||y===270;var x=a.layerSpacing;if(0=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==j0&&a!==rm||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==ip&&a!==em&&a!==nm&&!im||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==j0&&a!==rm||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var z0=new Re(Sr,"PathDefault",-1),$d=new Re(Sr,"PathDestination",0),Sg=new Re(Sr,"PathSource",1),ip=new Re(Sr,"SortingForwards",10),em=new Re(Sr,"SortingReverse",11),nm=new Re(Sr,"SortingAscending",12),im=new Re(Sr,"SortingDescending",13),rp=new Re(Sr,"AlignmentCenterSubtrees",20),xg=new Re(Sr,"AlignmentCenterChildren",21),tc=new Re(Sr,"AlignmentStart",22),ec=new Re(Sr,"AlignmentEnd",23),Jc=new Re(Sr,"AlignmentBus",24),nc=new Re(Sr,"AlignmentBusBranching",25),Qc=new Re(Sr,"AlignmentTopLeftBus",26),Cc=new Re(Sr,"AlignmentBottomRightBus",27),j0=new Re(Sr,"CompactionNone",30),rm=new Re(Sr,"CompactionBlock",31),W0=new Re(Sr,"StyleLayered",40),Dy=new Re(Sr,"StyleLastParents",41),By=new Re(Sr,"StyleAlternating",42),Oy=new Re(Sr,"StyleRootOnly",43),H0=new Re(Sr,"ArrangementVertical",50),Iy=new Re(Sr,"ArrangementHorizontal",51),G0=new Re(Sr,"ArrangementFixedRoots",52),Ry=new Re(Sr,"LayerIndividual",60),zy=new Re(Sr,"LayerSiblings",61),K0=new Re(Sr,"LayerUniform",62);Sr.className="TreeLayout",Sr.PathDefault=z0,Sr.PathDestination=$d,Sr.PathSource=Sg,Sr.SortingForwards=ip,Sr.SortingReverse=em,Sr.SortingAscending=nm,Sr.SortingDescending=im,Sr.AlignmentCenterSubtrees=rp,Sr.AlignmentCenterChildren=xg,Sr.AlignmentStart=tc,Sr.AlignmentEnd=ec,Sr.AlignmentBus=Jc,Sr.AlignmentBusBranching=nc,Sr.AlignmentTopLeftBus=Qc,Sr.AlignmentBottomRightBus=Cc,Sr.CompactionNone=j0,Sr.CompactionBlock=rm,Sr.StyleLayered=W0,Sr.StyleLastParents=Dy,Sr.StyleAlternating=By,Sr.StyleRootOnly=Oy,Sr.ArrangementVertical=H0,Sr.ArrangementHorizontal=Iy,Sr.ArrangementFixedRoots=G0,Sr.LayerIndividual=Ry,Sr.LayerSiblings=zy,Sr.LayerUniform=K0;function wg(a){Jo.call(this,a)}Pe(wg,Jo),wg.prototype.createVertex=function(){return new Ch(this)},wg.prototype.createEdge=function(){return new op(this)},wg.className="TreeNetwork";function Ch(a){As.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new Xt(0,0),this.Da=new sn(0,0),this.la=new Xt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=ip,this.hd=ry,this.Kb=0,this.Jb=xg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=rm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Rs,this.wr=!0,this.Dp=Rs}Pe(Ch,As),Ch.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},_e.Object.defineProperties(Ch.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;xSt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===tc?(z=E.top+b.y,b.y===0&&ft.ySt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===tc?(z=E.left+b.x,b.x===0&&ft.xSt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===tc?(z=E.top+b.y,b.y===0&&ft.ySt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===tc?(z=E.left+b.x,b.x===0&&ft.x0&&Zt[Zt.length-1])||nn[0]!==6&&nn[0]!==2)){_t=0;continue}if(nn[0]===3&&(!Zt||nn[1]>Zt[0]&&nn[1]',"select"),this.addActionButton(Dt,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Dt,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Dt,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Dt,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Dt,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Dt,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Dt,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(kt){var _t=document.createElement("div");_t.className=""+Ct.toolbarButtonStyleClass.name,_t.setAttribute("data-type-name",kt.typeName),_t.innerHTML=kt.icon,_t.addEventListener("click",function(){Ct.markerToolbarButtonClicked(_t,kt)}),Ct.buttons.push(_t),Ct.markerButtons.push(_t)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Zt=document.createElement("div");Zt.className=this.toolbarBlockStyleClass.name,Zt.style.whiteSpace="nowrap",Zt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Zt),this.addActionButton(Zt,'',"render"),this.addActionButton(Zt,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ht.prototype.addButtonClickListener=function(Lt){this.buttonClickListeners.push(Lt)},Ht.prototype.removeButtonClickListener=function(Lt){this.buttonClickListeners.indexOf(Lt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Lt),1)},Ht.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ht.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Lt=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ct=0;Ct0&&this.buttonClickListeners.forEach(function(Dt){return Dt("marker",Ct)}),this.markerButtonOverflowBlock.style.display="none"},Ht.prototype.actionToolbarButtonClicked=function(Lt,Ct){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Dt){return Dt("action",Ct)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ht.prototype.setActiveButton=function(Lt){this.resetButtonStyles(),Lt.className=Lt.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Lt.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ht.prototype.setActiveMarkerButton=function(Lt){var Ct=this.markerButtons.find(function(Dt){return Dt.getAttribute("data-type-name")===Lt});Ct&&this.setActiveButton(Ct)},Ht.prototype.setCurrentMarker=function(Lt){var Ct=this;this.currentMarker=Lt,this.buttons.filter(function(Dt){return/delete|notes/.test(Dt.getAttribute("data-action"))}).forEach(function(Dt){Ct.currentMarker===void 0?(Dt.style.fillOpacity="0.4",Dt.style.pointerEvents="none"):(Dt.style.fillOpacity="1",Dt.style.pointerEvents="all")})},Ht}(),Ft=function(){function Ht(Lt,Ct,Dt,Zt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Lt,this.displayMode=Ct,this.uiStyleSettings=Dt,this.styles=Zt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ht.prototype.addStyles=function(){var Lt;this.toolboxStyleClass=this.styles.addClass(new he("toolbox",` width: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: sans-serif; `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+` box-sizing: content-box; `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+` `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` overflow: hidden; `)),this.toolboxStyleColorsClass=this.styles.addClass(new he("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var Ct=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new he("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new he("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new he("toolbox-panel-row",` display: flex; `+(this.displayMode==="inline"?"position: absolute;":"")+` `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+` cursor: default; height: `+1.5*this.uiStyleSettings.toolbarHeight+`px; `+(this.displayMode==="inline"?"width: 100%;":"")+` box-sizing: content-box; `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new he("toolbox-panel-row_colors",` background-color: `+((Lt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Lt!==void 0?Lt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new he("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*Ct)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*Ct)+`px; padding: `+Ct+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new he("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new he("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Ve("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Ve("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},Ht.prototype.show=function(Lt){var Ct;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ct=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ct!==void 0?Ct:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ht.prototype.setPanelButtons=function(Lt){var Ct,Dt,Zt=this;this.panels=Lt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ct=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ct!==void 0?Ct:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Dt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Dt!==void 0?Dt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(kt){var _t;kt.uiStyleSettings=Zt.uiStyleSettings;var tn=document.createElement("div");tn.className=Zt.toolboxButtonStyleClass.name+" "+((_t=Zt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_t!==void 0?_t:Zt.toolboxButtonStyleColorsClass.name),tn.innerHTML=kt.icon,tn.title=kt.title,tn.addEventListener("click",function(){Zt.panelButtonClick(kt)}),Zt.panelButtons.push(tn),Zt.buttonRow.appendChild(tn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ht.prototype.panelButtonClick=function(Lt){var Ct=this,Dt=-1;if(Lt!==this.activePanel){Dt=this.panels.indexOf(Lt),this.panelRow.innerHTML="";var Zt=Lt.getUi();Zt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Zt),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=Lt}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ct.displayMode==="inline"?Ct.panelRow.style.display="none":Ct.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(kt,_t){var tn,an;kt.className=Ct.toolboxButtonStyleClass.name+" "+(_t===Dt?""+((tn=Ct.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&tn!==void 0?tn:Ct.toolboxActiveButtonStyleColorsClass.name):""+((an=Ct.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&an!==void 0?an:Ct.toolboxButtonStyleColorsClass.name))})},Ht}(),nt=function(Ht,Lt){this.title=Ht,this.icon=Lt},et=function(Ht){function Lt(Ct,Dt,Zt,kt){var _t=Ht.call(this,Ct,kt||'')||this;return _t.colors=[],_t.addTransparent=!1,_t.colorBoxes=[],_t.colors=Dt,_t.currentColor=Zt,_t.setCurrentColor=_t.setCurrentColor.bind(_t),_t.getColorBox=_t.getColorBox.bind(_t),_t}return ie(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Dt=document.createElement("div");return Dt.style.overflow="hidden",Dt.style.whiteSpace="nowrap",this.colors.forEach(function(Zt){var kt=Ct.getColorBox(Zt);Dt.appendChild(kt),Ct.colorBoxes.push(kt)}),Dt},Lt.prototype.getColorBox=function(Ct){var Dt=this,Zt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-Zt,_t=document.createElement("div");_t.style.display="inline-block",_t.style.boxSizing="content-box",_t.style.width=kt-2+"px",_t.style.height=kt-2+"px",_t.style.padding="1px",_t.style.marginRight="2px",_t.style.marginBottom="2px",_t.style.borderWidth="2px",_t.style.borderStyle="solid",_t.style.borderRadius=(kt+2)/2+"px",_t.style.borderColor=Ct===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_t.addEventListener("click",function(){Dt.setCurrentColor(Ct,_t)});var tn=document.createElement("div");return tn.style.display="inline-block",tn.style.width=kt-2+"px",tn.style.height=kt-2+"px",tn.style.backgroundColor=Ct,tn.style.borderRadius=kt/2+"px",Ct==="transparent"&&(tn.style.fill=this.uiStyleSettings.toolboxAccentColor,tn.innerHTML=` `),_t.appendChild(tn),_t},Lt.prototype.setCurrentColor=function(Ct,Dt){var Zt=this;this.currentColor=Ct,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ct)},Lt}(nt),ht=function(){function Ht(Lt,Ct,Dt){this._state="new",this._isSelected=!1,this._container=Lt,this._overlayContainer=Ct,this.globalSettings=Dt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ht.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ht.prototype.ownsTarget=function(Lt){return!1},Object.defineProperty(Ht.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ht.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ht.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ht.prototype.pointerDown=function(Lt,Ct){},Ht.prototype.dblClick=function(Lt,Ct){},Ht.prototype.manipulate=function(Lt){},Ht.prototype.pointerUp=function(Lt){this.stateChanged()},Ht.prototype.dispose=function(){},Ht.prototype.addMarkerVisualToContainer=function(Lt){this.container.childNodes.length>0?this.container.insertBefore(Lt,this.container.childNodes[0]):this.container.appendChild(Lt)},Ht.prototype.getState=function(){return{typeName:Ht.typeName,state:this.state,notes:this.notes}},Ht.prototype.restoreState=function(Lt){this._state=Lt.state,this.notes=Lt.notes},Ht.prototype.scale=function(Lt,Ct){},Ht.prototype.colorChanged=function(Lt){this.onColorChanged&&this.onColorChanged(Lt),this.stateChanged()},Ht.prototype.fillColorChanged=function(Lt){this.onFillColorChanged&&this.onFillColorChanged(Lt),this.stateChanged()},Ht.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Lt=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Lt.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Lt)&&this.onStateChanged(this)}},Ht.typeName="MarkerBase",Ht}(),lt=function(){function Ht(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ht.prototype.findGripByVisual=function(Lt){return this.topLeft.ownsTarget(Lt)?this.topLeft:this.topCenter.ownsTarget(Lt)?this.topCenter:this.topRight.ownsTarget(Lt)?this.topRight:this.centerLeft.ownsTarget(Lt)?this.centerLeft:this.centerRight.ownsTarget(Lt)?this.centerRight:this.bottomLeft.ownsTarget(Lt)?this.bottomLeft:this.bottomCenter.ownsTarget(Lt)?this.bottomCenter:this.bottomRight.ownsTarget(Lt)?this.bottomRight:void 0},Ht}(),gt=function(){function Ht(){this.GRIP_SIZE=10,this.visual=It.createGroup(),this.visual.appendChild(It.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(It.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ht.prototype.ownsTarget=function(Lt){return Lt===this.visual||Lt===this.visual.childNodes[0]||Lt===this.visual.childNodes[1]},Ht}(),mt=function(){function Ht(){}return Ht.toITransformMatrix=function(Lt){return{a:Lt.a,b:Lt.b,c:Lt.c,d:Lt.d,e:Lt.e,f:Lt.f}},Ht.toSVGMatrix=function(Lt,Ct){return Lt.a=Ct.a,Lt.b=Ct.b,Lt.c=Ct.c,Lt.d=Ct.d,Lt.e=Ct.e,Lt.f=Ct.f,Lt},Ht}(),xt=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.left=0,kt.top=0,kt.width=0,kt.height=0,kt.defaultSize={x:50,y:20},kt.offsetX=0,kt.offsetY=0,kt.rotationAngle=0,kt.CB_DISTANCE=10,kt._suppressMarkerCreateEvent=!1,kt.container.transform.baseVal.appendItem(It.createTransform()),kt.setupControlBox(),kt}return ie(Lt,Ht),Object.defineProperty(Lt.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"visual",{get:function(){return this._visual},set:function(Ct){this._visual=Ct;var Dt=It.createTransform();this._visual.transform.baseVal.appendItem(Dt)},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(Ct){return!!Ht.prototype.ownsTarget.call(this,Ct)||!!(this.controlGrips.findGripByVisual(Ct)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ct))},Lt.prototype.pointerDown=function(Ct,Dt){Ht.prototype.pointerDown.call(this,Ct,Dt),this.state==="new"&&(this.left=Ct.x,this.top=Ct.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Zt=this.unrotatePoint(Ct);if(this.manipulationStartX=Zt.x,this.manipulationStartY=Zt.y,this.offsetX=Zt.x-this.left,this.offsetY=Zt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Dt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Dt)){this.activeGrip=this.rotatorGrip;var kt=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=kt.x-this.width/2,this.top=kt.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _t=this.container.transform.baseVal.getItem(0);_t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_t,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Lt.prototype.pointerUp=function(Ct){var Dt=this.state;Ht.prototype.pointerUp.call(this,Ct),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ct),this._state="select",Dt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Lt.prototype.moveVisual=function(Ct){this.visual.style.transform="translate("+Ct.x+"px, "+Ct.y+"px)"},Lt.prototype.manipulate=function(Ct){var Dt=this.unrotatePoint(Ct);this.state==="creating"?this.resize(Ct):this.state==="move"?(this.left=this.manipulationStartLeft+(Dt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Dt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Dt):this.state==="rotate"&&this.rotate(Ct)},Lt.prototype.resize=function(Ct){var Dt=this.manipulationStartLeft,Zt=this.manipulationStartWidth,kt=this.manipulationStartTop,_t=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Dt=this.manipulationStartLeft+Ct.x-this.manipulationStartX,Zt=this.manipulationStartWidth+this.manipulationStartLeft-Dt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Zt=this.manipulationStartWidth+Ct.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:kt=this.manipulationStartTop+Ct.y-this.manipulationStartY,_t=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_t=this.manipulationStartHeight+Ct.y-this.manipulationStartY}Zt>=0?(this.left=Dt,this.width=Zt):(this.left=Dt+Zt,this.width=-Zt),_t>=0?(this.top=kt,this.height=_t):(this.top=kt+_t,this.height=-_t),this.setSize()},Lt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Lt.prototype.rotate=function(Ct){if(Math.abs(Ct.x-this.centerX)>.1){var Dt=Math.sign(Ct.x-this.centerX);this.rotationAngle=180*Math.atan((Ct.y-this.centerY)/(Ct.x-this.centerX))/Math.PI+90*Dt,this.applyRotation()}},Lt.prototype.applyRotation=function(){var Ct=this.container.transform.baseVal.getItem(0);Ct.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ct,0)},Lt.prototype.rotatePoint=function(Ct){if(this.rotationAngle===0)return Ct;var Dt=this.container.getCTM(),Zt=It.createPoint(Ct.x,Ct.y);return{x:(Zt=Zt.matrixTransform(Dt)).x,y:Zt.y}},Lt.prototype.unrotatePoint=function(Ct){if(this.rotationAngle===0)return Ct;var Dt=this.container.getCTM();Dt=Dt.inverse();var Zt=It.createPoint(Ct.x,Ct.y);return{x:(Zt=Zt.matrixTransform(Dt)).x,y:Zt.y}},Lt.prototype.select=function(){Ht.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ht.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=It.createGroup();var Ct=It.createTransform();Ct.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ct),this.container.appendChild(this.controlBox),this.controlRect=It.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=It.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new lt,this.addControlGrips(),this.controlBox.style.display="none"},Lt.prototype.adjustControlBox=function(){var Ct=this.controlBox.transform.baseVal.getItem(0);Ct.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ct,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},Lt.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},Lt.prototype.createGrip=function(){var Ct=new gt;return Ct.visual.transform.baseVal.appendItem(It.createTransform()),this.controlBox.appendChild(Ct.visual),Ct},Lt.prototype.positionGrips=function(){var Ct=this.controlGrips.topLeft.GRIP_SIZE,Dt=-Ct/2,Zt=Dt,kt=(this.width+this.CB_DISTANCE)/2-Ct/2,_t=(this.height+this.CB_DISTANCE)/2-Ct/2,tn=this.height+this.CB_DISTANCE-Ct/2,an=this.width+this.CB_DISTANCE-Ct/2;this.positionGrip(this.controlGrips.topLeft.visual,Dt,Zt),this.positionGrip(this.controlGrips.topCenter.visual,kt,Zt),this.positionGrip(this.controlGrips.topRight.visual,an,Zt),this.positionGrip(this.controlGrips.centerLeft.visual,Dt,_t),this.positionGrip(this.controlGrips.centerRight.visual,an,_t),this.positionGrip(this.controlGrips.bottomLeft.visual,Dt,tn),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,tn),this.positionGrip(this.controlGrips.bottomRight.visual,an,tn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,Zt-3*this.CB_DISTANCE)},Lt.prototype.positionGrip=function(Ct,Dt,Zt){var kt=Ct.transform.baseVal.getItem(0);kt.setTranslate(Dt,Zt),Ct.transform.baseVal.replaceItem(kt,0)},Lt.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Lt.prototype.showControlBox=function(){this.controlBox.style.display=""},Lt.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:mt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:mt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ht.prototype.getState.call(this))},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Dt=Ct;this.left=Dt.left,this.top=Dt.top,this.width=Dt.width,this.height=Dt.height,this.rotationAngle=Dt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(mt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Dt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(mt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Dt.containerTransformMatrix))},Lt.prototype.scale=function(Ct,Dt){Ht.prototype.scale.call(this,Ct,Dt);var Zt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:Zt.x*Ct,y:Zt.y*Dt});this.left=kt.x,this.top=kt.y,this.width=this.width*Ct,this.height=this.height*Dt,this.adjustControlBox()},Lt}(ht),Mt=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual)},Lt.prototype.createVisual=function(){this.visual=It.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(Ct,Dt){Ht.prototype.pointerDown.call(this,Ct,Dt),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Lt.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.setSize()},Lt.prototype.setSize=function(){Ht.prototype.setSize.call(this),It.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(Ct){Ht.prototype.pointerUp.call(this,Ct),this.setSize()},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.visual&&It.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ct),this.stateChanged()},Lt.prototype.setFillColor=function(Ct){this.fillColor=Ct,this.visual&&It.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.visual&&It.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.visual&&It.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ht.prototype.getState.call(this))},Lt.prototype.restoreState=function(Ct){var Dt=Ct;this.fillColor=Dt.fillColor,this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.opacity=Dt.opacity,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Lt.prototype.scale=function(Ct,Dt){Ht.prototype.scale.call(this,Ct,Dt),this.setSize()},Lt.title="Rectangle marker",Lt}(xt),jt=function(Ht){function Lt(Ct,Dt,Zt,kt){var _t=Ht.call(this,Ct,kt||'')||this;return _t.widths=[],_t.widthBoxes=[],_t.widths=Dt,_t.currentWidth=Zt,_t.setCurrentWidth=_t.setCurrentWidth.bind(_t),_t}return ie(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Dt=document.createElement("div");return Dt.style.display="flex",Dt.style.overflow="hidden",Dt.style.flexGrow="2",this.widths.forEach(function(Zt){var kt=document.createElement("div");kt.style.display="flex",kt.style.flexGrow="2",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Zt===Ct.currentWidth?Ct.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ct.setCurrentWidth(Zt,kt)}),Dt.appendChild(kt);var _t=document.createElement("div");_t.innerText=Zt.toString(),_t.style.marginRight="5px",kt.appendChild(_t);var tn=document.createElement("div");tn.style.minHeight="20px",tn.style.flexGrow="2",tn.style.display="flex",tn.style.alignItems="center";var an=document.createElement("hr");an.style.minWidth="20px",an.style.border="0px",an.style.borderTop=Zt+"px solid "+Ct.uiStyleSettings.toolboxColor,an.style.flexGrow="2",tn.appendChild(an),kt.appendChild(tn),Ct.widthBoxes.push(kt)}),Dt},Lt.prototype.setCurrentWidth=function(Ct,Dt){var Zt=this;this.currentWidth=Ct,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Lt}(nt),Qt=function(Ht){function Lt(Ct,Dt,Zt,kt){var _t=Ht.call(this,Ct,kt||'')||this;return _t.styles=[],_t.styleBoxes=[],_t.styles=Dt,_t.currentStyle=Zt,_t.setCurrentStyle=_t.setCurrentStyle.bind(_t),_t}return ie(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Dt=document.createElement("div");return Dt.style.display="flex",Dt.style.overflow="hidden",Dt.style.flexGrow="2",this.styles.forEach(function(Zt){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.overflow="hidden",kt.style.maxWidth=100/Ct.styles.length-5+"%",kt.style.borderColor=Zt===Ct.currentStyle?Ct.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ct.setCurrentStyle(Zt,kt)}),Dt.appendChild(kt);var _t=document.createElement("div");_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.overflow="hidden";var tn=` `;_t.innerHTML=tn,kt.appendChild(_t),Ct.styleBoxes.push(kt)}),Dt},Lt.prototype.setCurrentStyle=function(Ct,Dt){var Zt=this;this.currentStyle=Ct,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Lt}(nt),ne=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.strokeColor=Zt.defaultColor,kt.strokeWidth=Zt.defaultStrokeWidth,kt.strokeDasharray=Zt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",Zt.defaultColorSet,Zt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new jt("Line width",Zt.defaultStrokeWidths,Zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Qt("Line style",Zt.defaultStrokeDasharrays,Zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return ie(Lt,Ht),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.typeName="FrameMarker",Lt.title="Frame marker",Lt.icon='',Lt}(Mt),qt=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},$t=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.x1=0,kt.y1=0,kt.x2=0,kt.y2=0,kt.defaultLength=50,kt.manipulationStartX=0,kt.manipulationStartY=0,kt.manipulationStartX1=0,kt.manipulationStartY1=0,kt.manipulationStartX2=0,kt.manipulationStartY2=0,kt.setupControlBox(),kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!!Ht.prototype.ownsTarget.call(this,Ct)||!(!this.grip1.ownsTarget(Ct)&&!this.grip2.ownsTarget(Ct))},Lt.prototype.pointerDown=function(Ct,Dt){Ht.prototype.pointerDown.call(this,Ct,Dt),this.manipulationStartX=Ct.x,this.manipulationStartY=Ct.y,this.state==="new"&&(this.x1=Ct.x,this.y1=Ct.y,this.x2=Ct.x,this.y2=Ct.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Dt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Dt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Lt.prototype.pointerUp=function(Ct){var Dt=this.state;Ht.prototype.pointerUp.call(this,Ct),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Ct),this._state="select",Dt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Lt.prototype.adjustVisual=function(){},Lt.prototype.manipulate=function(Ct){this.state==="creating"?this.resize(Ct):this.state==="move"?(this.x1=this.manipulationStartX1+Ct.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ct.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ct.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ct.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ct)},Lt.prototype.resize=function(Ct){switch(this.activeGrip){case this.grip1:this.x1=Ct.x,this.y1=Ct.y;break;case this.grip2:case void 0:this.x2=Ct.x,this.y2=Ct.y}this.adjustVisual(),this.adjustControlBox()},Lt.prototype.select=function(){Ht.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ht.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=It.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Lt.prototype.adjustControlBox=function(){this.positionGrips()},Lt.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Lt.prototype.createGrip=function(){var Ct=new gt;return Ct.visual.transform.baseVal.appendItem(It.createTransform()),this.controlBox.appendChild(Ct.visual),Ct},Lt.prototype.positionGrips=function(){var Ct=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ct/2,this.y1-Ct/2),this.positionGrip(this.grip2.visual,this.x2-Ct/2,this.y2-Ct/2)},Lt.prototype.positionGrip=function(Ct,Dt,Zt){var kt=Ct.transform.baseVal.getItem(0);kt.setTranslate(Dt,Zt),Ct.transform.baseVal.replaceItem(kt,0)},Lt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ht.prototype.getState.call(this))},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Dt=Ct;this.x1=Dt.x1,this.y1=Dt.y1,this.x2=Dt.x2,this.y2=Dt.y2},Lt.prototype.scale=function(Ct,Dt){Ht.prototype.scale.call(this,Ct,Dt),this.x1=this.x1*Ct,this.y1=this.y1*Dt,this.x2=this.x2*Ct,this.y2=this.y2*Dt,this.adjustVisual(),this.adjustControlBox()},Lt}(ht),we=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.strokeColor=Zt.defaultColor,kt.strokeWidth=Zt.defaultStrokeWidth,kt.strokeDasharray=Zt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",Zt.defaultColorSet,Zt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new jt("Line width",Zt.defaultStrokeWidths,Zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Qt("Line style",Zt.defaultStrokeDasharrays,Zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.selectorLine&&Ct!==this.visibleLine)},Lt.prototype.createVisual=function(){this.visual=It.createGroup(),this.selectorLine=It.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=It.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(Ct,Dt){Ht.prototype.pointerDown.call(this,Ct,Dt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Lt.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),It.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),It.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),It.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.adjustVisual(),this.colorChanged(Ct)},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Dt=Ct;this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.createVisual(),this.adjustVisual()},Lt.typeName="LineMarker",Lt.title="Line marker",Lt.icon='',Lt}($t),ce=function(Ht){function Lt(Ct,Dt,Zt,kt){var _t=Ht.call(this,Ct,kt||'')||this;return _t.fonts=[],_t.fontBoxes=[],_t.fonts=Dt,_t.currentFont=Zt,_t.setCurrentFont=_t.setCurrentFont.bind(_t),_t}return ie(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Dt=document.createElement("div");return Dt.style.overflow="hidden",Dt.style.flexGrow="2",this.fonts.forEach(function(Zt){var kt=document.createElement("div");kt.style.display="inline-block",kt.style.alignItems="center",kt.style.justifyContent="space-between",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.overflow="hidden",kt.style.maxWidth=100/Ct.fonts.length-5+"%",kt.style.borderColor=Zt===Ct.currentFont?Ct.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ct.setCurrentFont(Zt,kt)}),Dt.appendChild(kt);var _t=document.createElement("div");_t.style.display="flex",_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.fontFamily=Zt,_t.style.overflow="hidden";var tn=document.createElement("div");tn.style.whiteSpace="nowrap",tn.style.overflow="hidden",tn.style.textOverflow="ellipsis",tn.innerHTML="The quick brown fox jumps over the lazy dog",_t.appendChild(tn),kt.appendChild(_t),Ct.fontBoxes.push(kt)}),Dt},Lt.prototype.setCurrentFont=function(Ct,Dt){var Zt=this;this.currentFont=Ct,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Lt}(nt),be=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.color="transparent",kt.padding=5,kt.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",kt.text=kt.DEFAULT_TEXT,kt.isMoved=!1,kt.color=Zt.defaultColor,kt.fontFamily=Zt.defaultFontFamily,kt.defaultSize={x:100,y:30},kt.setColor=kt.setColor.bind(kt),kt.setFont=kt.setFont.bind(kt),kt.renderText=kt.renderText.bind(kt),kt.sizeText=kt.sizeText.bind(kt),kt.textEditDivClicked=kt.textEditDivClicked.bind(kt),kt.showTextEditor=kt.showTextEditor.bind(kt),kt.setSize=kt.setSize.bind(kt),kt.positionTextEditor=kt.positionTextEditor.bind(kt),kt.colorPanel=new et("Color",Zt.defaultColorSet,Zt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.fontFamilyPanel=new ce("Font",Zt.defaultFontFamilies,Zt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){if(Ht.prototype.ownsTarget.call(this,Ct)||Ct===this.visual||Ct===this.textElement||Ct===this.bgRectangle)return!0;var Dt=!1;return this.textElement.childNodes.forEach(function(Zt){Zt===Ct&&(Dt=!0)}),Dt},Lt.prototype.createVisual=function(){this.visual=It.createGroup(),this.bgRectangle=It.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=It.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(It.createTransform()),this.textElement.transform.baseVal.appendItem(It.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Lt.prototype.pointerDown=function(Ct,Dt){Ht.prototype.pointerDown.call(this,Ct,Dt),this.isMoved=!1,this.pointerDownPoint=Ct,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Lt.prototype.renderText=function(){var Ct=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Dt){Ct.textElement.appendChild(It.createTSpan(Dt.trim()===""?" ":Dt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Lt.prototype.getTextScale=function(){var Ct=this.textElement.getBBox(),Dt=1;if(Ct.width>0&&Ct.height>0){var Zt=(1*this.width-this.width*this.padding*2/100)/Ct.width,kt=(1*this.height-this.height*this.padding*2/100)/Ct.height;Dt=Math.min(Zt,kt)}return Dt},Lt.prototype.getTextPosition=function(Ct){var Dt=this.textElement.getBBox(),Zt=0,kt=0;return Dt.width>0&&Dt.height>0&&(Zt=(this.width-Dt.width*Ct)/2,kt=this.height/2-Dt.height*Ct/2),{x:Zt,y:kt}},Lt.prototype.sizeText=function(){var Ct=this.textElement.getBBox(),Dt=this.getTextScale(),Zt=this.getTextPosition(Dt);Zt.y-=Ct.y*Dt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Zt.x+"px, "+Zt.y+"px) scale("+Dt+", "+Dt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Zt.x,Zt.y),this.textElement.transform.baseVal.getItem(1).setScale(Dt,Dt))},Lt.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ct.x-this.pointerDownPoint.x)>5||Math.abs(Ct.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.isMoved=!0,this.setSize(),this.sizeText()},Lt.prototype.setSize=function(){Ht.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(It.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),It.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Lt.prototype.pointerUp=function(Ct){var Dt=this.state;Dt==="creating"&&(this._suppressMarkerCreateEvent=!0),Ht.prototype.pointerUp.call(this,Ct),this.setSize(),(Dt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.showTextEditor=function(){var Ct=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Dt){Dt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Dt=Number.parseFloat(Ct.textEditor.style.fontSize);Ct.textEditor.clientWidth>=Number.parseInt(Ct.textEditor.style.maxWidth)&&Dt>.9;)Dt-=.1,Ct.textEditor.style.fontSize=Math.max(Dt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Dt){Dt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Dt){if(Dt.clipboardData){var Zt=Dt.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(Zt)),Dt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ct.textEditDivClicked(Ct.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Lt.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ct=this.getTextScale(),Dt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Zt=this.textElement.getBBox(),kt={x:Zt.width*Ct,y:Zt.height*Ct};Dt.x-=kt.x/2,Dt.y-=kt.y/2,this.textEditor.style.top=Dt.y+"px",this.textEditor.style.left=Dt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Dt.x+"px",this.textEditor.style.fontSize=Math.max(16*Ct,12)+"px",this.textElement.style.display="none"}},Lt.prototype.textEditDivClicked=function(Ct){this.text=Ct.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Lt.prototype.select=function(){Ht.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Lt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ht.prototype.deselect.call(this)},Lt.prototype.dblClick=function(Ct,Dt){Ht.prototype.dblClick.call(this,Ct,Dt),this.showTextEditor()},Lt.prototype.setColor=function(Ct){this.textElement&&It.setAttributes(this.textElement,[["fill",Ct]]),this.color=Ct,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ct)},Lt.prototype.setFont=function(Ct){this.textElement&&It.setAttributes(this.textElement,[["font-family",Ct]]),this.fontFamily=Ct,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Lt.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Lt.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){var Dt=Ct;this.color=Dt.color,this.fontFamily=Dt.fontFamily,this.padding=Dt.padding,this.text=Dt.text,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Lt.prototype.scale=function(Ct,Dt){Ht.prototype.scale.call(this,Ct,Dt),this.setSize(),this.sizeText(),this.positionTextEditor()},Lt.typeName="TextMarker",Lt.title="Text marker",Lt.icon='',Lt}(xt),Ge=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.color="transparent",kt.lineWidth=3,kt.drawing=!1,kt.pixelRatio=1,kt.color=Zt.defaultColor,kt.lineWidth=Zt.defaultStrokeWidth,kt.pixelRatio=Zt.freehandPixelRatio,kt.setColor=kt.setColor.bind(kt),kt.addCanvas=kt.addCanvas.bind(kt),kt.finishCreation=kt.finishCreation.bind(kt),kt.setLineWidth=kt.setLineWidth.bind(kt),kt.colorPanel=new et("Color",Zt.defaultColorSet,Zt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.lineWidthPanel=new jt("Line width",Zt.defaultStrokeWidths,Zt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.drawingImage)},Lt.prototype.createVisual=function(){this.visual=It.createGroup(),this.drawingImage=It.createImage(),this.visual.appendChild(this.drawingImage);var Ct=It.createTransform();this.visual.transform.baseVal.appendItem(Ct),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(Ct,Dt){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Ct.x,Ct.y),this.drawing=!0):Ht.prototype.pointerDown.call(this,Ct,Dt)},Lt.prototype.manipulate=function(Ct){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ct.x,Ct.y),this.canvasContext.stroke()):Ht.prototype.manipulate.call(this,Ct)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),It.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),It.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(Ct){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ht.prototype.pointerUp.call(this,Ct)},Lt.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},Lt.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ht.prototype.select.call(this)},Lt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ht.prototype.deselect.call(this)},Lt.prototype.finishCreation=function(){for(var Ct=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Dt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Zt=Dt[0],kt=Dt[1],_t=Dt[2],tn=Dt[3],an=!1,_n=0;_n0&&(an=!0,_ntn&&(tn=_n),nn>_t&&(_t=nn));if(an){this.left=Zt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(_t-Zt)/this.pixelRatio,this.height=(tn-kt)/this.pixelRatio;var Pn=document.createElement("canvas");Pn.width=_t-Zt,Pn.height=tn-kt,Pn.getContext("2d").putImageData(this.canvasContext.getImageData(Zt,kt,_t-Zt,tn-kt),0,0),this.drawingImgUrl=Pn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Lt.prototype.setDrawingImage=function(){It.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),It.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Lt.prototype.setColor=function(Ct){this.color=Ct,this.colorChanged(Ct)},Lt.prototype.setLineWidth=function(Ct){this.lineWidth=Ct},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({drawingImgUrl:this.drawingImgUrl},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.drawingImgUrl=Ct.drawingImgUrl,this.setDrawingImage()},Lt.prototype.scale=function(Ct,Dt){Ht.prototype.scale.call(this,Ct,Dt),this.setDrawingImage()},Lt.typeName="FreehandMarker",Lt.title="Freehand marker",Lt.icon='',Lt}(xt),Oe=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Zt||'')||this;return kt.typeBoxes=[],kt.currentType=Dt,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return ie(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Dt=document.createElement("div");Dt.style.display="flex",Dt.style.overflow="hidden",Dt.style.flexGrow="2";for(var Zt=function(tn){var an="both";switch(tn){case 0:an="both";break;case 1:an="start";break;case 2:an="end";break;case 3:an="none"}var _n=document.createElement("div");if(_n.style.display="flex",_n.style.flexGrow="2",_n.style.alignItems="center",_n.style.justifyContent="space-between",_n.style.padding="5px",_n.style.borderWidth="2px",_n.style.borderStyle="solid",_n.style.borderColor=an===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",_n.addEventListener("click",function(){Ct.setCurrentType(an,_n)}),Dt.appendChild(_n),an==="both"||an==="start"){var nn=document.createElement("div");nn.style.display="flex",nn.style.alignItems="center",nn.style.minHeight="20px",nn.innerHTML=` `,nn.style.marginLeft="5px",_n.appendChild(nn)}var Pn=document.createElement("div");Pn.style.display="flex",Pn.style.alignItems="center",Pn.style.minHeight="20px",Pn.style.flexGrow="2";var je=document.createElement("hr");if(je.style.minWidth="20px",je.style.border="0px",je.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),je.style.flexGrow="2",Pn.appendChild(je),_n.appendChild(Pn),an==="both"||an==="end"){var In=document.createElement("div");In.style.display="flex",In.style.alignItems="center",In.style.minHeight="20px",In.innerHTML=` `,In.style.marginRight="5px",_n.appendChild(In)}kt.typeBoxes.push(_n)},kt=this,_t=0;_t<4;_t++)Zt(_t);return Dt},Lt.prototype.setCurrentType=function(Ct,Dt){var Zt=this;this.currentType=Ct,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Zt.uiStyleSettings!==void 0?Zt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Lt}(nt),On=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.arrowType="end",kt.arrowBaseHeight=10,kt.arrowBaseWidth=10,kt.getArrowPoints=kt.getArrowPoints.bind(kt),kt.setArrowType=kt.setArrowType.bind(kt),kt.arrowTypePanel=new Oe("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.arrow1&&Ct!==this.arrow2)},Lt.prototype.getArrowPoints=function(Ct,Dt){var Zt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return Ct-Zt/2+","+(Dt+kt/2)+" "+Ct+","+(Dt-kt/2)+" "+(Ct+Zt/2)+","+(Dt+kt/2)},Lt.prototype.createTips=function(){this.arrow1=It.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(It.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=It.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(It.createTransform()),this.visual.appendChild(this.arrow2)},Lt.prototype.pointerDown=function(Ct,Dt){Ht.prototype.pointerDown.call(this,Ct,Dt),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(Ht.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",It.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),It.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ct=0;Math.abs(this.x1-this.x2)>.1&&(Ct=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Dt=this.arrow1.transform.baseVal.getItem(0);Dt.setRotate(Ct,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Dt,0);var Zt=this.arrow2.transform.baseVal.getItem(0);Zt.setRotate(Ct+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Zt,0)}},Lt.prototype.setArrowType=function(Ct){this.arrowType=Ct,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({arrowType:this.arrowType},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Dt=Ct;this.arrowType=Dt.arrowType,this.createTips(),this.adjustVisual()},Lt.typeName="ArrowMarker",Lt.title="Arrow marker",Lt.icon='',Lt}(we),Nn=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.fillColor=Zt.defaultFillColor,kt.strokeWidth=0,kt.fillPanel=new et("Color",Zt.defaultColorSet,Zt.defaultFillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt}return ie(Lt,Ht),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.typeName="CoverMarker",Lt.title="Cover marker",Lt.icon='',Lt}(Mt),Sn=function(Ht){function Lt(Ct,Dt,Zt,kt){var _t=Ht.call(this,Ct,kt||'')||this;return _t.opacities=[],_t.opacityBoxes=[],_t.opacities=Dt,_t.currentOpacity=Zt,_t.setCurrentOpacity=_t.setCurrentOpacity.bind(_t),_t}return ie(Lt,Ht),Lt.prototype.getUi=function(){var Ct=this,Dt=document.createElement("div");return Dt.style.display="flex",Dt.style.overflow="hidden",Dt.style.flexGrow="2",Dt.style.justifyContent="space-between",this.opacities.forEach(function(Zt){var kt=document.createElement("div");kt.style.display="flex",kt.style.alignItems="center",kt.style.justifyContent="center",kt.style.padding="5px",kt.style.borderWidth="2px",kt.style.borderStyle="solid",kt.style.borderColor=Zt===Ct.currentOpacity?Ct.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Ct.setCurrentOpacity(Zt,kt)}),Dt.appendChild(kt);var _t=document.createElement("div");_t.innerText=100*Zt+"%",kt.appendChild(_t),Ct.opacityBoxes.push(kt)}),Dt},Lt.prototype.setCurrentOpacity=function(Ct,Dt){var Zt=this;this.currentOpacity=Ct,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Dt?Zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Lt}(nt),Zn=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.setOpacity=kt.setOpacity.bind(kt),kt.fillColor=Zt.defaultHighlightColor,kt.strokeWidth=0,kt.opacity=Zt.defaultHighlightOpacity,kt.fillPanel=new et("Color",Zt.defaultColorSet,kt.fillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt.opacityPanel=new Sn("Opacity",Zt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return ie(Lt,Ht),Lt.prototype.setOpacity=function(Ct){this.opacity=Ct,this.visual&&It.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.typeName="HighlightMarker",Lt.title="Highlight marker",Lt.icon='',Lt}(Nn),re='',Wt='',Me=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.bgColor="transparent",kt.tipPosition={x:0,y:0},kt.tipBase1Position={x:0,y:0},kt.tipBase2Position={x:0,y:0},kt.tipMoving=!1,kt.color=Zt.defaultStrokeColor,kt.bgColor=Zt.defaultFillColor,kt.fontFamily=Zt.defaultFontFamily,kt.defaultSize={x:100,y:30},kt.setBgColor=kt.setBgColor.bind(kt),kt.getTipPoints=kt.getTipPoints.bind(kt),kt.positionTip=kt.positionTip.bind(kt),kt.setTipPoints=kt.setTipPoints.bind(kt),kt.colorPanel=new et("Text color",Zt.defaultColorSet,kt.color,re),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new et("Fill color",Zt.defaultColorSet,kt.bgColor,Wt),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new ce("Font",Zt.defaultFontFamilies,Zt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new gt,kt.tipGrip.visual.transform.baseVal.appendItem(It.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return Ht.prototype.ownsTarget.call(this,Ct)||this.tipGrip.ownsTarget(Ct)||this.tip===Ct},Lt.prototype.createTip=function(){It.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=It.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Lt.prototype.pointerDown=function(Ct,Dt){this.state==="new"&&Ht.prototype.pointerDown.call(this,Ct,Dt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Dt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ht.prototype.pointerDown.call(this,Ct,Dt)},Lt.prototype.pointerUp=function(Ct){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ht.prototype.pointerUp.call(this,Ct);else{var Dt=this.state==="creating";Ht.prototype.pointerUp.call(this,Ct),this.setTipPoints(Dt),this.positionTip()}},Lt.prototype.manipulate=function(Ct){if(this.tipMoving){var Dt=this.unrotatePoint(Ct);this.tipPosition={x:Dt.x-this.manipulationStartLeft,y:Dt.y-this.manipulationStartTop},this.positionTip()}else Ht.prototype.manipulate.call(this,Ct)},Lt.prototype.setBgColor=function(Ct){this.bgRectangle&&this.tip&&(It.setAttributes(this.bgRectangle,[["fill",Ct]]),It.setAttributes(this.tip,[["fill",Ct]])),this.bgColor=Ct,this.fillColorChanged(Ct)},Lt.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},Lt.prototype.setTipPoints=function(Ct){Ct===void 0&&(Ct=!1);var Dt=Math.min(this.height/2,15),Zt=this.height/5;Ct&&(this.tipPosition={x:Dt+Zt/2,y:this.height+20});var kt=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?kt.1)){var Ct=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Dt=this.tip1.transform.baseVal.getItem(0);Dt.setRotate(Ct,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Dt,0);var Zt=this.tip2.transform.baseVal.getItem(0);Zt.setRotate(Ct+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Zt,0)}},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct),this.createTips(),this.adjustVisual()},Lt.typeName="MeasurementMarker",Lt.title="Measurement marker",Lt.icon='',Lt}(we),Ae=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.strokePanel.colors=Zt.defaultColorSet,kt.fillColor="transparent",kt}return ie(Lt,Ht),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Ht.prototype.getState.call(this);return Ct.typeName=Lt.typeName,Ct},Lt.typeName="EllipseFrameMarker",Lt.title="Ellipse frame marker",Lt.icon='',Lt}(ln),pn=function(){function Ht(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ht.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ht.prototype.addUndoStep=function(Lt){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Lt)||(this.undoStack.push(Lt),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Lt)&&this.redoStack.splice(0,this.redoStack.length))},Ht.prototype.replaceLastUndoStep=function(Lt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Lt)},Ht.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ht.prototype.undo=function(){if(this.undoStack.length>1){var Lt=this.undoStack.pop();return Lt!==void 0&&this.redoStack.push(Lt),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ht.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ht}(),$e=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.curveX=0,kt.curveY=0,kt.manipulationStartCurveX=0,kt.manipulationStartCurveY=0,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.positionGrips=kt.positionGrips.bind(kt),kt.addControlGrips=kt.addControlGrips.bind(kt),kt.adjustVisual=kt.adjustVisual.bind(kt),kt.setupControlBox=kt.setupControlBox.bind(kt),kt.resize=kt.resize.bind(kt),kt.strokeColor=Zt.defaultColor,kt.strokeWidth=Zt.defaultStrokeWidth,kt.strokeDasharray=Zt.defaultStrokeDasharray,kt.strokePanel=new et("Line color",Zt.defaultColorSet,Zt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new jt("Line width",Zt.defaultStrokeWidths,Zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Qt("Line style",Zt.defaultStrokeDasharrays,Zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.selectorCurve&&Ct!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ct))},Lt.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Lt.prototype.createVisual=function(){this.visual=It.createGroup(),this.selectorCurve=It.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=It.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(Ct,Dt){Ht.prototype.pointerDown.call(this,Ct,Dt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ct.x,this.curveY=Ct.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Dt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Lt.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),It.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),It.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),It.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setupControlBox=function(){Ht.prototype.setupControlBox.call(this),this.curveControlLine1=It.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=It.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},Lt.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ht.prototype.addControlGrips.call(this)},Lt.prototype.positionGrips=function(){Ht.prototype.positionGrips.call(this);var Ct=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ct/2,this.curveY-Ct/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},Lt.prototype.manipulate=function(Ct){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ct.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ct.y-this.manipulationStartY),Ht.prototype.manipulate.call(this,Ct)},Lt.prototype.resize=function(Ct){this.activeGrip===this.curveGrip&&(this.curveX=Ct.x,this.curveY=Ct.y),Ht.prototype.resize.call(this,Ct),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.adjustVisual(),this.colorChanged(Ct)},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.adjustVisual()},Lt.prototype.scale=function(Ct,Dt){this.curveX=this.curveX*Ct,this.curveY=this.curveY*Dt,Ht.prototype.scale.call(this,Ct,Dt)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ht.prototype.getState.call(this));return Ct.typeName=Lt.typeName,Ct},Lt.prototype.restoreState=function(Ct){Ht.prototype.restoreState.call(this,Ct);var Dt=Ct;this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.curveX=Dt.curveX,this.curveY=Dt.curveY,this.createVisual(),this.adjustVisual()},Lt.typeName="CurveMarker",Lt.title="Curve marker",Lt.icon='',Lt}($t),An=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,Dt,Zt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.textColor="transparent",kt.fontSize="1rem",kt.isMoved=!1,kt.captionText="Caption",kt.PADDING=5,kt.captionBoxWidth=0,kt.captionBoxHeight=0,kt.strokeColor=Zt.defaultColor,kt.strokeWidth=Zt.defaultStrokeWidth,kt.strokeDasharray=Zt.defaultStrokeDasharray,kt.fillColor=Zt.defaultFillColor,kt.textColor=Zt.defaultStrokeColor,kt.fontFamily=Zt.defaultFontFamily,kt.fontSize=Zt.defaultCaptionFontSize,kt.captionText=Zt.defaultCaptionText,kt.setStrokeColor=kt.setStrokeColor.bind(kt),kt.setFillColor=kt.setFillColor.bind(kt),kt.setStrokeWidth=kt.setStrokeWidth.bind(kt),kt.setStrokeDasharray=kt.setStrokeDasharray.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt.sizeCaption=kt.sizeCaption.bind(kt),kt.setCaptionText=kt.setCaptionText.bind(kt),kt.showTextEditor=kt.showTextEditor.bind(kt),kt.positionTextEditor=kt.positionTextEditor.bind(kt),kt.finishTextEditing=kt.finishTextEditing.bind(kt),kt.setFont=kt.setFont.bind(kt),kt.setTextColor=kt.setTextColor.bind(kt),kt.strokePanel=new et("Line color",Le(Zt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new et("Fill color",Le(Zt.defaultColorSet,["transparent"]),kt.fillColor,Wt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new jt("Line width",Zt.defaultStrokeWidths,Zt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Qt("Line style",Zt.defaultStrokeDasharrays,Zt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.fontFamilyPanel=new ce("Font",Zt.defaultFontFamilies,Zt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new et("Text color",Zt.defaultColorSet,kt.textColor,re),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return ie(Lt,Ht),Lt.prototype.ownsTarget=function(Ct){return!(!Ht.prototype.ownsTarget.call(this,Ct)&&Ct!==this.visual&&Ct!==this.frame&&Ct!==this.captionBg&&Ct!==this.captionElement)},Lt.prototype.createVisual=function(){this.visual=It.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=It.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=It.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=It.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},Lt.prototype.setCaptionText=function(Ct){this.captionText=Ct,this.captionElement.textContent=this.captionText,this.sizeCaption()},Lt.prototype.pointerDown=function(Ct,Dt){Ht.prototype.pointerDown.call(this,Ct,Dt),this.isMoved=!1,this.pointerDownPoint=Ct,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ct),this._state="creating")},Lt.prototype.manipulate=function(Ct){Ht.prototype.manipulate.call(this,Ct),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ct.x-this.pointerDownPoint.x)>5||Math.abs(Ct.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(Ct){Ht.prototype.resize.call(this,Ct),this.setSize()},Lt.prototype.sizeCaption=function(){var Ct=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ct.width+2*this.PADDING,this.captionBoxHeight=Ct.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),It.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),It.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},Lt.prototype.showTextEditor=function(){var Ct=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(Dt){Dt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Dt){Dt.key==="Enter"&&Ct.finishTextEditing(Ct.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Dt){Dt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ct.finishTextEditing(Ct.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ct.finishTextEditing(Ct.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Lt.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},Lt.prototype.finishTextEditing=function(Ct){this.setCaptionText(Ct.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Lt.prototype.setFont=function(Ct){this.captionElement&&It.setAttributes(this.captionElement,[["font-family",Ct]]),this.fontFamily=Ct,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Lt.prototype.setTextColor=function(Ct){this.captionElement&&It.setAttributes(this.captionElement,[["fill",Ct]]),this.textColor=Ct,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Lt.prototype.setSize=function(){Ht.prototype.setSize.call(this),It.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Lt.prototype.pointerUp=function(Ct){Ht.prototype.pointerUp.call(this,Ct),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.dblClick=function(Ct,Dt){Ht.prototype.dblClick.call(this,Ct,Dt),this.showTextEditor()},Lt.prototype.setStrokeColor=function(Ct){this.strokeColor=Ct,this.frame&&It.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ct),this.stateChanged()},Lt.prototype.setFillColor=function(Ct){this.fillColor=Ct,this.captionBg&&It.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ct),this.stateChanged()},Lt.prototype.setStrokeWidth=function(Ct){this.strokeWidth=Ct,this.frame&&It.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(Ct){this.strokeDasharray=Ct,this.frame&&It.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Ct=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Ht.prototype.getState.call(this));return Ct.typeName=this.typeName,Ct},Lt.prototype.restoreState=function(Ct){var Dt=Ct;this.fillColor=Dt.fillColor,this.strokeColor=Dt.strokeColor,this.strokeWidth=Dt.strokeWidth,this.strokeDasharray=Dt.strokeDasharray,this.textColor=Dt.textColor,this.fontFamily=Dt.fontFamily,this.captionText=Dt.captionText,this.fontSize=Dt.fontSize,this.createVisual(),Ht.prototype.restoreState.call(this,Ct),this.setSize()},Lt.prototype.scale=function(Ct,Dt){Ht.prototype.scale.call(this,Ct,Dt),this.setSize()},Lt.typeName="CaptionFrameMarker",Lt.title="Caption frame marker",Lt.icon='',Lt}(xt),Fe=function(){function Ht(Lt,Ct){Ct===void 0&&(Ct=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Lt,this.cancelable=Ct}return Object.defineProperty(Ht.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ht.prototype.preventDefault=function(){this._defaultPrevented=!0},Ht}(),de=function(Ht){function Lt(Ct,Dt,Zt){var kt=Ht.call(this,Ct,!1)||this;return kt.dataUrl=Dt,kt.state=Zt,kt}return ie(Lt,Ht),Lt}(Fe),Ie=function(Ht){function Lt(Ct,Dt,Zt){Zt===void 0&&(Zt=!1);var kt=Ht.call(this,Ct,Zt)||this;return kt.marker=Dt,kt}return ie(Lt,Ht),Lt}(Fe),cn=function(){function Ht(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Ht.prototype.addEventListener=function(Lt,Ct){this[Lt].push(Ct)},Ht.prototype.removeEventListener=function(Lt,Ct){var Dt=this[Lt].indexOf(Ct);Dt>-1&&this[Lt].splice(Dt,1)},Ht}(),Ke=function(){function Ht(Lt){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new qt,this._isOpen=!1,this.undoRedoManager=new pn,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new cn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ht.instanceCounter++,this.styles=new xe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Lt,this.targetRoot=document.body,this.width=Lt.clientWidth,this.height=Lt.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Ht.prototype,"ALL_MARKER_TYPES",{get:function(){return[ne,Ge,On,be,Ae,ln,Zn,Me,Dn,Nn,we,$e,An]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ne,Ge,On,be,ln,Zn,Me]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ne,Ge,On,be,Zn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Lt){var Ct=this;this._availableMarkerTypes.splice(0),Lt.forEach(function(Dt){if(typeof Dt=="string"){var Zt=Ct.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Dt});Zt!==void 0&&Ct._availableMarkerTypes.push(Zt)}else Ct._availableMarkerTypes.push(Dt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Lt){this._zoomLevel=Lt,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Ht.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ht.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Jt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ht.prototype.show=function(){var Lt=this;this.styles.styleSheetRoot===void 0&&ve.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ve.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ct){return Ct(new Fe(Lt))})},Ht.prototype.render=function(){return De(this,void 0,void 0,function(){var Lt;return Ne(this,function(Ct){switch(Ct.label){case 0:return this.setCurrentMarker(),(Lt=new fe).naturalSize=this.renderAtNaturalSize,Lt.imageType=this.renderImageType,Lt.imageQuality=this.renderImageQuality,Lt.markersOnly=this.renderMarkersOnly,Lt.width=this.renderWidth,Lt.height=this.renderHeight,[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ct.sent(),[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ct.sent()]}})})},Ht.prototype.close=function(Lt){var Ct=this;if(Lt===void 0&&(Lt=!1),this.isOpen){var Dt=!1;Lt||this.eventListeners.beforeclose.forEach(function(Zt){var kt=new Fe(Ct,!0);Zt(kt),kt.defaultPrevented&&(Dt=!0)}),Dt||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Zt){return Zt(new Fe(Ct))}),this.detachEvents(),this._isOpen=!1)}},Ht.prototype.addMarkersToToolbar=function(){for(var Lt,Ct=[],Dt=0;Dtthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Lt:this.editorCanvas.clientWidth,Dt=Ct',Lt.title="Powered by marker.js",Lt.style.display="grid",Lt.style.alignItems="center",Lt.style.justifyItems="center",Lt.style.padding="3px",Lt.style.width="20px",Lt.style.height="20px",this.logoUI.appendChild(Lt),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ht.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Ht.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Ht.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ht.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var Lt=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Lt+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Rt(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop-1&&this.markers.splice(this.markers.indexOf(Lt),1),Lt.dispose()},Ht.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Ht.prototype.toolbarButtonClicked=function(Lt,Ct){if(Lt==="marker"&&Ct!==void 0)this.createNewMarker(Ct);else if(Lt==="action")switch(Ct){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Ht.prototype.deleteSelectedMarker=function(){var Lt=this;if(this._currentMarker!==void 0){var Ct=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Zt){var kt=new Ie(Lt,Lt._currentMarker,!0);Zt(kt),kt.defaultPrevented&&(Ct=!0)}),!Ct){var Dt=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Zt){return Zt(new Ie(Lt,Dt))})}}},Ht.prototype.clear=function(){var Lt=this,Ct=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_t){var tn=new Ie(Lt,void 0,!0);_t(tn),tn.defaultPrevented&&(Ct=!0)}),!Ct)){this.setCurrentMarker();for(var Dt=function(_t){var tn=Zt.markers[_t];Zt.setCurrentMarker(Zt.markers[_t]),Zt._currentMarker.dispose(),Zt.markerImage.removeChild(Zt._currentMarker.container),Zt.markers.splice(Zt.markers.indexOf(Zt._currentMarker),1),Zt.eventListeners.markerdelete.forEach(function(an){return an(new Ie(Lt,tn))})},Zt=this,kt=this.markers.length-1;kt>=0;kt--)Dt(kt);this.addUndoStep()}},Object.defineProperty(Ht.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ht.prototype.showNotesEditor=function(){var Lt;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(Lt=this._currentMarker.notes)!==null&&Lt!==void 0?Lt:"",this.overlayContainer.appendChild(this.notesArea))},Ht.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Ht.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ht.prototype.addUndoStep=function(){var Lt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ct=this.getState(),Dt=this.undoRedoManager.getLastUndoStep();if(!Dt||Dt.width===Ct.width&&Dt.height===Ct.height){var Zt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ct),Zt1&&this.panTo({x:Lt.clientX,y:Lt.clientY}))},Ht.prototype.onPointerUp=function(Lt){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)),this.isDragging=!1,this.addUndoStep()},Ht.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ht.prototype.onKeyUp=function(Lt){this._currentMarker===void 0||this.notesArea!==void 0||Lt.key!=="Delete"&&Lt.key!=="Backspace"||this.deleteSelectedMarker()},Ht.prototype.clientToLocalCoordinates=function(Lt,Ct){var Dt=this.markerImage.getBoundingClientRect();return{x:(Lt-Dt.left)/this.zoomLevel,y:(Ct-Dt.top)/this.zoomLevel}},Ht.prototype.onWindowResize=function(){this.positionUI()},Ht.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Lt=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Lt+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Ht.prototype.addLicenseKey=function(Lt){Jt.addKey(Lt)},Ht.prototype.addEventListener=function(Lt,Ct){this.eventListeners.addEventListener(Lt,Ct)},Ht.prototype.removeEventListener=function(Lt,Ct){this.eventListeners.removeEventListener(Lt,Ct)},Ht.prototype.renderState=function(Lt){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Lt),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ht.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ht.prototype.focus=function(){var Lt=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ct){return Ct(new Fe(Lt))}))},Ht.prototype.blur=function(){var Lt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ct){return Ct(new Fe(Lt))}))},Ht.instanceCounter=0,Ht}()},31457:function(En,jn,Nt){"use strict";Nt.d(jn,{Z:function(){return Ie}});var bt=Nt(4942),ie=Nt(87462),De=Nt(71002),Ne=Nt(1413),Le=Nt(97685),It=Nt(94184),Jt=Nt.n(It),fe=Nt(67294);function ve(cn){var Ke=fe.useRef();Ke.current=cn;var Ht=fe.useCallback(function(){for(var Lt,Ct=arguments.length,Dt=new Array(Ct),Zt=0;Zt=lt.F1&&Ht<=lt.F12)return!1;switch(Ht){case lt.ALT:case lt.CAPS_LOCK:case lt.CONTEXT_MENU:case lt.CTRL:case lt.DOWN:case lt.END:case lt.ESC:case lt.HOME:case lt.INSERT:case lt.LEFT:case lt.MAC_FF_META:case lt.META:case lt.NUMLOCK:case lt.NUM_CENTER:case lt.PAGE_DOWN:case lt.PAGE_UP:case lt.PAUSE:case lt.PRINT_SCREEN:case lt.RIGHT:case lt.SHIFT:case lt.UP:case lt.WIN_KEY:case lt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ke){if(Ke>=lt.ZERO&&Ke<=lt.NINE||Ke>=lt.NUM_ZERO&&Ke<=lt.NUM_MULTIPLY||Ke>=lt.A&&Ke<=lt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ke===0)return!0;switch(Ke){case lt.SPACE:case lt.QUESTION_MARK:case lt.NUM_PLUS:case lt.NUM_MINUS:case lt.NUM_PERIOD:case lt.NUM_DIVISION:case lt.SEMICOLON:case lt.DASH:case lt.EQUALS:case lt.COMMA:case lt.PERIOD:case lt.SLASH:case lt.APOSTROPHE:case lt.SINGLE_QUOTE:case lt.OPEN_SQUARE_BRACKET:case lt.BACKSLASH:case lt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},gt=lt,mt=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name noValidate nonce open optimum pattern placeholder poster preload radioGroup readOnly rel required reversed role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap`,xt=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Mt="".concat(mt," ").concat(xt).split(/[\s\n]+/),jt="aria-",Qt="data-";function ne(cn,Ke){return cn.indexOf(Ke)===0}function qt(cn){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht;Ke===!1?Ht={aria:!0,data:!0,attr:!0}:Ke===!0?Ht={aria:!0}:Ht=(0,Ne.Z)({},Ke);var Lt={};return Object.keys(cn).forEach(function(Ct){(Ht.aria&&(Ct==="role"||ne(Ct,jt))||Ht.data&&ne(Ct,Qt)||Ht.attr&&Mt.includes(Ct))&&(Lt[Ct]=cn[Ct])}),Lt}var $t={},we=[],ce=function(Ke){we.push(Ke)};function be(cn,Ke){if(0)var Ht}function Ge(cn,Ke){if(0)var Ht}function Oe(){$t={}}function On(cn,Ke,Ht){!Ke&&!$t[Ht]&&(cn(!1,Ht),$t[Ht]=!0)}function Nn(cn,Ke){On(be,cn,Ke)}function Sn(cn,Ke){On(Ge,cn,Ke)}Nn.preMessage=ce,Nn.resetWarned=Oe,Nn.noteOnce=Sn;var Zn=null,re=Nt(81626),Wt=[10,20,50,100],Me=function(Ke){var Ht=Ke.pageSizeOptions,Lt=Ht===void 0?Wt:Ht,Ct=Ke.locale,Dt=Ke.changeSize,Zt=Ke.pageSize,kt=Ke.goButton,_t=Ke.quickGo,tn=Ke.rootPrefixCls,an=Ke.disabled,_n=Ke.buildOptionText,nn=Ke.showSizeChanger,Pn=Ke.sizeChangerRender,je=fe.useState(""),In=(0,Le.Z)(je,2),ti=In[0],Ii=In[1],ni=function(){return!ti||Number.isNaN(ti)?void 0:Number(ti)},Pi=typeof _n=="function"?_n:function(Di){return"".concat(Di," ").concat(Ct.items_per_page)},Zi=function(Zr){Ii(Zr.target.value)},ii=function(Zr){kt||ti===""||(Ii(""),!(Zr.relatedTarget&&(Zr.relatedTarget.className.indexOf("".concat(tn,"-item-link"))>=0||Zr.relatedTarget.className.indexOf("".concat(tn,"-item"))>=0))&&(_t==null||_t(ni())))},ci=function(Zr){ti!==""&&(Zr.keyCode===gt.ENTER||Zr.type==="click")&&(Ii(""),_t==null||_t(ni()))},li=function(){return Lt.some(function(Zr){return Zr.toString()===Zt.toString()})?Lt:Lt.concat([Zt]).sort(function(Zr,Mo){var Ha=Number.isNaN(Number(Zr))?0:Number(Zr),pa=Number.isNaN(Number(Mo))?0:Number(Mo);return Ha-pa})},di="".concat(tn,"-options");if(!nn&&!_t)return null;var cr=null,Gr=null,fr=null;return nn&&Pn&&(cr=Pn({disabled:an,size:Zt,onSizeChange:function(Zr){Dt==null||Dt(Number(Zr))},"aria-label":Ct.page_size,className:"".concat(di,"-size-changer"),options:li().map(function(Di){return{label:Pi(Di),value:Di}})})),_t&&(kt&&(fr=typeof kt=="boolean"?fe.createElement("button",{type:"button",onClick:ci,onKeyUp:ci,disabled:an,className:"".concat(di,"-quick-jumper-button")},Ct.jump_to_confirm):fe.createElement("span",{onClick:ci,onKeyUp:ci},kt)),Gr=fe.createElement("div",{className:"".concat(di,"-quick-jumper")},Ct.jump_to,fe.createElement("input",{disabled:an,type:"text",value:ti,onChange:Zi,onKeyUp:ci,onBlur:ii,"aria-label":Ct.page}),Ct.page,fr)),fe.createElement("li",{className:di},cr,Gr)},ln=Me,Dn=function(Ke){var Ht=Ke.rootPrefixCls,Lt=Ke.page,Ct=Ke.active,Dt=Ke.className,Zt=Ke.showTitle,kt=Ke.onClick,_t=Ke.onKeyPress,tn=Ke.itemRender,an="".concat(Ht,"-item"),_n=Jt()(an,"".concat(an,"-").concat(Lt),(0,bt.Z)((0,bt.Z)({},"".concat(an,"-active"),Ct),"".concat(an,"-disabled"),!Lt),Dt),nn=function(){kt(Lt)},Pn=function(ti){_t(ti,kt,Lt)},je=tn(Lt,"page",fe.createElement("a",{rel:"nofollow"},Lt));return je?fe.createElement("li",{title:Zt?String(Lt):null,className:_n,onClick:nn,onKeyDown:Pn,tabIndex:0},je):null},Ae=Dn,pn=function(Ke,Ht,Lt){return Lt};function $e(){}function An(cn){var Ke=Number(cn);return typeof Ke=="number"&&!Number.isNaN(Ke)&&isFinite(Ke)&&Math.floor(Ke)===Ke}function Fe(cn,Ke,Ht){var Lt=typeof cn=="undefined"?Ke:cn;return Math.floor((Ht-1)/Lt)+1}var de=function(Ke){var Ht=Ke.prefixCls,Lt=Ht===void 0?"rc-pagination":Ht,Ct=Ke.selectPrefixCls,Dt=Ct===void 0?"rc-select":Ct,Zt=Ke.className,kt=Ke.current,_t=Ke.defaultCurrent,tn=_t===void 0?1:_t,an=Ke.total,_n=an===void 0?0:an,nn=Ke.pageSize,Pn=Ke.defaultPageSize,je=Pn===void 0?10:Pn,In=Ke.onChange,ti=In===void 0?$e:In,Ii=Ke.hideOnSinglePage,ni=Ke.align,Pi=Ke.showPrevNextJumpers,Zi=Pi===void 0?!0:Pi,ii=Ke.showQuickJumper,ci=Ke.showLessItems,li=Ke.showTitle,di=li===void 0?!0:li,cr=Ke.onShowSizeChange,Gr=cr===void 0?$e:cr,fr=Ke.locale,Di=fr===void 0?re.Z:fr,Zr=Ke.style,Mo=Ke.totalBoundaryShowSizeChanger,Ha=Mo===void 0?50:Mo,pa=Ke.disabled,xa=Ke.simple,_a=Ke.showTotal,Oa=Ke.showSizeChanger,Go=Oa===void 0?_n>Ha:Oa,Cn=Ke.sizeChangerRender,wt=Ke.pageSizeOptions,Ue=Ke.itemRender,He=Ue===void 0?pn:Ue,wi=Ke.jumpPrevIcon,hi=Ke.jumpNextIcon,Un=Ke.prevIcon,zi=Ke.nextIcon,hr=fe.useRef(null),Qe=ht(10,{value:nn,defaultValue:je}),on=(0,Le.Z)(Qe,2),Pe=on[0],_e=on[1],fi=ht(1,{value:kt,defaultValue:tn,postState:function(pr){return Math.max(1,Math.min(pr,Fe(void 0,Pe,_n)))}}),Mi=(0,Le.Z)(fi,2),Si=Mi[0],We=Mi[1],Ln=fe.useState(Si),ji=(0,Le.Z)(Ln,2),Ar=ji[0],Hn=ji[1];(0,fe.useEffect)(function(){Hn(Si)},[Si]);var Be=ti!==$e,xi="current"in Ke,Ki=Math.max(1,Si-(ci?3:5)),Tr=Math.min(Fe(void 0,Pe,_n),Si+(ci?3:5));function mn(sn,pr){var ro=sn||fe.createElement("button",{type:"button","aria-label":pr,className:"".concat(Lt,"-item-link")});return typeof sn=="function"&&(ro=fe.createElement(sn,(0,Ne.Z)({},Ke))),ro}function Ni(sn){var pr=sn.target.value,ro=Fe(void 0,Pe,_n),Ra;return pr===""?Ra=pr:Number.isNaN(Number(pr))?Ra=Ar:pr>=ro?Ra=ro:Ra=Number(pr),Ra}function io(sn){return An(sn)&&sn!==Si&&An(_n)&&_n>0}var ma=_n>Pe?ii:!1;function Ao(sn){(sn.keyCode===gt.UP||sn.keyCode===gt.DOWN)&&sn.preventDefault()}function Ei(sn){var pr=Ni(sn);switch(pr!==Ar&&Hn(pr),sn.keyCode){case gt.ENTER:$r(pr);break;case gt.UP:$r(pr-1);break;case gt.DOWN:$r(pr+1);break;default:break}}function bi(sn){$r(Ni(sn))}function Wi(sn){var pr=Fe(sn,Pe,_n),ro=Si>pr&&pr!==0?pr:Si;_e(sn),Hn(ro),Gr==null||Gr(Si,sn),We(ro),ti==null||ti(ro,sn)}function $r(sn){if(io(sn)&&!pa){var pr=Fe(void 0,Pe,_n),ro=sn;return sn>pr?ro=pr:sn<1&&(ro=1),ro!==Ar&&Hn(ro),We(ro),ti==null||ti(ro,Pe),ro}return Si}var Kr=Si>1,Xn=Si2?ro-2:0),Ma=2;Ma_n?_n:Si*Pe])),La=null,hn=Fe(void 0,Pe,_n);if(Ii&&_n<=Pe)return null;var po=[],Fs={rootPrefixCls:Lt,onClick:$r,onKeyPress:Re,showTitle:di,itemRender:He,page:-1},Ia=Si-1>0?Si-1:0,$s=Si+1=oa*2&&Si!==3&&(po[0]=fe.cloneElement(po[0],{className:Jt()("".concat(Lt,"-item-after-jump-prev"),po[0].props.className)}),po.unshift(zr)),hn-Si>=oa*2&&Si!==hn-2){var kh=po[po.length-1];po[po.length-1]=fe.cloneElement(kh,{className:Jt()("".concat(Lt,"-item-before-jump-next"),kh.props.className)}),po.push(La)}Ys!==1&&po.unshift(fe.createElement(Ae,(0,ie.Z)({},Fs,{key:1,page:1}))),du!==hn&&po.push(fe.createElement(Ae,(0,ie.Z)({},Fs,{key:hn,page:hn})))}var Cu=fo(Ia);if(Cu){var Ea=!Kr||!hn;Cu=fe.createElement("li",{title:di?Di.prev_page:null,onClick:ir,tabIndex:Ea?null:0,onKeyDown:gr,className:Jt()("".concat(Lt,"-prev"),(0,bt.Z)({},"".concat(Lt,"-disabled"),Ea)),"aria-disabled":Ea},Cu)}var Xa=To($s);if(Xa){var sr,Yi;xa?(sr=!Xn,Yi=Kr?0:null):(sr=!Xn||!hn,Yi=sr?null:0),Xa=fe.createElement("li",{title:di?Di.next_page:null,onClick:pl,tabIndex:Yi,onKeyDown:yo,className:Jt()("".concat(Lt,"-next"),(0,bt.Z)({},"".concat(Lt,"-disabled"),sr)),"aria-disabled":sr},Xa)}var Br=Jt()(Lt,Zt,(0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)({},"".concat(Lt,"-start"),ni==="start"),"".concat(Lt,"-center"),ni==="center"),"".concat(Lt,"-end"),ni==="end"),"".concat(Lt,"-simple"),xa),"".concat(Lt,"-disabled"),pa));return fe.createElement("ul",(0,ie.Z)({className:Br,style:Zr,ref:hr},qo),xn,Cu,xa?al:po,Xa,fe.createElement(ln,{locale:Di,rootPrefixCls:Lt,disabled:pa,selectPrefixCls:Dt,changeSize:Wi,pageSize:Pe,pageSizeOptions:wt,quickGo:ma?$r:null,goButton:Aa,showSizeChanger:Go,sizeChangerRender:Cn}))},Ie=de},63697:function(En,jn,Nt){"use strict";var bt=Nt(27484),ie=Nt.n(bt),De=Nt(6833),Ne=Nt.n(De),Le=Nt(96036),It=Nt.n(Le),Jt=Nt(55183),fe=Nt.n(Jt),ve=Nt(172),xe=Nt.n(ve),Ve=Nt(28734),he=Nt.n(Ve),Rt=Nt(10285),Ft=Nt.n(Rt);ie().extend(Ft()),ie().extend(he()),ie().extend(Ne()),ie().extend(It()),ie().extend(fe()),ie().extend(xe()),ie().extend(function(gt,mt){var xt=mt.prototype,Mt=xt.format;xt.format=function(Qt){var ne=(Qt||"").replace("Wo","wo");return Mt.bind(this)(ne)}});var nt={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},et=function(mt){var xt=nt[mt];return xt||mt.split("_")[0]},ht=function(){},lt={getNow:function(){var mt=ie()();return typeof mt.tz=="function"?mt.tz():mt},getFixedDate:function(mt){return ie()(mt,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(mt){return mt.endOf("month")},getWeekDay:function(mt){var xt=mt.locale("en");return xt.weekday()+xt.localeData().firstDayOfWeek()},getYear:function(mt){return mt.year()},getMonth:function(mt){return mt.month()},getDate:function(mt){return mt.date()},getHour:function(mt){return mt.hour()},getMinute:function(mt){return mt.minute()},getSecond:function(mt){return mt.second()},getMillisecond:function(mt){return mt.millisecond()},addYear:function(mt,xt){return mt.add(xt,"year")},addMonth:function(mt,xt){return mt.add(xt,"month")},addDate:function(mt,xt){return mt.add(xt,"day")},setYear:function(mt,xt){return mt.year(xt)},setMonth:function(mt,xt){return mt.month(xt)},setDate:function(mt,xt){return mt.date(xt)},setHour:function(mt,xt){return mt.hour(xt)},setMinute:function(mt,xt){return mt.minute(xt)},setSecond:function(mt,xt){return mt.second(xt)},setMillisecond:function(mt,xt){return mt.millisecond(xt)},isAfter:function(mt,xt){return mt.isAfter(xt)},isValidate:function(mt){return mt.isValid()},locale:{getWeekFirstDay:function(mt){return ie()().locale(et(mt)).localeData().firstDayOfWeek()},getWeekFirstDate:function(mt,xt){return xt.locale(et(mt)).weekday(0)},getWeek:function(mt,xt){return xt.locale(et(mt)).week()},getShortWeekDays:function(mt){return ie()().locale(et(mt)).localeData().weekdaysMin()},getShortMonths:function(mt){return ie()().locale(et(mt)).localeData().monthsShort()},format:function(mt,xt,Mt){return xt.locale(et(mt)).format(Mt)},parse:function(mt,xt,Mt){for(var jt=et(mt),Qt=0;Qtyt.length)&&(Tt=yt.length);for(var Bt=0,Kt=Array(Tt);Btyt.length)&&(Tt=yt.length);for(var Bt=0,Kt=new Array(Tt);Bt=19)return!0;var le=(0,be.isMemo)(Tt)?Tt.type.type:Tt.type;return!(typeof le=="function"&&!((Bt=le.prototype)!==null&&Bt!==void 0&&Bt.render)&&le.$$typeof!==be.ForwardRef||typeof Tt=="function"&&!((Kt=Tt.prototype)!==null&&Kt!==void 0&&Kt.render)&&Tt.$$typeof!==be.ForwardRef)};function Dn(yt){return(0,Rt.isValidElement)(yt)&&!Sn(yt)}var Ae=function(Tt){return Dn(Tt)&&ln(Tt)},pn=function(Tt){if(Tt&&Dn(Tt)){var Bt=Tt;return Bt.props.propertyIsEnumerable("ref")?Bt.props.ref:Bt.ref}return null};function $e(yt,Tt,Bt,Kt){if(!Tt.length)return Bt;var le=_toArray(Tt),Ce=le[0],ze=le.slice(1),qe;return!yt&&typeof Ce=="number"?qe=[]:Array.isArray(yt)?qe=_toConsumableArray(yt):qe=_objectSpread({},yt),Kt&&Bt===void 0&&ze.length===1?delete qe[Ce][ze[0]]:qe[Ce]=$e(qe[Ce],ze,Bt,Kt),qe}function An(yt,Tt,Bt){var Kt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Tt.length&&Kt&&Bt===void 0&&!get(yt,Tt.slice(0,-1))?yt:$e(yt,Tt,Bt,Kt)}function Fe(yt){return _typeof(yt)==="object"&&yt!==null&&Object.getPrototypeOf(yt)===Object.prototype}function de(yt){return Array.isArray(yt)?[]:{}}var Ie=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function cn(){for(var yt=arguments.length,Tt=new Array(yt),Bt=0;Bt