You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1255 lines
2.1 MiB
1255 lines
2.1 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[67],{8336:function(){"use strict"},12469:function(){"use strict"},99587:function(Pn,gi){"use strict";gi.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},3878:function(Pn,gi){"use strict";gi.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},63720:function(){"use strict";function Pn(Dt,et,nt,ct){nt===void 0&&(nt=0),ct===void 0&&(ct=1/0),this._name=Dt,this._defaultValue=et,this._minimum=nt,this._maximum=ct}Object.defineProperty(Pn.prototype,"name",{get:function(){return this._name},set:function(Dt){if(typeof Dt!="string"||Dt==="")throw new Error("Shape name must be a valid string.");this._name=Dt}}),Object.defineProperty(Pn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("The default value must be a real number, not: "+Dt);this._defaultValue=Dt}}),Object.defineProperty(Pn.prototype,"minimum",{get:function(){return this._minimum},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("Minimum must be a real number, not: "+Dt);this._minimum=Dt}}),Object.defineProperty(Pn.prototype,"maximum",{get:function(){return this._maximum},set:function(Dt){if(typeof Dt!="number"||isNaN(Dt))throw new Error("Maximum must be a real number, not: "+Dt);this._maximum=Dt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Dt,et){var nt=go.Shape._FigureParameters[Dt];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Dt,et,nt){if(!(nt instanceof Pn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValue<nt.minimum||nt.defaultValue>nt.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var ct=go.Shape._FigureParameters[Dt];ct||(ct=[],go.Shape._FigureParameters[Dt]=ct),ct[et]=nt};var gi=[];function ne(Dt,et){var nt=gi.pop();return nt===void 0?new go.Point(Dt,et):(nt.x=Dt,nt.y=et,nt)}function bt(){var Dt=gi.pop();return Dt===void 0?new go.Point:Dt}function xe(Dt){gi.push(Dt)}function Me(Dt,et,nt,ct,lt,gt,yt,Et,Nt){Nt||(Nt=new go.Point);var Vt=Dt-nt,Jt=lt-yt,ce=NaN,de=NaN;if(Vt===0)if(Jt===0)Dt===nt&&(ce=Dt,de=et);else{var Ae=(gt-Et)/Jt,De=gt-Ae*lt;ce=Dt,de=Ae*ce+De}else if(Jt===0){var ve=(et-ct)/Vt,We=et-ve*Dt;ce=lt,de=ve*ce+We}else{var ve=(et-ct)/Vt,Ae=(gt-Et)/Jt,We=et-ve*Dt,De=gt-Ae*lt;ce=(De-We)/(ve-Ae),de=ve*ce+We}return Nt.x=ce,Nt.y=de,Nt}function je(Dt,et,nt,ct,lt,gt,yt,Et,Nt,Vt,Jt,ce,de,Ae){var De=1-Nt,ve=Nt,We=Dt*De+nt*ve,nn=et*De+ct*ve,an=nt*De+lt*ve,In=ct*De+gt*ve,En=lt*De+yt*ve,ui=gt*De+Et*ve,fi=We*De+an*ve,ue=nn*De+In*ve,Kt=an*De+En*ve,dn=In*De+ui*ve,Ai=fi*De+Kt*ve,qn=ue*De+dn*ve;Vt.x=We,Vt.y=nn,Jt.x=fi,Jt.y=ue,ce.x=Ai,ce.y=qn,de.x=Kt,de.y=dn,Ae.x=En,Ae.y=ui}var ke=new go.Spot(.156,.156),ye=new go.Spot(.844,.844),pe=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Pn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=5),ct=Math.min(ct,et/3),ct=Math.min(ct,nt/3);var lt=ct*pe,gt=new go.Geometry().add(new go.PathFigure(ct,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-ct,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,ct,et-lt,0,et,lt)).add(new go.PathSegment(go.PathSegment.Line,et,nt-ct)).add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et,nt-lt,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,ct,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ct,lt,nt,0,nt-lt)).add(new go.PathSegment(go.PathSegment.Line,0,ct)).add(new go.PathSegment(go.PathSegment.Bezier,ct,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(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Dt,et,nt){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=0,ct.startY=nt/2,ct.endX=et,ct.endY=nt/2,ct}),go.Shape.defineFigureGenerator("LineV",function(Dt,et,nt){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=et/2,ct.startY=0,ct.endX=et/2,ct.endY=nt,ct}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt/2,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("XLine",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LineRight",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(.25*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)))}),go.Shape.defineFigureGenerator("LineDown",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.25*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)))}),go.Shape.defineFigureGenerator("LineLeft",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(.75*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)))}),go.Shape.defineFigureGenerator("LineUp",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.75*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Dt,et,nt){var ct=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ct*et,(1-ct)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Move,ct*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,(1-ct)*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt/2)).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("CircleLine",function(Dt,et,nt){var ct=et/2,lt=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ct,ct,ct,ct).close()));return lt.spot1=ke,lt.spot2=ye,lt.defaultStretch=go.GraphObject.Uniform,lt}),go.Shape.defineFigureGenerator("Line1",function(Dt,et,nt){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=0,ct.startY=0,ct.endX=et,ct.endY=nt,ct}),go.Shape.defineFigureGenerator("Line2",function(Dt,et,nt){var ct=new go.Geometry(go.Geometry.Line);return ct.startX=et,ct.startY=0,ct.endX=0,ct.endY=nt,ct}),go.Shape.defineFigureGenerator("Curve1",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,pe*et,0,et,(1-pe)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,pe*nt,(1-pe)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,pe*nt,pe*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-pe)*et,0,0,(1-pe)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Pn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)?ct=.1:ct<-1?ct=-1:ct>1&&(ct=1);var lt=Math.abs(ct)*et;if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)?ct=10:ct<-et?ct=-et:ct>et&&(ct=et);var lt=Math.abs(ct);if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.setFigureParameter("Trapezoid1",0,new Pn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)?ct=.2:ct<.5?ct=-.5:ct>.5&&(ct=.5);var lt=Math.abs(ct)*et;if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Pn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)?ct=20:ct<-et?ct=-et/2:ct>et&&(ct=et/2);var lt=Math.abs(ct);if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())),lt<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}}),go.Shape.setFigureParameter("ManualOperation",0,new Pn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)?ct=10:ct<-et?ct=-et/2:ct>et&&(ct=et/2);var lt=Math.abs(ct);if(ct===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ct>0?gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,nt).close())):gt.add(new go.PathFigure(lt,0).add(new go.PathSegment(go.PathSegment.Line,et-lt,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())),lt<et/2&>.setSpots(lt/et,0,(et-lt)/et,1),gt}});var Ue=[];function Pe(){var Dt=Ue.pop();return Dt===void 0?[]:Dt}function ie(Dt){Dt.length=0,Ue.push(Dt)}function An(Dt){for(var et=Pe(),nt=.5,ct=.5,lt=Math.PI*1.5,gt=0,yt=0;yt<Dt;yt++)gt=2*Math.PI/Dt*yt+lt,et[yt]=new go.Point(ct+nt*Math.cos(gt),ct+nt*Math.sin(gt));return et.push(et[0]),et}function we(Dt){var et=xn(Dt),nt=Pe();nt[0]=et[0];for(var ct=1,lt=1;ct<et.length;ct+=2,lt+=3)nt[lt]=et[ct],nt[lt+1]=et[ct],nt[lt+2]=et[ct+1];return ie(et),nt}function xn(Dt){for(var et=An(Dt),nt=Pe(),ct=Math.floor(et.length/2),lt=et.length-1,gt=Dt%2===0?2:1,yt=0;yt<lt;yt++){var Et=et[yt],Nt=et[yt+1],Vt=et[(ct+yt-1)%lt],Jt=et[(ct+yt+gt)%lt];nt[yt*2]=Et,nt[yt*2+1]=Me(Et.x,Et.y,Vt.x,Vt.y,Nt.x,Nt.y,Jt.x,Jt.y,new go.Point)}return nt[nt.length]=nt[0],ie(et),nt}go.Shape.defineFigureGenerator("Pentagon",function(Dt,et,nt){var ct=An(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<5;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.2,.22),lt.spot2=new go.Spot(.8,.9),lt}),go.Shape.defineFigureGenerator("Hexagon",function(Dt,et,nt){var ct=An(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<6;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.07,.25),lt.spot2=new go.Spot(.93,.75),lt}),go.Shape.defineFigureGenerator("Heptagon",function(Dt,et,nt){var ct=An(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<7;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.2,.15),lt.spot2=new go.Spot(.8,.85),lt}),go.Shape.defineFigureGenerator("Octagon",function(Dt,et,nt){var ct=An(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<8;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.15,.15),lt.spot2=new go.Spot(.85,.85),lt}),go.Shape.defineFigureGenerator("Nonagon",function(Dt,et,nt){var ct=An(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<9;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.17,.13),lt.spot2=new go.Spot(.82,.82),lt}),go.Shape.defineFigureGenerator("Decagon",function(Dt,et,nt){var ct=An(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<10;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("Dodecagon",function(Dt,et,nt){var ct=An(12),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<12;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.16,.16),lt.spot2=new go.Spot(.84,.84),lt}),go.Shape.defineFigureGenerator("FivePointedStar",function(Dt,et,nt){var ct=xn(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<10;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.266,.333),lt.spot2=new go.Spot(.733,.733),lt}),go.Shape.defineFigureGenerator("SixPointedStar",function(Dt,et,nt){var ct=xn(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<12;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.17,.25),lt.spot2=new go.Spot(.83,.75),lt}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Dt,et,nt){var ct=xn(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<14;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("EightPointedStar",function(Dt,et,nt){var ct=xn(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<16;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.25,.25),lt.spot2=new go.Spot(.75,.75),lt}),go.Shape.defineFigureGenerator("NinePointedStar",function(Dt,et,nt){var ct=xn(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<18;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.666),lt}),go.Shape.defineFigureGenerator("TenPointedStar",function(Dt,et,nt){var ct=xn(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<20;yt++)gt.add(new go.PathSegment(go.PathSegment.Line,ct[yt].x*et,ct[yt].y*nt));return gt.add(new go.PathSegment(go.PathSegment.Line,ct[0].x*et,ct[0].y*nt).close()),ie(ct),lt.spot1=new go.Spot(.281,.261),lt.spot2=new go.Spot(.723,.748),lt}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Dt,et,nt){var ct=we(5),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),ie(ct),lt.spot1=new go.Spot(.222,.277),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Dt,et,nt){var ct=we(6),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),ie(ct),lt.spot1=new go.Spot(.17,.222),lt.spot2=new go.Spot(.833,.777),lt}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Dt,et,nt){var ct=we(7),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),ie(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Dt,et,nt){var ct=we(8),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),ie(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Dt,et,nt){var ct=we(9),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),ie(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Dt,et,nt){var ct=we(10),lt=new go.Geometry,gt=new go.PathFigure(ct[0].x*et,ct[0].y*nt,!0);lt.add(gt);for(var yt=1;yt<ct.length;yt+=3)gt.add(new go.PathSegment(go.PathSegment.Bezier,ct[yt+2].x*et,ct[yt+2].y*nt,ct[yt].x*et,ct[yt].y*nt,ct[yt+1].x*et,ct[yt+1].y*nt));return gt.segments.last().close(),ie(ct),lt.spot1=new go.Spot(.222,.222),lt.spot2=new go.Spot(.777,.777),lt}),go.Shape.setFigureParameter("FramedRectangle",0,new Pn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Pn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN,lt=Dt?Dt.parameter2:NaN;isNaN(ct)&&(ct=8),isNaN(lt)&&(lt=8);var gt=new go.Geometry,yt=new go.PathFigure(0,0,!0);return gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct<et/2&<<nt/2&&(yt.add(new go.PathSegment(go.PathSegment.Move,ct,lt)),yt.add(new go.PathSegment(go.PathSegment.Line,ct,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,lt).close())),gt.setSpots(0,0,1,1,ct,lt,-ct,-lt),gt}),go.Shape.setFigureParameter("Ring",0,new Pn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=8);var lt=et/2,gt=new go.Geometry,yt=new go.PathFigure(et,et/2,!0);gt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Arc,0,360,lt,lt,lt,lt).close());var Et=Math.max(lt-ct,0);return Et>0&&(yt.add(new go.PathSegment(go.PathSegment.Move,et/2+Et,et/2)),yt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,lt,lt,Et,Et).close())),gt.spot1=ke,gt.spot2=ye,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(.08034461*et,.1944299*nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*et,.05349299*nt,-.09239631*et,.07836421*nt,.1406031*et,-.0542823*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*et,.074219*nt,.2450511*et,-.00697547*nt,.3776197*et,-.01112067*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*et,.07004196*nt,.4539471*et,0,.6066018*et,-.02526587*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*et,.08370865*nt,.6914277*et,-.01904177*nt,.8921095*et,-.01220843*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*et,.3194596*nt,1.036446*et,.04105738*nt,1.020377*et,.3022052*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*et,.562044*nt,1.04448*et,.360238*nt,.992256*et,.5219009*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*et,.8217117*nt,1.032337*et,.5771781*nt,1.018411*et,.8120651*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*et,.9156953*nt,1.028411*et,.9571472*nt,.8556702*et,1.052487*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*et,.9310455*nt,.7431877*et,1.009325*nt,.5624123*et,1.021761*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*et,.9344623*nt,.4820677*et,1.031761*nt,.3030112*et,1.002796*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.870098*nt,.2329994*et,1.01518*nt,.03213784*et,1.01518*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*et,.6545475*nt,-.02812061*et,.9032597*nt,-.01205169*et,.6835638*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*et,.4265613*nt,-.01812061*et,.6089503*nt,-.00606892*et,.4555777*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.1944299*nt,-.01606892*et,.3892545*nt,-.01205169*et,.1944299*nt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Dt,et,nt){var ct=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ct*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,ct*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-ct)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,ct*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ct)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,ct*nt).close())).setSpots(ct/2,ct/2,1-ct/2,1-ct/2)}),go.Shape.setFigureParameter("Pie",0,new Pn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Pn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN,lt=Dt?Dt.parameter2:NaN;isNaN(ct)&&(ct=0),isNaN(lt)&&(lt=315);var gt=ct%360;gt<0&&(gt+=360);var yt=lt%360,Et=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(Et,Et).add(new go.PathSegment(go.PathSegment.Arc,gt,yt,Et,Et,Et,Et).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Dt,et,nt){var ct=pe/Math.SQRT2*.5,lt=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,lt*et,gt*nt,et,(1-ct)*nt,(lt+ct)*et,(gt+ct)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=30);var lt=Math.min(ct,et)/2,gt=et/2,yt=nt/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,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=10);var lt=Math.min(ct,et)/2,gt=et/2,yt=nt/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,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,et,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,gt+lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt+lt)).add(new go.PathSegment(go.PathSegment.Line,0,yt-lt)).add(new go.PathSegment(go.PathSegment.Line,gt-lt,yt-lt).close()))}),go.Shape.setFigureParameter("ThickX",0,new Pn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;if((isNaN(ct)||ct<0)&&(ct=30),et===0||nt===0){var lt=new go.Geometry(go.Geometry.Rectangle);return lt.startX=0,lt.startY=0,lt.endX=et,lt.endY=nt,lt}else{var gt=et/2,yt=nt/2,Et=Math.atan2(nt,et),Nt=ct-Math.min(Math.cos(Et)*ct/2,gt),Vt=ct-Math.min(Math.sin(Et)*ct/2,yt),lt=new go.Geometry,Jt=new go.PathFigure(Nt,0,!0);return lt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,et-Nt,0)),Jt.add(new go.PathSegment(go.PathSegment.Line,et,Vt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.8*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,et,nt-Vt)),Jt.add(new go.PathSegment(go.PathSegment.Line,et-Nt,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,Nt,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,nt-Vt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,Vt).close()),lt}}),go.Shape.setFigureParameter("ThinX",0,new Pn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=10);var lt=new go.Geometry,gt=new go.PathFigure(.1*et,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),lt}),go.Shape.setFigureParameter("SquareIBeam",0,new Pn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.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,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,ct*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ct/2)*et,ct*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ct/2)*et,(1-ct)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,(1-ct)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ct)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ct/2)*et,(1-ct)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ct/2)*et,ct*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ct*nt).close()),lt}),go.Shape.setFigureParameter("RoundedIBeam",0,new Pn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.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,et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-ct)*et,.25*nt,Math.abs(1-ct)*et,.75*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ct*et,.75*nt,ct*et,.25*nt).close()),lt}),go.Shape.defineFigureGenerator("HalfEllipse",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,pe*et,0,et,(.5-pe/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+pe/2)*nt,pe*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,0,et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*et,.75*nt,.5*et,.25*nt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,.1*et,.8*nt,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,0,0,.45*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.55*et,0,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.5*nt,.9*et,.8*nt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*et,.01*nt)).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.6*et,.2*nt,et,.25*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.7*nt,et,.8*nt,.6*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,.5*et,.75*nt,.55*et,.95*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.7*nt,.45*et,.95*nt,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.4*et,.8*nt,0,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*et,.01*nt,0,.25*nt,.4*et,.2*nt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.4*et,.6*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.15*et,nt,.5*et,.75*nt,.45*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.6*nt,.55*et,.95*nt,.5*et,.75*nt));var gt=.2,yt=.3,Et=0,Nt=gt*pe;return lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+gt+Et)*nt,(.5-gt+yt)*et,(.5+Nt+Et)*nt,(.5-Nt+yt)*et,(.5+gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*et,(.5+Et)*nt,(.5+Nt+yt)*et,(.5+gt+Et)*nt,(.5+gt+yt)*et,(.5+Nt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Et)*nt,(1-.5+gt+yt)*et,(.5-Nt+Et)*nt,(.5+Nt+yt)*et,(.5-gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Nt+yt)*et,(.5-gt+Et)*nt,(.5-gt+yt+.05)*et,(.5-Nt+Et-.02)*nt)),gt=.2,yt=0,Et=-.3,Nt=gt*pe,lt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+yt)*et,(.5+Et)*nt,(.5+Nt+yt)*et,(.5+gt+Et)*nt,(.5+gt+yt)*et,(.5+Nt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Et)*nt,(1-.5+gt+yt)*et,(.5-Nt+Et)*nt,(.5+Nt+yt)*et,(.5-gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*et,(.5+Et)*nt,(.5-Nt+yt)*et,(.5-gt+Et)*nt,(.5-gt+yt)*et,(.5-Nt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Nt+yt)*et,(.5+gt+Et)*nt,(.5-gt+yt)*et,(.5+Nt+Et)*nt,(.5-Nt+yt)*et,(.5+gt+Et)*nt)),gt=.2,yt=-.3,Et=0,Nt=gt*pe,lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5-gt+Et)*nt,(1-.5+gt+yt-.05)*et,(.5-Nt+Et-.02)*nt,(.5+Nt+yt)*et,(.5-gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+yt)*et,(.5+Et)*nt,(.5-Nt+yt)*et,(.5-gt+Et)*nt,(.5-gt+yt)*et,(.5-Nt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+yt)*et,(.5+gt+Et)*nt,(.5-gt+yt)*et,(.5+Nt+Et)*nt,(.5-Nt+yt)*et,(.5+gt+Et)*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Nt+yt)*et,(.5+gt+Et)*nt,(.5+gt+yt)*et,(.5+Nt+Et)*nt).close()),ct.setSpots(.06,.33,.93,.68),ct}),go.Shape.defineFigureGenerator("YinYang",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*.5,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*.5,et*.5,et*.5,et*.5)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,-180,et*.5,et*.75,et*.25,et*.25)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,et*.5,et*.25,et*.25,et*.25));var gt=.1,yt=.5,Et=.25;return lt.add(new go.PathSegment(go.PathSegment.Move,(yt+gt)*et,Et*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*yt,nt*Et,gt*et,gt*et).close()),lt=new go.PathFigure(et*.5,0,!1),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),Et=.75,lt=new go.PathFigure((yt+gt)*et,Et*nt,!0),ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*yt,nt*Et,gt*et,gt*et).close()),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Peace",function(Dt,et,nt){var ct=.8535533905932737,lt=.5*et,gt=.5*nt;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,nt)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Move,lt,gt)).add(new go.PathSegment(go.PathSegment.Line,ct*et,ct*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=.5,yt=.5,Et=.5,Nt=new go.PathFigure(yt*et,(Et-gt)*nt);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),gt=.4,lt=pe*.4;var Vt=bt(),Jt=bt(),ce=bt(),de=bt();je(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.42,Vt,Jt,ce,de,de);var Ae=bt(),De=bt(),ve=bt();je(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.58,de,de,ve,Ae,De);var We=bt(),nn=bt(),an=bt();je(yt,Et+gt,yt-lt,Et+gt,yt-gt,Et+lt,yt-gt,Et,.42,We,nn,an,de,de);var In=bt(),En=bt(),ui=bt();return je(yt,Et+gt,yt-lt,Et+gt,yt-gt,Et+lt,yt-gt,Et,.58,de,de,ui,In,En),Nt.add(new go.PathSegment(go.PathSegment.Move,ui.x*et,ui.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,In.x*et,In.y*nt,En.x*et,En.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,ce.x*et,ce.y*nt,Vt.x*et,Vt.y*nt,Jt.x*et,Jt.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,ui.x*et,ui.y*nt).close()),Nt.add(new go.PathSegment(go.PathSegment.Move,an.x*et,an.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,ve.x*et,ve.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,Ae.x*et,Ae.y*nt,De.x*et,De.y*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,an.x*et,an.y*nt,We.x*et,We.y*nt,nn.x*et,nn.y*nt).close()),xe(Vt),xe(Jt),xe(ce),xe(de),xe(Ae),xe(De),xe(ve),xe(We),xe(nn),xe(an),xe(In),xe(En),xe(ui),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("Fragile",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*et,0)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.29*et,.33*nt)).add(new go.PathSegment(go.PathSegment.Line,.35*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.5*nt,et,.25*nt,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.5*nt,0,.25*nt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Pn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=30),ct>et&&(ct=et);var lt=(et-ct)/2,gt=lt+ct;return new go.Geometry().add(new go.PathFigure(gt,.5*nt).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,lt,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.55*nt).add(new go.PathSegment(go.PathSegment.Line,.6*et,0)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.55*nt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.4,gt=.4,yt=.5,Et=.5,Nt=bt(),Vt=bt(),Jt=bt(),ce=bt(),de=new go.PathFigure((yt-gt)*et,Et*nt,!1);ct.add(de),de.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt)),je(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.44,Jt,ce,Vt,Nt,Nt),de.add(new go.PathSegment(go.PathSegment.Bezier,Vt.x*et,Vt.y*nt,Jt.x*et,Jt.y*nt,ce.x*et,ce.y*nt));var Ae=ne(Vt.x,Vt.y);je(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.56,Nt,Nt,Vt,Jt,ce);var De=ne(Vt.x,Vt.y);de.add(new go.PathSegment(go.PathSegment.Line,(Ae.x*.1+.95*.9)*et,Ae.y*.1*nt)),de.add(new go.PathSegment(go.PathSegment.Line,.85*et,Ae.y*.1*nt)),de.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),de.add(new go.PathSegment(go.PathSegment.Line,et,0)),de.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),de.add(new go.PathSegment(go.PathSegment.Line,(De.x*.1+.9)*et,.15*nt)),de.add(new go.PathSegment(go.PathSegment.Line,(De.x*.1+.9)*et,(De.y*.1+.05*.9)*nt)),de.add(new go.PathSegment(go.PathSegment.Line,De.x*et,De.y*nt)),de.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,Jt.x*et,Jt.y*nt,ce.x*et,ce.y*nt)),de.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),de.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt)),gt=.35,lt=pe*.35;var ve=new go.PathFigure(yt*et,(Et-gt)*nt,!1);ct.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt));var We=new go.PathFigure((yt-gt)*et,Et*nt,!1);return ct.add(We),xe(Nt),xe(Vt),xe(Jt),xe(ce),xe(Ae),xe(De),ct.spot1=new go.Spot(.202,.257),ct.spot2=new go.Spot(.792,.739),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("GenderFemale",function(Dt,et,nt){var ct=new go.Geometry,lt=.375,gt=0,yt=-.125,Et=lt*pe,Nt=new go.PathFigure((.525+gt)*et,(.5+lt+yt)*nt,!1);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+yt)*nt,(.5+Et+gt)*et,(.5+lt+yt)*nt,(.5+lt+gt)*et,(.5+Et+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+yt)*nt,(1-.5+lt+gt)*et,(.5-Et+yt)*nt,(.5+Et+gt)*et,(.5-lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Et+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Et+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*et,(.5+lt+yt)*nt,(.5-lt+gt)*et,(.5+Et+yt)*nt,(.5-Et+gt)*et,(.5+lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),lt=.325,gt=0,yt=-.125,Et=lt*pe;var Nt=new go.PathFigure((1-.5+lt+gt)*et,(.5+yt)*nt,!1);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5+lt+yt)*nt,(.5+lt+gt)*et,(.5+Et+yt)*nt,(.5+Et+gt)*et,(.5+lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Et+gt)*et,(.5+lt+yt)*nt,(.5-lt+gt)*et,(.5+Et+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Et+yt)*nt,(.5-Et+gt)*et,(.5-lt+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+lt+gt)*et,(.5+yt)*nt,(.5+Et+gt)*et,(.5-lt+yt)*nt,(1-.5+lt+gt)*et,(.5-Et+yt)*nt));var Nt=new go.PathFigure((.525+gt)*et,(.5+lt+yt)*nt,!1);return ct.add(Nt),ct.spot1=new go.Spot(.232,.136),ct.spot2=new go.Spot(.682,.611),ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("LogicImplies",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;return isNaN(ct)&&(ct=.2),new go.Geometry().add(new go.PathFigure((1-ct)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;return isNaN(ct)&&(ct=.2),new go.Geometry().add(new go.PathFigure((1-ct)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ct)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,ct*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,ct*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Dt,et,nt){var ct=new go.Geometry().add(new go.PathFigure(.5*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*et,.5*nt,.5*et,.5*nt)));return ct.defaultStretch=go.GraphObject.Uniform,ct}),go.Shape.defineFigureGenerator("LogicTruth",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Dt,et,nt){var ct=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,ct*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ct*et,ct*nt,ct*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Dt,et,nt){var ct=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,ct*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ct*et,ct*nt,ct*et,ct*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Pn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Pn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=.3);var gt=(1-ct)*et,yt=(.5-lt/2)*nt,Et=(.5+lt/2)*nt,Nt=new go.Geometry,Vt=new go.PathFigure(0,yt,!0);Nt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),Vt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),Vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,gt,Et)),Vt.add(new go.PathSegment(go.PathSegment.Line,0,Et).close()),Nt.spot1=new go.Spot(0,yt/nt);var Jt=Me(0,Et/nt,1,Et/nt,gt/et,1,1,.5,bt());return Nt.spot2=new go.Spot(Jt.x,Jt.y),xe(Jt),Nt}),go.Shape.setFigureParameter("Arrow2",0,new Pn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Pn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=30),ct>et&&(ct=et);var lt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=30),lt=Math.min(lt,nt/2);var gt=et-ct,yt=(nt-lt)/2,Et=yt+lt,Nt=new go.Geometry,Vt=new go.PathFigure(0,yt,!0);Nt.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,gt,yt)),Vt.add(new go.PathSegment(go.PathSegment.Line,gt,0)),Vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,gt,Et)),Vt.add(new go.PathSegment(go.PathSegment.Line,0,Et).close()),Nt.spot1=new go.Spot(0,yt/nt);var Jt=Me(0,Et/nt,1,Et/nt,gt/et,1,1,.5,bt());return Nt.spot2=new go.Spot(Jt.x,Jt.y),xe(Jt),Nt}),go.Shape.defineFigureGenerator("Chevron",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ct}),go.Shape.defineFigureGenerator("DoubleArrow",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.214*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,1*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.786*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,1*nt).close()),ct}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Pn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Et=new go.PathFigure(et,.5*nt,!0);yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),Et.add(new go.PathSegment(go.PathSegment.Line,.3*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var Nt=Me(0,.5,.3,0,0,lt/nt,.1,lt/nt,bt());return yt.spot1=new go.Spot(Nt.x,Nt.y),Nt=Me(.7,1,1,.5,0,gt/nt,1,gt/nt,Nt),yt.spot2=new go.Spot(Nt.x,Nt.y),xe(Nt),yt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Pn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Pn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ct)/2,yt=gt+ct,Et=(nt-lt)/2,Nt=Et+lt;(ct>nt||lt>nt)&&(lt>ct?(ct=ct*nt/lt,gt=(nt-ct)/2,yt=gt+ct,Et=0,Nt=nt):(gt=0,yt=nt,Et=0,Nt=nt));var Vt=new go.Geometry,Jt=new go.PathFigure(et,.5*nt,!0);Vt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Et).close());var ce=Me(0,.5,.3,Et/nt,0,gt/nt,1,gt/nt,bt());return Vt.spot1=new go.Spot(ce.x,ce.y),ce=Me(.7,Nt/nt,1,.5,0,yt/nt,1,yt/nt,ce),Vt.spot2=new go.Spot(ce.x,ce.y),xe(ce),Vt}),go.Shape.setFigureParameter("IBeamArrow",0,new Pn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Et=new go.PathFigure(et,.5*nt,!0);yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,0)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(0,lt/nt);var Nt=Me(.7,1,1,.5,0,gt/nt,1,gt/nt,bt());return yt.spot2=new go.Spot(Nt.x,Nt.y),xe(Nt),yt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Pn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Pn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=40);var lt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=100);var gt=(nt-ct)/2,yt=gt+ct,Et=(nt-lt)/2,Nt=Et+lt;(ct>nt||lt>nt)&&(lt>ct?(ct=ct*nt/lt,gt=(nt-ct)/2,yt=gt+ct,Et=0,Nt=nt):(gt=0,yt=nt,Et=0,Nt=nt));var Vt=new go.Geometry,Jt=new go.PathFigure(et,.5*nt,!0);Vt.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,yt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,Nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,Et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Et)),Jt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Jt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Et).close()),Vt.spot1=new go.Spot(0,gt/nt);var ce=Me(.7,Nt/nt,1,.5,0,yt/nt,1,yt/nt,bt());return Vt.spot2=new go.Spot(ce.x,ce.y),xe(ce),Vt}),go.Shape.setFigureParameter("Pointer",0,new Pn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.1);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ct*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),lt.spot1=new go.Spot(ct,.35);var yt=Me(.2,.65,1,.65,0,1,1,.5,bt());return lt.spot2=new go.Spot(yt.x,yt.y),xe(yt),lt}),go.Shape.setFigureParameter("RoundedPointer",0,new Pn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.3);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ct*et,.75*nt,ct*et,.25*nt).close()),lt.spot1=new go.Spot(ct,.35);var yt=Me(0,.65,1,.65,0,1,1,.5,bt());return lt.spot2=new go.Spot(yt.x,yt.y),xe(yt),lt}),go.Shape.setFigureParameter("SplitEndArrow",0,new Pn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.4);var lt=(.5-ct/2)*nt,gt=(.5+ct/2)*nt,yt=new go.Geometry,Et=new go.PathFigure(et,.5*nt,!0);yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(.2,.3);var Nt=Me(.7,1,1,.5,0,gt/nt,1,gt/nt,bt());return yt.spot2=new go.Spot(Nt.x,Nt.y),xe(Nt),yt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Pn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=50);var lt=(nt-ct)/2,gt=lt+ct;ct>nt&&(lt=0,gt=nt);var yt=new go.Geometry,Et=new go.PathFigure(et,.5*nt,!0);yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),yt.spot1=new go.Spot(.2,lt/nt);var Nt=Me(.7,1,1,.5,0,gt/nt,1,gt/nt,bt());return yt.spot2=new go.Spot(Nt.x,Nt.y),xe(Nt),yt}),go.Shape.setFigureParameter("SquareArrow",0,new Pn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.7);var lt=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ct*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ct*et,0).close()),lt.spot1=go.Spot.TopLeft,lt.spot2=new go.Spot(ct,1),lt}),go.Shape.defineFigureGenerator("Cone1",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=pe*.1,yt=new go.PathFigure(0,.9*nt,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt).close()),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.97),ct}),go.Shape.defineFigureGenerator("Cone2",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.9*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,nt,.85/.9*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt).close());var gt=new go.PathFigure(0,.9*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.82),ct}),go.Shape.defineFigureGenerator("Cube1",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(.5,.85),ct}),go.Shape.defineFigureGenerator("Cube2",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.3*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0).close());var gt=new go.PathFigure(0,.3*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(.7,1),ct}),go.Shape.defineFigureGenerator("Cylinder1",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,gt=pe*.5,yt=new go.PathFigure(0,ct,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,pe*ct,(.5-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ct,(.5+gt)*et,0,1*et,pe*ct)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ct)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-pe*ct,(.5+gt)*et,1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ct,(.5-gt)*et,1*nt,0,nt-pe*ct)),yt.add(new go.PathSegment(go.PathSegment.Line,0,ct));var Et=new go.PathFigure(et,ct,!1);return lt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ct,1*et,2*ct-pe*ct,(.5+gt)*et,2*ct)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,ct,(.5-gt)*et,2*ct,0,2*ct-pe*ct)),lt.spot1=new go.Spot(0,0,0,2*ct),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder2",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,nt/3);var lt=new go.Geometry,gt=pe*.5,yt=new go.PathFigure(0,nt-ct,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,ct)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,pe*ct,(.5-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,ct,(.5+gt)*et,0,et,pe*ct)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ct)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-pe*ct,(.5+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ct,(.5-gt)*et,nt,0,nt-pe*ct));var Et=new go.PathFigure(0,nt-ct,!1);return lt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ct,0,nt-ct-pe*ct,(.5-gt)*et,nt-2*ct)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ct,(.5+gt)*et,nt-2*ct,et,nt-ct-pe*ct)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,0,-2*ct),lt}),go.Shape.defineFigureGenerator("Cylinder3",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,gt=pe*.5,yt=new go.PathFigure(ct,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-pe*ct,0,et,(.5-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et,(.5+gt)*nt,et-pe*ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,pe*ct,nt,0,(.5+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-gt)*nt,pe*ct,0));var Et=new go.PathFigure(ct,0,!1);return lt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,2*ct,.5*nt,ct+pe*ct,0,2*ct,(.5-gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,ct,nt,2*ct,(.5+gt)*nt,ct+pe*ct,nt)),lt.spot1=new go.Spot(0,0,2*ct,0),lt.spot2=new go.Spot(1,1),lt}),go.Shape.defineFigureGenerator("Cylinder4",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=5),ct=Math.min(ct,et/3);var lt=new go.Geometry,gt=pe*.5,yt=new go.PathFigure(et-ct,0,!0);lt.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-pe*ct,0,et,(.5-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et,(.5+gt)*nt,et-pe*ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,ct,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,pe*ct,nt,0,(.5+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,(.5-gt)*nt,pe*ct,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et-ct,0));var Et=new go.PathFigure(et-ct,0,!1);return lt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ct,.5*nt,et-ct-pe*ct,0,et-2*ct,(.5-gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,nt,et-2*ct,(.5+gt)*nt,et-ct-pe*ct,nt)),lt.spot1=new go.Spot(0,0),lt.spot2=new go.Spot(1,1,-2*ct,0),lt}),go.Shape.defineFigureGenerator("Prism1",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.25*et,.25*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.25*et,.25*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ct.spot1=new go.Spot(.408,.172),ct.spot2=new go.Spot(.833,.662),ct}),go.Shape.defineFigureGenerator("Prism2",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ct.spot1=new go.Spot(.25,.5),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("Pyramid1",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ct.spot1=new go.Spot(.25,.367),ct.spot2=new go.Spot(.75,.875),ct}),go.Shape.defineFigureGenerator("Pyramid2",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),ct.spot1=new go.Spot(.25,.367),ct.spot2=new go.Spot(.75,.875),ct}),go.Shape.defineFigureGenerator("Actor",function(Dt,et,nt){var ct=new go.Geometry,lt=.2,gt=.1,yt=pe*lt,Et=pe*gt,Nt=.5,Vt=.1,Jt=new go.PathFigure(Nt*et,(Vt+gt)*nt,!0);ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-lt)*et,Vt*nt,(Nt-yt)*et,(Vt+gt)*nt,(Nt-lt)*et,(Vt+Et)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-gt)*nt,(Nt-lt)*et,(Vt-Et)*nt,(Nt-yt)*et,(Vt-gt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+lt)*et,Vt*nt,(Nt+yt)*et,(Vt-gt)*nt,(Nt+lt)*et,(Vt-Et)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt+gt)*nt,(Nt+lt)*et,(Vt+Et)*nt,(Nt+yt)*et,(Vt+gt)*nt));var ce=.05,de=pe*ce;Nt=.05,Vt=.25;var Ae=new go.PathFigure(.5*et,.2*nt,!0);return ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Nt=.95,Vt=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+ce)*et,Vt*nt,(Nt+de)*et,(Vt-ce)*nt,(Nt+ce)*et,(Vt-de)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),ce=.025,de=pe*ce,Nt=.825,Vt=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-ce)*nt,(Nt+ce)*et,(Vt-de)*nt,(Nt+de)*et,(Vt-ce)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-ce)*et,Vt*nt,(Nt-de)*et,(Vt-ce)*nt,(Nt-ce)*et,(Vt-de)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),ce=.05,de=pe*ce,Nt=.5,Vt=.7,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-ce)*nt,(Nt+ce)*et,(Vt-de)*nt,(Nt+de)*et,(Vt-ce)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-ce)*et,Vt*nt,(Nt-de)*et,(Vt-ce)*nt,(Nt-ce)*et,(Vt-de)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),ce=.025,de=pe*ce,Nt=.175,Vt=.35,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-ce)*nt,(Nt+ce)*et,(Vt-de)*nt,(Nt+de)*et,(Vt-ce)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-ce)*et,Vt*nt,(Nt-de)*et,(Vt-ce)*nt,(Nt-ce)*et,(Vt-de)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),ce=.05,de=pe*ce,Nt=.05,Vt=.25,Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-ce)*nt,(Nt-ce)*et,(Vt-de)*nt,(Nt-de)*et,(Vt-ce)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),ct.spot1=new go.Spot(.2,.2),ct.spot2=new go.Spot(.8,.65),ct}),go.Shape.setFigureParameter("Card",0,new Pn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;isNaN(ct)&&(ct=.2);var lt=new go.Geometry,gt=new go.PathFigure(et,0,!0);return lt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ct*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ct*et,0).close()),lt.spot1=new go.Spot(0,ct),lt.spot2=go.Spot.BottomRight,lt}),go.Shape.defineFigureGenerator("Collate",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,.5*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt));var gt=new go.PathFigure(.5*et,.5*nt,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ct.spot1=new go.Spot(.25,0),ct.spot2=new go.Spot(.75,.25),ct}),go.Shape.defineFigureGenerator("CreateRequest",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(0,lt*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),ct}),go.Shape.defineFigureGenerator("Database",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=pe*.1,yt=new go.PathFigure(et,.1*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-gt)*nt));var Et=new go.PathFigure(et,.1*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+lt)*et,.2*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+lt)*et,.3*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+gt)*nt,(.5+lt)*et,.4*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-lt)*et,.4*nt,0,(.3+gt)*nt)),ct.spot1=new go.Spot(0,.4),ct.spot2=new go.Spot(1,.9),ct}),go.Shape.defineFigureGenerator("DataStorage",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.9*nt,.25*et,.1*nt).close()),ct.spot1=new go.Spot(.226,0),ct.spot2=new go.Spot(.81,1),ct}),go.Shape.defineFigureGenerator("DiskStorage",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=pe*.1,yt=new go.PathFigure(et,.1*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-lt)*et,nt,0,(.9+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+lt)*et,0,et,(.1-gt)*nt));var Et=new go.PathFigure(et,.1*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+lt)*et,.2*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-lt)*et,.2*nt,0,(.1+gt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+lt)*et,.3*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-lt)*et,.3*nt,0,(.2+gt)*nt)),ct.spot1=new go.Spot(0,.3),ct.spot2=new go.Spot(1,.9),ct}),go.Shape.defineFigureGenerator("Display",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close()),ct.spot1=new go.Spot(.25,0),ct.spot2=new go.Spot(.75,1),ct}),go.Shape.defineFigureGenerator("DividedEvent",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)?lt=.2:lt<.15&&(lt=.15);var gt=pe*.2,yt=new go.PathFigure(0,.2*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-gt)*nt,(.2-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+gt)*et,0,et,(.2-gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+gt)*nt,(.8+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-gt)*et,nt,0,(.8+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var Et=new go.PathFigure(0,lt*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ct}),go.Shape.defineFigureGenerator("DividedProcess",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;(isNaN(lt)||lt<.1)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(0,lt*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,lt*nt)),ct}),go.Shape.defineFigureGenerator("Document",function(Dt,et,nt){var ct=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(1,.6),ct}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;(isNaN(lt)||lt<.2)&&(lt=.2);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(lt*et,0,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Move,0,(1-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,(1-lt)*nt)),ct}),go.Shape.defineFigureGenerator("ExternalProcess",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(.1*et,.4*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),ct.spot1=new go.Spot(.25,.25),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("File",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.75*et,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("Interrupt",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,.5*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt));var gt=new go.PathFigure(et,.5*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt));var yt=new go.PathFigure(et,.5*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("InternalStorage",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN,gt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.1);var yt=new go.PathFigure(0,0,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var Et=new go.PathFigure(lt*et,0,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Move,0,gt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)),ct}),go.Shape.defineFigureGenerator("Junction",function(Dt,et,nt){var ct=new go.Geometry,lt=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,yt=pe*.5,Et=.5,Nt=new go.PathFigure(et,Et*nt,!0);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,nt,et,(Et+yt)*nt,(Et+yt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,Et*nt,(Et-yt)*et,nt,0,(Et+yt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,0,0,(Et-yt)*nt,(Et-yt)*et,0)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,et,Et*nt,(Et+yt)*et,0,et,(Et-yt)*nt));var Vt=new go.PathFigure((gt+lt)*et,(gt+lt)*nt,!1);return ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)),Vt.add(new go.PathSegment(go.PathSegment.Move,gt*et,(gt+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,(gt+lt)*et,gt*nt)),ct}),go.Shape.defineFigureGenerator("LinedDocument",function(Dt,et,nt){var ct=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close());var gt=new go.PathFigure(.1*et,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),ct.spot1=new go.Spot(.1,0),ct.spot2=new go.Spot(1,.6),ct}),go.Shape.defineFigureGenerator("LoopLimit",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("MagneticTape",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=.5,yt=new go.PathFigure(.5*et,nt,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*et,.9*nt,et,(gt+lt)*nt,(gt+lt)*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ct.spot1=new go.Spot(.15,.15),ct.spot2=new go.Spot(.85,.8),ct}),go.Shape.defineFigureGenerator("ManualInput",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("MessageFromUser",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.7);var gt=new go.PathFigure(0,0,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,lt*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=go.Spot.TopLeft,ct}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(0,0,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,lt*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct}),go.Shape.defineFigureGenerator("MicroformRecording",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(1,.75),ct}),go.Shape.defineFigureGenerator("MultiDocument",function(Dt,et,nt){var ct=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.44*nt,.96*et,.47*nt,.93*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.54*nt,.86*et,.57*nt,.83*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.4*et,.4*nt,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0).close());var gt=new go.PathFigure(.1*et,.2*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.8,.77),ct}),go.Shape.defineFigureGenerator("MultiProcess",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.1*et,.1*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close());var gt=new go.PathFigure(.2*et,.1*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),ct.spot1=new go.Spot(0,.2),ct.spot2=new go.Spot(.8,1),ct}),go.Shape.defineFigureGenerator("OfflineStorage",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=1-lt,yt=new go.PathFigure(0,0,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close());var Et=new go.PathFigure(.5*lt*et,lt*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,(1-.5*lt)*et,lt*nt)),ct}),go.Shape.defineFigureGenerator("OffPageConnector",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(.75,1),ct}),go.Shape.defineFigureGenerator("Or",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=.5,yt=new go.PathFigure(et,gt*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+lt)*nt,(gt+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt));var Et=new go.PathFigure(et,.5*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ct}),go.Shape.defineFigureGenerator("PaperTape",function(Dt,et,nt){var ct=new go.Geometry;nt=nt/.8;var lt=new go.PathFigure(0,.7*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.5*et,.6*nt,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ct.spot1=new go.Spot(0,.49),ct.spot2=new go.Spot(1,.75),ct}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN,gt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var yt=new go.PathFigure(0,0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN,gt=Dt?Dt.parameter2:NaN;isNaN(lt)&&(lt=.1),isNaN(gt)&&(gt=.3);var yt=new go.PathFigure(0,0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct}),go.Shape.defineFigureGenerator("Procedure",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure((1-lt)*et,0,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,lt*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ct}),go.Shape.defineFigureGenerator("Process",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var yt=new go.PathFigure(lt*et,0,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),ct.spot2=go.Spot.BottomRight,ct}),go.Shape.defineFigureGenerator("Sort",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(0,.5*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),ct.spot1=new go.Spot(.25,.25),ct.spot2=new go.Spot(.75,.5),ct}),go.Shape.defineFigureGenerator("Start",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.25);var gt=new go.PathFigure(lt*et,0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt));var yt=new go.PathFigure(lt*et,0,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,lt*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Move,(1-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,(1-lt)*et,nt)),ct.spot1=new go.Spot(lt,0),ct.spot2=new go.Spot(1-lt,1),ct}),go.Shape.defineFigureGenerator("Terminator",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.25*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt)),ct.spot1=new go.Spot(.23,0),ct.spot2=new go.Spot(.77,1),ct}),go.Shape.defineFigureGenerator("TransmittalTape",function(Dt,et,nt){var ct=new go.Geometry,lt=Dt?Dt.parameter1:NaN;isNaN(lt)&&(lt=.1);var gt=new go.PathFigure(0,0,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-lt)*nt).close()),ct.spot1=go.Spot.TopLeft,ct}),go.Shape.defineFigureGenerator("AndGate",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=new go.PathFigure(0,0,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+lt)*et,0,et,(.5-lt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+lt)*nt,(.5+lt)*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=go.Spot.TopLeft,ct.spot2=new go.Spot(.55,1),ct}),go.Shape.defineFigureGenerator("Buffer",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("Clock",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=.5,yt=new go.PathFigure(et,gt*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+lt)*nt,(gt+lt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-lt)*et,nt,0,(gt+lt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-lt)*nt,(gt-lt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+lt)*et,0,et,(gt-lt)*nt));var Et=new go.PathFigure(et,gt*nt,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt));var Nt=new go.PathFigure(.8*et,.75*nt,!1);return ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ct}),go.Shape.defineFigureGenerator("Ground",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.3*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),ct}),go.Shape.defineFigureGenerator("Inverter",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.1,gt=.1,yt=.9,Et=.5,Nt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var Vt=new go.PathFigure((yt+gt)*et,Et*nt,!0);return ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et-gt)*nt,(yt+gt)*et,(Et-lt)*nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.4,.75),ct}),go.Shape.defineFigureGenerator("NandGate",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=pe*.4,yt=pe*.1,Et=.1,Nt=.9,Vt=.5,Jt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+gt)*nt,(.4+lt)*et,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Jt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Jt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+lt)*et,0,.8*et,(.5-gt)*nt));var ce=new go.PathFigure((Nt+Et)*et,Vt*nt,!0);return ct.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt+Et)*nt,(Nt+Et)*et,(Vt+yt)*nt,(Nt+yt)*et,(Vt+Et)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Et)*et,Vt*nt,(Nt-yt)*et,(Vt+Et)*nt,(Nt-Et)*et,(Vt+yt)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-Et)*nt,(Nt-Et)*et,(Vt-yt)*nt,(Nt-yt)*et,(Vt-Et)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Et)*et,Vt*nt,(Nt+yt)*et,(Vt-Et)*nt,(Nt+Et)*et,(Vt-yt)*nt)),ct.spot1=new go.Spot(0,.05),ct.spot2=new go.Spot(.55,.95),ct}),go.Shape.defineFigureGenerator("NorGate",function(Dt,et,nt){var ct=new go.Geometry,lt=.5,gt=pe*lt,yt=0,Et=.5,Nt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+gt)*et,(Et-lt)*nt,.7*et,(Et-gt)*nt)),lt=.1,gt=pe*.1,yt=.9,Et=.5;var Vt=new go.PathFigure((yt-lt)*et,Et*nt,!0);return ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.6,.75),ct}),go.Shape.defineFigureGenerator("OrGate",function(Dt,et,nt){var ct=new go.Geometry,lt=.5,gt=pe*lt,yt=0,Et=.5,Nt=new go.PathFigure(0,0,!0);return ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+gt+gt)*et,(Et-lt)*nt,.8*et,(Et-gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(Et+gt)*nt,(yt+gt+gt)*et,(Et+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),ct.spot1=new go.Spot(.2,.25),ct.spot2=new go.Spot(.75,.75),ct}),go.Shape.defineFigureGenerator("XnorGate",function(Dt,et,nt){var ct=new go.Geometry,lt=.5,gt=pe*lt,yt=.2,Et=.5,Nt=new go.PathFigure(.1*et,0,!1);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Vt=new go.PathFigure(.8*et,.5*nt,!0);ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(yt+gt)*et,(Et-lt)*nt,.7*et,(Et-gt)*nt)),lt=.1,gt=pe*.1,yt=.9,Et=.5;var Jt=new go.PathFigure((yt-lt)*et,Et*nt,!0);return ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.65,.75),ct}),go.Shape.defineFigureGenerator("XorGate",function(Dt,et,nt){var ct=new go.Geometry,lt=.5,gt=pe*lt,yt=.2,Et=.5,Nt=new go.PathFigure(.1*et,0,!1);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var Vt=new go.PathFigure(.2*et,0,!0);return ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(yt+gt)*et,(Et-lt)*nt,.9*et,(Et-gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),ct.spot1=new go.Spot(.4,.25),ct.spot2=new go.Spot(.8,.75),ct}),go.Shape.defineFigureGenerator("Capacitor",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct}),go.Shape.defineFigureGenerator("Resistor",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),ct}),go.Shape.defineFigureGenerator("Inductor",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.1,gt=.1,yt=.1,Et=.5,Nt=new go.PathFigure((yt-lt*.5)*et,nt,!1);return ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.3,Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.5,Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.7,Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,0,(yt-lt)*et,nt,(yt-gt)*et,0)),yt=.9,Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt*.5)*et,nt,(yt+gt)*et,0,(yt+lt)*et,nt)),ct}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.5,gt=.5,yt=.5,Et=.5,Nt=new go.PathFigure((yt-gt)*et,Et*nt,!1);return ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et-gt)*nt,(yt+gt)*et,(Et-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Move,(yt-gt+.1)*et,Et*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt-.1)*et,Et*nt,yt*et,(Et-gt)*nt,yt*et,(Et+gt)*nt)),ct}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct}),go.Shape.defineFigureGenerator("Diode",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct.spot1=new go.Spot(0,.25),ct.spot2=new go.Spot(.5,.75),ct}),go.Shape.defineFigureGenerator("Wifi",function(Dt,et,nt){var ct=new go.Geometry,lt=et,gt=nt;et=et*.38,nt=nt*.6;var yt=pe*.8,Et=.8,Nt=0,Vt=.5,Jt=(lt-et)/2,ce=(gt-nt)/2,de=new go.PathFigure(Nt*et+Jt,(Vt+Et)*nt+ce,!0);ct.add(de),de.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Et)*et+Jt,Vt*nt+ce,(Nt-yt)*et+Jt,(Vt+Et)*nt+ce,(Nt-Et)*et+Jt,(Vt+yt)*nt+ce)),de.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Et)*nt+ce,(Nt-Et)*et+Jt,(Vt-yt)*nt+ce,(Nt-yt)*et+Jt,(Vt-Et)*nt+ce)),de.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Et+yt*.5)*et+Jt,Vt*nt+ce,Nt*et+Jt,(Vt-Et)*nt+ce,(Nt-Et+yt*.5)*et+Jt,(Vt-yt)*nt+ce)),de.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Et)*nt+ce,(Nt-Et+yt*.5)*et+Jt,(Vt+yt)*nt+ce,Nt*et+Jt,(Vt+Et)*nt+ce).close()),yt=pe*.4,Et=.4,Nt=.2,Vt=.5;var Ae=new go.PathFigure(Nt*et+Jt,(Vt+Et)*nt+ce,!0);ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Et)*et+Jt,Vt*nt+ce,(Nt-yt)*et+Jt,(Vt+Et)*nt+ce,(Nt-Et)*et+Jt,(Vt+yt)*nt+ce)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Et)*nt+ce,(Nt-Et)*et+Jt,(Vt-yt)*nt+ce,(Nt-yt)*et+Jt,(Vt-Et)*nt+ce)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Et+yt*.5)*et+Jt,Vt*nt+ce,Nt*et+Jt,(Vt-Et)*nt+ce,(Nt-Et+yt*.5)*et+Jt,(Vt-yt)*nt+ce)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Et)*nt+ce,(Nt-Et+yt*.5)*et+Jt,(Vt+yt)*nt+ce,Nt*et+Jt,(Vt+Et)*nt+ce).close()),yt=pe*.2,Et=.2,Nt=.5,Vt=.5;var De=new go.PathFigure((Nt-Et)*et+Jt,Vt*nt+ce,!0);ct.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Et)*nt+ce,(Nt-Et)*et+Jt,(Vt-yt)*nt+ce,(Nt-yt)*et+Jt,(Vt-Et)*nt+ce)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Et)*et+Jt,Vt*nt+ce,(Nt+yt)*et+Jt,(Vt-Et)*nt+ce,(Nt+Et)*et+Jt,(Vt-yt)*nt+ce)),De.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Et)*nt+ce,(Nt+Et)*et+Jt,(Vt+yt)*nt+ce,(Nt+yt)*et+Jt,(Vt+Et)*nt+ce)),De.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-Et)*et+Jt,Vt*nt+ce,(Nt-yt)*et+Jt,(Vt+Et)*nt+ce,(Nt-Et)*et+Jt,(Vt+yt)*nt+ce)),yt=pe*.4,Et=.4,Nt=.8,Vt=.5;var ve=new go.PathFigure(Nt*et+Jt,(Vt-Et)*nt+ce,!0);ct.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Et)*et+Jt,Vt*nt+ce,(Nt+yt)*et+Jt,(Vt-Et)*nt+ce,(Nt+Et)*et+Jt,(Vt-yt)*nt+ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Et)*nt+ce,(Nt+Et)*et+Jt,(Vt+yt)*nt+ce,(Nt+yt)*et+Jt,(Vt+Et)*nt+ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Et-yt*.5)*et+Jt,Vt*nt+ce,Nt*et+Jt,(Vt+Et)*nt+ce,(Nt+Et-yt*.5)*et+Jt,(Vt+yt)*nt+ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Et)*nt+ce,(Nt+Et-yt*.5)*et+Jt,(Vt-yt)*nt+ce,Nt*et+Jt,(Vt-Et)*nt+ce).close()),yt=pe*.8,Et=.8,Nt=1,Vt=.5;var We=new go.PathFigure(Nt*et+Jt,(Vt-Et)*nt+ce,!0);return ct.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Et)*et+Jt,Vt*nt+ce,(Nt+yt)*et+Jt,(Vt-Et)*nt+ce,(Nt+Et)*et+Jt,(Vt-yt)*nt+ce)),We.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt+Et)*nt+ce,(Nt+Et)*et+Jt,(Vt+yt)*nt+ce,(Nt+yt)*et+Jt,(Vt+Et)*nt+ce)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+Et-yt*.5)*et+Jt,Vt*nt+ce,Nt*et+Jt,(Vt+Et)*nt+ce,(Nt+Et-yt*.5)*et+Jt,(Vt+yt)*nt+ce)),We.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et+Jt,(Vt-Et)*nt+ce,(Nt+Et-yt*.5)*et+Jt,(Vt-yt)*nt+ce,Nt*et+Jt,(Vt-Et)*nt+ce).close()),ct}),go.Shape.defineFigureGenerator("Email",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,0,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),ct}),go.Shape.defineFigureGenerator("Ethernet",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.35*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,0).close());var gt=new go.PathFigure(.1*et,nt,!0,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var yt=new go.PathFigure(.6*et,nt,!0,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt).close());var Et=new go.PathFigure(0,.5*nt,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ct}),go.Shape.defineFigureGenerator("Power",function(Dt,et,nt){var ct=new go.Geometry,lt=pe*.4,gt=.4,yt=.5,Et=.5,Nt=bt(),Vt=bt(),Jt=bt(),ce=bt();je(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.5,Nt,Nt,Vt,Jt,ce);var de=ne(Vt.x,Vt.y),Ae=new go.PathFigure(Vt.x*et,Vt.y*nt,!0);ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,Jt.x*et,Jt.y*nt,ce.x*et,ce.y*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,(yt-lt)*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt)),je(yt-gt,Et,yt-gt,Et-lt,yt-lt,Et-gt,yt,Et-gt,.5,Jt,ce,Vt,Nt,Nt),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Vt.x*et,Vt.y*nt,Jt.x*et,Jt.y*nt,ce.x*et,ce.y*nt)),lt=pe*.3,gt=.3,je(yt-gt,Et,yt-gt,Et-lt,yt-lt,Et-gt,yt,Et-gt,.5,Jt,ce,Vt,Nt,Nt),Ae.add(new go.PathSegment(go.PathSegment.Line,Vt.x*et,Vt.y*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt-gt)*et,Et*nt,ce.x*et,ce.y*nt,Jt.x*et,Jt.y*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+gt)*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(yt+gt)*et,Et*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),je(yt,Et-gt,yt+lt,Et-gt,yt+gt,Et-lt,yt+gt,Et,.5,Nt,Nt,Vt,Jt,ce),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Vt.x*et,Vt.y*nt,ce.x*et,ce.y*nt,Jt.x*et,Jt.y*nt).close());var Ae=new go.PathFigure(.45*et,0,!0);return ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),Ae.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),xe(Nt),xe(Vt),xe(Jt),xe(ce),xe(de),ct.spot1=new go.Spot(.25,.45),ct.spot2=new go.Spot(.75,.8),ct}),go.Shape.defineFigureGenerator("Fallout",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt/2,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function gt(yt,Et,Nt){yt.add(new go.PathSegment(go.PathSegment.Move,(.3+Et)*et,(.8+Nt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.5+Et)*et,(.5+Nt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.1+Et)*et,(.5+Nt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,(.3+Et)*et,(.8+Nt)*nt).close())}return gt(lt,0,0),gt(lt,.4,0),gt(lt,.2,-.3),ct}),go.Shape.defineFigureGenerator("IrritationHazard",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.2*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close()),ct.spot1=new go.Spot(.3,.3),ct.spot2=new go.Spot(.7,.7),ct}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.37*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.11*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*et,.04*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.49*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.37*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.86*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.77*et,.91*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.34*et,.78*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.44*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.56*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt).close()),ct}),go.Shape.defineFigureGenerator("FireHazard",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.1*et,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.29*et,0,-.25*et,.63*nt,.45*et,.44*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.51*et,.42*nt,.48*et,.17*nt,.54*et,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.59*et,.18*nt,.59*et,.29*nt,.58*et,.28*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,.6*nt,.8*et,.34*nt,.88*et,.43*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.88*et,.31*nt,.87*et,.48*nt,.88*et,.43*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,1.17*et,.76*nt,.82*et,.8*nt).close()),ct.spot1=new go.Spot(.07,.445),ct.spot2=new go.Spot(.884,.958),ct}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Dt,et,nt){var ct=new go.Geometry,lt=.5,gt=0,yt=0,Et=lt*pe,Nt=.4*Math.SQRT2/2+.5,Vt=.5-.5*Math.SQRT2/2,Jt=1,ce=.5,de=.5,Ae=0,De=new go.PathFigure(Nt*et,(1-Vt)*nt,!1);return ct.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,ce*nt,Jt*et,.7*nt,Jt*et,ce*nt)),De.add(new go.PathSegment(go.PathSegment.Bezier,(de+gt)*et,(Ae+gt)*nt,(.5+lt+gt)*et,(.5-Et+gt)*nt,(.5+Et+gt)*et,(.5-lt+gt)*nt)),De.add(new go.PathSegment(go.PathSegment.Bezier,(.5-lt+gt)*et,(.5+yt)*nt,(.5-Et+gt)*et,(.5-lt+yt)*nt,(.5-lt+gt)*et,(.5-Et+yt)*nt)),De.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*et,.9*nt,(.5-lt+gt)*et,(.5+Et+yt)*nt,(.5-Et+gt)*et,.9*nt)),De.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*et,.8*nt)),De.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*et,.9*nt)),De.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*et,.95*nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(et,nt,!1);ct.add(gt);var yt=new go.PathFigure(0,.5*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),ct}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close()),ct}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt).close());var lt=new go.PathFigure(0,.2*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),ct}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.7*et,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,0,.6*et,.5*nt,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,nt,.4*et,.5*nt,et,.5*nt).close());var gt=new go.PathFigure(.45*et,.73*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),ct}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(.335*et,(1-.555)*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var yt=.5-.285,Et=.5,Nt=yt,Vt=Math.PI/4,Jt=4*(1-Math.cos(Vt))/(3*Math.sin(Vt)),ce=Jt*.5,de=yt,Ae=yt,De=Jt*de,ve=Jt*Ae;gt.add(new go.PathSegment(go.PathSegment.Bezier,(Et-de)*et,Nt*nt,(Et-(De+de)/2)*et,(Nt+(Ae+ve)/2)*nt,(Et-de)*et,(Nt+ve)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,Et*et,(Nt-Ae)*nt,(Et-de)*et,(Nt-ve)*nt,(Et-De)*et,(Nt-Ae)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(Et+de)*et,Nt*nt,(Et+De)*et,(Nt-Ae)*nt,(Et+de)*et,(Nt-ve)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(Et+de)*et,(Nt+ve)*nt,(Et+(De+de)/2)*et,(Nt+(Ae+ve)/2)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var We=new go.PathFigure(.2*et,nt,!1);ct.add(We),We.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var nn=new go.PathFigure(.8*et,nt,!1);return ct.add(nn),nn.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ct}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.1*et,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var gt=new go.PathFigure(.2*et,.2*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ct}),go.Shape.defineFigureGenerator("BpmnEventError",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.5*nt).close()),ct}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt);var gt=new go.PathFigure(et,nt,!1);ct.add(gt);var yt=new go.PathFigure(.1*et,nt,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ct}),go.Shape.defineFigureGenerator("Caution",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.05*et,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.8*nt,0,nt,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.1*nt,.5*et,0,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.95*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,et,nt,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,nt));var gt=.05;return lt.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*et,.875*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,gt*et,gt*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.325*nt,.575*et,.725*nt,.625*et,.375*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.75*nt,.375*et,.375*nt,.425*et,.725*nt)),ct}),go.Shape.defineFigureGenerator("Recycle",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.45*et,.95*nt,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.185*et,.85*nt,.17*et,.95*nt,.15*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.235*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.3*et,.625*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.05*et,.575*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1875*et,.95*nt,0,.675*nt,0,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.45*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.775*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.22*et,.775*nt));var gt=new go.PathFigure(.475*et,.2*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var yt=new go.PathFigure(.675*et,.575*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),yt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),ct}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Dt,et,nt){var ct=new go.Geometry,lt=.5,gt=pe*.5,yt=new go.PathFigure(et,lt*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,nt,et,(lt+gt)*nt,(lt+gt)*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,lt*nt,(lt-gt)*et,nt,0,(lt+gt)*nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt*et,0,0,(lt-gt)*nt,(lt-gt)*et,0)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et,lt*nt,(lt+gt)*et,0,et,(lt-gt)*nt));var Et=new go.PathFigure(lt*et,0,!1);return ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,lt*et,.15*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,lt*et,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,lt*et,.85*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,0,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.15*et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.85*et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),Et.add(new go.PathSegment(go.PathSegment.Move,lt*et,lt*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ct}),go.Shape.defineFigureGenerator("Package",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.15*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,.15*nt,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),ct.spot1=new go.Spot(0,.1),ct.spot2=new go.Spot(1,1),ct}),go.Shape.defineFigureGenerator("Class",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var yt=new go.PathFigure(0,.5*nt,!1);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ct}),go.Shape.defineFigureGenerator("Component",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close());var gt=new go.PathFigure(0,.2*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var yt=new go.PathFigure(0,.6*nt,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),ct}),go.Shape.defineFigureGenerator("Boat Shipment",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.15*et,.6*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt));var gt=new go.PathFigure(.15*et,.6*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ct}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.66*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ct}),go.Shape.defineFigureGenerator("Workcell",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.35*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ct}),go.Shape.defineFigureGenerator("Supermarket",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,.33*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,et,.66*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ct}),go.Shape.defineFigureGenerator("TruckShipment",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(et,.8*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var yt=.1,Et=pe*.1,Nt=.2,Vt=.9,Jt=new go.PathFigure((Nt-yt)*et,Vt*nt,!0);ct.add(Jt),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-yt)*nt,(Nt-yt)*et,(Vt-Et)*nt,(Nt-Et)*et,(Vt-yt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+yt)*et,Vt*nt,(Nt+Et)*et,(Vt-yt)*nt,(Nt+yt)*et,(Vt-Et)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt+yt)*nt,(Nt+yt)*et,(Vt+Et)*nt,(Nt+Et)*et,(Vt+yt)*nt)),Jt.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-yt)*et,Vt*nt,(Nt-Et)*et,(Vt+yt)*nt,(Nt-yt)*et,(Vt+Et)*nt).close()),yt=.1,Et=pe*.1,Nt=.8,Vt=.9;var ce=new go.PathFigure((Nt-yt)*et,Vt*nt,!0);return ct.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt-yt)*nt,(Nt-yt)*et,(Vt-Et)*nt,(Nt-Et)*et,(Vt-yt)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(Nt+yt)*et,Vt*nt,(Nt+Et)*et,(Vt-yt)*nt,(Nt+yt)*et,(Vt-Et)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,Nt*et,(Vt+yt)*nt,(Nt+yt)*et,(Vt+Et)*nt,(Nt+Et)*et,(Vt+yt)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(Nt-yt)*et,Vt*nt,(Nt-Et)*et,(Vt+yt)*nt,(Nt-yt)*et,(Vt+Et)*nt).close()),ct}),go.Shape.defineFigureGenerator("KanbanPost",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.2*et,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ct}),go.Shape.defineFigureGenerator("Forklift",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0));var gt=new go.PathFigure(0,.5*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var yt=new go.PathFigure(.5*et,.8*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt));var Et=new go.PathFigure(.5*et,.7*nt,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var Nt=.1,Vt=pe*.1,Jt=.1,ce=.9,de=new go.PathFigure((Jt-Nt)*et,ce*nt,!0);ct.add(de),de.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,(ce-Nt)*nt,(Jt-Nt)*et,(ce-Vt)*nt,(Jt-Vt)*et,(ce-Nt)*nt)),de.add(new go.PathSegment(go.PathSegment.Bezier,(Jt+Nt)*et,ce*nt,(Jt+Vt)*et,(ce-Nt)*nt,(Jt+Nt)*et,(ce-Vt)*nt)),de.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,(ce+Nt)*nt,(Jt+Nt)*et,(ce+Vt)*nt,(Jt+Vt)*et,(ce+Nt)*nt)),de.add(new go.PathSegment(go.PathSegment.Bezier,(Jt-Nt)*et,ce*nt,(Jt-Vt)*et,(ce+Nt)*nt,(Jt-Nt)*et,(ce+Vt)*nt)),Nt=.1,Vt=pe*.1,Jt=.4,ce=.9;var Ae=new go.PathFigure((Jt-Nt)*et,ce*nt,!0);return ct.add(Ae),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,(ce-Nt)*nt,(Jt-Nt)*et,(ce-Vt)*nt,(Jt-Vt)*et,(ce-Nt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Jt+Nt)*et,ce*nt,(Jt+Vt)*et,(ce-Nt)*nt,(Jt+Nt)*et,(ce-Vt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,Jt*et,(ce+Nt)*nt,(Jt+Nt)*et,(ce+Vt)*nt,(Jt+Vt)*et,(ce+Nt)*nt)),Ae.add(new go.PathSegment(go.PathSegment.Bezier,(Jt-Nt)*et,ce*nt,(Jt-Vt)*et,(ce+Nt)*nt,(Jt-Nt)*et,(ce+Vt)*nt)),ct}),go.Shape.defineFigureGenerator("RailShipment",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.1*et,.4*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.4*nt).close());var gt=new go.PathFigure(.45*et,.7*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var yt=new go.PathFigure(.55*et,.4*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var Jt=.05,ce=pe*.05,de=.175,Ae=.95,Et=new go.PathFigure((de-Jt)*et,Ae*nt,!0);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Bezier,de*et,(Ae-Jt)*nt,(de-Jt)*et,(Ae-ce)*nt,(de-ce)*et,(Ae-Jt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(de+Jt)*et,Ae*nt,(de+ce)*et,(Ae-Jt)*nt,(de+Jt)*et,(Ae-ce)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,de*et,(Ae+Jt)*nt,(de+Jt)*et,(Ae+ce)*nt,(de+ce)*et,(Ae+Jt)*nt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,(de-Jt)*et,Ae*nt,(de-ce)*et,(Ae+Jt)*nt,(de-Jt)*et,(Ae+ce)*nt));var Jt=.05,ce=pe*.05,de=.375,Ae=.95,Nt=new go.PathFigure((de-Jt)*et,Ae*nt,!0);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,de*et,(Ae-Jt)*nt,(de-Jt)*et,(Ae-ce)*nt,(de-ce)*et,(Ae-Jt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(de+Jt)*et,Ae*nt,(de+ce)*et,(Ae-Jt)*nt,(de+Jt)*et,(Ae-ce)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,de*et,(Ae+Jt)*nt,(de+Jt)*et,(Ae+ce)*nt,(de+ce)*et,(Ae+Jt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(de-Jt)*et,Ae*nt,(de-ce)*et,(Ae+Jt)*nt,(de-Jt)*et,(Ae+ce)*nt));var Jt=.05,ce=pe*.05,de=.625,Ae=.95,Vt=new go.PathFigure((de-Jt)*et,Ae*nt,!0);ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,de*et,(Ae-Jt)*nt,(de-Jt)*et,(Ae-ce)*nt,(de-ce)*et,(Ae-Jt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(de+Jt)*et,Ae*nt,(de+ce)*et,(Ae-Jt)*nt,(de+Jt)*et,(Ae-ce)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,de*et,(Ae+Jt)*nt,(de+Jt)*et,(Ae+ce)*nt,(de+ce)*et,(Ae+Jt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(de-Jt)*et,Ae*nt,(de-ce)*et,(Ae+Jt)*nt,(de-Jt)*et,(Ae+ce)*nt));var Jt=.05,ce=pe*.05,de=.825,Ae=.95,De=new go.PathFigure((de-Jt)*et,Ae*nt,!0);ct.add(De),De.add(new go.PathSegment(go.PathSegment.Bezier,de*et,(Ae-Jt)*nt,(de-Jt)*et,(Ae-ce)*nt,(de-ce)*et,(Ae-Jt)*nt)),De.add(new go.PathSegment(go.PathSegment.Bezier,(de+Jt)*et,Ae*nt,(de+ce)*et,(Ae-Jt)*nt,(de+Jt)*et,(Ae-ce)*nt)),De.add(new go.PathSegment(go.PathSegment.Bezier,de*et,(Ae+Jt)*nt,(de+Jt)*et,(Ae+ce)*nt,(de+ce)*et,(Ae+Jt)*nt)),De.add(new go.PathSegment(go.PathSegment.Bezier,(de-Jt)*et,Ae*nt,(de-ce)*et,(Ae+Jt)*nt,(de-Jt)*et,(Ae+ce)*nt).close());var ve=new go.PathFigure(0,nt,!1);return ct.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ct}),go.Shape.defineFigureGenerator("Warehouse",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var yt=new go.PathFigure(.15*et,nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var Et=.05,Nt=pe*.05,Vt=.35,Jt=.775,ce=new go.PathFigure((Vt-Et)*et,Jt*nt,!0);return ct.add(ce),ce.add(new go.PathSegment(go.PathSegment.Bezier,Vt*et,(Jt-Et)*nt,(Vt-Et)*et,(Jt-Nt)*nt,(Vt-Nt)*et,(Jt-Et)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(Vt+Et)*et,Jt*nt,(Vt+Nt)*et,(Jt-Et)*nt,(Vt+Et)*et,(Jt-Nt)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,Vt*et,(Jt+Et)*nt,(Vt+Et)*et,(Jt+Nt)*nt,(Vt+Nt)*et,(Jt+Et)*nt)),ce.add(new go.PathSegment(go.PathSegment.Bezier,(Vt-Et)*et,Jt*nt,(Vt-Nt)*et,(Jt+Et)*nt,(Vt-Et)*et,(Jt+Nt)*nt).close()),ct}),go.Shape.defineFigureGenerator("ControlCenter",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt).close()),ct}),go.Shape.defineFigureGenerator("Bluetooth",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.75*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),ct}),go.Shape.defineFigureGenerator("Bookmark",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ct}),go.Shape.defineFigureGenerator("Bookmark",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,0,0)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ct}),go.Shape.defineFigureGenerator("Globe",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.75*et,0,et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.75*nt,.75*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.25*et,nt,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,.25*nt,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,.15*et,.25*nt,.15*et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.85*et,.75*nt,.85*et,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.15*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.15*nt,.35*et,.3*nt,.65*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.85*nt,.35*et,.7*nt,.65*et,.7*nt)),ct}),go.Shape.defineFigureGenerator("Wave",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.25*nt,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.25*nt,.1*et,0,.2*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.25*nt,.425*et,.5*nt,.575*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.25*nt,.8*et,0,.9*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.75*nt,.1*et,.5*nt,.2*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.75*nt,.425*et,nt,.575*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.75*nt,.8*et,.5*nt,.9*et,.5*nt)),ct}),go.Shape.defineFigureGenerator("Operator",function(Dt,et,nt){var ct=new go.Geometry,lt=.3,gt=pe*.3,yt=.5,Et=.7,Nt=new go.PathFigure((yt-lt)*et,Et*nt,!0);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt));var Vt=new go.PathFigure(0,.7*nt,!1);return ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ct}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.5*et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.65*et,.3*nt,.65*et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.35*et,.5*nt,.35*et,.3*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.3*et,.6*nt,.1*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.2*et,nt,.35*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,.7*et,.6*nt,.9*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.8*et,nt,.65*et,.95*nt)),ct}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et,0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,0,.075*nt,0,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,0,nt,.4*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.4*nt,.8*et,nt,.85*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ct}),go.Shape.defineFigureGenerator("Battery",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.1*nt));var gt=new go.PathFigure(0,.6*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ct}),go.Shape.defineFigureGenerator("Delete",function(Dt,et,nt){var ct=new go.Geometry,lt=.5,gt=pe*.5,yt=.5,Et=.5,Nt=new go.PathFigure((yt-lt)*et,Et*nt,!0);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt));var Vt=new go.PathFigure(.15*et,.5*nt,!1);return ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ct}),go.Shape.defineFigureGenerator("Flag",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.1*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,0,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.1*nt,.15*et,0,.35*et,0)),lt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,.65*et,.2*nt,.85*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.85*et,.6*nt,.65*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.35*et,.4*nt,.15*et,.4*nt).close()),ct}),go.Shape.defineFigureGenerator("Help",function(Dt,et,nt){var ct=new go.Geometry,lt=.5,gt=pe*.5,yt=.5,Et=.5,Nt=new go.PathFigure((yt-lt)*et,Et*nt,!1);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt).close()),lt=.05,gt=pe*.05,yt=.5,Et=.8;var Vt=new go.PathFigure((yt-lt)*et,Et*nt,!1);return ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et-lt)*nt,(yt-lt)*et,(Et-gt)*nt,(yt-gt)*et,(Et-lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt+lt)*et,Et*nt,(yt+gt)*et,(Et-lt)*nt,(yt+lt)*et,(Et-gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,yt*et,(Et+lt)*nt,(yt+lt)*et,(Et+gt)*nt,(yt+gt)*et,(Et+lt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(yt-lt)*et,Et*nt,(yt-gt)*et,(Et+lt)*nt,(yt-lt)*et,(Et+gt)*nt).close()),Vt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),Vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.35*nt,.4*et,.2*nt,.3*et,.25*nt)),ct}),go.Shape.defineFigureGenerator("Location",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.975*et,.025*nt,.5*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*et,.5*nt,.5*et,0,.025*et,.025*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*et,.3*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Lock",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),ct}),go.Shape.defineFigureGenerator("Unlocked",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),ct}),go.Shape.defineFigureGenerator("Gear",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(.9375*et,.56246875*nt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*et,.3316875*nt,.79840625*et,.39915625*nt,.7834375*et,.3635*nt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*et,.23796875*nt)).add(new go.PathSegment(go.PathSegment.Line,.76825*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*et,.24184375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*et,.19378125*nt,.64228125*et,.2188125*nt,.603875*et,.2021875*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.19378125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*et,.239375*nt,.39759375*et,.20190625*nt,.36053125*et,.2176875*nt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*et,.2379375*nt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*et,.3278125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*et,.4375*nt,.21765625*et,.36059375*nt,.201875*et,.397625*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*et,.67596875*nt,.20221875*et,.603875*nt,.21884375*et,.64228125*nt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.238*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*et,.76296875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*et,.80621875*nt,.36353125*et,.78340625*nt,.3991875*et,.79840625*nt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.80621875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*et,.760625*nt,.602375*et,.79809375*nt,.63946875*et,.78234375*nt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*et,.67221875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*et,.56246875*nt,.78234375*et,.63940625*nt,.798125*et,.602375*nt)).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.56246875*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*et,.5*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Hand",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.5*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.3*nt,0,.375*nt,.05*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.075*nt,.3*et,.225*nt,.4*et,.175*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.525*et,.075*nt,.46*et,.05*nt,.525*et,.05*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.4*nt,.525*et,.275*nt,.475*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.55*nt,et,.4*nt,et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.425*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.7*nt,.675*et,.55*nt,.675*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,.85*nt,.65*et,.7*nt,.65*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.535*et,nt,.61*et,.85*nt,.61*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,.435*et,nt,0,nt).close()),ct}),go.Shape.defineFigureGenerator("Map",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,.2*nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.25*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),lt.add(new go.PathSegment(go.PathSegment.Move,.75*et,0)),lt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),ct}),go.Shape.defineFigureGenerator("Eject",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.7)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.7).close());var gt=new go.PathFigure(0,nt*.6,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),ct}),go.Shape.defineFigureGenerator("Pencil",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close()))}),go.Shape.defineFigureGenerator("Building",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*1,nt*1,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.3)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.85)),lt.add(new go.PathSegment(go.PathSegment.Line,et,nt*.85).close());var gt=new go.PathFigure(.126*et,.85*nt,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var yt=new go.PathFigure(.402*et,.85*nt,!1);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),yt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.85*nt).close());var Et=new go.PathFigure(.678*et,.85*nt,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),Et.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var Nt=new go.PathFigure(.5*et,.1*nt,!1);return ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Nt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ct}),go.Shape.defineFigureGenerator("Staircase",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.8)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.6)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.4)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.2)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.15)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*.95).close()),ct}),go.Shape.defineFigureGenerator("5Bars",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,nt*1,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*(1-.184)).close());var gt=new go.PathFigure(et*.204,nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var yt=new go.PathFigure(et*.408,nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),yt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),yt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*1).close());var Et=new go.PathFigure(et*.612,nt,!0);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),Et.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),Et.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var Nt=new go.PathFigure(et*.816,nt,!0);return ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ct}),go.Shape.defineFigureGenerator("PC",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,0).close());var gt=new go.PathFigure(et*.055,.07*nt,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var yt=new go.PathFigure(et*.055,.13*nt,!0);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.16).close());var Et=new go.PathFigure(et*.055,.18*nt,!0);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var Nt=new go.PathFigure(et*1,0,!0);return ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ct}),go.Shape.defineFigureGenerator("Plane",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(.55*et,nt,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.475*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.35*et,.525*nt,0,.4*nt,.225*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.475*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.325*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.1*nt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.2*nt,.975*et,0,et,.08*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.45*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.95*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt).close()),ct}),go.Shape.defineFigureGenerator("Key",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*1,nt*.5,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.9,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.4*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,.2*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.35*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,0,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.15,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,.8*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.65*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,.55*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,.6*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,.575*nt)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.9,.6*nt).close()),lt.add(new go.PathSegment(go.PathSegment.Move,.17*et,.425*nt)),lt.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*et,.5*nt,.075*et,.075*nt).close()),ct}),go.Shape.defineFigureGenerator("FilmTape",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(0,0,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*0,et*.3,et*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*.95)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var gt=new go.PathFigure(0,0,!1);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var yt=new go.PathFigure(et*.11,nt*.1,!1);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),yt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.11,nt*.8).close());var Et=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),Et.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var Nt=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ct}),go.Shape.defineFigureGenerator("FloppyDisk",function(Dt,et,nt){var ct=new go.Geometry,lt=8,gt=lt*pe,yt=new go.PathFigure(lt,0,!1);ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-gt,et-gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,gt,nt,0,nt-gt)),yt.add(new go.PathSegment(go.PathSegment.Line,0,lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,lt,0,0,gt,gt,0).close());var Et=new go.PathFigure(et*.83,0,!1);ct.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var Nt=new go.PathFigure(et*.83,nt*1,!1);ct.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Nt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var Vt=new go.PathFigure(et*.78,nt*.05,!1);return ct.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),Vt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),Vt.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ct}),go.Shape.defineFigureGenerator("SpeechBubble",function(Dt,et,nt){var ct=Dt?Dt.parameter1:NaN;(isNaN(ct)||ct<0)&&(ct=15),ct=Math.min(ct,et/3),ct=Math.min(ct,nt/3);var lt=ct*pe,gt=nt*.8,yt=new go.Geometry,Et=new go.PathFigure(ct,0,!0);return yt.add(Et),Et.add(new go.PathSegment(go.PathSegment.Line,et-ct,0)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et,ct,et-lt,0,et,lt)),Et.add(new go.PathSegment(go.PathSegment.Line,et,gt-ct)),Et.add(new go.PathSegment(go.PathSegment.Bezier,et-ct,gt,et,gt-lt,et-lt,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.7,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),Et.add(new go.PathSegment(go.PathSegment.Line,et*.55,gt)),Et.add(new go.PathSegment(go.PathSegment.Line,ct,gt)),Et.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ct,lt,gt,0,gt-lt)),Et.add(new go.PathSegment(go.PathSegment.Line,0,ct)),Et.add(new go.PathSegment(go.PathSegment.Bezier,ct,0,0,lt,lt,0).close()),lt>1?(yt.spot1=new go.Spot(0,0,lt,lt),yt.spot2=new go.Spot(1,.8,-lt,-lt)):(yt.spot1=go.Spot.TopLeft,yt.spot2=new go.Spot(1,.8)),yt}),go.Shape.defineFigureGenerator("Repeat",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*.45,!0);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.45).close());var gt=new go.PathFigure(et*1,nt*.55,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),ct}),go.Shape.defineFigureGenerator("Windows",function(Dt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*et,.4*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.1*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*.1,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.9)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.9).close());var gt=new go.PathFigure(et*.1,nt*.2,!0);ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var yt=new go.PathFigure(et*.28,nt*.37,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),ct}),go.Shape.defineFigureGenerator("Beaker",function(Dt,et,nt){var ct=new go.Geometry,lt=15,gt=lt*pe,yt=new go.PathFigure(et*.62,nt*.475,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et,nt-lt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,et-lt,nt,et,nt-gt,et-gt,nt)),yt.add(new go.PathSegment(go.PathSegment.Line,lt,nt)),yt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-lt,gt,nt,0,nt-gt)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.62,nt*.03).close()),gt>1?(ct.spot1=new go.Spot(0,0,gt,gt),ct.spot2=new go.Spot(1,1,-gt,-gt)):(ct.spot1=go.Spot.TopLeft,ct.spot2=go.Spot.BottomRight),ct}),go.Shape.defineFigureGenerator("Download",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ct.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var yt=new go.PathFigure(et*.4,nt*0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),yt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),ct}),go.Shape.defineFigureGenerator("Bin",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ct.add(lt);var gt=.1/.3;return lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close()),ct}),go.Shape.defineFigureGenerator("Upload",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*0,nt*1,!0);ct.add(lt);var gt=.1/.3;lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var yt=new go.PathFigure(et*.5,nt*0,!0);return ct.add(yt),yt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),yt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),ct}),go.Shape.defineFigureGenerator("EmptyDrink",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close()),ct}),go.Shape.defineFigureGenerator("Drink",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*.15,nt*0,!1);ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close());var gt=new go.PathFigure(et*.235,nt*.28,!0);return ct.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),ct}),go.Shape.defineFigureGenerator("4Arrows",function(Dt,et,nt){var ct=new go.Geometry,lt=new go.PathFigure(et*.5,nt*0,!0);return ct.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*1)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.75)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.55)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.65)),lt.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.5)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.35)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.45)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.25)),lt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.25).close()),ct}),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")},43001: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 Pn={},gi="5.0",ne={},bt=null,xe=!1,Me=!1,je=null,ke=!1,ye=null,pe=null,Ue=0;Ue<arguments.length;Ue++){var Pe=arguments[Ue];if(Pe!==null)switch(typeof Pe){case"number":gi=Pe.toFixed(1);break;case"string":Pe.match(new RegExp("^[0-9]\\.[0-9]+$"))?gi=Pe:je=Pe;break;case"object":typeof Pe.is3D!="undefined"?bt=Pe:ne=Pe;break;case"boolean":xe=Pe,Me=!0;break}}bt===null&&(bt={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},ne.material_id!==void 0&&!Me&&(xe=!0)),je!==null&&ne.id===void 0&&(ne.id=je);var ie="",An="",we=!1,xn=null,Dt=null,et=null,nt=!1,ct=null,lt=null,gt=null,yt=null,Et=null;ne.height!==void 0&&(ne.height=Math.round(ne.height)),ne.width!==void 0&&(ne.width=Math.round(ne.width));var Nt=function(Ke){return parseFloat(Ke)>4?parseFloat(Ke):5};Pn.setHTML5Codebase=function(Ke,yn){pe=Ke,dn(Ke,yn)},Pn.setJavaCodebase=Pn.setJavaCodebaseVersion=Pn.isCompiledInstalled=Pn.setPreCompiledScriptPath=Pn.setPreCompiledResourcePath=function(){},Pn.setHTML5CodebaseVersion=function(Ke,yn){var Sn=parseFloat(Ke);if(Sn!==NaN&&Sn<5){console.log("The GeoGebra HTML5 codebase version "+Sn+" is deprecated. Using version latest instead.");return}ye=Ke,Kt(Ke,yn)},Pn.getHTML5CodebaseVersion=function(){return Dt},Pn.getParameters=function(){return ne},Pn.setFontsCSSURL=function(Ke){yt=Ke},Pn.setGiacJSURL=function(Ke){},Pn.setJNLPFile=function(Ke){ie=Ke},Pn.setJNLPBaseDir=function(Ke){},Pn.inject=function(){function Ke(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var yn="auto",Sn=ne.id,si,Bn=!1,Se=0;Se<arguments.length;Se++){var Fe=arguments[Se];typeof Fe=="string"?(Fe=Fe.toLowerCase(),Fe.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?yn=Fe:Sn=arguments[Se]):typeof Fe=="boolean"?Bn=Fe:Fe instanceof HTMLElement&&(si=Fe)}pn();function pn(){if(!ke){setTimeout(pn,200);return}yn=fi(yn);var Cn=si||document.getElementById(Sn);if(!Cn){console.log("possibly bug on ajax loading? ");return}if(Pn.removeExistingApplet(Cn,!1),ne.width===void 0&&Cn.clientWidth&&(ne.width=Cn.clientWidth),ne.height===void 0&&Cn.clientHeight&&(ne.height=Cn.clientHeight),!(ne.width&&ne.height)&&yn==="html5"&&(delete ne.width,delete ne.height),xn=yn,yn==="screenshot")nn(Cn,ne);else{var Ut=!1;ne.hasOwnProperty("playButton")&&ne.playButton||ne.hasOwnProperty("clickToLoad")&&ne.clickToLoad?Ut=!0:ne.hasOwnProperty("playButtonAutoDecide")&&ne.playButtonAutoDecide&&(Ut=(!Vt()||Ke())&&Jt()),Ut?(xn="screenshot",In(Cn,ne,Bn,yn)):We(Cn,ne,Bn)}}};function Vt(){try{return window.self!==window.top}catch(Ke){return!0}}function Jt(){return ne.hasOwnProperty("screenshotGenerator")&&ne.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Pn.getViews=function(){return bt},Pn.isJavaInstalled=function(){return!1};var ce=function(Ke){var yn=function(Se){var Fe=JSON.parse(Se),pn=function(Lt){return Lt.type=="G"||Lt.type=="E"},Cn=Fe.elements?Fe.elements.filter(pn)[0]:Fe;if(!Cn||!Cn.url){Sn();return}ne.fileName=Cn.url,de(Cn.settings||{}),bt.is3D=!0;var Ut="https://www.geogebra.org/images/";Pn.setPreviewImage(ct||Cn.previewUrl,Ut+"GeoGebra_loading.png",Ut+"applet_play.png"),Ke()},Sn=function(){ne.onError&&ne.onError(),Ai("Error: Fetching material (id "+ne.material_id+") failed.",ne)},si=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Bn="/materials/"+ne.material_id+"?scope=basic";Ae("https://"+si+"/api/proxy.php?path="+encodeURIComponent(Bn),yn,Sn)};function de(Ke){var yn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(Sn){Ke[Sn]=!!Ke[Sn]}),yn.forEach(function(Sn){ne[Sn]===void 0&&Ke[Sn]!==void 0&&(ne[Sn]=Ke[Sn])}),ne.showToolBarHelp===void 0&&(ne.showToolBarHelp=ne.showToolBar)}function Ae(Ke,yn,Sn){var si=new XMLHttpRequest;si.open("GET",Ke),si.onload=function(){yn(si.responseText)},si.onerror=Sn,si.send()}Pn.isHTML5Installed=function(){return!0},Pn.getLoadedAppletType=function(){return xn},Pn.setPreviewImage=function(Ke,yn,Sn){ct=Ke,lt=yn,gt=Sn},Pn.removeExistingApplet=function(Ke,yn){var Sn;typeof Ke=="string"&&(Ke=document.getElementById(Ke)),xn=null;var si=null;for(Sn=0;Sn<Ke.childNodes.length;Sn++){var Bn=Ke.childNodes[Sn],Se=Bn.className;Se==="applet_screenshot"?yn?(Bn.style.display="block",xn="screenshot"):Bn.style.display="none":Se!=="applet_scaler prerender"&&(Ke.removeChild(Bn),si=Se&&Se.indexOf("appletParameters")!=-1?Bn.id:null,Sn--)}var Fe=ne.id!==void 0?ne.id:si,pn=window[Fe];pn&&typeof pn.getBase64=="function"&&(pn.remove(),window[Fe]=null)},Pn.refreshHitPoints=function(){if(Nt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Ke=Pn.getAppletObject();return Ke&&typeof Ke.recalculateEnvironments=="function"?(Ke.recalculateEnvironments(),!0):!1},Pn.startAnimation=function(){var Ke=Pn.getAppletObject();return Ke&&typeof Ke.startAnimation=="function"?(Ke.startAnimation(),!0):!1},Pn.stopAnimation=function(){var Ke=Pn.getAppletObject();return Ke&&typeof Ke.stopAnimation=="function"?(Ke.stopAnimation(),!0):!1},Pn.getAppletObject=function(){var Ke=ne.id!==void 0?ne.id:"ggbApplet";return window[Ke]},Pn.resize=function(){};var De=function(Ke,yn,Sn){var si=document.createElement("param");si.setAttribute("name",yn),si.setAttribute("value",Sn),Ke.appendChild(si)},ve=function(Ke){return Ke&&Ke!=="false"},We=function(Ke,yn,Sn){Nt(Dt)<=4.2&&(Sn=!0);var si=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Dt||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(si=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Bn=document.createElement("div");Bn.classList.add("appletParameters","notranslate");var Se=yn.width,Fe=yn.height;if(yn.disableAutoScale=yn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():yn.disableAutoScale,yn.width!==void 0)if(Nt(Dt)<=4.4)ve(yn.showToolBar)&&(yn.height-=7),ve(yn.showAlgebraInput)&&(yn.height-=37),yn.width<605&&ve(yn.showToolBar)&&(yn.width=605,Se=605);else{var pn=100;(ve(yn.showToolBar)||ve(yn.showMenuBar))&&(yn.hasOwnProperty("customToolBar")&&(yn.customToolbar=yn.customToolBar),pn=ve(yn.showMenuBar)?245:155),Se<pn&&(yn.width=pn,Se=pn)}Bn.style.border="none",Bn.style.display="inline-block";for(var Cn in yn)yn.hasOwnProperty(Cn)&&Cn!=="appletOnLoad"&&Bn.setAttribute("data-param-"+Cn,yn[Cn]);yt&&Bn.setAttribute("data-param-fontscssurl",yt),Pn.resize=function(){GGBAppletUtils.responsiveResize(Ke,yn)},window.addEventListener("resize",function(Zn){Pn.resize()});var Ut=typeof yn.appletOnLoad=="function"?yn.appletOnLoad:function(){};if(!Sn&&yn.width!==void 0){yn.hasOwnProperty("showSplash")||Bn.setAttribute("data-param-showSplash","false");var Lt=Ke.querySelector(".applet_scaler.prerender"),Bt=Lt!==null;if(Bt)var Tt=Lt.querySelector(".ggb_preview");else{var Tt=ui(Se,Fe,yn.borderColor,!1);Lt=document.createElement("div"),Lt.className="applet_scaler",Lt.style.position="relative",Lt.style.display="block",Lt.style.width=Se+"px",Lt.style.height=Fe+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Lt,"66%"),Nt(Dt)>=5?(yn.appletOnLoad=function(Zn){var Dn=Ke.querySelector(".ggb_preview");Dn&&Dn.parentNode.removeChild(Dn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Lt),window.GGBT_wsf_view&&$(window).trigger("resize"),Ut(Zn)},Bt||Lt.appendChild(Tt)):Bn.appendChild(Tt),Lt.appendChild(Bn),Bt||Ke.appendChild(Lt),setTimeout(function(){Pn.resize()},1)}else{var jt=document.createElement("div");jt.className="applet_scaler",jt.style.position="relative",jt.style.display="block",jt.appendChild(Bn),Ke.appendChild(jt),yn.appletOnLoad=function(Zn){Pn.resize(),Ut(Zn)}}function kt(Zn,Dn){Dn&&typeof Dn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Zn,Dn.appletOnLoad):renderGGBElement(Zn),Ai("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Dn)}function Ce(Zn,Dn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Zn,params:Dn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ai){kt(ai.article,ai.params)}),html5AppletsToProcess=null)},Nt(Dt)<5&&(Zn.className+=" geogebraweb")):kt(Zn,Dn)}if(si){scriptLoadStarted=!0;for(var on=0;on<Bn.childNodes.length;on++){var Gn=Bn.childNodes[on].tagName;Gn==="TABLE"&&(Bn.removeChild(Bn.childNodes[on]),on--)}if(ggbHTML5LoadedScript!==null){var Qn=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Qn!=null&&Qn.parentNode.removeChild(Qn)}var _n=document.createElement("script"),_e=function(){Ce(Bn,yn)};_n.src=An+et,ggbHTML5LoadedCodebaseIsWebSimple=nt,ggbHTML5LoadedCodebaseVersion=Dt,ggbHTML5LoadedScript=_n.src,Ai("GeoGebra HTML5 codebase loaded: '"+An+"'.",yn),!pe&&(!ye||ye=="5.0")?(nt?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),_e()):An.requirejs?__webpack_require__.e(7963).then(function(){var Zn=[__webpack_require__(87963)];_e.apply(null,Zn)}.bind(this)).catch(__webpack_require__.oe):(_n.onload=_e,Ke.appendChild(_n))}else Ce(Bn,yn);yn.height=Fe,yn.width=Se},nn=function(Ke,yn,Sn){var si=ui(yn.width,yn.height,yn.borderColor,Sn),Bn=document.createElement("div");Bn.style.position="relative",Bn.style.display="block",Bn.style.width=yn.width+"px",Bn.style.height=yn.height+"px",Bn.className="applet_screenshot applet_scaler"+(Sn?" applet_screenshot_play":""),Bn.appendChild(si);var Se=GGBAppletUtils.getScale(yn,Ke,Sn);Sn?(Ke.appendChild(En()),window.GGBT_wsf_view||(Ke.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Bn,"66%"),Ke.appendChild(Bn),Se!==1&&!isNaN(Se)&&(GGBAppletUtils.scaleElement(Bn,Se),Bn.style.width=yn.width+"px",Bn.style.height=yn.height+"px",Bn.parentNode.style.width=yn.width*Se+"px",Bn.parentNode.style.height=yn.height*Se+"px"),Pn.resize=function(){an(Ke,si,Bn,Sn)},window.addEventListener("resize",function(Fe){Pn.resize()}),Pn.resize()};function an(Ke,yn,Sn,si){if(Ke.contains(yn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ke.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Ke)}var Bn=GGBAppletUtils.getScale(ne,Ke,si);Sn.parentNode!==null&&(!isNaN(Bn)&&Bn!==1?(GGBAppletUtils.scaleElement(Sn,Bn),Sn.parentNode.style.width=ne.width*Bn+"px",Sn.parentNode.style.height=ne.height*Bn+"px"):(GGBAppletUtils.scaleElement(Sn,1),Sn.parentNode.style.width=ne.width+"px",Sn.parentNode.style.height=ne.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Ke),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Pn.onExitFullscreen=function(Ke,yn){yn.appendChild(Ke)};var In=function(Ke,yn,Sn,si){nn(Ke,yn,!0);for(var Bn=function(){var pn=[];for(Fe=0;Fe<Ke.childNodes.length;Fe++)pn.push(Ke.childNodes[Fe]);if(window.GGBT_wsf_view){var Cn=window.GGBT_wsf_view.renderFullScreen(Ke,yn.id),Ut=document.getElementById("fullscreencontainer"),Lt=jQuery(Ke).find(".fullscreencontent");Lt.length>0?(Cn.remove(),Lt.attr("id","fullscreencontent").show(),jQuery(Ut).append(Lt),window.dispatchEvent(new Event("resize"))):We(Cn,yn,!1),window.GGBT_wsf_view.launchFullScreen(Ut)}else xn=si,We(Ke,yn,!1);if(!window.GGBT_wsf_view)for(Fe=0;Fe<pn.length;Fe++)Ke.removeChild(pn[Fe])},Se=Ke.getElementsByClassName("ggb_preview_play"),Fe=0;Fe<Se.length;Fe++)Se[Fe].addEventListener("click",Bn,!1),Se[Fe].addEventListener("ontouchstart",Bn,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Ke),Jt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},En=function(){var Ke=document.createElement("div");if(Ke.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var yn='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',Sn=document.createElement("style");Sn.styleSheet?Sn.styleSheet.cssText=yn:Sn.appendChild(document.createTextNode(yn)),document.getElementsByTagName("head")[0].appendChild(Sn)}return Ke},ui=function(Ke,yn,Sn,si){var Bn=document.createElement("div");Bn.className="ggb_preview",Bn.style.position="absolute",Bn.style.zIndex="90",Bn.style.width=Ke-2+"px",Bn.style.height=yn-2+"px",Bn.style.top="0px",Bn.style.left="0px",Bn.style.overflow="hidden",Bn.style.backgroundColor="white";var Se="lightgrey";Sn!==void 0&&(Sn==="none"?Se="transparent":Se=Sn),Bn.style.border="1px solid "+Se;var Fe=document.createElement("img");if(Fe.style.position="relative",Fe.style.zIndex="1000",Fe.style.top="-1px",Fe.style.left="-1px",ct!==null&&Fe.setAttribute("src",ct),Fe.style.opacity=.7,lt!==null){var pn,Cn,Ut;if(!si){pn=document.createElement("img"),pn.style.position="absolute",pn.style.zIndex="1001",pn.style.opacity=1,Fe.style.opacity=.3,Cn=360,Cn>Ke/4*3&&(Cn=Ke/4*3),Ut=Cn/5.8,pn.setAttribute("src",lt),pn.setAttribute("width",Cn),pn.setAttribute("height",Ut);var Lt=(Ke-Cn)/2,Bt=(yn-Ut)/2;pn.style.left=Lt+"px",pn.style.top=Bt+"px",Bn.appendChild(pn)}}return Bn.appendChild(Fe),Bn},fi=function(Ke){return Ke=Ke.toLowerCase(),Ke==="html5"||Ke==="screenshot"?Ke:"html5"},ue=["web","webSimple","web3d","tablet","tablet3d","phone"],Kt=function(Ke,yn){if(Dt=Ke,yn){dn(Dt,!0);return}var Sn=!xe;if(Sn){var si=Nt(Dt);!isNaN(si)&&si<4.4&&(Sn=!1)}var Bn,Se;window.location.protocol.substr(0,4)==="http"?Bn=window.location.protocol:Bn="http:";var Fe=Dt.indexOf("//");Fe>0?Se=Dt:Fe===0?Se=Bn+Dt:Se="https://www.geogebra.org/apps/5.2.814.0/";for(var pn in ue)if(Dt.slice(ue[pn].length*-1)===ue[pn]||Dt.slice((ue[pn].length+1)*-1)===ue[pn]+"/"){dn(Se,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Sn&&!bt.is3D&&!bt.AV&&!bt.SV&&!bt.CV&&!bt.EV2&&!bt.CP&&!bt.PC&&!bt.DA&&!bt.FI&&!bt.PV&&!ve(ne.showToolBar)&&!ve(ne.showMenuBar)&&!ve(ne.showAlgebraInput)&&!ve(ne.enableRightClick)&&(!ne.appName||ne.appName=="classic")?Se+="webSimple/":Se+="web3d/",dn(Se,!1)},dn=function(Ke,yn){if(Ke.requirejs){An=Ke;return}Ke.slice(-1)!=="/"&&(Ke+="/"),An=Ke,yn===null&&(yn=Ke.indexOf("http")===-1),we=yn,et="web.nocache.js",nt=!1;var Sn=An.split("/");Sn.length>1&&(!yn&&Sn[Sn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):ue.indexOf(Sn[Sn.length-2])>=0&&(et=Sn[Sn.length-2]+".nocache.js")),Sn=Ke.split("/"),Dt=Sn[Sn.length-3],Dt.substr(0,4)==="test"?Dt=Dt.substr(4,1)+"."+Dt.substr(5,1):(Dt.substr(0,3)==="war"||Dt.substr(0,4)==="beta")&&(Dt="5.0");var si=parseFloat(Dt);si!==NaN&&si<5&&Ke.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+si+" is deprecated. Using version latest instead."),Kt("5.0",yn))},Ai=function(Ke,yn){window.console&&window.console.log&&(!yn||typeof yn.showLogging=="undefined"||yn.showLogging&&yn.showLogging!=="false")&&console.log(Ke)};ne.material_id!==void 0?ce(qn):qn();function qn(){var Ke=gi;ye!==null?Ke=ye:parseFloat(Ke)<5&&(Ke="5.0"),Kt(Ke,!1),pe!==null&&dn(pe,we),ke=!0}return Pn},GGBAppletUtils=function(){"use strict";function Pn(){return window.GGBT_wsf_edit!==void 0}function gi(ke,ye){ye!=1?(ke.style.transformOrigin="0% 0% 0px",ke.style.webkitTransformOrigin="0% 0% 0px",ke.style.transform="scale("+ye+","+ye+")",ke.style.webkitTransform="scale("+ye+","+ye+")",ke.style.maxWidth="initial",ke.querySelector(".ggb_preview")!==null&&(ke.querySelector(".ggb_preview").style.maxWidth="initial"),ke.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ke.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ke.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ke.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ke.style.transform="none",ke.style.webkitTransform="none")}function ne(ke,ye,pe,Ue,Pe,ie){var An=null;if(ie!=null&&ie!="")for(var we=ke.parentNode;we!=null;)if((" "+we.className+" ").indexOf(" "+ie+" ")>-1){An=we;break}else we=we.parentNode;var xn=0,Dt=0,et=0,nt=0,ct=0,lt=0,gt=0;if(An)xn=An.offsetWidth,Dt=Math.max(Ue?An.offsetWidth:0,An.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(xn=Math.min(window.innerWidth,document.documentElement.clientWidth),Dt=Math.min(window.innerHeight,document.documentElement.clientHeight),et=xn):(xn=window.innerWidth,Dt=window.innerHeight,et=window.innerWidth),ke){var yt=ke.getBoundingClientRect();yt.left>0&&yt.left<=xn&&(Pe===void 0||!Pe)&&(document.dir==="rtl"?(ct=xn-yt.width-yt.left,lt=et<=480?10:30):(lt=yt.left,ct=et<=480?10:30),nt=lt+ct)}if(ke&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Et=ke.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,gt=40)}}return ke&&((pe===void 0||!pe)&&ye>0&&ye+nt<xn?xn=ye:xn-=nt,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(pe===void 0||!pe)&&(Dt-=gt)),{width:xn,height:Dt}}function bt(ke,ye,pe,Ue,Pe){if(ke.isScreenshoGenerator)return 1;var ie=Ue!==void 0&&Ue,An=ke.noScaleMargin!=null&&ke.noScaleMargin,we=function(Et){return Et&&Et!=="false"},xn=we(ke.autoHeight),Dt=ne(ye,ke.width,pe,xn,ie&&window.GGBT_wsf_view||An,Pe),et=parseInt(Dt.width),nt=ke.width,ct=ke.height;if(nt===void 0){var lt=ye.querySelector(".appletParameters");lt&&(nt=lt.offsetWidth,ct=lt.offsetHeight)}var gt=et/nt,yt=ie?1:Dt.height/ct;return pe!==void 0&&!pe&&(gt=Math.min(1,gt),yt=Math.min(1,yt)),Math.min(gt,yt)}function xe(ke,ye,pe){var Ue=1,Pe,ie=!1;if(ke.hasOwnProperty("allowUpscale")&&(ie=ke.allowUpscale),ke.hasOwnProperty("scale")&&(Ue=parseFloat(ke.scale),(isNaN(Ue)||Ue===null||Ue===0)&&(Ue=1),Ue>1&&(ie=!0)),ye&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ie=!0),!(ke.hasOwnProperty("disableAutoScale")&&ke.disableAutoScale))Pe=bt(ke,ye,ie,pe,ke.scaleContainerClass);else return Ue;return ie&&(!ke.hasOwnProperty("scale")||Ue===1)?Pe:Math.min(Ue,Pe)}function Me(ke){var ye=Math.min(window.innerWidth,document.documentElement.clientWidth),pe=Math.min(window.innerHeight,document.documentElement.clientHeight),Ue=ke.getBoundingClientRect(),Pe=(ye-Ue.width)/2,ie=(pe-Ue.height)/2;ie<0&&(ie=0),ke.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Pe<40?ke.style.left="40px":ke.style.left=Pe+"px",ke.style.top=ie+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ie<40?ke.style.top="40px":ke.style.top=ie+"px",ke.style.left=Pe+"px")}function je(ke,ye){var pe=ke.querySelector(".appletParameters");if(pe){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ye.id!==pe.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ke)}if(pe.parentElement&&/fullscreen/.test(pe.parentElement.className))return;var Ue=xe(ye,ke);Pn()&&pe.setAttribute("data-param-scale",Ue);for(var Pe=null,ie=0;ie<ke.childNodes.length;ie++)if(ke.childNodes[ie].className!==void 0&&ke.childNodes[ie].className.match(/^applet_scaler/)){Pe=ke.childNodes[ie];break}if(Pe!==null&&Pe.querySelector(".noscale")!==null)return;var An=ye.id!==void 0?ye.id:"ggbApplet",we=window[An];(we==null||!we.recalculateEnvironments)&&Pe!==null&&!Pe.className.match(/fullscreen/)&&(Pe.parentNode.style.transform="",!isNaN(Ue)&&Ue!==1?(Pe.parentNode.style.width=ye.width*Ue+"px",Pe.parentNode.style.height=ye.height*Ue+"px",gi(Pe,Ue)):(gi(Pe,1),Pe.parentNode.style.width=ye.width+"px",Pe.parentNode.style.height=ye.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Me(ke),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(pe).parents(".content-added-content"))}}return{responsiveResize:je,isFlexibleWorksheetEditor:Pn,positionCenter:Me,getScale:xe,scaleElement:gi}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Pn=n.location.search;return Pn.indexOf(J)!=-1||Pn.indexOf(K)!=-1}function q(Pn,gi){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Pn){var gi=s[L].bindings;s[L].bindings=function(){for(var ne=gi?gi():{},bt=Pn[webModule.__softPermutationId],xe=O;xe<bt.length;xe++){var Me=bt[xe];ne[Me[O]]=Me[P]}return ne}};var t;function u(){return v(),t}function v(){if(!t){var Pn=o.createElement(Q);if(Pn.id=L,Pn.style.cssText=R+S,Pn.tabIndex=-1,o.body.appendChild(Pn),t=Pn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var gi=document.compatMode==U?V:W;t.write(gi+X),t.close()}}}function w(Pn){function gi(bt){function xe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Me=xe();if(Me){bt();return}function je(){if(!Me){if(!xe())return;Me=!0,bt(),o.removeEventListener&&o.removeEventListener(Z,je,!1),ke&&clearInterval(ke)}}o.addEventListener&&o.addEventListener(Z,je,!1);var ke=setInterval(function(){je()},$)}function ne(bt){var xe=u(),Me=xe.body,je=xe.createElement(_);je.language=ab,je.crossOrigin=W,je.src=bt,webModule.__errFn&&(je.onerror=function(){webModule.__errFn(L,new Error(bb+bt))}),Me.appendChild(je)}gi(function(){ne(Pn)})}webModule.__startLoadingFragment=function(Pn){return C(Pn)},webModule.__installRunAsyncCode=function(Pn){var gi=u(),ne=gi.body,bt=gi.createElement(_);bt.language=ab,bt.text=Pn,ne.appendChild(bt),ne.removeChild(bt)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=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(Pn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Pn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Pn){var gi=c[Pn];return gi==null?null:gi},r=d,webModule.__errFn=e}function B(){function Pn(ke){var ye=ke.lastIndexOf(rb);ye==-1&&(ye=ke.length);var pe=ke.indexOf(sb);pe==-1&&(pe=ke.length);var Ue=ke.lastIndexOf(tb,Math.min(pe,ye));return Ue>=O?ke.substring(O,Ue+P):W}function gi(ke){if(!ke.match(/^\w+:\/\//)){var ye=o.createElement(ub);ye.src=ke+vb,ke=Pn(ye.src)}return ke}function ne(){var ke=__gwt_getMetaProperty(wb);return ke!=null?ke:W}function bt(){for(var ke=o.getElementsByTagName(_),ye=O;ye<ke.length;++ye)if(ke[ye].src.indexOf(xb)!=-1)return Pn(ke[ye].src);return W}function xe(){var ke=o.getElementsByTagName(yb);return ke.length>O?ke[ke.length-P].href:W}function Me(){var ke=o.location;return ke.href==ke.protocol+zb+ke.host+ke.pathname+ke.search+ke.hash}var je=ne();return je==W&&(je=bt()),je==W&&(je=xe()),je==W&&Me()&&(je=Pn(o.location.href)),je=gi(je),je}function C(Pn){return Pn.match(/^\//)||Pn.match(/^[a-zA-Z]+:\/\//)?Pn:webModule.__moduleBase+Pn}function D(){var Pn=[],gi=O,ne=[],bt=[];function xe(ke){var ye=bt[ke](),pe=ne[ke];if(ye in pe)return ye;var Ue=[];for(var Pe in pe)Ue[pe[Pe]]=Pe;throw r&&r(ke,Ue,ye),null}if(__gwt_isKnownPropertyValue=function(ke,ye){return ye in ne[ke]},webModule.__getPropMap=function(){var ke={};for(var ye in ne)ne.hasOwnProperty(ye)&&(ke[ye]=xe(ye));return ke},webModule.__computePropValue=xe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Me;try{Me=Cb;var je=Me.indexOf(Db);je!=-1&&(gi=parseInt(Me.substring(je+P),$),Me=Me.substring(O,je))}catch(ke){}return webModule.__softPermutationId=gi,C(Me+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})()},46699:function(Pn,gi,ne){"use strict";ne.d(gi,{Ax:function(){return je},Ds:function(){return ke},KI:function(){return pe},SI:function(){return Me},f1:function(){return xe}});var bt=ne(346);function xe(Ue){let Pe=!0;if(Ue.length>0){for(let ie=0;ie<Ue.length;ie++)if(Ue[ie].compile_success==0||!Ue[ie].compile_success){Pe=!1;break}}else Pe=!1;return Pe}function Me(Ue,Pe=""){let ie=[];for(let An=0;An<Ue.length;An++){let we=Ue[An],xn=Pe?`${Pe}/${we.name}`:`${we.name}`;ie.push({title:we.name,type:we.type,isLeaf:we.type!=="tree",key:xn})}return ie}function je(Ue,Pe,ie){for(let An=0;An<Ue.length;An++){let we=Ue[An];if(we.key===Pe){we.children=ie;break}we.children&&je(we.children,Pe,ie)}return Ue}function ke(Ue,Pe,ie){let An;return function(){let we=this,xn=arguments,Dt=function(){An=null,ie||Ue.apply(we,xn)},et=ie&&!An;clearTimeout(An),An=setTimeout(Dt,Pe),et&&Ue.apply(we,xn)}}const ye=!0,pe=bt.Z.API_SERVER},9507:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return An}});var bt=ne(59301),xe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Me=ne(92310),je=ne.n(Me),ke=ne(29787),ye=ne(2859),pe=ne(38986),Ue=ne(51257),Pe=(we,xn,Dt)=>new Promise((et,nt)=>{var ct=yt=>{try{gt(Dt.next(yt))}catch(Et){nt(Et)}},lt=yt=>{try{gt(Dt.throw(yt))}catch(Et){nt(Et)}},gt=yt=>yt.done?et(yt.value):Promise.resolve(yt.value).then(ct,lt);gt((Dt=Dt.apply(we,xn)).next())}),An=({data:we,className:xn,fullWidth:Dt,style:et={},onClose:nt,onOk:ct,showFullTools:lt,noAssociationId:gt})=>{const yt=(0,bt.useRef)(null),Et=(0,bt.useRef)(null),Nt=(0,bt.useRef)(null),Vt=(0,bt.useRef)(null),[Jt,ce]=(0,bt.useState)(!1),[de,Ae]=(0,bt.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,bt.useEffect)(()=>(Nt.current||(Nt.current=document.createElement("style"),document.head.appendChild(Nt.current)),we!=null&&we.visible?(document.body.setAttribute("data-custom","y-hidden"),Nt.current.innerHTML=" html { overflow-y: hidden; }",we!=null&&we.src&&De()):(document.body.removeAttribute("data-custom"),Nt.current&&(document.head.removeChild(Nt.current),Nt.current=null)),()=>{document.body.removeAttribute("data-custom"),Nt.current&&(document.head.removeChild(Nt.current),Nt.current=null)}),[we==null?void 0:we.visible]);const De=()=>Pe(void 0,null,function*(){ce(!0),Ae("\u6B63\u5728\u52A0\u8F7D\u4E2D");const an=yield(0,Ue.ZJ)(we==null?void 0:we.src);yt.current.src="",yt.current.src=an,yt.current.onload=function(){nn()},ce(!1),Ae("")}),ve=an=>Pe(void 0,null,function*(){ce(!0),Ae("\u6B63\u5728\u4FDD\u5B58\u4E2D");const In=yield(0,pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:we.title,file:an.dataUrl}});In!=null&&In.id&&!gt?(yield(0,pe.ZP)(`/api/attachments/${we.id}/add_subitem.json`,{method:"post",body:{subitem_id:In==null?void 0:In.id,settings:JSON.stringify(an.state)}})).status===0&&ct():In!=null&&In.id&&ct(In),ce(!1),Ae("")}),We=()=>{const an=document.querySelector('a[href="https://markerjs.com/"]');an&&an.parentNode&&(an.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(En=>{const ui=document.querySelector(En.name);ui&&ui.setAttribute("title",En.title)})},nn=()=>{Et.current=new ye.hP(yt.current),Et.current.targetRoot=Vt.current,Et.current.addEventListener("render",ve),Et.current.addEventListener("beforeclose",nt),lt&&(Et.current.availableMarkerTypes=Et.current.ALL_MARKER_TYPES,Et.current.uiStyleSettings.redoButtonVisible=!0,Et.current.uiStyleSettings.notesButtonVisible=!0,Et.current.uiStyleSettings.zoomButtonVisible=!0,Et.current.uiStyleSettings.zoomOutButtonVisible=!0,Et.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Et.current.uiStyleSettings,Et.current.show(),we!=null&&we.snapshotData&&Et.current.restoreState(we.snapshotData),setTimeout(()=>{window.scrollTo(0,0),We()},300)};return bt.createElement(bt.Fragment,null,(we==null?void 0:we.visible)&&bt.createElement(ke.Z,{spinning:Jt,tip:de,style:{position:"absolute",width:"100vw"}},bt.createElement("div",{ref:Vt,className:je()(xe.imageDimensions,xn,Dt?xe.fullWidth:""),style:et},bt.createElement("img",{className:xe.img,ref:yt}))))}},76562:function(Pn,gi,ne){"use strict";var bt=ne(59301),xe=ne(77019),Me=ne(5269),je=ne(20554),ke=ne(99571),ye=ne(76902),pe=ne(99587),Ue=ne(48136),Pe=ne(59301);const ie=(0,bt.forwardRef)(({callback:An,showSaveButton:we,value:xn=""},Dt)=>{const et=(0,bt.useRef)(),nt=[{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 "}]}]}],ct=[{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=Et=>{et.current.setValue(et.current.getValue()+" "+Et.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Pe.createElement(xe.Z,{className:pe.Z.lists,gutter:[10,10]},nt.map((Et,Nt)=>Pe.createElement(Me.Z,{flex:"110px",className:pe.Z.item},Pe.createElement("div",null,Pe.createElement(ye.Z,{value:`$$${Et.value}$$`}),Et.name),Pe.createElement("div",{className:pe.Z.children},Et.children.map((Vt,Jt)=>Pe.createElement("div",{key:Jt},Pe.createElement("h1",null,Vt.name),Pe.createElement(xe.Z,{gutter:[10,10]},Vt.data.map((ce,de)=>Pe.createElement(Me.Z,{key:de,onClick:()=>lt(ce),className:pe.Z.diamond},Pe.createElement(ye.Z,{value:"`$$"+ce.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Pe.createElement(xe.Z,{className:pe.Z.lists,gutter:[10,10]},ct.map((Et,Nt)=>Pe.createElement(Me.Z,{flex:"110px",className:pe.Z.item},Pe.createElement("div",null,Pe.createElement(ye.Z,{value:"`$$"+Et.value+"$$`"}),Et.name),Pe.createElement("div",{className:pe.Z.children},Et.children.map((Vt,Jt)=>Pe.createElement("div",{key:Jt},Vt.name&&Pe.createElement("h1",null,Vt.name),Pe.createElement(xe.Z,{gutter:[10,10]},Vt.data.map((ce,de)=>Pe.createElement(Me.Z,{key:de,onClick:()=>lt(ce),className:pe.Z.diamond},Pe.createElement(ye.Z,{value:"`$$"+ce.value+"$$`"}))))))))))}],yt=()=>{var Et=document.createElement("div");Et.innerHTML=et.current.getValue();var Nt=Et.innerText;return An&&An(Nt),Nt};return(0,bt.useImperativeHandle)(Dt,()=>({getData:yt})),Pe.createElement("div",{className:pe.Z.mathWrap},Pe.createElement(je.default,{defaultActiveKey:"1",items:gt}),Pe.createElement("math-field",{locale:"zh_cn",className:pe.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},xn||""),we&&Pe.createElement("div",{className:pe.Z.button},Pe.createElement(ke.ZP,{size:"large",onClick:yt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});gi.Z=ie},28426:function(Pn,gi,ne){"use strict";var bt=ne(59301),xe=ne(93314),Me=ne(99571),je=Object.defineProperty,ke=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,ie=(Dt,et,nt)=>et in Dt?je(Dt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Dt[et]=nt,An=(Dt,et)=>{for(var nt in et||(et={}))Ue.call(et,nt)&&ie(Dt,nt,et[nt]);if(pe)for(var nt of pe(et))Pe.call(et,nt)&&ie(Dt,nt,et[nt]);return Dt},we=(Dt,et)=>ke(Dt,ye(et));const xn=({img:Dt,buttonProps:et={},styles:nt={},customText:ct,ButtonText:lt,ButtonClick:gt,Buttonclass:yt,ButtonTwo:Et,imgStyles:Nt,loading:Vt=!1,className:Jt=""})=>bt.createElement("section",{className:`tc animated fadeIn ${Jt}`,style:An({color:"#999",margin:"100px auto",visibility:Vt?"hidden":"visible"},nt)},bt.createElement("img",{src:Dt||xe,style:we(An({},Nt),{pointerEvents:"none",userSelect:"none"})}),bt.createElement("p",{className:"mt20 font14"},ct||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),lt&&bt.createElement(Me.ZP,An({className:yt,onClick:gt},et),lt),Et&&Et);gi.Z=xn},45677:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return yt}});var bt=ne(59301),xe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Me=ne(99571),je=ne(70557),ke=ne(75975),ye=ne(25399),pe=ne(51257),Ue=ne(81722),Pe=ne(28426),ie=ne(346),An=ne(44203),we=ne(59301),xn=Object.defineProperty,Dt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ct=(Et,Nt,Vt)=>Nt in Et?xn(Et,Nt,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):Et[Nt]=Vt,lt=(Et,Nt)=>{for(var Vt in Nt||(Nt={}))et.call(Nt,Vt)&&ct(Et,Vt,Nt[Vt]);if(Dt)for(var Vt of Dt(Nt))nt.call(Nt,Vt)&&ct(Et,Vt,Nt[Vt]);return Et},gt=(Et,Nt,Vt)=>new Promise((Jt,ce)=>{var de=ve=>{try{De(Vt.next(ve))}catch(We){ce(We)}},Ae=ve=>{try{De(Vt.throw(ve))}catch(We){ce(We)}},De=ve=>ve.done?Jt(ve.value):Promise.resolve(ve.value).then(de,Ae);De((Vt=Vt.apply(Et,Nt)).next())}),yt=({editOffice:Et="view",data:Nt,issaver:Vt,onSaver:Jt,theme:ce,type:de,filename:Ae,monacoEditor:De,className:ve,style:We,close:nn,onClose:an,hasMask:In,disabledDownload:En,onImgDimensions:ui,showNodata:fi,recordInfo:ue})=>{const[Kt,dn]=(0,bt.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ai,qn]=(0,bt.useState)(""),[Ke,yn]=(0,bt.useState)(),Sn=window.ENV==="build"?"/react/build":"",si=location.host.startsWith("localhost")?ie.Z.PROXY_SERVER:ie.Z.API_SERVER,Se=10*(1024*1024),Fe=(0,bt.useRef)();Nt!=null&&Nt.startsWith("/api")&&de!=="txt"&&(Nt=ie.Z.API_SERVER+Nt);const pn=Tt=>Tt.substring(Tt.lastIndexOf("/")+1).split(".").pop();Ae&&De&&(De.filename=Ae),(0,bt.useEffect)(()=>{var Tt,jt;const kt=(jt=(Tt=document.cookie)==null?void 0:Tt.replace(/\s/g,""))==null?void 0:jt.split(";");kt==null||kt.map(Ce=>{let on=Ce.split("=");on[0]==="_educoder_session"&&qn(on[1])})},[]),(0,bt.useEffect)(()=>{de==="office"&&(Nt.indexOf("bigfilescdn.")>-1||Nt.indexOf("bigfiles1")>-1?yn({url:Nt,fileType:pn(Nt),model:Nt.indexOf("model=edit")?"edit":"view"}):Ut())},[de,Nt]);function Cn(Tt){return gt(this,null,function*(){Tt.data.type==="pdfdata"&&(Jt(Tt.data.data),window.removeEventListener("message",Cn,!1)),console.log("mess---:",Tt.data)})}const Ut=()=>gt(void 0,null,function*(){console.log("data:",Nt);let Tt=Nt;Nt.startsWith("http")||(Tt=location.origin+Tt);let jt=new URL(Tt).pathname.split("/").pop();const kt=yield(0,Ue.gJ)({attachment_id:jt});kt.url=si+kt.url,yn(kt)}),Lt=()=>{if(Nt.startsWith("http")||Nt.startsWith("blob:")){Bt();return}(0,pe.Sv)(Ae||"educoder",Nt,Ae)},Bt=()=>{ue&&(0,An.fc)({id:ue==null?void 0:ue.id,watch_type:1,course_id:ue==null?void 0:ue.course_id}),(0,pe.Nd)(Ae||"educoder",decodeURIComponent(Nt))};return we.createElement("div",{style:lt({},We||{}),className:`${In&&xe.bgBlack} ${de?xe.wrp:"hide"}`},nn&&we.createElement("div",{className:xe.close,ref:Fe},!!ui&&we.createElement(ye.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Fe.current},we.createElement("span",{onClick:()=>{an(),ui()}},we.createElement("i",{className:"icon-yulanpizhu"}))),!En&&we.createElement(ye.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Fe.current},we.createElement("span",{onClick:Bt},we.createElement("i",{className:"icon-quxiaozhiding"}))),Vt&&we.createElement(ye.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Fe.current},we.createElement("span",{className:"",onClick:()=>{const Tt=document.getElementById("pdfiframe");window.addEventListener("message",Cn,!1),setTimeout(()=>{Tt.contentWindow.postMessage("getData","*")},300)}},we.createElement("i",{className:"icon-baocun"}))),we.createElement(ye.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Fe.current},we.createElement("span",{className:"",onClick:()=>{an()}},we.createElement("i",{className:"icon-guanbi1"})))),we.createElement("div",{className:`${xe[ve]} ${ve} ${xe.monaco} ${de==="txt"?"show":"hide"}`},de==="txt"&&we.createElement(we.Fragment,null,we.createElement(ke.ZP,lt({},De)))),de==="audio"&&we.createElement("audio",{src:`${(Nt==null?void 0:Nt.indexOf("http://"))>-1||(Nt==null?void 0:Nt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Nt}`,autoPlay:!0}),de==="video"&&we.createElement(we.Fragment,null,(Nt==null?void 0:Nt.indexOf("http"))>-1?we.createElement("video",{controls:!0,src:`${Nt}`,autoPlay:!0}):we.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Nt}`,autoPlay:!0})),de==="office"&&Ke&&we.createElement("iframe",{src:`${Sn}/office.html?key=${Ke.key}&url=${btoa(Ke.url)}&callbackUrl=${si+(Ke.callbackUrl||"")}&fileType=${Ke.fileType}&title=${Ke.title||""}&model=${Et}&officeServer=${ie.Z.ONLYOFFICE}&disabledDownload=${!!En}`}),de==="html"&&we.createElement("iframe",{src:Nt+"&disposition=inline"}),de==="pdf"&&we.createElement("iframe",{id:"pdfiframe",src:`${Sn}/js/pdfview/index.html?filename=${Ae||"educoder.pdf"}&url=${encodeURIComponent(Nt)}&disabledDownload=${!!En}&model=${Et}`}),de==="image"&&we.createElement("img",{src:`${(Nt==null?void 0:Nt.indexOf("http://"))>-1||(Nt==null?void 0:Nt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Nt}`}),(de==="other"||de==="download")&&we.createElement(we.Fragment,null,fi?we.createElement(Pe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:we.createElement(Me.ZP,{icon:we.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Lt,disabled:En},"\u4E0B\u8F7D")}):we.createElement(Me.ZP,{type:"primary",size:"middle",onClick:Lt,disabled:En},we.createElement(je.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(Pn,gi,ne){"use strict";ne.d(gi,{z:function(){return ce},Z:function(){return de}});var bt=ne(59301),xe=ne(8944),Me=ne(81428),je=ne(64018),ke=ne(81168),ye=ne(346),pe=ne(51257),Ue=ne(15342),Pe=ne(1012),ie=ne(45677),An=ne(59301),xn=({html:Ae})=>{const De=(0,bt.useRef)(null),ve=(0,bt.useRef)(null),We=`.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 nn=De.current.attachShadow({mode:"open"});ve.current=document.createElement("div"),ve.current.className="markdown-body",ve.current.innerHTML=Ae,nn.appendChild(ve.current);const an=document.createElement("style");return an.textContent=We,nn.appendChild(an),()=>{nn.innerHTML=""}},[]),(0,bt.useEffect)(()=>{ve.current&&(ve.current.innerHTML=Ae)},[Ae]),An.createElement("div",{ref:De})};function Dt(Ae){const De=["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"],ve=new RegExp(`\\b(${De.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Ae.replace(ve,"").trim()}var et=Object.defineProperty,nt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,gt=(Ae,De,ve)=>De in Ae?et(Ae,De,{enumerable:!0,configurable:!0,writable:!0,value:ve}):Ae[De]=ve,yt=(Ae,De)=>{for(var ve in De||(De={}))ct.call(De,ve)&>(Ae,ve,De[ve]);if(nt)for(var ve of nt(De))lt.call(De,ve)&>(Ae,ve,De[ve]);return Ae};const Et="@\u2581\u2581@",Nt="@\u2581@",Vt=/<pre[^>]*>/g;function Jt(Ae){let De=document.createElement("div");return De.innerHTML=Ae,De.childNodes.length===0?"":De.childNodes[0].nodeValue}const ce=(Ae,De)=>{Ae=Ae||"";const ve=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,We=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,nn=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,an=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return De?Ae.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ve,(In,En,ui,fi,ue,Kt,dn)=>{const Ai=En||fi||Kt,qn=ui||ue||dn||"?";return ye.Z.API_SERVER+"/api/attachments/"+Ai+qn+"&t="+(0,pe.Jn)(Ai,Date.now())+(In.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ae=Ae.replace(an,(In,En,ui,fi,ue,Kt,dn)=>{const Ai=En||fi||Kt,qn=ui||ue||dn||"?";return ye.Z.API_SERVER+"/attachments/download/"+Ai+qn+"&t="+(0,pe.Jn)(Ai,Date.now())+(In.indexOf(")")>-1?")":"&")}).replace(ve,(In,En,ui,fi,ue,Kt,dn)=>{const Ai=En||fi||Kt,qn=ui||ue||dn||"?";return ye.Z.API_SERVER+"/api/attachments/"+Ai+qn+"&t="+(0,pe.Jn)(Ai,Date.now())+(In.indexOf(")")>-1?")":"&")}).replace(We,(In,En,ui,fi,ue)=>{const Kt=En||fi,dn=ui||ue||"";return'"'+ye.Z.API_SERVER+"/api/attachments/"+Kt+dn+Kt+dn+"&t="+(0,pe.Jn)(Kt,Date.now())}).replace(nn,(In,En,ui,fi,ue)=>{const Kt=En||fi,dn=ui||ue||"";return"("+ye.Z.API_SERVER+"/files/uploads/"+Kt+dn+Kt+dn+"&t="+(0,pe.Jn)(Kt,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,`
|
|
`),Ae)};var de=({value:Ae="",className:De,showTextOnly:ve,showLines:We,style:nn={},stylesPrev:an={},highlightKeywords:In,showProgramFill:En,isProgramFill:ui,disabledFill:fi=!1,programFillValue:ue,onFillChange:Kt=qn=>{},onFillBlur:dn=()=>{},onFillFocus:Ai=()=>{}})=>{let qn=Dt(String(Ae||""));const[Ke,yn]=(0,bt.useState)(""),[Sn,si]=(0,bt.useState)("office"),[Bn,Se]=(0,bt.useState)([]),Fe=(0,bt.useRef)("a"+(0,Pe.Z)()),pn={},Cn=_e=>/<style[\s\S]*?>/i.test(_e||""),Ut=(_e,Zn,Dn)=>{const ai=document.createElement(_e===Nt?"input":"textarea");ai.style.width="100%",ai.style.height=_e===Nt?"40px":"151px",ai.rows=5,ai.spellcheck=!1,ai.name="edu-program-fill",ai.placeholder="\u8BF7\u8F93\u5165",ai.dataset.id=Zn;const vi=Object.keys(pn).length;return pn[vi]=ai,`<span class="edu-program-fill-wrap ${_e===Nt?"":"show"}" style="width:${_e===Nt?"600px":"100%"}" title=${Dn||""}><span>${ai.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Lt(_e){return _e=_e.replace(/!\[.*?\]\(.*?\)/g,""),_e=_e.replace(/\[.*?\]\(.*?\)/g,""),_e=_e.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),_e=_e.replace(/<embed.*?>/g,""),_e=_e.replace(/<img.*?>/g,""),_e=_e.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),_e=_e.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),_e=_e.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),_e=_e.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),_e}const Bt=_e=>!ve&&Cn(qn)?_e:_e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Zn,Dn){let ai=Dn.replace(/(\n|\r)/g,"").split("}"),vi=[];return ai.map(Rn=>{Rn!=""&&vi.push(`.${Fe.current} ${Rn}`)}),`<style>${vi.join("}")}</style>`}),Tt=(0,bt.useMemo)(()=>{try{const ai=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,vi=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Rn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,_i=/\(\/attachments\/download\//g;qn=qn.replace(_i,"("+ye.Z.API_SERVER+"/attachments/download/").replace(ai,"("+ye.Z.API_SERVER+"/api/attachments/").replace(vi,'"'+ye.Z.API_SERVER+"/api/attachments/").replace(Rn,'"'+ye.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(ai){}if(En){let ai=-1;return qn=qn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(vi,Rn,_i){var ii;return++ai,Ut(vi,ai,(ii=ue==null?void 0:ue[ai])==null?void 0:ii.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Bt(qn||"")}</pre>`}let _e=Bt(qn);_e=(0,Me.ZP)(_e);const Zn=(0,Me.ez)();qn.match(/\[TOC\]/)&&(_e=_e.replace("<p>[TOC]</p>",(0,Me.Qv)()),(0,Me.Iy)()),_e=_e.replace(/(__special_katext_id_\d+__)/g,(ai,vi)=>{const{type:Rn,expression:_i}=Zn[vi];return(0,Ue.renderToString)(Jt(_i)||"",{displayMode:Rn==="block",throwOnError:!1,output:"html"})}),_e=_e.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Me.AL)();const Dn=document.createElement("div");if(Dn.innerHTML=_e,ve)return Dn.innerText;if(In){const ai=In.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return on(Dn,ai),Dn.innerHTML}return setTimeout(()=>_n(),500),Dn.innerHTML},[qn,In]);(0,bt.useEffect)(()=>{Gn.current&&Gn.current.querySelectorAll(["input","textarea"]).forEach(Zn=>{Zn.oninput=jt,Zn.onblur=kt,Zn.onfocus=Ce})},[Bn]),(0,bt.useEffect)(()=>{var _e,Zn,Dn,ai,vi;if(ue!=null&&ue.length)try{const Rn=Gn.current.querySelectorAll(".edu-program-fill-score"),_i=Gn.current.querySelectorAll('[name="edu-program-fill"]');for(const[ii,ji]of _i.entries())ji.value=((_e=ue==null?void 0:ue[ii])==null?void 0:_e.value)||"",((Zn=ue==null?void 0:ue[ii])==null?void 0:Zn.type)==="warning"?ji.className="program-fill-warning":((Dn=ue==null?void 0:ue[ii])==null?void 0:Dn.type)==="success"?ji.className="program-fill-success":ji.className="";for(const[ii,ji]of Rn.entries())ji.innerHTML=(ai=ue==null?void 0:ue[ii])!=null&&ai.score?`${(vi=ue==null?void 0:ue[ii])==null?void 0:vi.score}\u5206`:"";Se(ue)}catch(Rn){console.log(Rn,"error")}},[ue]);const jt=_e=>{Bn[_e.target.dataset.id]=Bn[_e.target.dataset.id]||{},Bn[_e.target.dataset.id].value=_e.target.value,Se([...Bn]),Kt(Bn,_e.target.dataset.id)},kt=_e=>{Bn[_e.target.dataset.id]=Bn[_e.target.dataset.id]||{},Bn[_e.target.dataset.id].value=_e.target.value,Se([...Bn]),dn(Bn,_e.target.dataset.id)},Ce=_e=>{Bn[_e.target.dataset.id]=Bn[_e.target.dataset.id]||{},Bn[_e.target.dataset.id].value=_e.target.value,Se([...Bn]),Ai(Bn,_e.target.dataset.id)};function on(_e,Zn){return _e.childNodes.forEach(Dn=>{var ai;if(Dn.childNodes.length>0)on(Dn,Zn);else if(Dn.nodeName!=="IMG")if(Dn.innerHTML)Dn.innerHTML=(ai=Dn.innerHTML)==null?void 0:ai.replace(new RegExp(Zn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const vi=document.createElement("span");vi.innerHTML=Dn.textContent.replace(new RegExp(Zn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Dn.replaceWith(vi)}})}const Gn=(0,bt.useRef)();Me.jb.WebkitLineClamp=We,We&&(nn=yt(yt({},nn),Me.jb));function Qn(_e){let Zn=_e.target;if(Zn.tagName.toUpperCase()==="A"){let Dn=Zn.getAttribute("href");if(Dn.indexOf("office")>-1)_e.preventDefault(),yn(Dn),si("office");else if(Dn.indexOf("application/pdf")>-1)_e.preventDefault(),yn(Dn),si("pdf");else if(Dn.indexOf("text/html")>-1)_e.preventDefault(),yn(Dn),si("html");else if(Dn.startsWith("#")){_e.preventDefault();let ai=document.getElementById(Dn.replace("#",""));ai&&ai.scrollIntoView(!0)}}}const _n=()=>{var _e;const Zn=(_e=Gn.current)==null?void 0:_e.querySelectorAll("video");Zn==null||Zn.forEach(Dn=>{if(Dn.oncontextmenu=()=>!1,Dn.src.indexOf(".m3u8")>-1&&!Dn.canPlayType("application/vnd.apple.mpegurl")){if(ke.ZP.isSupported()){var ai=new ke.ZP;ai.loadSource(Dn.src),ai.attachMedia(Dn)}}})};return(0,bt.useEffect)(()=>{if(Gn.current&&Tt&&Tt.match(Vt)&&window.PR.prettyPrint(),Gn.current)return Gn.current.addEventListener("click",Qn),()=>{var _e;(_e=Gn.current)==null||_e.removeEventListener("click",Qn),(0,Me.AL)(),(0,Me.Iy)()}},[Tt,Gn.current,Qn]),(0,bt.useEffect)(()=>{var _e;const Zn=Dn=>{Dn.preventDefault(),Dn.clipboardData.setData("text",window.getSelection().toString())};return(_e=Gn.current)==null||_e.addEventListener("copy",Zn),()=>{var Dn;(Dn=Gn.current)==null||Dn.removeEventListener("copy",Zn)}},[Gn.current]),bt.createElement(bt.Fragment,null,ve&&bt.createElement("div",{ref:Gn},Tt),!ve&&!Cn(Tt)&&bt.createElement("div",{ref:Gn,style:yt({},nn),className:`${De||""} ${fi?"disabled-fill":""} markdown-body ${Fe.current}`,dangerouslySetInnerHTML:{__html:Tt}}),!ve&&Cn(Tt)&&bt.createElement(xn,{html:Tt}),bt.createElement(ie.Z,{close:!0,data:Ke,type:Ke!=null&&Ke.length?Sn:"",style:yt({},an),onClose:()=>yn("")}))}},69720:function(Pn,gi,ne){"use strict";ne.d(gi,{h:function(){return Et}});var bt=ne(59301),xe=ne(82326),Me=ne(28284),je=ne(99571),ke=ne(89780),ye=ne.n(ke),pe=ne(8336),Ue=ne(12469),Pe=Object.defineProperty,ie=Object.defineProperties,An=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,et=(Nt,Vt,Jt)=>Vt in Nt?Pe(Nt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Jt}):Nt[Vt]=Jt,nt=(Nt,Vt)=>{for(var Jt in Vt||(Vt={}))xn.call(Vt,Jt)&&et(Nt,Jt,Vt[Jt]);if(we)for(var Jt of we(Vt))Dt.call(Vt,Jt)&&et(Nt,Jt,Vt[Jt]);return Nt},ct=(Nt,Vt)=>ie(Nt,An(Vt));const lt=xe.default.Option,gt={labelCol:{span:4},wrapperCol:{span:20}},yt={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"]};gi.Z=({callback:Nt,onCancel:Vt})=>{const[Jt,ce]=(0,bt.useState)("python");function de(De){ce(yt[De][1])}function Ae(De){Nt(De)}return bt.createElement(Me.default,ct(nt({},gt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ae,style:{width:500}}),bt.createElement(Me.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},bt.createElement(xe.default,{getPopupContainer:De=>De.parentNode,onChange:de},Object.keys(yt).map(De=>bt.createElement(lt,{key:De,value:De},yt[De][0])))),bt.createElement(Me.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},bt.createElement(Et,{mode:Jt})),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(je.ZP,{type:"ghost",onClick:Vt},"\u53D6\u6D88")))};function Et({value:Nt,onChange:Vt,mode:Jt,options:ce={}}){const de=(0,bt.useRef)(),[Ae,De]=(0,bt.useState)();return(0,bt.useEffect)(()=>{if(Ae){let ve=function(We){const nn=We.getValue();Vt&&Vt(nn)};return Ae.on("change",ve),()=>{Ae.off("change",ve)}}},[Ae,Vt]),(0,bt.useEffect)(()=>{Ae&&Ae.setOption("mode",Jt)},[Ae,Jt]),(0,bt.useEffect)(()=>{Ae&&(Nt!==Ae.getValue()||Nt==="")&&setTimeout(()=>{Ae.setValue(Nt||"")},300)},[Ae,Nt]),(0,bt.useEffect)(()=>{if(de.current&&!Ae){const ve=ye().fromTextArea(de.current,nt({mode:Jt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ce));De(ve)}},[de.current,Ae]),bt.createElement("div",{className:"my-codemirror-container"},bt.createElement("textarea",{ref:de}))}},39793:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return Tr}});var bt=ne(59301),xe=ne(89780),Me=ne.n(xe),je=ne(76374),ke=ne(8336),ye=ne(6313),pe=ne(25717),Ue=ne(99498),Pe=ne(25419),ie=ne(67549),An=ne(76902),we=({value:Re="",className:Oe,showTextOnly:Te,showLines:Ze,style:yi={}})=>{const hi=(0,bt.useMemo)(()=>"",[Re]);return bt.createElement(bt.Fragment,null,bt.createElement("div",{dangerouslySetInnerHTML:{__html:hi}}))},xn=Object.defineProperty,Dt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,gt=(Re,Oe,Te)=>Oe in Re?xn(Re,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Te}):Re[Oe]=Te,yt=(Re,Oe)=>{for(var Te in Oe||(Oe={}))ct.call(Oe,Te)&>(Re,Te,Oe[Te]);if(nt)for(var Te of nt(Oe))lt.call(Oe,Te)&>(Re,Te,Oe[Te]);return Re},Et=(Re,Oe)=>Dt(Re,et(Oe));let Nt=[{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 Vt({onActionCallback:Re,title:Oe,icon:Te,actionName:Ze,className:yi="",children:hi}){function Zi(){Re(Ze)}return bt.createElement("a",{title:Oe,className:yi,onClick:Zi},bt.createElement("i",{className:`${Te}`}),hi)}var Jt=({watch:Re,showNullButton:Oe,showNullProgramButton:Te,onActionCallback:Ze,fullScreen:yi,insertTemp:hi,hidetoolBar:Zi,extraUse:He})=>{const Le=[...Nt,{title:`${Re?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Re?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return bt.createElement("ul",{className:"markdown-toolbar-container"},!Zi&&Le.map((kn,Bi)=>bt.createElement("li",{key:Bi},kn.actionName?bt.createElement(Vt,Et(yt({},kn),{onActionCallback:Ze})):bt.createElement("span",{className:"v-line"}))),Oe?bt.createElement("li",null,bt.createElement(Vt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ze},bt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Te?bt.createElement(bt.Fragment,null,bt.createElement("li",null,bt.createElement(Vt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ze},bt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),bt.createElement("li",null,bt.createElement(Vt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ze},bt.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,hi&&bt.createElement("li",null,bt.createElement(Vt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${hi}`,onActionCallback:Ze},bt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),He&&bt.createElement("li",null,He),bt.createElement("li",{className:"btn-full-screen"},bt.createElement(Vt,{icon:`${yi?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:yi?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ze})))},ce=ne(91558),de=ne(28284),Ae=ne(37568),De=ne(99571),ve=Object.defineProperty,We=Object.defineProperties,nn=Object.getOwnPropertyDescriptors,an=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,ui=(Re,Oe,Te)=>Oe in Re?ve(Re,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Te}):Re[Oe]=Te,fi=(Re,Oe)=>{for(var Te in Oe||(Oe={}))In.call(Oe,Te)&&ui(Re,Te,Oe[Te]);if(an)for(var Te of an(Oe))En.call(Oe,Te)&&ui(Re,Te,Oe[Te]);return Re},ue=(Re,Oe)=>We(Re,nn(Oe));const Kt={labelCol:{span:4},wrapperCol:{span:20}};var dn=({callback:Re,onCancel:Oe})=>{function Te(Ze){Re(Ze)}return bt.createElement(de.default,ue(fi({},Kt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Te,style:{width:500}}),bt.createElement(de.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},bt.createElement(Ae.default,null)),bt.createElement(de.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},bt.createElement(Ae.default,null)),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(De.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(De.ZP,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},Ai=ne(69720),qn=ne(17077),Ke=ne(62957),yn=ne(77019),Sn=ne(9507),si=ne(59301),Bn=({callback:Re,onCancel:Oe})=>{const Te=document.createElement("canvas"),Ze=Te.getContext("2d");Te.width=1e3,Te.height=800,Ze.fillStyle="#ffffff",Ze.fillRect(0,0,Te.width,Te.height);const yi=Te.toDataURL("image/png");return si.createElement(Ke.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},si.createElement(yn.Z,{style:{height:"100vh"}},si.createElement(Sn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:yi,visible:!0,title:String(Date.now())},onOk:hi=>{Re({src:hi.url})},onClose:Oe})))},Se=ne(12378);function Fe(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Fe,go.CommandHandler),Fe.prototype.canAlignSelection=function(){var Re=this.diagram;return!(Re===null||Re.isReadOnly||Re.isModelReadOnly||Re.selection.count<2)},Fe.prototype.alignLeft=function(){var Re=this.diagram;Re.startTransaction("aligning left");var Oe=1/0;Re.selection.each(function(Te){Te instanceof go.Link||(Oe=Math.min(Te.position.x,Oe))}),Re.selection.each(function(Te){Te instanceof go.Link||Te.move(new go.Point(Oe,Te.position.y))}),Re.commitTransaction("aligning left")},Fe.prototype.alignRight=function(){var Re=this.diagram;Re.startTransaction("aligning right");var Oe=-1/0;Re.selection.each(function(Te){if(!(Te instanceof go.Link)){var Ze=Te.actualBounds.x+Te.actualBounds.width;Oe=Math.max(Ze,Oe)}}),Re.selection.each(function(Te){Te instanceof go.Link||Te.move(new go.Point(Oe-Te.actualBounds.width,Te.position.y))}),Re.commitTransaction("aligning right")},Fe.prototype.alignTop=function(){var Re=this.diagram;Re.startTransaction("alignTop");var Oe=1/0;Re.selection.each(function(Te){Te instanceof go.Link||(Oe=Math.min(Te.position.y,Oe))}),Re.selection.each(function(Te){Te instanceof go.Link||Te.move(new go.Point(Te.position.x,Oe))}),Re.commitTransaction("alignTop")},Fe.prototype.alignBottom=function(){var Re=this.diagram;Re.startTransaction("aligning bottom");var Oe=-1/0;Re.selection.each(function(Te){if(!(Te instanceof go.Link)){var Ze=Te.actualBounds.y+Te.actualBounds.height;Oe=Math.max(Ze,Oe)}}),Re.selection.each(function(Te){Te instanceof go.Link||Te.move(new go.Point(Te.actualBounds.x,Oe-Te.actualBounds.height))}),Re.commitTransaction("aligning bottom")},Fe.prototype.alignCenterX=function(){var Re=this.diagram,Oe=Re.selection.first();if(Oe){Re.startTransaction("aligning Center X");var Te=Oe.actualBounds.x+Oe.actualBounds.width/2;Re.selection.each(function(Ze){Ze instanceof go.Link||Ze.move(new go.Point(Te-Ze.actualBounds.width/2,Ze.actualBounds.y))}),Re.commitTransaction("aligning Center X")}},Fe.prototype.alignCenterY=function(){var Re=this.diagram,Oe=Re.selection.first();if(Oe){Re.startTransaction("aligning Center Y");var Te=Oe.actualBounds.y+Oe.actualBounds.height/2;Re.selection.each(function(Ze){Ze instanceof go.Link||Ze.move(new go.Point(Ze.actualBounds.x,Te-Ze.actualBounds.height/2))}),Re.commitTransaction("aligning Center Y")}},Fe.prototype.alignColumn=function(Re){var Oe=this.diagram;Oe.startTransaction("align Column"),Re===void 0&&(Re=0),Re=parseFloat(Re);var Te=new Array;Oe.selection.each(function(He){He instanceof go.Link||Te.push(He)});for(var Ze=0;Ze<Te.length-1;Ze++){var yi=Te[Ze],hi=yi.actualBounds.y+yi.actualBounds.height+Re,Zi=Te[Ze+1];Zi.move(new go.Point(yi.actualBounds.x,hi))}Oe.commitTransaction("align Column")},Fe.prototype.alignRow=function(Re){Re===void 0&&(Re=0),Re=parseFloat(Re);var Oe=this.diagram;Oe.startTransaction("align Row");var Te=new Array;Oe.selection.each(function(He){He instanceof go.Link||Te.push(He)});for(var Ze=0;Ze<Te.length-1;Ze++){var yi=Te[Ze],hi=yi.actualBounds.x+yi.actualBounds.width+Re,Zi=Te[Ze+1];Zi.move(new go.Point(hi,yi.actualBounds.y))}Oe.commitTransaction("align Row")},Fe.prototype.canRotate=function(Re){var Oe=this.diagram;return!(Oe===null||Oe.isReadOnly||Oe.isModelReadOnly||Oe.selection.count<1)},Fe.prototype.rotate=function(Re){Re===void 0&&(Re=90);var Oe=this.diagram;Oe.startTransaction("rotate "+Re.toString());var Oe=this.diagram;Oe.selection.each(function(Te){Te instanceof go.Link||Te instanceof go.Group||(Te.angle+=Re)}),Oe.commitTransaction("rotate "+Re.toString())},Fe.prototype.pullToFront=function(){var Re=this.diagram;Re.startTransaction("pullToFront");var Oe=new go.Map;Re.selection.each(function(Te){Oe.set(Te.layer,0)}),Oe.iteratorKeys.each(function(Te){var Ze=0;Te.parts.each(function(yi){if(!yi.isSelected){var hi=yi.zOrder;isNaN(hi)?yi.zOrder=0:Ze=Math.max(Ze,hi)}}),Oe.set(Te,Ze)}),Re.selection.each(function(Te){Fe._assignZOrder(Te,Oe.get(Te.layer)+1)}),Re.commitTransaction("pullToFront")},Fe.prototype.pushToBack=function(){var Re=this.diagram;Re.startTransaction("pushToBack");var Oe=new go.Map;Re.selection.each(function(Te){Oe.set(Te.layer,0)}),Oe.iteratorKeys.each(function(Te){var Ze=0;Te.parts.each(function(yi){if(!yi.isSelected){var hi=yi.zOrder;isNaN(hi)?yi.zOrder=0:Ze=Math.min(Ze,hi)}}),Oe.set(Te,Ze)}),Re.selection.each(function(Te){Fe._assignZOrder(Te,Oe.get(Te.layer)-1-Fe._findGroupDepth(Te))}),Re.commitTransaction("pushToBack")},Fe._assignZOrder=function(Re,Oe,Te){Te===void 0&&(Te=Re),Re.layer===Te.layer&&(Re.zOrder=Oe),Re instanceof go.Group&&Re.memberParts.each(function(Ze){Fe._assignZOrder(Ze,Oe+1,Te)})},Fe._findGroupDepth=function(Re){if(Re instanceof go.Group){var Oe=0;return Re.memberParts.each(function(Te){Oe=Math.max(Oe,Fe._findGroupDepth(Te))}),Oe+1}else return 0},Fe.prototype.doKeyDown=function(){var Re=this.diagram;if(Re!==null){var Oe=Re.lastInput;if(Oe.key==="Up"||Oe.key==="Down"||Oe.key==="Left"||Oe.key==="Right"){var Te=this.arrowKeyBehavior;if(Te==="none")return;if(Te==="select"){this._arrowKeySelect();return}else if(Te==="move"){this._arrowKeyMove();return}else if(Te==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Fe.prototype._getAllParts=function(){var Re=new Array;return this.diagram.nodes.each(function(Oe){Re.push(Oe)}),this.diagram.parts.each(function(Oe){Re.push(Oe)}),Re},Fe.prototype._arrowKeyMove=function(){var Re=this.diagram,Oe=Re.lastInput,Te=0,Ze=0;if(Oe.control||Oe.meta)Te=1,Ze=1;else if(Re.grid!==null){var yi=Re.grid.gridCellSize;Ze=yi.width,Te=yi.height}Re.startTransaction("arrowKeyMove"),Re.selection.each(function(hi){Oe.key==="Up"?hi.move(new go.Point(hi.actualBounds.x,hi.actualBounds.y-Te)):Oe.key==="Down"?hi.move(new go.Point(hi.actualBounds.x,hi.actualBounds.y+Te)):Oe.key==="Left"?hi.move(new go.Point(hi.actualBounds.x-Ze,hi.actualBounds.y)):Oe.key==="Right"&&hi.move(new go.Point(hi.actualBounds.x+Ze,hi.actualBounds.y))}),Re.commitTransaction("arrowKeyMove")},Fe.prototype._arrowKeySelect=function(){var Re=this.diagram,Oe=Re.lastInput,Te=null;Oe.key==="Up"?Te=this._findNearestPartTowards(270):Oe.key==="Down"?Te=this._findNearestPartTowards(90):Oe.key==="Left"?Te=this._findNearestPartTowards(180):Oe.key==="Right"&&(Te=this._findNearestPartTowards(0)),Te!==null&&(Oe.shift?Te.isSelected=!0:Oe.control||Oe.meta?Te.isSelected=!Te.isSelected:Re.select(Te))},Fe.prototype._findNearestPartTowards=function(Re){var Oe=this.diagram.selection.first();if(Oe===null)return null;for(var Te=Oe.actualBounds.center,Ze=this._getAllParts(),yi=1/0,hi=Oe,Zi=0;Zi<Ze.length;Zi++){var He=Ze[Zi];if(He!==Oe&&He.canSelect()){var Le=He.actualBounds.center,kn=Te.directionPoint(Le),Bi=this._angleCloseness(kn,Re);if(Bi<=45){var sn=Te.distanceSquaredPoint(Le);sn*=1+Math.sin(Bi*Math.PI/180),sn<yi&&(yi=sn,hi=He)}}}return hi},Fe.prototype._angleCloseness=function(Re,Oe){return Math.min(Math.abs(Oe-Re),Math.min(Math.abs(Oe+360-Re),Math.abs(Oe-360-Re)))},Fe.prototype._arrowKeyTree=function(){var Re=this.diagram,Oe=Re.selection.first();if(Oe instanceof go.Node){var Te=Re.lastInput;if(Te.key==="Right"){if(!Oe.isTreeLeaf)if(!Oe.isTreeExpanded)Re.commandHandler.canExpandTree(Oe)&&Re.commandHandler.expandTree(Oe);else{var Ze=this._sortTreeChildrenByY(Oe).first();Ze!==null&&Re.select(Ze)}}else if(Te.key==="Left")if(!Oe.isTreeLeaf&&Oe.isTreeExpanded)Re.commandHandler.canCollapseTree(Oe)&&Re.commandHandler.collapseTree(Oe);else{var yi=Oe.findTreeParentNode();yi!==null&&Re.select(yi)}else if(Te.key==="Up"){var yi=Oe.findTreeParentNode();if(yi!==null){var hi=this._sortTreeChildrenByY(yi),Zi=hi.indexOf(Oe);if(Zi>0){for(var He=hi.elt(Zi-1);He!==null&&He.isTreeExpanded&&!He.isTreeLeaf;){var Le=this._sortTreeChildrenByY(He);He=Le.last()}He!==null&&Re.select(He)}else Re.select(yi)}}else if(Te.key==="Down")if(Oe.isTreeExpanded&&!Oe.isTreeLeaf){var Ze=this._sortTreeChildrenByY(Oe).first();Ze!==null&&Re.select(Ze)}else for(;Oe!==null;){var yi=Oe.findTreeParentNode();if(yi===null)break;var hi=this._sortTreeChildrenByY(yi),Zi=hi.indexOf(Oe);if(Zi<hi.length-1){Re.select(hi.elt(Zi+1));break}else Oe=yi}var kn=Re.selection.first();kn!==null&&Re.scrollToRect(kn.actualBounds)}},Fe.prototype._sortTreeChildrenByY=function(Re){var Oe=new go.List().addAll(Re.findTreeChildrenNodes());return Oe.sort(function(Te,Ze){var yi=Te.location,hi=Ze.location;return yi.y<hi.y?-1:yi.y>hi.y?1:yi.x<hi.x?-1:yi.x>hi.x?1:0}),Oe},Fe.prototype.copyToClipboard=function(Re){go.CommandHandler.prototype.copyToClipboard.call(this,Re),this._lastPasteOffset.set(this.pasteOffset)},Fe.prototype.pasteFromClipboard=function(){var Re=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Re,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Re},Object.defineProperty(Fe.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Re){if(Re!=="move"&&Re!=="select"&&Re!=="scroll"&&Re!=="tree"&&Re!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Re);this._arrowKeyBehavior=Re}}),Object.defineProperty(Fe.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Re){if(!(Re instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Re);this._pasteOffset.set(Re)}});var pn=Fe,Cn=ne(63720),Ut=ne(5269),Lt=ne(38986),Bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Tt=ne(48790),jt=ne(59301),kt=(Re,Oe,Te)=>new Promise((Ze,yi)=>{var hi=Le=>{try{He(Te.next(Le))}catch(kn){yi(kn)}},Zi=Le=>{try{He(Te.throw(Le))}catch(kn){yi(kn)}},He=Le=>Le.done?Ze(Le.value):Promise.resolve(Le.value).then(hi,Zi);He((Te=Te.apply(Re,Oe)).next())});function Ce({onCancel:Re,callback:Oe}){let Te=(0,bt.useRef)(),Ze=(0,bt.useRef)(),yi=(0,bt.useRef)(),hi=(0,bt.useRef)(!1);const Zi=(0,bt.useRef)(!1),[He,Le]=(0,bt.useState)(0);function kn(){const sn=Se.bx.make,Yt={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"};Te.current=new Se.S0(Ze.current,{padding:20,grid:sn(Se.s_,"Grid",sn(Se.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),sn(Se.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Be=>{var wi=Be.diagram.commandHandler.addTopLevelParts(Be.diagram.selection,!0);wi||Be.diagram.currentTool.doCancel()},commandHandler:sn(pn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Be=>{var wi=Be.subject;wi.location=wi.location.copy().snapToGridPoint(Be.diagram.grid.gridOrigin,Be.diagram.grid.gridCellSize),setTimeout(()=>{Be.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Be=>{var wi=Be.subject;setTimeout(()=>{Be.diagram.commandHandler.editTextBlock()})},LinkRelinked:Be=>{var wi=Be.parameter.part;wi.invalidateConnectedLinks();var ir=Be.subject;Be.diagram.toolManager.linkingTool.isForwards?ir.toNode.invalidateConnectedLinks():ir.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Te.current.nodeTemplate=sn(Se.NB,"Auto",{locationSpot:Se.z6.Center,locationObjectName:"SHAPE",desiredSize:new Se.$u(120,60),minSize:new Se.$u(40,40),resizable:!0,resizeCellSize:new Se.$u(10,10),rotatable:!0},new Se.KX("location","loc",Se.E9.parse).makeTwoWay(Se.E9.stringify),new Se.KX("desiredSize","size",Se.$u.parse).makeTwoWay(Se.$u.stringify),sn(Se.bn,{name:"SHAPE",fill:Yt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Se.z6.AllSides,toSpot:Se.z6.AllSides},new Se.KX("figure"),new Se.KX("fill"),new Se.KX("stroke","borderColor"),new Se.KX("strokeWidth","thickness"),new Se.KX("strokeDashArray","dash")),sn(Se.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),sn(Se.al,{margin:1,textAlign:"center",overflow:Se.al.OverflowEllipsis,editable:!0},new Se.KX("text").makeTwoWay(),new Se.KX("stroke","color"))),Te.current.nodeTemplate.toolTip=sn("ToolTip",sn(Se.s_,"Vertical",{maxSize:new Se.$u(200,NaN)},sn(Se.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Se.KX("text")),sn(Se.al,{font:"10pt sans-serif",textAlign:"center"},new Se.KX("text","details"))));function he(Be,wi){var ir=(li,br)=>{li.handled=!0,li.diagram.model.commit(lr=>{var xr=br.part.adornedPart,Ar=new Se.E9().setRectSpot(xr.actualBounds,Be);Ar.subtract(xr.location),Ar.scale(2,2),Ar.x+=Math.sign(Ar.x)*130,Ar.y+=Math.sign(Ar.y)*130,Ar.add(xr.location),Ar.snapToGridPoint(li.diagram.grid.gridOrigin,li.diagram.grid.gridCellSize);var qt=lr.copyNodeData(xr.data);lr.setGroupKeyForNodeData(qt,lr.getGroupKeyForNodeData(xr.data)),lr.addNodeData(qt);var $t={from:xr.key,to:lr.getKeyForNodeData(qt)};lr.addLinkData($t);var _t=li.diagram.findNodeForData(qt);_t.location=Ar,li.diagram.select(_t),setTimeout(()=>{li.diagram.commandHandler.editTextBlock()},20)})};return sn(Se.bn,{figure:wi,alignment:Be,alignmentFocus:Be.opposite(),width:Be.equals(Se.z6.Top)||Be.equals(Se.z6.Bottom)?25:18,height:Be.equals(Se.z6.Top)||Be.equals(Se.z6.Bottom)?18:25,fill:"orange",stroke:Yt.white,strokeWidth:4,mouseEnter:(li,br)=>br.fill="dodgerblue",mouseLeave:(li,br)=>br.fill="orange",isActionable:!0,click:ir,contextClick:ir})}function wn(Be){return sn(Se.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:(wi,ir)=>ir.fill="dodgerblue",mouseLeave:(wi,ir)=>ir.fill="orange",click:(wi,ir)=>{wi.diagram.commandHandler.showContextMenu(ir.part.adornedPart)}},Be||{})}Te.current.nodeTemplate.selectionAdornmentTemplate=sn(Se.uz,"Spot",sn(Se.Vm,{padding:10}),he(Se.z6.Top,"TriangleUp"),he(Se.z6.Left,"TriangleLeft"),he(Se.z6.Right,"TriangleRight"),he(Se.z6.Bottom,"TriangleDown"),wn({alignment:new Se.z6(.75,0)}));function un(Be,wi){return(ir,li)=>{ir.handled=!0,ir.diagram.model.commit(br=>{br.set(li.part.adornedPart.data,Be,wi)})}}function Ne(Be,wi){return wi||(wi="color"),sn(Se.bn,{width:16,height:16,stroke:"lightgray",fill:Be,margin:1,background:"transparent",mouseEnter:(ir,li)=>li.stroke="dodgerblue",mouseLeave:(ir,li)=>li.stroke="lightgray",click:un(wi,Be),contextClick:un(wi,Be)})}function mn(){return[sn("ContextMenuButton",sn(Se.s_,"Horizontal",Ne(Yt.white,"fill"),Ne(Yt.beige,"fill"),Ne(Yt.extralightblue,"fill"),Ne(Yt.extralightred,"fill"))),sn("ContextMenuButton",sn(Se.s_,"Horizontal",Ne(Yt.lightgray,"fill"),Ne(Yt.lightgreen,"fill"),Ne(Yt.lightblue,"fill"),Ne(Yt.lightred,"fill")))]}function xi(){return[sn("ContextMenuButton",sn(Se.s_,"Horizontal",Ne(Yt.black),Ne(Yt.green),Ne(Yt.blue),Ne(Yt.red))),sn("ContextMenuButton",sn(Se.s_,"Horizontal",Ne(Yt.white),Ne(Yt.magenta),Ne(Yt.purple),Ne(Yt.orange)))]}function Mi(Be,wi){return wi||(wi="thickness"),sn(Se.bn,"LineH",{width:16,height:16,strokeWidth:Be,margin:1,background:"transparent",mouseEnter:(ir,li)=>li.background="dodgerblue",mouseLeave:(ir,li)=>li.background="transparent",click:un(wi,Be),contextClick:un(wi,Be)})}function Gi(Be,wi){return wi||(wi="dash"),sn(Se.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Be,margin:1,background:"transparent",mouseEnter:(ir,li)=>li.background="dodgerblue",mouseLeave:(ir,li)=>li.background="transparent",click:un(wi,Be),contextClick:un(wi,Be)})}function bn(){return[sn("ContextMenuButton",sn(Se.s_,"Horizontal",Mi(1),Mi(2),Mi(3),Mi(4))),sn("ContextMenuButton",sn(Se.s_,"Horizontal",Gi(null),Gi([2,4]),Gi([4,4])))]}function Ln(Be,wi){return wi||(wi="figure"),sn(Se.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Be,margin:1,background:"transparent",mouseEnter:(ir,li)=>li.fill="dodgerblue",mouseLeave:(ir,li)=>li.fill="lightgray",click:un(wi,Be),contextClick:un(wi,Be)})}Te.current.nodeTemplate.contextMenu=sn("ContextMenu",sn("ContextMenuButton",sn(Se.s_,"Horizontal",Ln("Rectangle"),Ln("RoundedRectangle"),Ln("Ellipse"),Ln("Diamond"))),sn("ContextMenuButton",sn(Se.s_,"Horizontal",Ln("Parallelogram2"),Ln("ManualOperation"),Ln("Procedure"),Ln("Cylinder1"))),sn("ContextMenuButton",sn(Se.s_,"Horizontal",Ln("Terminator"),Ln("CreateRequest"),Ln("Document"),Ln("TriangleDown"))),mn(),xi(),bn()),Te.current.groupTemplate=sn(Se.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Se.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Be,wi)=>{var ir=wi.addMembers(wi.diagram.selection,!0);ir||wi.diagram.currentTool.doCancel()},avoidable:!1},new Se.KX("location","loc",Se.E9.parse).makeTwoWay(Se.E9.stringify),sn(Se.s_,"Auto",{name:"BODY"},sn(Se.bn,{parameter1:10,fill:Yt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Se.z6.AllSides,toSpot:Se.z6.AllSides},new Se.KX("fill"),new Se.KX("stroke","color"),new Se.KX("strokeWidth","thickness"),new Se.KX("strokeDashArray","dash")),sn(Se.Vm,{background:"transparent",margin:20})),sn(Se.al,{alignment:Se.z6.Top,alignmentFocus:Se.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Se.KX("text"),new Se.KX("stroke","color"))),Te.current.groupTemplate.selectionAdornmentTemplate=sn(Se.uz,"Spot",sn(Se.s_,"Auto",sn(Se.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),sn(Se.Vm,{margin:1.5})),wn({alignment:Se.z6.TopRight,alignmentFocus:Se.z6.BottomRight})),Te.current.groupTemplate.contextMenu=sn("ContextMenu",mn(),xi(),bn()),Te.current.linkTemplate=sn(Se.rU,{layerName:"Foreground",routing:Se.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Se.KX("fromSpot","fromSpot",Se.z6.parse),new Se.KX("toSpot","toSpot",Se.z6.parse),new Se.KX("fromShortLength","dir",Be=>Be>=1?10:0),new Se.KX("toShortLength","dir",Be=>Be>=1?10:0),new Se.KX("points").makeTwoWay(),sn(Se.bn,{strokeWidth:2},new Se.KX("stroke","color"),new Se.KX("strokeWidth","thickness"),new Se.KX("strokeDashArray","dash")),sn(Se.bn,{segmentIndex:0,segmentOffset:new Se.E9(15,0),segmentOrientation:Se.rU.OrientAlong,alignmentFocus:Se.z6.Right,figure:"circle",width:10,strokeWidth:0},new Se.KX("fill","color"),new Se.KX("visible","dir",Be=>Be===1)),sn(Se.bn,{segmentIndex:-1,segmentOffset:new Se.E9(-10,6),segmentOrientation:Se.rU.OrientPlus90,alignmentFocus:Se.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Se.KX("fill","color"),new Se.KX("visible","dir",Be=>Be>=1),new Se.KX("width","thickness",Be=>7+3*Be),new Se.KX("height","thickness",Be=>7+3*Be),new Se.KX("segmentOffset","thickness",Be=>new Se.E9(-15,4+1.5*Be))),sn(Se.bn,{segmentIndex:0,segmentOffset:new Se.E9(15,-6),segmentOrientation:Se.rU.OrientMinus90,alignmentFocus:Se.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Se.KX("fill","color"),new Se.KX("visible","dir",Be=>Be===2),new Se.KX("width","thickness",Be=>7+3*Be),new Se.KX("height","thickness",Be=>7+3*Be),new Se.KX("segmentOffset","thickness",Be=>new Se.E9(-15,4+1.5*Be))),sn(Se.al,{alignmentFocus:new Se.z6(0,1,-4,0),editable:!0},new Se.KX("text").makeTwoWay(),new Se.KX("stroke","color"))),Te.current.linkTemplate.selectionAdornmentTemplate=sn(Se.uz,sn(Se.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:On(2)},new Se.KX("pathPattern","thickness",On)),wn({alignmentFocus:new Se.z6(0,0,-6,-4)}));function On(Be){return sn(Se.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Be+4).toString()+" H3"})}function Yi(Be){var wi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Be===0?wi="M0 0 M16 16 M0 8 L16 8":Be===2&&(wi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),sn(Se.bn,{geometryString:wi,margin:2,background:"transparent",mouseEnter:(ir,li)=>li.background="dodgerblue",mouseLeave:(ir,li)=>li.background="transparent",click:un("dir",Be),contextClick:un("dir",Be)})}function ki(Be){var wi=(ir,li)=>{ir.handled=!0,ir.diagram.model.commit(br=>{var lr=li.part.adornedPart;br.set(lr.data,Be?"toSpot":"fromSpot",Se.z6.stringify(Se.z6.AllSides)),(Be?lr.toNode:lr.fromNode).invalidateConnectedLinks()})};return sn(Se.bn,{width:12,height:12,fill:"transparent",mouseEnter:(ir,li)=>li.background="dodgerblue",mouseLeave:(ir,li)=>li.background="transparent",click:wi,contextClick:wi})}function hn(Be,wi){var ir=0,li=Se.z6.RightSide;Be.equals(Se.z6.Top)?(ir=270,li=Se.z6.TopSide):Be.equals(Se.z6.Left)?(ir=180,li=Se.z6.LeftSide):Be.equals(Se.z6.Bottom)&&(ir=90,li=Se.z6.BottomSide),wi||(ir-=180);var br=(lr,xr)=>{lr.handled=!0,lr.diagram.model.commit(Ar=>{var qt=xr.part.adornedPart;Ar.set(qt.data,wi?"toSpot":"fromSpot",Se.z6.stringify(li)),(wi?qt.toNode:qt.fromNode).invalidateConnectedLinks()})};return sn(Se.bn,{alignment:Be,alignmentFocus:Be.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:ir,background:"transparent",mouseEnter:(lr,xr)=>xr.background="dodgerblue",mouseLeave:(lr,xr)=>xr.background="transparent",click:br,contextClick:br})}Te.current.linkTemplate.contextMenu=sn("ContextMenu",xi(),bn(),sn("ContextMenuButton",sn(Se.s_,"Horizontal",Yi(0),Yi(1),Yi(2))),sn("ContextMenuButton",sn(Se.s_,"Horizontal",sn(Se.s_,"Spot",ki(!1),hn(Se.z6.Top,!1),hn(Se.z6.Left,!1),hn(Se.z6.Right,!1),hn(Se.z6.Bottom,!1)),sn(Se.s_,"Spot",{margin:new Se.Zt(0,0,0,2)},ki(!0),hn(Se.z6.Top,!0),hn(Se.z6.Left,!0),hn(Se.z6.Right,!0),hn(Se.z6.Bottom,!0)))));const Vn=`{ "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 Fr=["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 Ur(Be){return console.log("shapeName:",Be),Fr.indexOf(Be)>=0}var vo=new Se.YI(yi.current,{maxSelectionCount:1,linkTemplate:sn(Se.rU,{locationSpot:Se.z6.Center,selectionAdornmentTemplate:sn(Se.uz,"Link",{locationSpot:Se.z6.Center},sn(Se.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),sn(Se.bn,{toArrow:"Standard",stroke:null}))},{routing:Se.rU.AvoidsNodes,curve:Se.rU.JumpOver,corner:5,toShortLength:4},new Se.KX("points"),sn(Se.bn,{isPanelMain:!0,strokeWidth:2}),sn(Se.bn,{toArrow:"Standard",stroke:null})),model:new Se.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Se.bn.getFigureGenerators().toArray().map(Be=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Be.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Te.current.addDiagramListener("TextEdited",function(Be){var wi;const ir=Be.subject.part;var li=(wi=document.activeElement)==null?void 0:wi.value;typeof li=="string"&&li.trim()===""&&Te.current.model.commit(function(br){br.set(ir.data,"text","\u672A\u547D\u540D"),Te.current.commandHandler.stopCommand()},"increment")}),vo.nodeTemplate=sn(Se.NB,"Auto",{locationSpot:Se.z6.Center},new Se.KX("location","location",Se.E9.parse).makeTwoWay(Se.E9.stringify),sn(Se.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 Se.KX("stroke").makeTwoWay(),new Se.KX("fill").makeTwoWay(),new Se.KX("figure")),sn(Se.al,{margin:new Se.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Se.$u(16,16),maxSize:new Se.$u(10,NaN),textAlign:"center",editable:!0},new Se.KX("key").makeTwoWay())),setTimeout(()=>{Te.current.grid=sn(Se.s_,"Grid",sn(Se.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),sn(Se.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Te.current.grid.visible=!0,Te.current.grid.gridCellStroke="darkgray",Te.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Te.current,Te.current}const Bi=()=>kt(this,null,function*(){var sn,Yt=Te.current.makeImage();const he=yield(0,Lt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Yt.src,file_data:JSON.stringify({login:(sn=(0,Tt.eY)())==null?void 0:sn.login,data:JSON.parse(Te.current.model.toJson())})}});Oe({src:he.url})});return(0,bt.useEffect)(()=>(setTimeout(()=>{kn()},500),Le(He+1),()=>{Te.current=null}),[]),jt.createElement("div",{ref:Zi,className:"body-overflow-initial"},jt.createElement(Ke.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!He,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:jt.createElement(yn.Z,null,jt.createElement(Ut.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),jt.createElement(Ut.Z,{onClick:()=>{var sn,Yt,he=Te.current.selection.first();if(hi.current=!hi.current,document.activeElement&&he){let wn=(Yt=(sn=document.activeElement)==null?void 0:sn.value)==null?void 0:Yt.trim();typeof wn=="string"&&Te.current.model.commit(function(un){un.set(he.data,"text",wn||"\u672A\u547D\u540D"),Te.current.commandHandler.stopCommand()},"increment")}Le(He+1)}},jt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Re},jt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:hi.current?"none":"block"},className:Bt.flowChartWrp},jt.createElement("div",{style:{display:"flex",height:"100%"}},jt.createElement("div",{style:{width:"300px",height:"100%"}},jt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),jt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Bt.myPaletteDiv,ref:yi})),jt.createElement("div",{style:{flex:1,position:"relative"}},jt.createElement("div",{ref:Ze,style:{height:"80vh"}}))),jt.createElement("div",{className:"tr"},jt.createElement(De.ZP,{size:"large",onClick:Bi,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var on=Ce,Gn=ne(47889),Qn=ne(71051);const _n=Gn.ZP.Group,_e={margin:"0 8px"};var Zn=({callback:Re,onCancel:Oe})=>{function Te(Ze){Re(Ze)}return bt.createElement(de.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Te},bt.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},bt.createElement("span",{style:_e},"\u5355\u5143\u683C\u6570\uFF1A"),bt.createElement("span",{style:_e},"\u884C\u6570"),bt.createElement(de.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},bt.createElement(Qn.Z,null)),bt.createElement("span",{style:_e},"\u5217\u6570"),bt.createElement(de.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},bt.createElement(Qn.Z,null))),bt.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},bt.createElement("span",{style:_e},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),bt.createElement(de.default.Item,{name:"align"},bt.createElement(_n,null,bt.createElement(Gn.ZP,{value:"default"},bt.createElement("i",{className:"fa fa-align-justify"})),bt.createElement(Gn.ZP,{value:"left"},bt.createElement("i",{className:"fa fa-align-left"})),bt.createElement(Gn.ZP,{value:"center"},bt.createElement("i",{className:"fa fa-align-center"})),bt.createElement(Gn.ZP,{value:"right"},bt.createElement("i",{className:"fa fa-align-right"}))))),bt.createElement("div",{className:"flex-container flex-end"},bt.createElement(De.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),bt.createElement(De.ZP,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},Dn=ne(71411),ai=ne(43001),vi=ne.n(ai),_i=(0,bt.forwardRef)(({use3d:Re,width:Oe,height:Te,callback:Ze,showSaveButton:yi},hi)=>{const Zi=(0,bt.useRef)(),He=(0,bt.useRef)(),[Le,kn]=(0,bt.useState)(!1),Bi=(0,bt.useRef)({id:Zi,appName:"graphing",width:Oe||1e3,height:Te||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)(()=>{He.current=new(vi())(Bi.current,!0),window.onload=function(){He.current.inject("applet_container")}},[]);const sn=()=>{var Yt=window.ggbApplet.getPNGBase64(1,!0,72);return Ze&&Ze(Yt),Yt};return(0,bt.useEffect)(()=>{Bi.current.appName=Le?"3D":"graphing",He.current.inject("applet_container")},[Le]),(0,bt.useEffect)(()=>{kn(Re)},[Re]),(0,bt.useImperativeHandle)(hi,()=>({getImgData:sn})),bt.createElement(bt.Fragment,null,bt.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Zi}),bt.createElement(yn.Z,{align:"middle"},bt.createElement(Ut.Z,{flex:1},bt.createElement(Dn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Le,onChange:Yt=>kn(Yt)})),bt.createElement(Ut.Z,null,bt.createElement(De.ZP,{size:"large",onClick:sn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ii=ne(76562),ji=ne(6767);const Vi="link",Wr="upload-image",pr="add-flowchart",mr="draw-image",Sr="add-flowchart",$r="code-block",ar="add-table",Yr="------------",kr={default:Yr,left:`:${Yr}`,center:`:${Yr}:`,right:`${Yr}:`};var no=ne(37808);function Oo(){}let $o=0;const ko=1e4,oo="\u2581",tr="@\u2581\u2581@",Hr="@\u2581@",Pt=`
|
|
**\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`,so=["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 zr(Re){return/^\d+$/.test(Re)?`${Re}px`:Re}const pi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Ci={[pi+"-B"]:"bold",[pi+"-I"]:"italic"},Qi={[Vi]:"\u6DFB\u52A0\u94FE\u63A5",[$r]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Wr]:"\u6DFB\u52A0\u56FE\u7247",[mr]:"\u6DFB\u52A0\u753B\u56FE",[pr]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ar]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Tr=({defaultValue:Re="",onChange:Oe,width:Te="100%",height:Ze=400,miniToolbar:yi=!1,isFocus:hi=!1,watch:Zi,insertTemp:He,mode:Le="markdown",id:kn="markdown-editor-id",showResizeBar:Bi=!1,noStorage:sn=!1,showNullButton:Yt=!1,showNullProgramButton:he=!1,hidetoolBar:wn=!1,fullScreen:un=!1,onBlur:Ne,onCMBeforeChange:mn,onFullScreen:xi,className:Mi="",disablePaste:Gi=!1,disabled:bn=!1,disabledFill:Ln=!1,placeholder:On="",values:Yi="",extraUse:ki})=>{const[hn,Vn]=(0,bt.useState)(null),[Fr,Ur]=(0,bt.useState)(Re),[vo,Be]=(0,bt.useState)(Zi),[wi,ir]=(0,bt.useState)(un),[li,br]=(0,bt.useState)(""),[lr,xr]=(0,bt.useState)(0),[Ar,qt]=(0,bt.useState)(Ze),[$t,_t]=(0,bt.useState)(!1),[Qe,le]=(0,bt.useState)(0),[rn,Wn]=(0,bt.useState)(0),Un=(0,bt.useRef)(),mi=(0,bt.useRef)(),zn=(0,bt.useRef)(),cn=(0,bt.useRef)();(0,bt.useEffect)(()=>{const Jn=window.scrollY||window.pageYOffset;Ur(Yi),hn==null||hn.setValue(Yi),window.scrollTo(0,Jn)},[Yi]),(0,bt.useEffect)(()=>{xi==null||xi(wi)},[wi]),(0,bt.useEffect)(()=>{if(Un.current){let Jn=function(ci,Je){var er;if(Gi){Je.preventDefault();return}const fr=Je.clipboardData;if(fr){const Or=fr.types.toString(),nr=fr.items;if(Or==="Files"||fr.types.indexOf("Files")>-1){if(Je.preventDefault(),Le=="stex")return;try{let jr=nr[1];((er=nr[0])==null?void 0:er.kind)==="file"&&(jr=nr[0]);const Kr=jr.getAsFile(),Ho=Kr.name.split(".").pop();(0,qn.I)(Kr,ao=>{var bo,ho,be;ao.id?((bo=Kr==null?void 0:Kr.type)==null?void 0:bo.indexOf("image"))>-1?Mn.replaceSelection(`<img width="100%" src="/api/attachments/${ao.id}?type=${ao.content_type})" alt="" />`):((ho=Kr==null?void 0:Kr.type)==null?void 0:ho.indexOf("video"))>-1?Mn.replaceSelection(`<video width="100%" controls src="/api/attachments/${ao.id}"></video>`):((be=Kr==null?void 0:Kr.type)==null?void 0:be.indexOf("pdf"))>-1?Mn.replaceSelection(`<a href="/api/attachments/${ao.id}?type=${Kr.type}&disposition=inline" target="_blank">${Kr.name}</a>`):so.includes(Ho)?Mn.replaceSelection(`<a href="/api/attachments/${ao.id}?type=office&disposition=inline" target="_blank">${Kr.name}</a>`):Mn.replaceSelection(`[${Kr.name}](/api/attachments/${ao.id}?type=${ao.content_type})`):(ao==null?void 0:ao.status)===401&&(document.location.href="/user/login")})}catch(jr){ji.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Mn=Me().fromTextArea(Un.current,{mode:Le,lineNumbers:!yi,lineWrapping:!0,value:Re,autoCloseTags:!0,autoCloseBrackets:!0});return Mn.on("keyup",function(ci,Je){Je.keyCode===8&&(ci.getValue()==""?Mn.setOption("placeholder",On):Mn.setOption("placeholder",null))}),Mn.on("keydown",function(ci,Je){if(Je.keyCode===8){var er=Ki(ci);er&&Je.preventDefault()}}),hi&&Mn.focus(),Mn.on("paste",Jn),bn&&Mn.on("beforeChange",function(ci,Je){(Je.origin==="paste"||Je.origin==="+input")&&Je.cancel()}),Vn(Mn),()=>{Mn.off("paste",Jn)}}},[]);const Yn=(0,bt.useCallback)(()=>{if(mi.current)try{}catch(Jn){console.log(Jn,"---- to set md editor body height")}},[Ar,mi,wi]);(0,bt.useEffect)(()=>{function Jn(){let Mn=new je.Z(ci=>{for(let Je of ci)(Je.target.offsetHeight>0||Je.target.offsetWidth>0)&&(Yn(),hn.setSize("100%","100%"),hn.refresh())});return Mn.observe(Un.current.parentElement),Mn}if(hn){const Mn=Jn();return()=>{var ci,Je;(ci=Un.current)!=null&&ci.parentElement&&Mn.unobserve((Je=Un.current)==null?void 0:Je.parentElement)}}},[hn,Yn]),(0,bt.useEffect)(()=>{if(hn){let Jn=[];for(const[Mn,ci]of Object.entries(Ci)){let Je={[Mn]:()=>{Wi(ci)}};Jn.push(Je),hn.addKeyMap(Je)}return()=>{for(let Mn of Jn)hn.removeKeyMap(Mn)}}},[hn]),(0,bt.useEffect)(()=>{un!==wi&&ir(un)},[un]),(0,no.Z)(()=>{if(!sn&&lr>0){let Jn=new Date().getTime(),Mn=window.sessionStorage.getItem(kn);Jn>=lr+ko&&(!Mn||Mn!==Fr)&&(window.sessionStorage.setItem(kn,Fr),_t(!0))}},ko),(0,bt.useEffect)(()=>{Be(Zi)},[hn,Zi]),(0,bt.useEffect)(()=>{hn&&hi&&hn.focus()},[hn,hi]),(0,bt.useEffect)(()=>{if(vo&&hn){let Jn=function(ci){let Je=ci.target;if(cn.current){let er=Je.scrollTop/Je.scrollHeight;cn.current.scrollTop=cn.current.scrollHeight*er}};const Mn=hn.getScrollerElement();return Mn.addEventListener("scroll",Jn),()=>{Mn.removeEventListener("scroll",Jn)}}},[hn,vo]),(0,bt.useEffect)(()=>{if(hn&&mn){let Jn=function(Mn,ci){mn(Mn,ci)};return hn.on("beforeChange",Jn),()=>{hn.off("beforeChange",Jn)}}},[hn,mn]),(0,bt.useEffect)(()=>{if(hn&&Ne){let Jn=function(){Ne(hn.getValue())};return hn.on("blur",Jn),()=>{hn.off("blur",Jn)}}},[hn,Ne]);function Ki(Jn,Mn){var ci=Jn.getDoc(),Je=ci.getCursor(),er=ci.getLine(Je.line),fr=er.charAt(Je.ch-1),Or=er.lastIndexOf("@\u2581@",Je.ch),nr=er.lastIndexOf("@\u2581\u2581@",Je.ch),jr=Or>nr?Or:nr,Kr=Or>nr?3:4;if(tr.indexOf(fr)===-1)return null;if(console.log("change1:",Mn,Jn,er,Je,jr,Or,nr,fr),jr>=0&&Je.ch-jr<5){var Ho=jr+Kr;return ci.replaceRange("",{line:Je.line,ch:jr},{line:Je.line,ch:Ho}),{line:Je.line,ch:Ho}}return null}(0,bt.useEffect)(()=>{if(hn){let Jn=function(Mn,ci){const Je=Mn.getValue();Ur(Je),xr(new Date().getTime()),Mn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Oe&&(he?Oe(Je,jn(Je)):Oe(Je))};return hn.on("change",Jn),()=>{hn.off("change",Jn)}}},[hn,Oe]),(0,bt.useEffect)(()=>{if(hn)if(Re==null)hn.setValue(""),Ur("");else{const Jn=window.scrollY||window.pageYOffset;Re!==hn.getValue()&&(hn.setValue(Re),Ur(Re),hn.setCursor(bn?1:hn.lineCount(),0),window.scrollTo(0,Jn))}},[hn,Re]);const Wi=(0,bt.useCallback)(Jn=>{const Mn=hn.getCursor(),ci=hn.getSelection();let Je=ci.split(`
|
|
`);switch(Jn){case"bold":return hn.replaceSelection("**"+ci+"**"),ci===""&&hn.setCursor(Mn.line,Mn.ch+2),hn.focus();case"italic":return hn.replaceSelection("*"+ci+"*"),ci===""&&hn.setCursor(Mn.line,Mn.ch+1),hn.focus();case"code":return hn.replaceSelection("`"+ci+"`"),ci===""&&hn.setCursor(Mn.line,Mn.ch+1),hn.focus();case"inline-latex":return br("inline-latex"),hn.focus();case"latex":return hn.replaceSelection("```latex\n"+ci+"\n```"),hn.setCursor(Mn.line+1,ci.length+1),hn.focus();case"line-break":return hn.replaceSelection(`<br/>
|
|
`),hn.focus();case"list-ul":return ci===""?hn.replaceSelection("- "+ci):hn.replaceSelection(Je.map(er=>er===""?"":`- ${er}`).join(`
|
|
`)),hn.focus();case"list-ol":return ci===""?hn.replaceSelection("1. "+ci):hn.replaceSelection(Je.map((er,fr)=>er===""?"":`${fr+1}. ${er}`).join(`
|
|
`)),hn.focus();case"add-null-ch":return ci===""&&hn.setCursor(Mn.line,Mn.ch),hn.replaceSelection(oo),hn.focus();case"add-signal":return ci===""&&hn.setCursor(Mn.line,Mn.ch),hn.replaceSelection(Hr),hn.focus();case"add-multiple":return ci===""&&hn.setCursor(Mn.line,Mn.ch),hn.replaceSelection(tr),hn.focus();case"inster-template-1":return ci===""&&hn.setCursor(Mn.line,Mn.ch),hn.replaceSelection(Pt),hn.focus();case"eraser":return hn.setValue(""),hn.focus();case"trigger-watch":return Be(!vo),hn.focus();case"trigger-full-screen":return ir(!wi),hn.focus();case Vi:br(Vi);return;case $r:br($r);return;case Wr:br(Wr);return;case mr:br(mr);return;case"maths-latex":br("maths-latex");return;case pr:br(pr);return;case ar:br(ar);return;default:throw new Error}},[hn,vo,wi]),vn=(0,bt.useCallback)((Jn,Mn)=>{var ci,Je,er,fr,Or,nr;switch(br(""),li){case Vi:const{title:bo,link:ho}=Jn;return hn.replaceSelection(`[${bo}](${ho})`),hn.focus();case $r:const{language:be,content:co}=Jn;return hn.replaceSelection(["```"+be,co,"```"].join(`
|
|
`)),hn.focus();case"maths-latex":for(var jr=atob(Jn),Kr=new Uint8Array(jr.length),Ho=0;Ho<jr.length;Ho++)Kr[Ho]=jr.charCodeAt(Ho);var ao=new Blob([Kr],{type:"image/png"});(0,qn.I)(ao,Vs=>{Vs.id?hn.replaceSelection(``):(Vs==null?void 0:Vs.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":hn.replaceSelection("`$$"+Jn+"$$`");break;case Wr:case mr:case Sr:const{src:ls,alt:ks}=Jn,lo=Mn,xa=(er=(Je=(ci=lo==null?void 0:lo.name)==null?void 0:ci.split("."))==null?void 0:Je.pop)==null?void 0:er.call(Je);return((fr=lo==null?void 0:lo.type)==null?void 0:fr.indexOf("image"))>-1||!(lo!=null&&lo.type)?lo!=null&&lo.align||lo!=null&&lo.width?hn.replaceSelection(`<p style="text-align:${lo.align||"initial"}"><img width="${lo.width?lo.width+"%":"initial"}" src="${ls}" alt="${ks||""}" /></p>`):hn.replaceSelection(`<img width="100%" src="${ls}" alt="${ks||""}" />`):((Or=lo==null?void 0:lo.type)==null?void 0:Or.indexOf("video"))>-1?hn.replaceSelection(`<video width="100%" controls src="${ls}"></video>`):((nr=lo==null?void 0:lo.type)==null?void 0:nr.indexOf("pdf"))>-1?hn.replaceSelection(`<a href="${ls}?type=${lo.type}&disposition=inline" target="_blank">${lo.name}</a>`):so.includes(xa)?hn.replaceSelection(`<a href="${ls}?type=office&disposition=inline" target="_blank">${lo.name}</a>`):hn.replaceSelection(`[${lo.name}](${ls})`),hn.focus();case ar:const{row:ta,col:Da,align:Gr}=Jn;let Ro=`
|
|
`;for(let Vs=0;Vs<ta;Vs++){let Vl=[],zA=[];for(let Ba=0;Ba<Da;Ba++)Vs===1&&zA.push(kr[Gr]),Vl.push(" ");Vs===1&&(Ro+=`| ${zA.join(" | ")} |
|
|
`),Ro+=`| ${Vl.join(Da===1?"":" | ")} |
|
|
`}return hn.replaceSelection(Ro+`
|
|
`),hn.focus();default:throw new Error}},[hn,li]),Ht=(0,bt.useMemo)(()=>{switch(li){case Vi:return bt.createElement(dn,{callback:vn,onCancel:Ii});case $r:return bt.createElement(Ai.Z,{callback:vn,onCancel:Ii});case Wr:return bt.createElement(qn.Z,{callback:vn,onCancel:Ii});case pr:return bt.createElement(on,{callback:vn,onCancel:Ii});case ar:return bt.createElement(Zn,{callback:vn,onCancel:Ii});case"maths-latex":return bt.createElement(_i,{showSaveButton:!0,callback:vn});case"inline-latex":return bt.createElement(ii.Z,{showSaveButton:!0,callback:vn});default:return null}},[li]);function Ii(){br("")}(0,bt.useEffect)(()=>{if(zn.current){let Jn=function(Or){er=!0,fr=Or.pageY},Mn=function(){er=!1},ci=function(Or){if(er){let nr=Or.pageY-fr;nr<0&&(nr=0),nr>300&&(nr=300);let jr=Ze+nr+"px";qt(jr)}},Je=zn.current,er=!1,fr=0;return Je.addEventListener("mousedown",Jn),document.addEventListener("mousemove",ci),document.addEventListener("mouseup",Mn),()=>{Je.removeEventListener("mousedown",Jn),document.removeEventListener("mousemove",ci),document.removeEventListener("mouseup",Mn)}}},[hn,zn]),(0,bt.useEffect)(()=>{qt(Ze)},[Ze]);const Mr=zr(Te),Rr=zr(Ar),yr={width:Mr,height:Rr},Ei=(0,bt.useMemo)(()=>{if(lr){let Jn=new Date(lr),Mn=Jn.getHours(),ci=Jn.getMinutes(),Je=Jn.getSeconds();return Mn=Mn<10?"0"+Mn:Mn,ci=ci<10?"0"+ci:ci,Je=Je<10?"0"+Je:Je,`${Mn}:${ci}:${Je}`}return 0},[lr]),jn=Jn=>{const Mn=[];if(he){let ci=-1;Jn=Jn.replace(/(@▁▁@|@▁@)/g,function(Je,er,fr){Mn.push({multiLine:Je!==Hr})})}return Mn};function oi(){window.sessionStorage.removeItem(kn),_t(!1),xr(0)}function Pi(){_t(!1),xr(0),hn.setValue(window.sessionStorage.getItem(kn))}(0,bt.useEffect)(()=>{Qi[li]&&li!==mr&&li!==pr&&setTimeout(()=>{const Jn=document.getElementsByClassName("markdown-popup-form")[0],Mn=window.innerWidth/2-Jn.offsetWidth/2,ci=window.innerHeight/2-Jn.offsetHeight/2;le(Mn),Wn(ci)},0)},[li]);const Tn=Jn=>{Jn.preventDefault();const Mn=Jn.clientX-Qe,ci=Jn.clientY-rn;document.body.onmousemove=Je=>{let er=Je.clientX-Mn,fr=Je.clientY-ci;const Or=document.getElementsByClassName("markdown-popup-form")[0],nr=window.innerWidth-Or.offsetWidth,jr=window.innerHeight-Or.offsetHeight;er=Math.max(0,Math.min(er,nr)),fr=Math.max(0,Math.min(fr,jr)),ti(Je.clientX,Je.clientY,Mn,ci)&&(le(er),Wn(fr))},document.body.onmouseup=function(){document.body.onmousemove=null}},ti=(Jn,Mn,ci,Je)=>{const er=document.body.clientHeight,fr=document.body.clientWidth;return Jn<20&&ci>Jn||Jn>fr-20&&ci<Jn||Mn<20&&Je>Mn||Mn>er-20&&Je<Mn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return bt.createElement(bt.Fragment,null,bt.createElement("div",{className:"markdown-editor-wrapper",ref:mi},bt.createElement("div",{className:`markdown-editor-container ${Mi} ${vo?"on-preview":""} ${yi?"mini":""} ${wi?"full-screen":""}`,style:yr},bt.createElement(Jt,{insertTemp:He,watch:vo,fullScreen:wi,showNullButton:Yt,showNullProgramButton:he,onActionCallback:Wi,hidetoolBar:wn,extraUse:ki}),bt.createElement("div",{className:"markdown-editor-body"},bt.createElement("div",{className:"codemirror-container"},bt.createElement("textarea",{ref:Un,placeholder:On})),vo?bt.createElement("div",{ref:cn,className:"preview-container"},Le==="stex"&&bt.createElement(we,{value:Fr}),Le!=="stex"&&bt.createElement(An.Z,{disabledFill:Ln,showProgramFill:he,value:Fr})):null))),Bi?bt.createElement("a",{ref:zn,className:"editor-resize"}):null,li===mr&&bt.createElement(Bn,{callback:vn,onCancel:Ii}),li===pr&&bt.createElement(on,{callback:vn,onCancel:Ii}),bt.createElement(ce.Z,null,Qi[li]&&li!==mr&&li!==pr?bt.createElement(Ke.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Qe,top:rn},title:bt.createElement("div",{style:{cursor:"move"},onMouseDown:Tn},Qi[li]),open:!0,onCancel:Ii,footer:null,destroyOnClose:!0,width:li===pr?"1200px":null,height:li===pr?"80vh":null,className:"markdown-popup-form"},Ht):null))}},17077:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return Vt},I:function(){return ce}});var bt=ne(28284),xe=ne(6767),Me=ne(37568),je=ne(77736),ke=ne(71051),ye=ne(47889),pe=ne(99571),Ue=ne(46699),Pe=ne(59301),ie=ne(59301),An=Object.defineProperty,we=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ct=(de,Ae,De)=>Ae in de?An(de,Ae,{enumerable:!0,configurable:!0,writable:!0,value:De}):de[Ae]=De,lt=(de,Ae)=>{for(var De in Ae||(Ae={}))et.call(Ae,De)&&ct(de,De,Ae[De]);if(Dt)for(var De of Dt(Ae))nt.call(Ae,De)&&ct(de,De,Ae[De]);return de},gt=(de,Ae)=>we(de,xn(Ae));const{useForm:yt}=bt.default,Et={width:280,marginRight:10},Nt={labelCol:{span:5},wrapperCol:{span:19}};var Vt=({callback:de,onCancel:Ae})=>{const[De]=yt();let ve=(0,Pe.useRef)();function We(In){ve.current.width=De.getFieldValue("width"),ve.current.align=De.getFieldValue("align"),de(In,ve.current)}function nn(In,En){if(In.status===-1){xe.ZP.error(In.message);return}De.setFieldsValue({src:`/api/attachments/${In.id}`,type:En.type})}function an(In){let En=In.target.files[0];ve.current=En,ce(En,nn)}return ie.createElement(bt.default,gt(lt({form:De},Nt),{className:"upload-image-panel",onFinish:We,style:{width:470,overflow:"hidden"}}),ie.createElement(bt.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ie.createElement("div",{className:"flex-container"},ie.createElement(bt.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ie.createElement(Me.default,{style:Et})),ie.createElement(Jt,{onFileChange:an}))),ie.createElement(bt.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ie.createElement(Me.default,{style:{width:264}})),ie.createElement(bt.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ie.createElement(je.Z,null,ie.createElement(bt.default.Item,{name:"width",style:{margin:0}},ie.createElement(ke.Z,{style:{width:264}})),ie.createElement("span",{className:"ml8"},"%"))),ie.createElement(bt.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ie.createElement(ye.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"}]})),ie.createElement("aside",null,ie.createElement(bt.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ie.createElement(pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ie.createElement(pe.ZP,{type:"default",onClick:Ae},"\u53D6\u6D88"))))};function Jt({onFileChange:de}){return ie.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ie.createElement("input",{type:"file",onChange:de}))}function ce(de,Ae){if(!de)throw new String("\u6CA1\u6709\u6587\u4EF6");let De=new FormData;De.append("editormd-image-file",de),De.append("file_param_name","editormd-image-file"),De.append("byxhr","true");var ve=new window.XMLHttpRequest;ve.withCredentials=!0,ve.addEventListener("load",function(We){Ae(JSON.parse(We.target.responseText),de)},!1),ve.addEventListener("error",function(We){console.error(We)},!1),ve.open("POST",`${Ue.KI}/api/attachments.json`),ve.send(De)}},91558:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return Me}});var bt=ne(59301),xe=ne(4676);class Me extends bt.Component{constructor(ke){super(ke);const ye=window.document;this.node=ye.createElement("div"),ye.body.appendChild(this.node)}render(){const{children:ke}=this.props;return(0,xe.createPortal)(ke,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(Pn,gi,ne){"use strict";ne.d(gi,{SV:function(){return Se},ZP:function(){return Bn}});var bt=ne(59301),xe=ne(76374);const Me={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"]},je={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"]},ke={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 <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},ye={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(`
|
|
`)}]},pe={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 Ue=ne(53184),Pe=ne.n(Ue),ie=(Fe,pn,Cn)=>new Promise((Ut,Lt)=>{var Bt=kt=>{try{jt(Cn.next(kt))}catch(Ce){Lt(Ce)}},Tt=kt=>{try{jt(Cn.throw(kt))}catch(Ce){Lt(Ce)}},jt=kt=>kt.done?Ut(kt.value):Promise.resolve(kt.value).then(Bt,Tt);jt((Cn=Cn.apply(Fe,pn)).next())});const An={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"]}},we=(Fe,pn,Cn,Ut)=>{const Lt=pn.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Cn.lineNumber,endColumn:Cn.column});return Array.from(new Set(Lt.match(/\b\w{2,}\b/g)||[])).map(Tt=>({label:Tt,kind:Fe.languages.CompletionItemKind.Text,insertText:Tt,range:Ut}))},xn=(Fe,pn,Cn,Ut)=>{Fe.languages.registerCompletionItemProvider(pn,{provideCompletionItems(Lt,Bt){const Tt=Lt.getWordUntilPosition(Bt),jt={startLineNumber:Bt.lineNumber,endLineNumber:Bt.lineNumber,startColumn:Tt.startColumn,endColumn:Tt.endColumn},kt=Lt.getLineContent(Bt.lineNumber).substring(Tt.startColumn-2,Tt.endColumn);return{suggestions:[...we(Fe,Lt,Bt,jt),...Cn.map(on=>({label:on,kind:Fe.languages.CompletionItemKind.Keyword,documentation:on,insertText:on,insertTextRules:Fe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt})),...Ut.map(on=>({label:on.label,kind:Fe.languages.CompletionItemKind.Snippet,documentation:on.content,insertText:kt.startsWith("#")?on.content.replace(/#/,""):on.content,insertTextRules:Fe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt}))]}}})};var Dt=Fe=>{An.languages.forEach(pn=>{Fe.languages.registerDocumentFormattingEditProvider(pn,{provideDocumentFormattingEdits(Cn){return ie(this,null,function*(){const Ut=Pe()(Cn.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:Cn.getFullModelRange(),text:Ut}]})}})}),xn(Fe,"java",je.keywords,je.quickKey),xn(Fe,"cpp",ke.keywords,ke.quickKey),xn(Fe,"c",Me.keywords,[]),xn(Fe,"python",ye.keywords,ye.quickKey),xn(Fe,"scala",pe.keywords,pe.quickKey)};const et="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var nt=Object.defineProperty,ct=(Fe,pn,Cn)=>pn in Fe?nt(Fe,pn,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):Fe[pn]=Cn,lt=(Fe,pn,Cn)=>ct(Fe,typeof pn!="symbol"?pn+"":pn,Cn);const gt=class p1{constructor(pn,Cn,Ut){this.placeholder=pn,this.editor=Cn,this.monaco=Ut,Cn.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return p1.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 Et=gt,Nt=ne(96236),Vt=ne(6767),Jt=ne(25399),ce=ne(89392),de=ne(49535),Ae=ne(56102),De=Object.defineProperty,ve=Object.defineProperties,We=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,In=Object.prototype.propertyIsEnumerable,En=(Fe,pn,Cn)=>pn in Fe?De(Fe,pn,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):Fe[pn]=Cn,ui=(Fe,pn)=>{for(var Cn in pn||(pn={}))an.call(pn,Cn)&&En(Fe,Cn,pn[Cn]);if(nn)for(var Cn of nn(pn))In.call(pn,Cn)&&En(Fe,Cn,pn[Cn]);return Fe},fi=(Fe,pn)=>ve(Fe,We(pn)),ue=(Fe,pn)=>{var Cn={};for(var Ut in Fe)an.call(Fe,Ut)&&pn.indexOf(Ut)<0&&(Cn[Ut]=Fe[Ut]);if(Fe!=null&&nn)for(var Ut of nn(Fe))pn.indexOf(Ut)<0&&In.call(Fe,Ut)&&(Cn[Ut]=Fe[Ut]);return Cn},Kt=(Fe,pn,Cn)=>new Promise((Ut,Lt)=>{var Bt=kt=>{try{jt(Cn.next(kt))}catch(Ce){Lt(Ce)}},Tt=kt=>{try{jt(Cn.throw(kt))}catch(Ce){Lt(Ce)}},jt=kt=>kt.done?Ut(kt.value):Promise.resolve(kt.value).then(Bt,Tt);jt((Cn=Cn.apply(Fe,pn)).next())});function dn(Fe){return/^\d+$/.test(Fe)?`${Fe}px`:Fe}function Ai(){}let qn=!1;const Ke={"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 yn(Fe=[]){let pn=Fe;if(Array.isArray(Fe)){for(let Cn=0;Cn<Fe.length;Cn++){let Ut=Ke[Fe[Cn]];if(Ut)return Ut}return pn[0]}return Ke[pn]||pn}let Sn=null;const si=()=>Kt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Fe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Fe)}});var Bn=Fe=>{var pn=Fe,{width:Cn="100%",height:Ut="100%",value:Lt,language:Bt="javascript",style:Tt={},options:jt={},overrideServices:kt={},theme:Ce="vs-dark",onEditBlur:on,isCopy:Gn=!1,onSave:Qn,autoHeight:_n=!1,forbidCopy:_e=!1,onChange:Zn=Ai,editorDidMount:Dn=Ai,onFocus:ai=Ai,onBreakPoint:vi=Ai,breakPointValue:Rn=[],filename:_i="educoder.txt",errorLine:ii,errorContent:ji="",highlightLine:Vi,openBreakPoint:Wr=!1,placeholder:pr="",showMiniMap:mr=!0}=pn,Sr=ue(pn,["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 $r=(0,bt.useRef)(),ar=(0,bt.useRef)({}),Yr=(0,bt.useRef)(),kr=(0,bt.useRef)(),no=(0,bt.useRef)([]),Oo=(0,bt.useRef)(!1),$o=(0,bt.useRef)(),ko=(0,bt.useRef)(),oo=(0,bt.useRef)(!1),[tr,Hr]=(0,bt.useState)(!1);function Pt(){let He;return $r.current&&(He=new xe.Z(Le=>{for(let kn of Le)(kn.target.offsetHeight>0||kn.target.offsetWidth>0)&&ar.current.instance.layout()}),He.observe($r.current)),He}function so(){Vt.ZP.warning({content:decodeURIComponent(et),key:"monaco-editor-tip"})}const zr=()=>{let He=ar.current.instance;if(Lt!=null&&He&&tr){const Le=He.getModel();Le&&Lt!==Le.getValue()&&(qn=!0,Le.setValue(Lt),He.layout(),qn=!1)}};(0,bt.useEffect)(()=>{const He=de.Z.subscribe("formatDocument",Le=>{var kn;let Bi=ar.current.instance;(kn=Bi==null?void 0:Bi.getAction)==null||kn.call(Bi,"editor.action.formatDocument").run()});return window.updateMonacoValue=Le=>{Zn(Le)},He},[]),(0,bt.useEffect)(()=>{var He;let Le=ar.current.instance;kr.current&&clearTimeout(kr.current),kr.current=setTimeout(()=>{zr()},500),Lt&&(Lt!=null&&Lt.length)&&((He=Le==null?void 0:Le.updateOptions)==null||He.call(Le,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Lt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Lt,tr,ar.current]),(0,bt.useEffect)(()=>{if(ii&&ar.current&&ar.current.instance){let Le=ar.current.instance;Le.changeViewZones(function(kn){var Bi=document.createElement("div");Bi.style.padding="10px 20px",Bi.style.width="calc(100% - 20px)",Bi.className="my-error-line-wrp",Bi.innerHTML=ji,kn.addZone({afterLineNumber:ii||11,heightInLines:3,domNode:Bi})});var He={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}};Le.addOverlayWidget(He),Le.revealPositionInCenter({lineNumber:20,column:1})}},[ii,ar.current,tr]);const ri=(He="",Le)=>{if(!He||He.trim()==="")return!0;const Bi=ar.current.instance.getModel().getLineTokens(Le);let sn=!1;for(let Yt=0;Yt<2;Yt++)Bi.getStandardTokenType(Yt)===1&&(sn=!0);return sn};(0,bt.useEffect)(()=>{var He;const Le=(He=ar.current)==null?void 0:He.instance;if(Le&&tr&&_e){const kn=Le.onDidBlurEditorWidget(()=>{oo.current=!1}),Bi=Le.onDidFocusEditorText(()=>{oo.current=!0});return()=>{kn.dispose(),Bi.dispose()}}},[ar.current,tr,_e]),(0,bt.useEffect)(()=>{var He;if((He=ar.current)!=null&&He.instance&&tr&&Wr){let Le=ar.current.instance,kn=Le.getModel();if(!kn)return;(()=>{var bn;let Ln=[],On=[];const Yi=kn.getAllDecorations();for(let hn of Yi)hn.options.className==="highlighted-line"&&(Ln.push((bn=hn==null?void 0:hn.range)==null?void 0:bn.startLineNumber),On.push(hn==null?void 0:hn.id));if(Vi===Ln[0])return;kn.deltaDecorations(On,[]);const ki=kn.getLineCount();Vi&&Vi<=ki&&(Le.deltaDecorations([],[{range:new Sn.Range(Vi,1,Vi,kn.getLineMaxColumn(Vi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Le.revealLineInCenter(Vi))})();const sn=(bn=!1)=>{var Ln;let On=[],Yi=[];const ki=kn.getAllDecorations();for(let hn of ki)hn.options.linesDecorationsClassName==="breakpoints-select"&&(On.push((Ln=hn==null?void 0:hn.range)==null?void 0:Ln.startLineNumber),Yi.push(hn==null?void 0:hn.id));if(bn)return{lines:On,ids:Yi};vi(On)},Yt=bn=>Kt(void 0,null,function*(){let Ln={range:new Sn.Range(bn,1,bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield kn.deltaDecorations([],[Ln]),sn()}),he=bn=>Kt(void 0,null,function*(){let Ln=[];const On=Le.getLineDecorations(bn);for(let Yi of On)Yi.options.linesDecorationsClassName==="breakpoints-select"&&Ln.push(Yi.id);yield kn.deltaDecorations(Ln,[]),sn()}),wn=bn=>{let Ln=Le.getLineDecorations(bn);for(let On of Ln)if(On.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ce.isEqual)(Rn,sn(!0).lines)){kn.deltaDecorations(sn(!0).ids,[]);const bn=Rn.map(Ln=>({range:new Sn.Range(Ln,1,Ln,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));kn.deltaDecorations([],bn)}const un=Le.onDidChangeModelContent(bn=>{let Ln=Le.getPosition();if(Ln){let On=Ln.lineNumber;clearTimeout(ko.current),ko.current=setTimeout(()=>{ri(kn.getLineContent(On),On)?he(On):wn(On)?(he(On),Yt(On)):sn()},100)}}),Ne=Le.onMouseDown(bn=>{var Ln,On,Yi;if(bn.target.detail&&((Yi=(On=(Ln=bn.target)==null?void 0:Ln.element)==null?void 0:On.className)!=null&&Yi.includes("line-numbers"))){let ki=bn.target.position.lineNumber;if(ri(kn.getLineContent(ki),ki))return;wn(ki)?he(ki):Yt(ki)}}),mn=bn=>{let Ln={range:new Sn.Range(bn,1,bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};no.current=Le.deltaDecorations(no.current,[Ln])},xi=()=>{no.current=Le.deltaDecorations(no.current,[])},Mi=Le.onMouseMove(bn=>{var Ln,On,Yi;if(xi(),bn.target.detail&&((Yi=(On=(Ln=bn.target)==null?void 0:Ln.element)==null?void 0:On.className)!=null&&Yi.includes("line-numbers"))){let ki=bn.target.position.lineNumber;if(ri(kn.getLineContent(ki),ki))return;mn(ki)}}),Gi=Le.onMouseLeave(()=>{xi()});return()=>{un.dispose(),Ne.dispose(),Mi.dispose(),Gi.dispose()}}},[ar.current,tr,Rn,Vi,Wr,Bt]),(0,bt.useEffect)(()=>{var He;(He=ar.current)!=null&&He.instance&&Wr&&ar.current.instance.setPosition({lineNumber:0,column:0})},[Vi]);function pi(){let He=ar.current.instance;if(He){const Le=He.getSelection(),kn=ar.current.pastePos||{},Bi=new Sn.Range(kn.startLineNumber||Le.endLineNumber,kn.startColumn||Le.endColumn,kn.endLineNumber||Le.endLineNumber,kn.endColumn||Le.endColumn);setTimeout(()=>{He.executeEdits("",[{range:Bi,text:""}])},300)}}function Ci(He){(window.navigator.platform.match("Mac")?He.metaKey:He.ctrlKey)&&He.keyCode==83&&(He.preventDefault(),Qn())}const Qi=()=>{if(_n&&ar.current.instance){const He=ar.current.instance.getContentHeight();hi(He<Ut?Ut:He)}else hi(Ut)};function Tr(He){var Le=document.createEvent("MouseEvents");Le.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),He.dispatchEvent(Le)}const Re=He=>{if(!oo.current)return;const{keyCode:Le,ctrlKey:kn,metaKey:Bi,target:sn,type:Yt}=He;return(Yt==="paste"||(Le===67||Le===86)&&(Bi||kn))&&sn.nodeName==="TEXTAREA"&&(so(),He.preventDefault()),!1};function Oe(He,Le){var kn=window.URL||window.webkitURL||window,Bi=new Blob([Le]),sn=document.createElementNS("http://www.w3.org/1999/xhtml","a");sn.href=kn.createObjectURL(Bi),sn.download=He,Tr(sn)}(0,bt.useEffect)(()=>{Qi()},[Qi]),(0,bt.useEffect)(()=>{$r.current&&!tr&&Promise.all([ne.e(8909),ne.e(6656)]).then(ne.bind(ne,71448)).then(He=>{try{Sn=He,ar.current.instance=Sn.editor.create($r.current,{value:Lt,language:yn(Bt),theme:Ce,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:mr||!1}},kt);const Le=ar.current.instance;let sn=[...Nt.BH._menuItems].find(un=>un[0]._debugName=="EditorContext")[1],Yt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],he=(un,Ne)=>{var mn,xi;let Mi=un._first;do Ne.includes((xi=(mn=Mi.element)==null?void 0:mn.command)==null?void 0:xi.id)&&un._remove(Mi);while(Mi=Mi.next)};if(Dn(Le,Sn),setTimeout(()=>{Qi(),ar.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Oe(_i||"educoder.txt",Le.getValue())}})},500),ar.current.subscription=Le.onDidChangeModelContent(un=>{Oo.current?clearTimeout($o.current):(Qi(),Zn(Le.getValue(),un)),$o.current=setTimeout(()=>{Oo.current=!1},500)}),window.Monaco||Dt(Sn,yn(Bt)),_e&&(he(sn,Yt),$r.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Re),window.removeEventListener("paste",Re),window.addEventListener("keydown",Re),window.addEventListener("paste",Re)),window.Monaco=Sn,on&&Le.onDidBlurEditorWidget(()=>{on(Le.getValue())}),ai&&Le.onDidFocusEditorText(()=>{_e&&si(),ai(Le.getValue())}),_e){si();try{Le.onDidPaste(un=>{const Ne=Le.getSelection(),mn=ar.current.pastePos||{},xi=new Sn.Range(mn.startLineNumber||Ne.endLineNumber,mn.startColumn||Ne.endColumn,mn.endLineNumber||Ne.endLineNumber,mn.endColumn||Ne.endColumn);Le.executeEdits("",[{range:un.range,text:""}])})}catch(un){}}let wn=Pt();return pr&&typeof pr=="string"&&new Et(pr,Le,Sn),Hr(!0),()=>{const un=ar.current.instance;un.dispose();const Ne=un.getModel();Ne&&Ne.dispose(),ar.current.subscription&&ar.current.subscription.dispose(),wn.unobserve($r.current)}}catch(Le){}})},[]),(0,bt.useEffect)(()=>{if(ar.current.instance&&tr)return document.addEventListener("keydown",Ci,!1),()=>{document.removeEventListener("keydown",Ci)}},[Qn,tr]),(0,bt.useEffect)(()=>{let He=ar.current.instance;if(He&&tr){let Le=yn(Bt);Sn.editor.setModelLanguage(He.getModel(),Le)}},[Bt,tr]),(0,bt.useEffect)(()=>{ar.current.instance&&tr&&Sn.editor.setTheme(Ce)},[Ce,tr]),(0,bt.useEffect)(()=>{let He=ar.current.instance;Yr.current=jt,He&&tr&&(He.updateOptions(ui({},jt)),setTimeout(()=>{He.getModel().updateOptions(ui({},jt))},200))},[JSON.stringify(jt),tr]),(0,bt.useEffect)(()=>{let He=ar.current.instance;He&&tr&&He.layout()},[Cn,Ut,tr]);const[Te,Ze]=(0,bt.useState)(dn(Cn)),[yi,hi]=(0,bt.useState)(dn(Ut)),Zi=fi(ui({},Tt),{width:Te,height:yi,position:"relative"});return bt.createElement("div",{className:"my-monaco-editor",ref:$r,style:Zi},Gn&&bt.createElement(Ae.CopyToClipboard,{text:Lt,onCopy:()=>Vt.ZP.success("\u590D\u5236\u6210\u529F")},bt.createElement(Jt.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 Se({width:Fe="100%",height:pn="100%",original:Cn,modified:Ut,language:Lt,options:Bt={}}){const Tt=(0,bt.useRef)(),[jt,kt]=(0,bt.useState)(null);function Ce(_n){let _e;return Tt.current&&(_e=new xe.Z(Zn=>{for(let Dn of Zn)(Dn.target.offsetHeight>0||Dn.target.offsetWidth>0)&&_n.layout()}),_e.observe(Tt.current)),_e}(0,bt.useEffect)(()=>(Tt.current&&Promise.all([ne.e(8909),ne.e(9404)]).then(ne.bind(ne,2550)).then(_n=>{Sn=_n;const _e=Sn.editor.createDiffEditor(Tt.current,fi(ui({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},Bt),{wordWrap:!0}));kt(_e);let Zn=Ce(_e);return()=>{_e.dispose();const Dn=_e.getModel();Dn&&Dn.dispose(),Zn.unobserve(Tt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,bt.useEffect)(()=>{jt&&jt.setModel({original:Sn.editor.createModel(Cn,Lt),modified:Sn.editor.createModel(Ut,Lt)})},[Cn,Ut,Lt,jt]);const on=dn(Fe),Gn=dn(pn),Qn={width:on,height:Gn};return bt.createElement("div",{className:"my-diff-editor",ref:Tt,style:Qn})}},10661:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return we}});var bt={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT"},xe=ne(29787),Me=ne(25399),je=ne(60242),ke=ne(92310),ye=ne.n(ke),pe=ne(51257),Ue=ne(28426),Pe=ne(48790),ie=ne(59301),we=({className:xn,dataSource:Dt=[],col:et=4,right:nt,bottom:ct=23,precision:lt=0,wrapWidth:gt=1200,trackEventItems:yt,loading:Et,onRemove:Nt=()=>{},isCurrent:Vt=!0,showProgress:Jt=!1,showAlias:ce=!1})=>{const de=Math.floor((gt-(et-1)*nt)/et),Ae=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return ie.createElement(xe.Z,{spinning:Et},ie.createElement("div",{className:ye()(bt.list,xn)},!!(Dt!=null&&Dt.length)&&(Dt==null?void 0:Dt.map((De,ve)=>{var We,nn,an,In,En,ui;const{name:fi,id:ue,identifier:Kt,featured:dn,school_name:Ai,image_url:qn,excellent:Ke,is_plan:yn}=De;return ie.createElement("div",{key:ue,className:Vt&&Jt?bt.wrapisCurrent:bt.wrap,style:{width:de,marginRight:(1+ve)%et===0?0:nt+lt,marginBottom:ct}},ie.createElement("a",{className:bt.li,onClick:Sn=>{Sn.preventDefault(),Sn.stopPropagation(),yt&&(0,pe.L9)([yt]),(0,pe.xg)(`/paths/${Kt}`)}},ie.createElement("div",{className:bt.img},ie.createElement("img",{className:bt.cover,src:`${qn}`}),Vt&&(0,Pe.bg)()&&(De==null?void 0:De.studying)&&ie.createElement("div",{className:`${bt.movebq} user-path-items`,onClick:Sn=>{Sn.stopPropagation(),Nt(De)}},ie.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),ie.createElement("span",{className:"c-red"},"\u79FB\u9664")),(We=De==null?void 0:De.subject_tags)==null?void 0:We.map((Sn,si)=>{var Bn,Se;if(si===0){const pn=(Bn=Ae.find(Cn=>Cn.name==Sn))==null?void 0:Bn.swimg;return ie.createElement("img",{className:bt.sign,src:pn,style:{left:"-4px"}})}const Fe=(Se=Ae.find(pn=>pn.name==Sn))==null?void 0:Se.ptimg;return ie.createElement("img",{className:bt.sign,src:Fe,style:{left:`${48+52*(si-1)+2*si}px`}})}),ie.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(De==null?void 0:De.excellent)&&ie.createElement("div",{className:bt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),ie.createElement("div",{className:bt.name},ie.createElement(Me.Z,{title:ce&&(De!=null&&De.excellent_alias_name)?ie.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${fi}`,ie.createElement("br",null),ie.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${De==null?void 0:De.excellent_alias_name}`)):fi},ie.createElement("span",{className:bt.e},ce&&(De==null?void 0:De.excellent_alias_name)||fi))),Vt&&Jt&&((nn=De==null?void 0:De.progress)==null?void 0:nn.all_score)!=0&&ie.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},ie.createElement(je.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((an=De==null?void 0:De.progress)==null?void 0:an.my_score)/((In=De==null?void 0:De.progress)==null?void 0:In.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(En=De==null?void 0:De.progress)==null?void 0:En.my_score,"/",(ui=De==null?void 0:De.progress)==null?void 0:ui.all_score),(!Vt||!Jt)&&ie.createElement(Me.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Ai}`},ie.createElement("div",{className:bt.unit},ie.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Ai)),(!Vt||!Jt)&&ie.createElement("div",{className:bt.tags},ie.createElement("div",null,ie.createElement(Me.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},ie.createElement("span",null,ie.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),ie.createElement("span",null,De.stages_count))),ie.createElement(Me.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ie.createElement("span",null,ie.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),ie.createElement("span",null,De.members_count)))))))})),!Dt.length&&ie.createElement(Ue.Z,null)))}},9148:function(Pn,gi,ne){"use strict";ne.d(gi,{jL:function(){return ke},w9:function(){return dn},QD:function(){return ii},cQ:function(){return En.Z},op:function(){return Zn},O5:function(){return zr},_b:function(){return Sr},t7:function(){return lt},Gi:function(){return si},YG:function(){return yn},qp:function(){return An},vr:function(){return Wr},qE:function(){return vi},Je:function(){return Et},wb:function(){return In},cq:function(){return Ut},tp:function(){return Dt}});var bt=ne(59301),xe={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},Me="data:image/png;base64,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",ke=({dataSource:ri=[],img:pi,imgWidth:Ci=346,title:Qi,sunTitle:Tr,bannerExtraContent:Re})=>bt.createElement("div",{className:xe.banner},bt.createElement("div",{className:xe.content},bt.createElement("aside",null,bt.createElement("p",null,bt.createElement("b",null,Qi),bt.createElement("span",null,Tr)),ri.length>0&&bt.createElement("div",{className:xe.btns},ri.map((Oe,Te)=>bt.createElement("div",{key:Te,onClick:Oe.click},Oe.name,Oe.sign?bt.createElement("img",{src:Me,width:39}):null))),Re),pi&&bt.createElement("img",{style:{marginTop:33,marginRight:38},src:pi,width:Ci}))),ye={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},pe=ne(92310),Ue=ne.n(pe),Pe=ne(89392),An=({dataSource:ri=[],value:pi,onChange:Ci,onTitleChange:Qi,className:Tr,title:Re,titleWidth:Oe=41,style:Te={},fontColor:Ze="#6A7283",showCount:yi})=>{const[hi,Zi]=(0,bt.useState)(0),[He,Le]=(0,bt.useState)(!1),kn=(0,bt.useRef)(null),Bi=(0,bt.useRef)(null);return(0,bt.useEffect)(()=>{var sn;ri.length!==0&&(((sn=kn==null?void 0:kn.current)==null?void 0:sn.clientHeight)>97?Zi(1):Zi(0)),ri.length===0&&Zi(0),Le(!1)},[ri]),bt.createElement("div",{className:Ue()(ye.row,Tr),style:Te},bt.createElement("div",{onClick:(0,Pe.throttle)(()=>Qi==null?void 0:Qi(),2e3),style:{width:Oe,marginTop:He?12:4},className:`${ye.title} ${Qi?"current":""}`},Re),bt.createElement("div",{className:He?`${ye.tagsWrap} ${ye.tagsBorderWrap}`:ye.tagsWrap},bt.createElement("div",{className:ye.bar,ref:Bi,style:hi>0?{height:hi===1?97:"auto",overflow:hi===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},bt.createElement("div",{className:ye.tag,ref:kn},ri==null?void 0:ri.map(sn=>bt.createElement("span",{onClick:()=>Ci(sn.id),key:sn.id,style:{color:Ze},className:pi===sn.id?ye.active:""},bt.createElement("span",{title:sn.name,className:ye.name},sn.name),!!yi&&bt.createElement("span",{className:ye.num},sn.count))))),!!hi&&bt.createElement(bt.Fragment,null,hi===1?bt.createElement("div",{onClick:()=>{var sn;Zi(2),((sn=kn==null?void 0:kn.current)==null?void 0:sn.clientHeight)>245?Le(!0):Le(!1)},className:ye.action},"\u5C55\u5F00",bt.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):bt.createElement("div",{onClick:()=>{Bi.current.scrollTop=0,Zi(1),Le(!1)},className:ye.action},"\u6536\u8D77",bt.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},we={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Dt=({dataSource:ri=[],value:pi,onChange:Ci,className:Qi,style:Tr={}})=>bt.createElement("div",{style:Tr,className:Ue()(we.tabs,Qi)},ri.map(Re=>bt.createElement("span",{onClick:()=>Ci(Re.id),className:pi===Re.id?we.active:"",key:Re.id},Re.name))),et={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},nt=ne(37568),lt=({dataSource:ri=[],value:pi="",onChange:Ci,onInputChange:Qi=()=>{},className:Tr,style:Re={},placeholder:Oe,allowClear:Te=!1})=>{var Ze;const[yi,hi]=(0,bt.useState)(""),[Zi,He]=(0,bt.useState)("");(0,bt.useEffect)(()=>{var Bi;let sn=pi;(Bi=JSON.stringify(pi))!=null&&Bi.includes("{")&&(hi(pi.id),sn=pi.value||"");try{He(decodeURIComponent(sn||""))}catch(Yt){He(decodeURIComponent(sn||""))}},[pi]);const Le=()=>{Ci(encodeURIComponent(Zi),yi||null)},kn=Bi=>{Bi!==yi&&(hi(Bi),Ci(encodeURIComponent(Zi),Bi))};return bt.createElement("div",{className:Ue()(et.input,Tr),style:Re},!!ri.length&&bt.createElement("div",{className:et.dropdown},bt.createElement("div",{className:et.text},(Ze=ri.find(Bi=>Bi.id===yi))==null?void 0:Ze.name,bt.createElement("i",{className:"iconfont icon-zhankai4"}),bt.createElement("b",{className:et.b1}),bt.createElement("b",{className:et.b2})),bt.createElement("div",{className:et.menu},ri.map((Bi,sn)=>bt.createElement("div",{key:sn,onClick:()=>kn(Bi.id)},Bi.name)))),bt.createElement(nt.default,{onPressEnter:Le,value:Zi,onChange:Bi=>{He(Bi.target.value),Qi(encodeURIComponent(Bi.target.value),yi||null)},bordered:!1,placeholder:Oe}),bt.createElement("i",{onClick:Le,className:"iconfont icon-sousuo9 font14 pl10 current"}))},gt={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},Et=({value:ri,onChange:pi,className:Ci,total:Qi,pageSize:Tr,style:Re={}})=>{const Oe=ri<2,Te=ri>=Math.ceil(Qi/Tr);return Qi<=Tr?bt.createElement(bt.Fragment,null):bt.createElement("div",{className:Ue()(gt.quickPager,Ci),style:Re},bt.createElement("div",{onClick:()=>{Oe||pi(ri-1,"prev")},className:Oe?gt.disabled:""},"\u4E0A\u4E00\u9875"),bt.createElement("div",{onClick:()=>{Te||pi(ri+1,"next")},className:Te?gt.disabled:""},"\u4E0B\u4E00\u9875"))},Nt={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Vt=ne(29787),Jt=ne(25399),ce=ne(58018),de=ne(346),Ae=ne(51257),De=ne(96908),ve=ne(57177),We=ne(81378),nn=ne(28426),In=({className:ri,dataSource:pi=[],col:Ci=4,right:Qi,bottom:Tr=23,precision:Re=0,wrapWidth:Oe=1200,trackEventItems:Te,loading:Ze})=>{const yi=Math.floor((Oe-(Ci-1)*Qi)/Ci);return bt.createElement(Vt.Z,{spinning:Ze},bt.createElement("div",{className:Ue()(Nt.list,ri)},!!pi.length&&pi.map((hi,Zi)=>{const{name:He,id:Le,identifier:kn,power:Bi,cover_image_id:sn,pic:Yt}=hi;return bt.createElement("div",{className:Nt.wrap,key:Le,style:{width:yi,marginRight:(1+Zi)%Ci===0?0:Qi+Re,marginBottom:Tr}},bt.createElement("a",{target:"_blank",href:`/shixuns/${kn}/challenges`,className:Nt.li,onClick:he=>{he.preventDefault(),Te&&(0,Ae.L9)([Te]),Bi&&(0,Ae.xg)(`/shixuns/${kn}/challenges`)}},bt.createElement("div",{className:Nt.img},bt.createElement("img",{className:Nt.cover,src:`${Yt}`}),hi.is_jupyter&&bt.createElement("img",{className:Nt.sign,src:De}),hi.is_jupyter_lab&&bt.createElement("img",{className:Nt.sign,src:ve}),hi.is_unity_3d&&bt.createElement("img",{className:Nt.sign,src:We})),bt.createElement("div",{className:Nt.name},bt.createElement(Jt.Z,{title:He||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},bt.createElement("span",{className:Nt.e},He||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),bt.createElement("div",{className:Nt.tags},bt.createElement(Jt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),bt.createElement("span",null,hi.challenges_count))),!!hi.myshixuns_count&&bt.createElement(Jt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},bt.createElement("span",null,bt.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),bt.createElement("span",null,hi.myshixuns_count))),bt.createElement(Jt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},bt.createElement("span",null,bt.createElement("span",null,hi.level))),bt.createElement("div",{className:Nt.rate},bt.createElement(ce.Z,{allowHalf:!0,disabled:!0,defaultValue:hi.score_info}),bt.createElement("span",null,"\xA0",hi.score_info?`${hi.score_info}\u5206`:"5\u5206")))),!Bi&&bt.createElement("div",{className:Nt.lockWrap},bt.createElement("img",{src:`${de.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),bt.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!pi.length&&bt.createElement(nn.Z,null)))},En=ne(10661),ui={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},fi="data:image/png;base64,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",ue=ne(59301),dn=({className:ri,dataSource:pi=[],col:Ci=4,right:Qi,bottom:Tr=23,precision:Re=0,wrapWidth:Oe=1200,trackEventItems:Te,loading:Ze,handleVery:yi=()=>!0})=>{const hi=Math.floor((Oe-(Ci-1)*Qi)/Ci);return ue.createElement(Vt.Z,{spinning:Ze},ue.createElement("div",{className:Ue()(ui.list,ri)},!!pi.length&&pi.map((Zi,He)=>{const{subject_identifier:Le,id:kn,identifier:Bi,power:sn}=Zi,Yt=Zi.is_public!=0&&Zi.is_public;return ue.createElement("div",{className:ui.wrap,key:kn,style:{width:hi,marginRight:(1+He)%Ci===0?0:Qi+Re,marginBottom:Tr}},ue.createElement("a",{className:ui.li,onClick:he=>{he.preventDefault(),yi(Zi==null?void 0:Zi.first_category_url)&&(Te&&(0,Ae.L9)([Te]),(0,Ae.xg)(Zi.first_category_url))}},ue.createElement("div",{className:ui.top},ue.createElement(Jt.Z,{title:Zi.name},ue.createElement("div",{className:ui.name},Zi.name)),ue.createElement("img",{className:ui.img,src:de.Z.IMG_SERVER+"/images/"+Zi.avatar_url}),ue.createElement("div",{className:ui.text,title:Zi.creator},Zi.creator),Le&&ue.createElement("div",{className:ui.btns},ue.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),ue.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Yt&&ue.createElement("div",{className:ui.sign},"\u516C\u5F00")),ue.createElement("div",{className:ui.bottom},Zi.visits>0&&ue.createElement(Jt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},ue.createElement("span",null,ue.createElement("i",{className:"iconfont icon-liulanyan"}),ue.createElement("span",null,Zi.visits))),Zi.course_members_count>0&&ue.createElement(Jt.Z,{title:"\u6210\u5458",placement:"bottom"},ue.createElement("span",null,ue.createElement("i",{className:"iconfont icon-chengyuan"}),Zi.course_members_count)),Zi.tasks_count>0&&ue.createElement(Jt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},ue.createElement("span",null,ue.createElement("i",{className:"iconfont icon-zuoye"}),Zi.tasks_count)),Zi.is_end?ue.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):ue.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Zi.is_accessible&&ue.createElement("div",{className:ui.lockWrap},ue.createElement("img",{src:`${de.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ue.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!pi.length&&ue.createElement(nn.Z,null)))},Ai={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},qn=ne(25690),yn=({dataSource:ri=[],value:pi,onChange:Ci,className:Qi,style:Tr={},tabBarExtraContent:Re})=>bt.createElement("div",{className:Ue()(Ai.tabs,Qi),style:Tr},bt.createElement("div",{className:Ai.tabsWrap},ri.map((Oe,Te)=>!(Oe!=null&&Oe.hide)&&bt.createElement("aside",{className:Ai.tab,onClick:()=>{Ci(Oe.id),Oe.link&&qn.history.push(Oe.link)},key:Te},bt.createElement("div",{className:pi===Oe.id?Ai.active:""},Oe.name),(Oe==null?void 0:Oe.resetCount)==null&&(Oe==null?void 0:Oe.total)!==void 0&&bt.createElement("span",null,"\uFF08",Oe==null?void 0:Oe.total,"\uFF09"),(Oe==null?void 0:Oe.resetCount)!==void 0&&(Oe==null?void 0:Oe.total)!==void 0&&bt.createElement(Jt.Z,{title:(Oe==null?void 0:Oe.tip)!=null?Oe==null?void 0:Oe.tip:""},bt.createElement("span",{style:{color:"#9096A3"}},"\uFF08",bt.createElement("span",{style:{color:"#000"}},Oe==null?void 0:Oe.resetCount),"/",bt.createElement("span",null,Oe==null?void 0:Oe.total),"\uFF09"))))),bt.createElement("div",{className:Ai.tabBar},Re)),si=({className:ri,style:pi={},children:Ci})=>bt.createElement("div",{className:Ue()(ri),style:pi},Ci),Bn={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Se=ne(75727),Fe=ne(93041);const pn=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Ut=({sortValue:ri,dropValue:pi,className:Ci,onSort:Qi,onDrop:Tr,dataSource:Re=pn})=>{var Oe;return bt.createElement("div",{className:Ue()(Bn.orderWrap,Ci)},bt.createElement(Se.Z,{dropdownRender:()=>bt.createElement(Fe.default,null,Re.map((Te,Ze)=>bt.createElement(Fe.default.Item,{key:Ze,onClick:()=>Tr(Te.id)},Te.name)))},bt.createElement("span",{className:Bn.orderTextWrap},(Oe=Re.find(Te=>pi===Te.id))==null?void 0:Oe.name)),bt.createElement("span",{className:Bn.orderIconWrap},bt.createElement("span",{className:Bn.orderAsc},bt.createElement("i",{className:ri==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Bn.cursorPointer} ${Bn.active}`:`iconfont icon-sanjiaoxing-up font12 ${Bn.cursorPointer}`,onClick:()=>Qi(ri==="asc"?"desc":"asc")})),bt.createElement("span",{className:Bn.orderDesc},bt.createElement("i",{className:ri==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Bn.cursorPointer} ${Bn.active}`:`iconfont icon-sanjiaoxing-down font12 ${Bn.cursorPointer}`,onClick:()=>Qi(ri==="asc"?"desc":"asc")}))))},Lt={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Bt=ne(99571),Tt=Object.defineProperty,jt=Object.getOwnPropertySymbols,kt=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,on=(ri,pi,Ci)=>pi in ri?Tt(ri,pi,{enumerable:!0,configurable:!0,writable:!0,value:Ci}):ri[pi]=Ci,Gn=(ri,pi)=>{for(var Ci in pi||(pi={}))kt.call(pi,Ci)&&on(ri,Ci,pi[Ci]);if(jt)for(var Ci of jt(pi))Ce.call(pi,Ci)&&on(ri,Ci,pi[Ci]);return ri},Qn=(ri,pi)=>{var Ci={};for(var Qi in ri)kt.call(ri,Qi)&&pi.indexOf(Qi)<0&&(Ci[Qi]=ri[Qi]);if(ri!=null&&jt)for(var Qi of jt(ri))pi.indexOf(Qi)<0&&Ce.call(ri,Qi)&&(Ci[Qi]=ri[Qi]);return Ci},_n=(ri,pi,Ci)=>new Promise((Qi,Tr)=>{var Re=Ze=>{try{Te(Ci.next(Ze))}catch(yi){Tr(yi)}},Oe=Ze=>{try{Te(Ci.throw(Ze))}catch(yi){Tr(yi)}},Te=Ze=>Ze.done?Qi(Ze.value):Promise.resolve(Ze.value).then(Re,Oe);Te((Ci=Ci.apply(ri,pi)).next())}),Zn=ri=>{var pi=ri,{className:Ci,style:Qi,children:Tr,loading:Re=!1,openLoading:Oe,onClick:Te=()=>{},size:Ze="middle",shape:yi="round"}=pi,hi=Qn(pi,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Zi,He]=(0,bt.useState)(!1);return bt.createElement(Bt.ZP,Gn({onClick:(0,Pe.throttle)(Le=>_n(void 0,null,function*(){Oe&&He(!0);try{yield Te(Le)}catch(kn){console.log("error",kn)}Oe&&He(!1)}),2e3,{leading:!0,trailing:!1}),className:Ue()(Lt.btn,Lt[`${Ze}-${yi}`],Ci),style:Qi,size:Ze,shape:yi,loading:Zi||Re},hi),Tr)},Dn={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},vi=({className:ri,style:pi,children:Ci=null,onClick:Qi,title:Tr})=>bt.createElement("div",{className:Ue()(Dn.head,ri),style:pi},bt.createElement("span",{className:"primary-hover",onClick:Qi},bt.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),bt.createElement("b",{title:Tr},Tr),bt.createElement("div",{className:Dn.node},Ci)),Rn={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},ii=({confirmShow:ri=!0,confirmTitle:pi,confirmClick:Ci,cancelShow:Qi=!0,cancelTitle:Tr,cancelClick:Re,className:Oe,style:Te,confirmLoading:Ze=!1})=>bt.createElement("div",{className:Ue()(Rn.btns,Oe),style:Te},ri&&bt.createElement(Bt.ZP,{loading:Ze,onClick:Ci,type:"primary",className:Rn.confirm},pi),Qi&&bt.createElement(Bt.ZP,{onClick:Re,className:Rn.cancel},Tr)),ji={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},Wr=({className:ri,style:pi={},LeftContent:Ci,children:Qi,RightContent:Tr})=>bt.createElement("div",{className:Ue()(ji.fixedBottom,ri),style:pi},bt.createElement("div",{className:ji.wrap},bt.createElement("div",{className:ji.left},Ci),bt.createElement("div",{className:ji.center},Qi),bt.createElement("div",{className:ji.right},Tr))),pr={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Sr=({className:ri,style:pi={},dataSource:Ci=[]})=>bt.createElement("div",{className:Ue()(pr.crumbs,ri),style:pi},Ci.map((Qi,Tr)=>Tr<Ci.length-1?bt.createElement(bt.Fragment,{key:Tr},Qi.path||Qi.onClick?bt.createElement("span",{className:pr.hover,onClick:Qi!=null&&Qi.onClick?Qi.onClick:()=>qn.history.push(Qi.path)},Qi.name):bt.createElement("span",null,Qi.name),bt.createElement("span",null,"\xA0",">","\xA0")):bt.createElement("span",{key:Tr,style:{color:"#5F6368"}},Qi.name))),$r=ne(11938),ar=Object.defineProperty,Yr=Object.defineProperties,kr=Object.getOwnPropertyDescriptors,no=Object.getOwnPropertySymbols,Oo=Object.prototype.hasOwnProperty,$o=Object.prototype.propertyIsEnumerable,ko=(ri,pi,Ci)=>pi in ri?ar(ri,pi,{enumerable:!0,configurable:!0,writable:!0,value:Ci}):ri[pi]=Ci,oo=(ri,pi)=>{for(var Ci in pi||(pi={}))Oo.call(pi,Ci)&&ko(ri,Ci,pi[Ci]);if(no)for(var Ci of no(pi))$o.call(pi,Ci)&&ko(ri,Ci,pi[Ci]);return ri},tr=(ri,pi)=>Yr(ri,kr(pi)),Hr=(ri,pi)=>{var Ci={};for(var Qi in ri)Oo.call(ri,Qi)&&pi.indexOf(Qi)<0&&(Ci[Qi]=ri[Qi]);if(ri!=null&&no)for(var Qi of no(ri))pi.indexOf(Qi)<0&&$o.call(ri,Qi)&&(Ci[Qi]=ri[Qi]);return Ci};const{Countdown:Pt}=$r.default;var zr=ri=>{var pi=ri,{onChange:Ci}=pi,Qi=Hr(pi,["onChange"]);const[Tr,Re]=(0,bt.useState)(null);(0,bt.useEffect)(()=>{typeof Tr=="number"&&Tr>=0&&Ci(Tr)},[Tr]);const Oe=Te=>{const Ze=Math.floor(Te/1e3);Re(Ze)};return bt.createElement(Pt,tr(oo({},Qi),{onChange:Oe}))}},37808:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return xe}});var bt=ne(59301);function xe(Me,je){const ke=(0,bt.useRef)();(0,bt.useEffect)(()=>{ke.current=Me}),(0,bt.useEffect)(()=>{function ye(){ke.current()}if(je!==null){let pe=setInterval(ye,je);return()=>clearInterval(pe)}},[je])}},73752:function(Pn,gi,ne){"use strict";ne.r(gi),ne.d(gi,{default:function(){return Se}});var bt=ne(59301),xe=ne(6767),Me=ne(62957),je=ne(29787),ke=ne(37639),ye=ne(47889),pe=ne(77736),Ue={flex_box_center:"flex_box_center___Ja97S",flex_space_between:"flex_space_between___RJu4E",flex_box_vertical_center:"flex_box_vertical_center___jhPTF",flex_box_center_end:"flex_box_center_end___ZtezU",flex_box_column:"flex_box_column___MqeI4",wrap:"wrap___k3OOZ",head:"head___h6t3O",empty:"empty___S6QaM",content:"content___sMZPl",left:"left___J41Si",title:"title___GUZvZ",add:"add___zhwIv",leftBar:"leftBar___u_UUF",li:"li___Hnrra",active:"active___N4MxL",right:"right___eLWWO",rightBar:"rightBar___fMTLo",center:"center____NDzP",tabs:"tabs___jdS5u",cut:"cut___w1Pz_",action:"action___QkQ0f",tagBtn:"tagBtn___g2gHo",actActive:"actActive___ESHzD",answers:"answers___dVktP",btn:"btn___BnDvU",disableBtn:"disableBtn___WYJSQ",open_md:"open_md___Qcc2e",tip_container:"tip_container___cApBC",container_text:"container_text___riFvY",btn_send:"btn_send___jN38z",hide:"hide___wZuLt","md-container":"md-container___Am7nQ",unsolved:"unsolved___z4SON",box:"box____EpoE",hot:"hot___oUwVX",animation:"animation___YQjk7",stop:"stop___R1QBJ",disabledElement:"disabledElement___jKwzo",text:"text___Si2da",md_editor:"md_editor___vGEmh"},Pe=ne(38986),ie=ne(25690),An=ne(51257),we=ne(346),xn=ne(3878),Dt=ne(61186),et=ne.n(Dt),nt="data:image/png;base64,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",ct=ne(39793),lt=ne(76902),gt=ne(56102),yt=ne(44164),Et=ne.n(yt),Nt=(Fe,pn,Cn)=>new Promise((Ut,Lt)=>{var Bt=kt=>{try{jt(Cn.next(kt))}catch(Ce){Lt(Ce)}},Tt=kt=>{try{jt(Cn.throw(kt))}catch(Ce){Lt(Ce)}},jt=kt=>kt.done?Ut(kt.value):Promise.resolve(kt.value).then(Bt,Tt);jt((Cn=Cn.apply(Fe,pn)).next())});const Vt=Fe=>{const pn=/```[a-z]*\n([\s\S]*?)```/g;return Fe.replace(pn,(Cn,Ut)=>`<code>${Ut.trim()}</code>`)},Jt=(Fe,pn,Cn)=>{const Ut={markdown:"text/markdown",html:"text/html"},Lt=new Blob([Fe],{type:Ut[Cn]}),Bt=URL.createObjectURL(Lt),Tt=document.createElement("a");Tt.href=Bt,Tt.download=pn,Tt.click(),URL.revokeObjectURL(Bt)},ce=Fe=>et()(Fe).format("YYYY-MM-DD HH:mm:ss"),de=(Fe,pn,Cn)=>Fe.map((Ut,Lt)=>`
|
|
${Lt!==0?`
|
|
<div class="message">
|
|
<p class="user-name">${pn}<span class="timestamp">${ce(Ut.updated_at)}</span></p>
|
|
<pre class="code">${Vt(Ut.question)}</pre>
|
|
</div>`:""}
|
|
<div class="message">
|
|
<p class="user-name">${Cn}<span class="timestamp">${ce(Ut.updated_at)}</span></p>
|
|
<pre class="code">${Vt(Ut.answer)}</pre>
|
|
</div>
|
|
`).join(""),Ae=(Fe,pn,Cn)=>Fe.map((Ut,Lt)=>`${Lt!==0?`${pn}
|
|
${ce(Ut.updated_at)}
|
|
${Ut.question}
|
|
|
|
`:""}${Cn}
|
|
${ce(Ut.updated_at)}
|
|
${Ut.answer}
|
|
|
|
`).join(""),De=(Fe,pn)=>Nt(void 0,null,function*(){const Cn=de(Fe.data,Fe.my_user_name,Fe.user_name),Ut=Ae(Fe.data,Fe.my_user_name,Fe.user_name),Lt=`export-id-${String(Math.random()).slice(-6)}`,Bt=`
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<style>
|
|
.wrap {
|
|
font-family: Arial, sans-serif;
|
|
line-height: 1.6;
|
|
color: #333;
|
|
padding: 20px 20px 0 20px;
|
|
background-color: #f9f9f9;
|
|
position:fixed;
|
|
left: 0;
|
|
top: 0;
|
|
z-index: 100;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
overflow: auto;
|
|
box-sizing: border-box;
|
|
}
|
|
.message {
|
|
margin-bottom: 20px;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
background-color: #fff;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
.user-name {
|
|
font-weight: bold;
|
|
color: #333;
|
|
margin: 0;
|
|
}
|
|
.timestamp {
|
|
display: block;
|
|
font-size: 0.8em;
|
|
color: #666;
|
|
margin-top: 5px;
|
|
}
|
|
pre.code {
|
|
background-color: #f5f5f5;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
overflow-x: auto;
|
|
white-space: pre-wrap;
|
|
word-wrap: break-word;
|
|
margin: 10px 0 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class='wrap' id=${Lt}>
|
|
${Cn}
|
|
</div>
|
|
</body>
|
|
</html>
|
|
`;if(pn.key==="html")Jt(Bt,`\u4E0E${Fe.user_name}\u5BF9\u8BDD\u5185\u5BB9.html`,"html");else if(pn.key==="markdown")Jt(Ut,`\u4E0E${Fe.user_name}\u5BF9\u8BDD\u5185\u5BB9.md`,"markdown");else if(pn.key==="pdf"){const Tt=Me.default.info({icon:null,width:460,title:"\u63D0\u793A",content:"\u6B63\u5728\u5BFC\u51FAPDF\u4E2D...",maskClosable:!1,keyboard:!1,okButtonProps:{style:{display:"none"}}}),jt=document.createElement("div");jt.innerHTML=Bt.replaceAll("box-shadow","// box-shadow"),document.body.appendChild(jt);const kt=document.getElementById(Lt);if(!kt){console.error("PDF \u5143\u7D20\u672A\u627E\u5230");return}kt.style.width="auto",kt.style.height="auto",kt.style.position="initial";const Ce={html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1},jsPDF:{unit:"in",format:"letter",orientation:"portrait"},pagebreak:{mode:["avoid-all"]}};Et()().set(Ce).from(kt).toPdf().get("pdf").save(`\u4E0E${Fe.user_name}\u5BF9\u8BDD\u5185\u5BB9.pdf`).finally(()=>{Tt.destroy(),document.body.removeChild(jt)})}});var ve={cursor:"cursor___XqlqI"},nn=({text:Fe,open:pn=!1,onTextChange:Cn})=>{const[Ut,Lt]=(0,bt.useState)(""),[Bt,Tt]=(0,bt.useState)(0),[jt,kt]=(0,bt.useState)(!0);return(0,bt.useEffect)(()=>{if(pn)if(Bt<Fe.length){kt(!1);const Ce=setTimeout(()=>{Lt(on=>on+Fe[Bt]),Tt(Bt+1),Cn()},50);return()=>clearTimeout(Ce)}else kt(!0),Cn();else Lt(Fe),Tt(0),kt(!0)},[Bt,Fe,pn]),bt.createElement(lt.Z,{value:Ut+(jt?"":`<span class='${ve.cursor}'></span>`)})},an={menuWrap:"menuWrap___GDodS",menuMask:"menuMask___dldKr",menu:"menu___OrkS3",itemTwo:"itemTwo___gOXTT",item:"item___XhZWJ",itemDisabled:"itemDisabled___pRoiI",menuWrapRight:"menuWrapRight___Tgo4N"},In=ne(9148),En=ne(92310),ui=ne.n(En),ue=({disabled:Fe=!1,recoverDisabled:pn=!1,onFileType:Cn,onRecover:Ut,onEmpty:Lt})=>{const[Bt,Tt]=(0,bt.useState)(!1),[jt,kt]=(0,bt.useState)(!1),Ce=(0,bt.useRef)(null),on=[{key:"html",label:"\u5BFC\u51FA\u6210HTML"},{key:"markdown",label:"\u5BFC\u51FA\u6210Markdown"},{key:"pdf",label:"\u5BFC\u51FA\u6210PDF"}],Gn=()=>{if(!Fe){if(Ce.current){const Qn=Ce.current.getBoundingClientRect(),_n=window.innerWidth-Qn.right;kt(_n>300)}Tt(!0)}};return console.log(jt),bt.createElement("div",{ref:Ce,className:ui()(an.menuWrap,jt&&an.menuWrapRight),onMouseEnter:Gn,onMouseLeave:()=>Tt(!1)},bt.createElement(In.op,{disabled:Fe},bt.createElement("i",{className:"iconfont icon-gengduo6 font12 mr5"}),"\u66F4\u591A\u64CD\u4F5C"),bt.createElement("div",{className:an.menuMask,style:{display:Bt?"block":"none"}},bt.createElement("div",{className:an.menu},bt.createElement("div",{className:an.itemOne},bt.createElement("div",{className:an.item,style:{cursor:"auto"}},bt.createElement("span",null,"\u5BFC\u51FA\u5BF9\u8BDD"),bt.createElement("div",{className:an.itemTwo},on.map(Qn=>bt.createElement("div",{key:Qn.key,onClick:()=>{Tt(!1),Cn(Qn)},className:an.item},Qn.label)))),pn?bt.createElement("div",{className:an.itemDisabled},"\u6062\u590D\u5BF9\u8BDD"):bt.createElement("div",{onClick:Qn=>{Tt(!1),Ut(Qn)},className:an.item},"\u6062\u590D\u5BF9\u8BDD"),bt.createElement("div",{onClick:Qn=>{Tt(!1),Lt(Qn)},className:an.item},"\u6E05\u7A7A\u5BF9\u8BDD")))))},Kt=ne(59301),dn=Object.defineProperty,Ai=Object.getOwnPropertySymbols,qn=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable,yn=(Fe,pn,Cn)=>pn in Fe?dn(Fe,pn,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):Fe[pn]=Cn,Sn=(Fe,pn)=>{for(var Cn in pn||(pn={}))qn.call(pn,Cn)&&yn(Fe,Cn,pn[Cn]);if(Ai)for(var Cn of Ai(pn))Ke.call(pn,Cn)&&yn(Fe,Cn,pn[Cn]);return Fe},si=(Fe,pn,Cn)=>new Promise((Ut,Lt)=>{var Bt=kt=>{try{jt(Cn.next(kt))}catch(Ce){Lt(Ce)}},Tt=kt=>{try{jt(Cn.throw(kt))}catch(Ce){Lt(Ce)}},jt=kt=>kt.done?Ut(kt.value):Promise.resolve(kt.value).then(Bt,Tt);jt((Cn=Cn.apply(Fe,pn)).next())}),Se=({})=>{var Fe,pn,Cn,Ut;const{id:Lt,position:Bt}=(0,An.oP)(),[Tt,jt]=(0,bt.useState)(!0),[kt,Ce]=(0,bt.useState)(!1),on=(0,bt.useRef)("bottomRight"),Gn=(0,bt.useRef)();let[Qn,_n]=(0,bt.useState)({});const[_e,Zn]=(0,bt.useState)(Number(Lt)),[Dn,ai]=(0,bt.useState)([]),[vi,Rn]=(0,bt.useState)(1),[_i,ii]=(0,bt.useState)(Number(Bt)),ji=(0,bt.useRef)(Number(Bt)),[Vi,Wr]=(0,bt.useState)([]),[pr,mr]=(0,bt.useState)(!1),[Sr,$r]=(0,bt.useState)(!0),ar=(0,bt.useRef)(null),Yr=(0,bt.useRef)(1),[kr,no]=(0,bt.useState)({});let[Oo,$o]=(0,bt.useState)("");const[ko,oo]=(0,bt.useState)(!1),[tr,Hr]=(0,bt.useState)(!1),[Pt]=(0,ie.useSearchParams)();(0,bt.useEffect)(()=>((0,ie.getDvaApp)()._store.dispatch({type:"globalSetting/footerToggle",payload:!1}),()=>{(0,ie.getDvaApp)()._store.dispatch({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,bt.useEffect)(()=>{so()},[]),(0,bt.useEffect)(()=>{ar.current.scrollTop=ar.current.scrollHeight},[vi]),(0,bt.useEffect)(()=>{const Le=document.getElementById("wechat_QR_code_ids");return Le.classList.add("hide"),()=>{Le.classList.remove("hide")}},[]);const so=()=>si(void 0,null,function*(){var Le,kn;const Bi=yield(0,Pe.ZP)("/api/chats.json",{method:"post",body:{to_user_id:Lt}});if((Bi==null?void 0:Bi.status)===0){const sn=yield(0,Pe.ZP)("/api/chats.json",{method:"get",params:{to_user_id:Lt,challenge_id:Number(Bt)||""}});if(sn!=null&&sn.data){$r(!1),ai((sn==null?void 0:sn.data)||[]);const Yt=(kn=(Le=sn==null?void 0:sn.data)==null?void 0:Le.find(he=>he.to_user_id===Number(Lt)))==null?void 0:kn.id;Zn(Yt),zr(Yt),pi(Yt,Bt)}}}),zr=Le=>si(void 0,null,function*(){const kn=yield(0,Pe.ZP)("/api/chats/challenge_list.json",{method:"get",params:{id:Le,challenge_id:_i||""}});kn!=null&&kn.challenges&&Wr([{id:0,subject:"\u5168\u90E8"},...kn.challenges])}),ri=(Le,kn)=>si(void 0,null,function*(){const Bi=yield(0,Pe.ZP)("/api/chats.json",{method:"get",params:{to_user_id:Le,challenge_id:kn||""}});Bi!=null&&Bi.data&&ai((Bi==null?void 0:Bi.data)||[]),$r(!1)}),pi=(Le,kn,Bi)=>si(void 0,null,function*(){var sn;jt(!0);const Yt=yield(0,Pe.ZP)(`/api/chats/${Le}.json`,{method:"get",params:{challenge_id:Number(kn)||""}});if(Yt!=null&&Yt.data){Bi&&(Yt.data[Yt.data.length-1].open=!0),no(Sn({},Yt)||{}),mr(!0),Ce(!1);const he=(sn=Dn==null?void 0:Dn.find(wn=>wn.id===Le))==null?void 0:sn.to_user_id;window.location.host==="gpt.educoder.net"?Pt.get("homeworkId")?ie.history.replace(`/chatgpt?id=0&position=0&homeworkId=${Pt.get("homeworkId")}`):ie.history.replace("/chatgpt?id=0&position=0"):Pt.get("homeworkId")?ie.history.replace(`/chatgpt?id=${he||Lt}&position=${kn}&homeworkId=${Pt.get("homeworkId")}`):ie.history.replace(`/chatgpt?id=${he||Lt}&position=${kn}`),Bi&&(Rn(Math.random()),ri(he,kn))}jt(!1)}),Ci=Le=>{var kn;$o(Le),(kn=Le==null?void 0:Le.trim())==null||kn.length},Qi=Le=>{Yr.current=Yr.current+1,Zn(Le),ii(0),$o(""),Ce(!1),pi(Le,0),zr(Le)},Tr=()=>si(void 0,null,function*(){var Le;if(Oo.trim().length===0){xe.ZP.error("\u4E0D\u80FD\u8F93\u5165\u7EAF\u7A7A\u683C");return}if(!Oo){xe.ZP.warning("\u8BF7\u8F93\u5165\u4F60\u8981\u95EE\u7684\u95EE\u9898");return}Ce(!0);const kn=et()().format("YYYY-MM-DDTHH:mm:ss.SSSZ"),Bi=Sn({},kr);(Le=Bi==null?void 0:Bi.data)==null||Le.push({id:0,updated_at:kn,question:Oo,answer:Kt.createElement("div",{className:Ue.animation},"\u8001\u5E08\u6B63\u5728\u56DE\u7B54\u4E2D\uFF0C\u8BF7\u7A0D\u540E")}),no(Bi),Rn(vi+1),$o(""),Yr.current=Yr.current+1;const sn=Yr.current,Yt=yield(0,Pe.ZP)("/api/chats/get_answer",{method:"post",body:{chat_id:_e,to_user_id:Lt,question:Oo,challenge_id:_i||"",time:kn}});sn===Yr.current&&(Yt==null?void 0:Yt.status)===0&&pi(_e,_i,!0)}),Re=()=>{pi(_e,_i),ri(Lt,_i),oo(!1)},Oe=(Le,kn,Bi="")=>si(void 0,null,function*(){jt(!0);let sn={};Pt.get("homeworkId")?sn={id:Le,satisfied:kn,content:Bi,homework_common_id:Pt.get("homeworkId")}:sn={id:Le,satisfied:kn,content:Bi};const Yt=yield(0,Pe.ZP)("/api/chats/praise.json",{method:"post",body:sn});(Yt==null?void 0:Yt.status)===0&&pi(_e,_i)}),Te=Le=>{Le.shiftKey&&Le.keyCode===13||Le.keyCode===13&&(Le.preventDefault(),Tr())},Ze=Le=>si(void 0,null,function*(){Me.default.confirm({icon:null,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u8BE5\u95EE\u7B54\u5185\u5BB9\u8FDB\u884C\u5220\u9664\uFF1F",onOk:()=>si(void 0,null,function*(){(yield(0,Pe.ZP)("/api/chats/delete_one.json",{method:"delete",body:{id:Le}})).status===0&&(xe.ZP.success("\u5220\u9664\u6210\u529F"),pi(_e,_i))})})}),yi=()=>si(void 0,null,function*(){jt(!0),Yr.current=Yr.current+1,(yield(0,Pe.ZP)("/api/chats/stop_one.json",{method:"delete",body:{challenge_id:_i,id:_e}})).status===0&&pi(_e,_i),jt(!1)}),hi=[`\u8BF7${kr==null?void 0:kr.user_name}\u8001\u5E08\u5C1D\u8BD5\u518D\u56DE\u7B54\u4E00\u6B21`,"\u53EF\u80FD\u542F\u7528\u4E86\u673A\u5668\u4EBA\uFF0C\u8BF7\u8001\u5E08\u4EB2\u81EA\u56DE\u7B54"],Zi=Le=>{De(kr,Le)},He=()=>{};return Kt.createElement("div",{className:Ue.wrap},Kt.createElement("div",{className:Ue.head},Kt.createElement("b",null,"\u5B9E\u8BAD >"),"\u6559\u5B66\u8F85\u5BFC\uFF08beta\u7248\u672C\uFF09"),Kt.createElement("div",{className:Ue.content},Kt.createElement(je.Z,{spinning:Sr},Kt.createElement("div",{className:Ue.left,onClick:()=>{Hr(!1)}},Kt.createElement("div",{className:Ue.title},Kt.createElement("span",null,"\u95EE\u7B54\u5217\u8868"),Kt.createElement("div",{className:ui()(Ue.add,kt&&Ue.disabledElement),onClick:()=>si(void 0,null,function*(){if(kt)return;$r(!0);const Le=yield(0,Pe.ZP)("/api/chats.json",{method:"post",body:{to_user_id:Lt,new_chat:!0}});if(Le.status===0){const kn=Le==null?void 0:Le.id;if(kn===_e){xe.ZP.warning("\u5F53\u524D\u5DF2\u7ECF\u5728\u65B0\u5BF9\u8BDD\u7A97\u53E3"),$r(!1);return}yield ri(-1,0),Zn(kn),ii(0),yield pi(kn,0)}$r(!1)})})),Kt.createElement("div",{className:Ue.leftBar},Dn.map(Le=>Kt.createElement("div",{key:Le.id,onClick:()=>Qi(Le.id),className:`${Ue.li} ${Le.id===_e?Ue.active:""}`},Le!=null&&Le.avatar?Kt.createElement("img",{src:`${we.Z.IMG_SERVER}/images/${Le==null?void 0:Le.avatar}`}):Kt.createElement("img",{src:nt}),Kt.createElement("aside",null,Kt.createElement("p",null,Kt.createElement("b",{title:Le.user_name},Le.user_name),Kt.createElement("span",null,Le.time)),Kt.createElement("div",null,Le.last_message))))))),Kt.createElement("div",{className:Ue.right},pr&&Kt.createElement("div",{className:Ue.title,onClick:()=>{Hr(!1)}},Kt.createElement("section",{className:Ue.center},Kt.createElement("span",null,"\u4E0E",kr==null?void 0:kr.user_name,"\u8001\u5E08\u6C9F\u901A\u4E2D\u2026"),Kt.createElement("div",{className:Ue.tabs},Kt.createElement("i",{className:"iconfont icon-lianjie3"}),Kt.createElement("span",null,"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A",kr!=null&&kr.challenge_name?`${(pn=(Fe=kr==null?void 0:kr.data[0])==null?void 0:Fe.shixun)==null?void 0:pn.name} \u5B9E\u8BAD---\u7B2C${kr==null?void 0:kr.challenge_position}\u5173`:"\u5168\u90E8"),Kt.createElement("span",{onClick:()=>{kt||(ji.current=_i,oo(!0))},className:ui()(Ue.cut,kt&&Ue.disabledElement)},"\u5207\u6362")),Kt.createElement(ue,{disabled:kt,recoverDisabled:!(kr!=null&&kr.can_recycle),onFileType:Zi,onRecover:()=>si(void 0,null,function*(){jt(!0),(yield(0,Pe.ZP)("/api/chats/recycle.json",{method:"post",body:{challenge_id:_i,id:_e}})).status===0&&(xe.ZP.success("\u6062\u590D\u5BF9\u8BDD\u6210\u529F"),ri(Lt,_i),pi(_e,_i)),jt(!1)}),onEmpty:()=>{Me.default.confirm({icon:null,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u8BF7\u786E\u8BA4\u662F\u5426\u5C06\u5F53\u524D\u5BF9\u8BDD\u7A97\u53E3\u4E2D\u7684\u5BF9\u8BDD\u5185\u5BB9\u5168\u90E8\u6E05\u7A7A\uFF1F",onOk:()=>si(void 0,null,function*(){(yield(0,Pe.ZP)("/api/chats/clean.json",{method:"delete",body:{challenge_id:_i,id:_e}})).status===0&&(xe.ZP.success("\u6E05\u7A7A\u5BF9\u8BDD\u6210\u529F"),ri(Lt,_i),pi(_e,_i))})})}}))),Kt.createElement("div",{onClick:()=>{Hr(!1)},className:Ue.rightBar,ref:ar},Kt.createElement(je.Z,{spinning:Tt},!((Cn=kr==null?void 0:kr.data)!=null&&Cn.length)&&Kt.createElement("div",{className:Ue.empty}),(Ut=kr==null?void 0:kr.data)==null?void 0:Ut.map((Le,kn)=>{var Bi,sn,Yt;return Kt.createElement(bt.Fragment,{key:kn},!!Le.question&&Kt.createElement("div",{className:Ue.li},Kt.createElement("img",{src:`${we.Z.IMG_SERVER}/images/${kr==null?void 0:kr.my_avatar}`,style:{borderRadius:"50%",width:56,height:56}}),Kt.createElement("aside",null,Kt.createElement("p",null,Kt.createElement("b",null,kr.my_user_name),Kt.createElement("span",null,et()(Le.updated_at).format("YYYY-MM-DD HH:mm"))),Kt.createElement(lt.Z,{value:Le.question}),Kt.createElement("div",{className:Ue.action},Kt.createElement(gt.CopyToClipboard,{text:Le.question,onCopy:()=>xe.ZP.success("\u5185\u5BB9\u5DF2\u590D\u5236\u5230\u7C98\u8D34\u677F\u4E2D")},Kt.createElement("div",{className:Ue.tagBtn},Kt.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236")),!kt&&Kt.createElement("div",{onClick:()=>Ze(Le.id),className:Ue.tagBtn},Kt.createElement("i",{className:"iconfont icon-shanchu8"}),"\u5220\u9664")))),!!Le.answer&&Kt.createElement("div",{style:kn===0?{borderTop:0}:{},className:`${Ue.li} ${Ue.active}`},kr!=null&&kr.avatar?Kt.createElement("img",{src:`${we.Z.IMG_SERVER}/images/${kr==null?void 0:kr.avatar}`,style:{borderRadius:"50%",width:56,height:56}}):Kt.createElement("img",{src:nt,style:{borderRadius:"50%",width:56,height:56}}),Kt.createElement("aside",null,Kt.createElement("p",null,Kt.createElement("div",{style:{display:"flex"}},Kt.createElement("b",{style:{marginRight:"20px"}},kr.user_name),(Bi=Le.shixun)!=null&&Bi.name?Kt.createElement("span",{style:{display:"flex",alignItems:"center"}},"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A",(sn=Le.shixun)==null?void 0:sn.name," \u5B9E\u8BAD---\u7B2C",(Yt=Le.challenge)==null?void 0:Yt.position,"\u5173"):Kt.createElement("span",{style:{display:"flex",alignItems:"center"}},"\u5F53\u524D\u5BF9\u8BDD\u5173\u8054\uFF1A\u5168\u90E8")),Kt.createElement("span",null,et()(Le.updated_at).format("YYYY-MM-DD HH:mm"))),Le.id===0?Le.answer:Kt.createElement(nn,{onTextChange:He,open:!!(Le!=null&&Le.open),text:Le.answer}),Le.id===0&&Kt.createElement("div",{className:Ue.action},Kt.createElement("div",{onClick:yi,className:Ue.tagBtn},Kt.createElement("i",{className:"iconfont icon-tingzhishengcheng"}),"\u505C\u6B62\u751F\u6210")),(Le==null?void 0:Le.id)!==0&&Kt.createElement("div",{className:Ue.action},!!Le.question&&Kt.createElement(Kt.Fragment,null,Kt.createElement("div",{onClick:()=>{Oo=Le.question,Tr()},className:Ue.tagBtn},Kt.createElement("i",{className:"iconfont icon-zhongxinshengcheng"}),"\u91CD\u65B0\u751F\u6210"),Kt.createElement(gt.CopyToClipboard,{text:Le.answer,onCopy:()=>xe.ZP.success("\u5185\u5BB9\u5DF2\u590D\u5236\u5230\u7C98\u8D34\u677F\u4E2D")},Kt.createElement("div",{className:Ue.tagBtn},Kt.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236")),!kt&&Kt.createElement("div",{onClick:()=>Ze(Le.id),className:Ue.tagBtn},Kt.createElement("i",{className:"iconfont icon-shanchu8"}),"\u5220\u9664")),Kt.createElement("span",{style:{marginLeft:"auto"},onClick:()=>{Oe(Le.id,Le.satisfied===1?-1:1)},className:`mr30 ${Le.satisfied===1?Ue.actActive:""}`},Kt.createElement("i",{className:"iconfont icon-yijiejue"}),"\u5DF2\u89E3\u51B3"),Kt.createElement(ke.Z,{autoAdjustOverflow:!1,destroyTooltipOnHide:!0,open:Qn[kn],getPopupContainer:he=>he,placement:on.current,content:Kt.createElement("div",{className:Ue.box,onMouseLeave:he=>{clearTimeout(Gn.current),Qn[kn]=!1,_n(Sn({},Qn))},onMouseOver:()=>{clearTimeout(Gn.current)}},Kt.createElement("p",null,"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5\uFF1A"),hi.map((he,wn)=>{const un=he===Le.content;return Kt.createElement("div",{onClick:()=>{Oe(Le.id,un?-1:0,un?"":he)},className:un?Ue.hot:"",key:he},he)}))},Kt.createElement("span",{onMouseOver:he=>{clearTimeout(Gn.current),window.innerHeight-he.target.getBoundingClientRect().top<350?on.current="topRight":on.current="bottomRight",Qn={},Qn[kn]=!0,_n(Sn({},Qn))},onMouseOut:he=>{Gn.current=setTimeout(()=>{clearTimeout(Gn.current),Qn[kn]=!1,_n(Sn({},Qn))},800)},className:`${Ue.unsolved} ${Le.satisfied===0?Ue.actActive:""}`},Kt.createElement("i",{className:"iconfont icon-weijiejuezhengchang"}),"\u672A\u89E3\u51B3"))))))}))),pr&&Kt.createElement("div",{className:Ue.answers},!tr&&Kt.createElement("div",{className:Ue.open_md,onClick:()=>{Hr(!0)}},"\u8BF7\u8F93\u5165\u4F60\u7684\u95EE\u9898"),Kt.createElement("div",{className:tr?"md_container":"md_container hide",style:{marginTop:20}},Kt.createElement(ct.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Oo,height:240,width:1e3,onChange:Ci,className:Ue.md_editor}),Kt.createElement("div",{className:Ue.tip_container,style:{display:"flex"},onClick:()=>{Hr(!1)}},Kt.createElement("div",{className:Ue.btn_send,onClick:Tr},"\u53D1\u9001")))))),Kt.createElement(Me.default,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,onCancel:()=>{ii(ji.current),oo(!1)},onOk:Re,open:ko,wrapClassName:xn.Z.CustomCss,title:"\u66F4\u6362\u5173\u8054",width:"666px"},Kt.createElement("div",null,Kt.createElement(ye.ZP.Group,{value:_i,onChange:Le=>ii(Le.target.value)},Kt.createElement(pe.Z,{direction:"vertical"},Vi==null?void 0:Vi.map(Le=>{var kn;return Kt.createElement(ye.ZP,{key:Le.id,value:Le.id},Le.id===0?Le.subject:`${(kn=Le.shixun)==null?void 0:kn.name} \u5B9E\u8BAD---\u7B2C${Le==null?void 0:Le.challenge_position}\u5173`)}))))))}},81428:function(Pn,gi,ne){"use strict";ne.d(gi,{AL:function(){return Et},Iy:function(){return An},Qv:function(){return Dt},ez:function(){return yt},jb:function(){return we}});var bt=ne(32834),xe=ne.n(bt),Me=ne(11690),je=ne.n(Me);let ke=1;function ye(de,Ae){const De=de.match(/^(\s+)(?:```)/);if(De===null)return Ae;const ve=De[1];return Ae.split(`
|
|
`).map(We=>{const nn=We.match(/^\s+/);if(nn===null)return We;const[an]=nn;return an.length>=ve.length?We.slice(ve.length):We}).join(`
|
|
`)}let pe=[],Ue=["<ul>"];const Pe=new(xe()).Renderer,ie=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function An(){pe.length=0,Ue=["<ul>"]}const we={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function xn(de,Ae,De,ve){if(Ae>=de.length||de[Ae].level<=De)return Ae;var We=de[Ae];ve.push("<li><a href='#"+ke+We.anchor+"'>"+We.text+"</a>"),Ae++;var nn=[];return Ae=xn(de,Ae,We.level,nn),nn.length>0&&(ve.push("<ul>"),nn.forEach(function(an){ve.push(an)}),ve.push("</ul>")),ve.push("</li>"),Ae=xn(de,Ae,De,ve),Ae}function Dt(){return xn(pe,0,0,Ue),Ue.push("</ul>"),Ue.join("")}const et={heading(de){const Ae=ie.exec(de);if(ke+=1,Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},fences(de){const Ae=this.rules.block.fences.exec(de);if(Ae){const De=Ae[0];let ve=ye(De,Ae[3]||"");const We=Ae[2]?Ae[2].trim():Ae[2];if(["latex","katex","math"].indexOf(We)>=0){const nn=lt(),an=ve;ve=nn,gt[nn]={type:"block",expression:an}}return{type:"code",raw:De,lang:We,text:ve}}}},nt=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ct=0;const lt=()=>`__special_katext_id_${ct++}__`;let gt={};function yt(){return gt}function Et(){ct=0,gt={}}function Nt(de){return de=de.replace(nt,(Ae,De)=>{const ve=lt();return gt[ve]={type:"inline",expression:De},ve}),de}const Vt=Pe.listitem;Pe.listitem=function(de){return Vt(Nt(de))};const Jt=Pe.paragraph;Pe.paragraph=function(de){return Jt(Nt(de))};const ce=Pe.tablecell;Pe.tablecell=function(de,Ae){return ce(Nt(de),Ae)},Pe.code=function(de,Ae,De){const ve=(Ae||"").match(/\S*/)[0];return ve?["latex","katex","math"].indexOf(ve)>=0?`<p class='editormd-tex'>${de}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ae}">${De?de:(0,Me.escape)(de,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(De?de:(0,Me.escape)(de,!0))+"</code></pre>"},Pe.heading=function(de,Ae,De){let ve=this.options.headerPrefix+De.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return pe.push({anchor:ve,level:Ae,text:de}),"<h"+Ae+' id="'+ke+ve+'">'+de+"</h"+Ae+">"},xe().setOptions({silent:!0,gfm:!0,pedantic:!1}),xe().use({tokenizer:et,renderer:Pe}),gi.ZP=xe()},99498:function(Pn,gi,ne){(function(bt){bt(ne(89780))})(function(bt){bt.defineOption("placeholder","",function(Ue,Pe,ie){var An=ie&&ie!=bt.Init;if(Pe&&!An)Ue.on("blur",ke),Ue.on("change",ye),Ue.on("swapDoc",ye),bt.on(Ue.getInputField(),"compositionupdate",Ue.state.placeholderCompose=function(){je(Ue)}),ye(Ue);else if(!Pe&&An){Ue.off("blur",ke),Ue.off("change",ye),Ue.off("swapDoc",ye),bt.off(Ue.getInputField(),"compositionupdate",Ue.state.placeholderCompose),xe(Ue);var we=Ue.getWrapperElement();we.className=we.className.replace(" CodeMirror-empty","")}Pe&&!Ue.hasFocus()&&ke(Ue)});function xe(Ue){Ue.state.placeholder&&(Ue.state.placeholder.parentNode.removeChild(Ue.state.placeholder),Ue.state.placeholder=null)}function Me(Ue){xe(Ue);var Pe=Ue.state.placeholder=document.createElement("pre");Pe.style.cssText="height: 0; overflow: visible",Pe.style.direction=Ue.getOption("direction"),Pe.className="CodeMirror-placeholder CodeMirror-line-like";var ie=Ue.getOption("placeholder");typeof ie=="string"&&(ie=document.createTextNode(ie)),Pe.appendChild(ie),Ue.display.lineSpace.insertBefore(Pe,Ue.display.lineSpace.firstChild)}function je(Ue){setTimeout(function(){var Pe=!1,ie=Ue.getInputField();ie.nodeName=="TEXTAREA"?Pe=!ie.value:Ue.lineCount()==1&&(Pe=!/[^\u200b]/.test(ie.querySelector(".CodeMirror-line").textContent)),Pe?Me(Ue):xe(Ue)},20)}function ke(Ue){pe(Ue)&&Me(Ue)}function ye(Ue){var Pe=Ue.getWrapperElement(),ie=pe(Ue);Pe.className=Pe.className.replace(" CodeMirror-empty","")+(ie?" CodeMirror-empty":""),ie?Me(Ue):xe(Ue)}function pe(Ue){return Ue.lineCount()===1&&Ue.getLine(0)===""}})},25717:function(Pn,gi,ne){(function(bt){bt(ne(89780))})(function(bt){var xe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Me=bt.Pos;bt.defineOption("autoCloseBrackets",!1,function(et,nt,ct){ct&&ct!=bt.Init&&(et.removeKeyMap(ke),et.state.closeBrackets=null),nt&&(ye(je(nt,"pairs")),et.state.closeBrackets=nt,et.addKeyMap(ke))});function je(et,nt){return nt=="pairs"&&typeof et=="string"?et:typeof et=="object"&&et[nt]!=null?et[nt]:xe[nt]}var ke={Backspace:Pe,Enter:ie};function ye(et){for(var nt=0;nt<et.length;nt++){var ct=et.charAt(nt),lt="'"+ct+"'";ke[lt]||(ke[lt]=pe(ct))}}ye(xe.pairs+"`");function pe(et){return function(nt){return we(nt,et)}}function Ue(et){var nt=et.state.closeBrackets;if(!nt||nt.override)return nt;var ct=et.getModeAt(et.getCursor());return ct.closeBrackets||nt}function Pe(et){var nt=Ue(et);if(!nt||et.getOption("disableInput"))return bt.Pass;for(var ct=je(nt,"pairs"),lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return bt.Pass;var yt=xn(et,lt[gt].head);if(!yt||ct.indexOf(yt)%2!=0)return bt.Pass}for(var gt=lt.length-1;gt>=0;gt--){var Et=lt[gt].head;et.replaceRange("",Me(Et.line,Et.ch-1),Me(Et.line,Et.ch+1),"+delete")}}function ie(et){var nt=Ue(et),ct=nt&&je(nt,"explode");if(!ct||et.getOption("disableInput"))return bt.Pass;for(var lt=et.listSelections(),gt=0;gt<lt.length;gt++){if(!lt[gt].empty())return bt.Pass;var yt=xn(et,lt[gt].head);if(!yt||ct.indexOf(yt)%2!=0)return bt.Pass}et.operation(function(){var Et=et.lineSeparator()||`
|
|
`;et.replaceSelection(Et+Et,null),et.execCommand("goCharLeft"),lt=et.listSelections();for(var Nt=0;Nt<lt.length;Nt++){var Vt=lt[Nt].head.line;et.indentLine(Vt,null,!0),et.indentLine(Vt+1,null,!0)}})}function An(et){var nt=bt.cmpPos(et.anchor,et.head)>0;return{anchor:new Me(et.anchor.line,et.anchor.ch+(nt?-1:1)),head:new Me(et.head.line,et.head.ch+(nt?1:-1))}}function we(et,nt){var ct=Ue(et);if(!ct||et.getOption("disableInput"))return bt.Pass;var lt=je(ct,"pairs"),gt=lt.indexOf(nt);if(gt==-1)return bt.Pass;for(var yt=je(ct,"closeBefore"),Et=je(ct,"triples"),Nt=lt.charAt(gt+1)==nt,Vt=et.listSelections(),Jt=gt%2==0,ce,de=0;de<Vt.length;de++){var Ae=Vt[de],De=Ae.head,ve,We=et.getRange(De,Me(De.line,De.ch+1));if(Jt&&!Ae.empty())ve="surround";else if((Nt||!Jt)&&We==nt)Nt&&Dt(et,De)?ve="both":Et.indexOf(nt)>=0&&et.getRange(De,Me(De.line,De.ch+3))==nt+nt+nt?ve="skipThree":ve="skip";else if(Nt&&De.ch>1&&Et.indexOf(nt)>=0&&et.getRange(Me(De.line,De.ch-2),De)==nt+nt){if(De.ch>2&&/\bstring/.test(et.getTokenTypeAt(Me(De.line,De.ch-2))))return bt.Pass;ve="addFour"}else if(Nt){var nn=De.ch==0?" ":et.getRange(Me(De.line,De.ch-1),De);if(!bt.isWordChar(We)&&nn!=nt&&!bt.isWordChar(nn))ve="both";else return bt.Pass}else if(Jt&&(We.length===0||/\s/.test(We)||yt.indexOf(We)>-1))ve="both";else return bt.Pass;if(!ce)ce=ve;else if(ce!=ve)return bt.Pass}var an=gt%2?lt.charAt(gt-1):nt,In=gt%2?nt:lt.charAt(gt+1);et.operation(function(){if(ce=="skip")et.execCommand("goCharRight");else if(ce=="skipThree")for(var En=0;En<3;En++)et.execCommand("goCharRight");else if(ce=="surround"){for(var ui=et.getSelections(),En=0;En<ui.length;En++)ui[En]=an+ui[En]+In;et.replaceSelections(ui,"around"),ui=et.listSelections().slice();for(var En=0;En<ui.length;En++)ui[En]=An(ui[En]);et.setSelections(ui)}else ce=="both"?(et.replaceSelection(an+In,null),et.triggerElectric(an+In),et.execCommand("goCharLeft")):ce=="addFour"&&(et.replaceSelection(an+an+an+an,"before"),et.execCommand("goCharRight"))})}function xn(et,nt){var ct=et.getRange(Me(nt.line,nt.ch-1),Me(nt.line,nt.ch+1));return ct.length==2?ct:null}function Dt(et,nt){var ct=et.getTokenAt(Me(nt.line,nt.ch+1));return/\bstring/.test(ct.type)&&ct.start==nt.ch&&(nt.ch==0||!/\bstring/.test(et.getTokenTypeAt(nt)))}})},6313:function(Pn,gi,ne){(function(bt){bt(ne(89780),ne(32855))})(function(bt){bt.defineOption("autoCloseTags",!1,function(Pe,ie,An){if(An!=bt.Init&&An&&Pe.removeKeyMap("autoCloseTags"),!!ie){var we={name:"autoCloseTags"};(typeof ie!="object"||ie.whenClosing!==!1)&&(we["'/'"]=function(xn){return ye(xn)}),(typeof ie!="object"||ie.whenOpening!==!1)&&(we["'>'"]=function(xn){return je(xn)}),Pe.addKeyMap(we)}});var xe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Me=["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 je(Pe){if(Pe.getOption("disableInput"))return bt.Pass;for(var ie=Pe.listSelections(),An=[],we=Pe.getOption("autoCloseTags"),xn=0;xn<ie.length;xn++){if(!ie[xn].empty())return bt.Pass;var Dt=ie[xn].head,et=Pe.getTokenAt(Dt),nt=bt.innerMode(Pe.getMode(),et.state),ct=nt.state,lt=nt.mode.xmlCurrentTag&&nt.mode.xmlCurrentTag(ct),gt=lt&<.name;if(!gt)return bt.Pass;var yt=nt.mode.configuration=="html",Et=typeof we=="object"&&we.dontCloseTags||yt&&xe,Nt=typeof we=="object"&&we.indentTags||yt&&Me;et.end>Dt.ch&&(gt=gt.slice(0,gt.length-et.end+Dt.ch));var Vt=gt.toLowerCase();if(!gt||et.type=="string"&&(et.end!=Dt.ch||!/[\"\']/.test(et.string.charAt(et.string.length-1))||et.string.length==1)||et.type=="tag"&<.close||et.string.indexOf("/")==Dt.ch-et.start-1||Et&&pe(Et,Vt)>-1||Ue(Pe,nt.mode.xmlCurrentContext&&nt.mode.xmlCurrentContext(ct)||[],gt,Dt,!0))return bt.Pass;var Jt=typeof we=="object"&&we.emptyTags;if(Jt&&pe(Jt,gt)>-1){An[xn]={text:"/>",newPos:bt.Pos(Dt.line,Dt.ch+2)};continue}var ce=Nt&&pe(Nt,Vt)>-1;An[xn]={indent:ce,text:">"+(ce?`
|
|
|
|
`:"")+"</"+gt+">",newPos:ce?bt.Pos(Dt.line+1,0):bt.Pos(Dt.line,Dt.ch+1)}}for(var de=typeof we=="object"&&we.dontIndentOnAutoClose,xn=ie.length-1;xn>=0;xn--){var Ae=An[xn];Pe.replaceRange(Ae.text,ie[xn].head,ie[xn].anchor,"+insert");var De=Pe.listSelections().slice(0);De[xn]={head:Ae.newPos,anchor:Ae.newPos},Pe.setSelections(De),!de&&Ae.indent&&(Pe.indentLine(Ae.newPos.line,null,!0),Pe.indentLine(Ae.newPos.line+1,null,!0))}}function ke(Pe,ie){for(var An=Pe.listSelections(),we=[],xn=ie?"/":"</",Dt=Pe.getOption("autoCloseTags"),et=typeof Dt=="object"&&Dt.dontIndentOnSlash,nt=0;nt<An.length;nt++){if(!An[nt].empty())return bt.Pass;var ct=An[nt].head,lt=Pe.getTokenAt(ct),gt=bt.innerMode(Pe.getMode(),lt.state),yt=gt.state;if(ie&&(lt.type=="string"||lt.string.charAt(0)!="<"||lt.start!=ct.ch-1))return bt.Pass;var Et,Nt=gt.mode.name!="xml"&&Pe.getMode().name=="htmlmixed";if(Nt&>.mode.name=="javascript")Et=xn+"script";else if(Nt&>.mode.name=="css")Et=xn+"style";else{var Vt=gt.mode.xmlCurrentContext&>.mode.xmlCurrentContext(yt);if(!Vt||Vt.length&&Ue(Pe,Vt,Vt[Vt.length-1],ct))return bt.Pass;Et=xn+Vt[Vt.length-1]}Pe.getLine(ct.line).charAt(lt.end)!=">"&&(Et+=">"),we[nt]=Et}if(Pe.replaceSelections(we),An=Pe.listSelections(),!et)for(var nt=0;nt<An.length;nt++)(nt==An.length-1||An[nt].head.line<An[nt+1].head.line)&&Pe.indentLine(An[nt].head.line)}function ye(Pe){return Pe.getOption("disableInput")?bt.Pass:ke(Pe,!0)}bt.commands.closeTag=function(Pe){return ke(Pe)};function pe(Pe,ie){if(Pe.indexOf)return Pe.indexOf(ie);for(var An=0,we=Pe.length;An<we;++An)if(Pe[An]==ie)return An;return-1}function Ue(Pe,ie,An,we,xn){if(!bt.scanForClosingTag)return!1;var Dt=Math.min(Pe.lastLine()+1,we.line+500),et=bt.scanForClosingTag(Pe,we,null,Dt);if(!et||et.tag!=An)return!1;for(var nt=xn?1:0,ct=ie.length-1;ct>=0&&ie[ct]==An;ct--)++nt;we=et.to;for(var ct=1;ct<nt;ct++){var lt=bt.scanForClosingTag(Pe,we,null,Dt);if(!lt||lt.tag!=An)return!1;we=lt.to}return!0}})},32855:function(Pn,gi,ne){(function(bt){bt(ne(89780))})(function(bt){"use strict";var xe=bt.Pos;function Me(ct,lt){return ct.line-lt.line||ct.ch-lt.ch}var je="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ke=je+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ye=new RegExp("<(/?)(["+je+"]["+ke+"]*)","g");function pe(ct,lt,gt,yt){this.line=lt,this.ch=gt,this.cm=ct,this.text=ct.getLine(lt),this.min=yt?Math.max(yt.from,ct.firstLine()):ct.firstLine(),this.max=yt?Math.min(yt.to-1,ct.lastLine()):ct.lastLine()}function Ue(ct,lt){var gt=ct.cm.getTokenTypeAt(xe(ct.line,lt));return gt&&/\btag\b/.test(gt)}function Pe(ct){if(!(ct.line>=ct.max))return ct.ch=0,ct.text=ct.cm.getLine(++ct.line),!0}function ie(ct){if(!(ct.line<=ct.min))return ct.text=ct.cm.getLine(--ct.line),ct.ch=ct.text.length,!0}function An(ct){for(;;){var lt=ct.text.indexOf(">",ct.ch);if(lt==-1){if(Pe(ct))continue;return}if(!Ue(ct,lt+1)){ct.ch=lt+1;continue}var gt=ct.text.lastIndexOf("/",lt),yt=gt>-1&&!/\S/.test(ct.text.slice(gt+1,lt));return ct.ch=lt+1,yt?"selfClose":"regular"}}function we(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf("<",ct.ch-1):-1;if(lt==-1){if(ie(ct))continue;return}if(!Ue(ct,lt+1)){ct.ch=lt;continue}ye.lastIndex=lt,ct.ch=lt;var gt=ye.exec(ct.text);if(gt&>.index==lt)return gt}}function xn(ct){for(;;){ye.lastIndex=ct.ch;var lt=ye.exec(ct.text);if(!lt){if(Pe(ct))continue;return}if(!Ue(ct,lt.index+1)){ct.ch=lt.index+1;continue}return ct.ch=lt.index+lt[0].length,lt}}function Dt(ct){for(;;){var lt=ct.ch?ct.text.lastIndexOf(">",ct.ch-1):-1;if(lt==-1){if(ie(ct))continue;return}if(!Ue(ct,lt+1)){ct.ch=lt;continue}var gt=ct.text.lastIndexOf("/",lt),yt=gt>-1&&!/\S/.test(ct.text.slice(gt+1,lt));return ct.ch=lt+1,yt?"selfClose":"regular"}}function et(ct,lt){for(var gt=[];;){var yt=xn(ct),Et,Nt=ct.line,Vt=ct.ch-(yt?yt[0].length:0);if(!yt||!(Et=An(ct)))return;if(Et!="selfClose")if(yt[1]){for(var Jt=gt.length-1;Jt>=0;--Jt)if(gt[Jt]==yt[2]){gt.length=Jt;break}if(Jt<0&&(!lt||lt==yt[2]))return{tag:yt[2],from:xe(Nt,Vt),to:xe(ct.line,ct.ch)}}else gt.push(yt[2])}}function nt(ct,lt){for(var gt=[];;){var yt=Dt(ct);if(!yt)return;if(yt=="selfClose"){we(ct);continue}var Et=ct.line,Nt=ct.ch,Vt=we(ct);if(!Vt)return;if(Vt[1])gt.push(Vt[2]);else{for(var Jt=gt.length-1;Jt>=0;--Jt)if(gt[Jt]==Vt[2]){gt.length=Jt;break}if(Jt<0&&(!lt||lt==Vt[2]))return{tag:Vt[2],from:xe(ct.line,ct.ch),to:xe(Et,Nt)}}}}bt.registerHelper("fold","xml",function(ct,lt){for(var gt=new pe(ct,lt.line,0);;){var yt=xn(gt);if(!yt||gt.line!=lt.line)return;var Et=An(gt);if(!Et)return;if(!yt[1]&&Et!="selfClose"){var Nt=xe(gt.line,gt.ch),Vt=et(gt,yt[2]);return Vt&&Me(Vt.from,Nt)>0?{from:Nt,to:Vt.from}:null}}}),bt.findMatchingTag=function(ct,lt,gt){var yt=new pe(ct,lt.line,lt.ch,gt);if(!(yt.text.indexOf(">")==-1&&yt.text.indexOf("<")==-1)){var Et=An(yt),Nt=Et&&xe(yt.line,yt.ch),Vt=Et&&we(yt);if(!(!Et||!Vt||Me(yt,lt)>0)){var Jt={from:xe(yt.line,yt.ch),to:Nt,tag:Vt[2]};return Et=="selfClose"?{open:Jt,close:null,at:"open"}:Vt[1]?{open:nt(yt,Vt[2]),close:Jt,at:"close"}:(yt=new pe(ct,Nt.line,Nt.ch,gt),{open:Jt,close:et(yt,Vt[2]),at:"open"})}}},bt.findEnclosingTag=function(ct,lt,gt,yt){for(var Et=new pe(ct,lt.line,lt.ch,gt);;){var Nt=nt(Et,yt);if(!Nt)break;var Vt=new pe(ct,lt.line,lt.ch,gt),Jt=et(Vt,Nt.tag);if(Jt)return{open:Nt,close:Jt}}},bt.scanForClosingTag=function(ct,lt,gt,yt){var Et=new pe(ct,lt.line,lt.ch,yt?{from:0,to:yt}:null);return et(Et,gt)}})},89780:function(Pn){(function(gi,ne){Pn.exports=ne()})(this,function(){"use strict";var gi=navigator.userAgent,ne=navigator.platform,bt=/gecko\/\d/i.test(gi),xe=/MSIE \d/.test(gi),Me=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(gi),je=/Edge\/(\d+)/.exec(gi),ke=xe||Me||je,ye=ke&&(xe?document.documentMode||6:+(je||Me)[1]),pe=!je&&/WebKit\//.test(gi),Ue=pe&&/Qt\/\d+\.\d+/.test(gi),Pe=!je&&/Chrome\//.test(gi),ie=/Opera\//.test(gi),An=/Apple Computer/.test(navigator.vendor),we=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(gi),xn=/PhantomJS/.test(gi),Dt=!je&&/AppleWebKit/.test(gi)&&/Mobile\/\w+/.test(gi),et=/Android/.test(gi),nt=Dt||et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(gi),ct=Dt||/Mac/.test(ne),lt=/\bCrOS\b/.test(gi),gt=/win/i.test(ne),yt=ie&&gi.match(/Version\/(\d*\.\d*)/);yt&&(yt=Number(yt[1])),yt&&yt>=15&&(ie=!1,pe=!0);var Et=ct&&(Ue||ie&&(yt==null||yt<12.11)),Nt=bt||ke&&ye>=9;function Vt(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Jt=function(it,st){var ht=it.className,ut=Vt(st).exec(ht);if(ut){var dt=ht.slice(ut.index+ut[0].length);it.className=ht.slice(0,ut.index)+(dt?ut[1]+dt:"")}};function ce(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function de(it,st){return ce(it).appendChild(st)}function Ae(it,st,ht,ut){var dt=document.createElement(it);if(ht&&(dt.className=ht),ut&&(dt.style.cssText=ut),typeof st=="string")dt.appendChild(document.createTextNode(st));else if(st)for(var Ft=0;Ft<st.length;++Ft)dt.appendChild(st[Ft]);return dt}function De(it,st,ht,ut){var dt=Ae(it,st,ht,ut);return dt.setAttribute("role","presentation"),dt}var ve;document.createRange?ve=function(it,st,ht,ut){var dt=document.createRange();return dt.setEnd(ut||it,ht),dt.setStart(it,st),dt}:ve=function(it,st,ht){var ut=document.body.createTextRange();try{ut.moveToElementText(it.parentNode)}catch(dt){return ut}return ut.collapse(!0),ut.moveEnd("character",ht),ut.moveStart("character",st),ut};function We(it,st){if(st.nodeType==3&&(st=st.parentNode),it.contains)return it.contains(st);do if(st.nodeType==11&&(st=st.host),st==it)return!0;while(st=st.parentNode)}function nn(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function an(it,st){var ht=it.className;Vt(st).test(ht)||(it.className+=(ht?" ":"")+st)}function In(it,st){for(var ht=it.split(" "),ut=0;ut<ht.length;ut++)ht[ut]&&!Vt(ht[ut]).test(st)&&(st+=" "+ht[ut]);return st}var En=function(it){it.select()};Dt?En=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:ke&&(En=function(it){try{it.select()}catch(st){}});function ui(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function fi(it,st,ht){st||(st={});for(var ut in it)it.hasOwnProperty(ut)&&(ht!==!1||!st.hasOwnProperty(ut))&&(st[ut]=it[ut]);return st}function ue(it,st,ht,ut,dt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Ft=ut||0,It=dt||0;;){var zt=it.indexOf(" ",Ft);if(zt<0||zt>=st)return It+(st-Ft);It+=zt-Ft,It+=ht-It%ht,Ft=zt+1}}var Kt=function(){this.id=null,this.f=null,this.time=0,this.handler=ui(this.onTimeout,this)};Kt.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},Kt.prototype.set=function(it,st){this.f=st;var ht=+new Date+it;(!this.id||ht<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ht)};function dn(it,st){for(var ht=0;ht<it.length;++ht)if(it[ht]==st)return ht;return-1}var Ai=50,qn={toString:function(){return"CodeMirror.Pass"}},Ke={scroll:!1},yn={origin:"*mouse"},Sn={origin:"+move"};function si(it,st,ht){for(var ut=0,dt=0;;){var Ft=it.indexOf(" ",ut);Ft==-1&&(Ft=it.length);var It=Ft-ut;if(Ft==it.length||dt+It>=st)return ut+Math.min(It,st-dt);if(dt+=Ft-ut,dt+=ht-dt%ht,ut=Ft+1,dt>=st)return ut}}var Bn=[""];function Se(it){for(;Bn.length<=it;)Bn.push(Fe(Bn)+" ");return Bn[it]}function Fe(it){return it[it.length-1]}function pn(it,st){for(var ht=[],ut=0;ut<it.length;ut++)ht[ut]=st(it[ut],ut);return ht}function Cn(it,st,ht){for(var ut=0,dt=ht(st);ut<it.length&&ht(it[ut])<=dt;)ut++;it.splice(ut,0,st)}function Ut(){}function Lt(it,st){var ht;return Object.create?ht=Object.create(it):(Ut.prototype=it,ht=new Ut),st&&fi(st,ht),ht}var Bt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Tt(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||Bt.test(it))}function jt(it,st){return st?st.source.indexOf("\\w")>-1&&Tt(it)?!0:st.test(it):Tt(it)}function kt(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var Ce=/[\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 on(it){return it.charCodeAt(0)>=768&&Ce.test(it)}function Gn(it,st,ht){for(;(ht<0?st>0:st<it.length)&&on(it.charAt(st));)st+=ht;return st}function Qn(it,st,ht){for(var ut=st>ht?-1:1;;){if(st==ht)return st;var dt=(st+ht)/2,Ft=ut<0?Math.ceil(dt):Math.floor(dt);if(Ft==st)return it(Ft)?st:ht;it(Ft)?ht=Ft:st=Ft+ut}}function _n(it,st,ht,ut){if(!it)return ut(st,ht,"ltr",0);for(var dt=!1,Ft=0;Ft<it.length;++Ft){var It=it[Ft];(It.from<ht&&It.to>st||st==ht&&It.to==st)&&(ut(Math.max(It.from,st),Math.min(It.to,ht),It.level==1?"rtl":"ltr",Ft),dt=!0)}dt||ut(st,ht,"ltr")}var _e=null;function Zn(it,st,ht){var ut;_e=null;for(var dt=0;dt<it.length;++dt){var Ft=it[dt];if(Ft.from<st&&Ft.to>st)return dt;Ft.to==st&&(Ft.from!=Ft.to&&ht=="before"?ut=dt:_e=dt),Ft.from==st&&(Ft.from!=Ft.to&&ht!="before"?ut=dt:_e=dt)}return ut!=null?ut:_e}var Dn=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ht(ee){return ee<=247?it.charAt(ee):1424<=ee&&ee<=1524?"R":1536<=ee&&ee<=1785?st.charAt(ee-1536):1774<=ee&&ee<=2220?"r":8192<=ee&&ee<=8203?"w":ee==8204?"b":"L"}var ut=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,dt=/[stwN]/,Ft=/[LRr]/,It=/[Lb1n]/,zt=/[1n]/;function Rt(ee,Ie,oe){this.level=ee,this.from=Ie,this.to=oe}return function(ee,Ie){var oe=Ie=="ltr"?"L":"R";if(ee.length==0||Ie=="ltr"&&!ut.test(ee))return!1;for(var Ye=ee.length,ze=[],Hn=0;Hn<Ye;++Hn)ze.push(ht(ee.charCodeAt(Hn)));for(var Xn=0,di=oe;Xn<Ye;++Xn){var Li=ze[Xn];Li=="m"?ze[Xn]=di:di=Li}for(var Ji=0,Ri=oe;Ji<Ye;++Ji){var or=ze[Ji];or=="1"&&Ri=="r"?ze[Ji]="n":Ft.test(or)&&(Ri=or,or=="r"&&(ze[Ji]="R"))}for(var Ir=1,Hi=ze[0];Ir<Ye-1;++Ir){var eo=ze[Ir];eo=="+"&&Hi=="1"&&ze[Ir+1]=="1"?ze[Ir]="1":eo==","&&Hi==ze[Ir+1]&&(Hi=="1"||Hi=="n")&&(ze[Ir]=Hi),Hi=eo}for(var cs=0;cs<Ye;++cs){var na=ze[cs];if(na==",")ze[cs]="N";else if(na=="%"){var ws=void 0;for(ws=cs+1;ws<Ye&&ze[ws]=="%";++ws);for(var qa=cs&&ze[cs-1]=="!"||ws<Ye&&ze[ws]=="1"?"1":"N",ua=cs;ua<ws;++ua)ze[ua]=qa;cs=ws-1}}for(var Js=0,Ga=oe;Js<Ye;++Js){var pa=ze[Js];Ga=="L"&&pa=="1"?ze[Js]="L":Ft.test(pa)&&(Ga=pa)}for(var Di=0;Di<Ye;++Di)if(dt.test(ze[Di])){var wo=void 0;for(wo=Di+1;wo<Ye&&dt.test(ze[wo]);++wo);for(var fs=(Di?ze[Di-1]:oe)=="L",es=(wo<Ye?ze[wo]:oe)=="L",ma=fs==es?fs?"L":"R":oe,Fo=Di;Fo<wo;++Fo)ze[Fo]=ma;Di=wo-1}for(var Zr=[],$a,Ms=0;Ms<Ye;)if(It.test(ze[Ms])){var Nu=Ms;for(++Ms;Ms<Ye&&It.test(ze[Ms]);++Ms);Zr.push(new Rt(0,Nu,Ms))}else{var Ll=Ms,La=Zr.length,tl=Ie=="rtl"?1:0;for(++Ms;Ms<Ye&&ze[Ms]!="L";++Ms);for(var Xo=Ll;Xo<Ms;)if(zt.test(ze[Xo])){Ll<Xo&&(Zr.splice(La,0,new Rt(1,Ll,Xo)),La+=tl);var ia=Xo;for(++Xo;Xo<Ms&&zt.test(ze[Xo]);++Xo);Zr.splice(La,0,new Rt(2,ia,Xo)),La+=tl,Ll=Xo}else++Xo;Ll<Ms&&Zr.splice(La,0,new Rt(1,Ll,Ms))}return Ie=="ltr"&&(Zr[0].level==1&&($a=ee.match(/^\s+/))&&(Zr[0].from=$a[0].length,Zr.unshift(new Rt(0,0,$a[0].length))),Fe(Zr).level==1&&($a=ee.match(/\s+$/))&&(Fe(Zr).to-=$a[0].length,Zr.push(new Rt(0,Ye-$a[0].length,Ye)))),Ie=="rtl"?Zr.reverse():Zr}}();function ai(it,st){var ht=it.order;return ht==null&&(ht=it.order=Dn(it.text,st)),ht}var vi=[],Rn=function(it,st,ht){if(it.addEventListener)it.addEventListener(st,ht,!1);else if(it.attachEvent)it.attachEvent("on"+st,ht);else{var ut=it._handlers||(it._handlers={});ut[st]=(ut[st]||vi).concat(ht)}};function _i(it,st){return it._handlers&&it._handlers[st]||vi}function ii(it,st,ht){if(it.removeEventListener)it.removeEventListener(st,ht,!1);else if(it.detachEvent)it.detachEvent("on"+st,ht);else{var ut=it._handlers,dt=ut&&ut[st];if(dt){var Ft=dn(dt,ht);Ft>-1&&(ut[st]=dt.slice(0,Ft).concat(dt.slice(Ft+1)))}}}function ji(it,st){var ht=_i(it,st);if(ht.length)for(var ut=Array.prototype.slice.call(arguments,2),dt=0;dt<ht.length;++dt)ht[dt].apply(null,ut)}function Vi(it,st,ht){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),ji(it,ht||st.type,it,st),ar(st)||st.codemirrorIgnore}function Wr(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var ht=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ut=0;ut<st.length;++ut)dn(ht,st[ut])==-1&&ht.push(st[ut])}function pr(it,st){return _i(it,st).length>0}function mr(it){it.prototype.on=function(st,ht){Rn(this,st,ht)},it.prototype.off=function(st,ht){ii(this,st,ht)}}function Sr(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function $r(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function ar(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function Yr(it){Sr(it),$r(it)}function kr(it){return it.target||it.srcElement}function no(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),ct&&it.ctrlKey&&st==1&&(st=3),st}var Oo=function(){if(ke&&ye<9)return!1;var it=Ae("div");return"draggable"in it||"dragDrop"in it}(),$o;function ko(it){if($o==null){var st=Ae("span","\u200B");de(it,Ae("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&($o=st.offsetWidth<=1&&st.offsetHeight>2&&!(ke&&ye<8))}var ht=$o?Ae("span","\u200B"):Ae("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ht.setAttribute("cm-text",""),ht}var oo;function tr(it){if(oo!=null)return oo;var st=de(it,document.createTextNode("A\u062EA")),ht=ve(st,0,1).getBoundingClientRect(),ut=ve(st,1,2).getBoundingClientRect();return ce(it),!ht||ht.left==ht.right?!1:oo=ut.right-ht.right<3}var Hr=`
|
|
|
|
b`.split(/\n/).length!=3?function(it){for(var st=0,ht=[],ut=it.length;st<=ut;){var dt=it.indexOf(`
|
|
`,st);dt==-1&&(dt=it.length);var Ft=it.slice(st,it.charAt(dt-1)=="\r"?dt-1:dt),It=Ft.indexOf("\r");It!=-1?(ht.push(Ft.slice(0,It)),st+=It+1):(ht.push(Ft),st=dt+1)}return ht}:function(it){return it.split(/\r\n?|\n/)},Pt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(ht){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},so=function(){var it=Ae("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),zr=null;function ri(it){if(zr!=null)return zr;var st=de(it,Ae("span","x")),ht=st.getBoundingClientRect(),ut=ve(st,0,1).getBoundingClientRect();return zr=Math.abs(ht.left-ut.left)>1}var pi={},Ci={};function Qi(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),pi[it]=st}function Tr(it,st){Ci[it]=st}function Re(it){if(typeof it=="string"&&Ci.hasOwnProperty(it))it=Ci[it];else if(it&&typeof it.name=="string"&&Ci.hasOwnProperty(it.name)){var st=Ci[it.name];typeof st=="string"&&(st={name:st}),it=Lt(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return Re("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return Re("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function Oe(it,st){st=Re(st);var ht=pi[st.name];if(!ht)return Oe(it,"text/plain");var ut=ht(it,st);if(Te.hasOwnProperty(st.name)){var dt=Te[st.name];for(var Ft in dt)dt.hasOwnProperty(Ft)&&(ut.hasOwnProperty(Ft)&&(ut["_"+Ft]=ut[Ft]),ut[Ft]=dt[Ft])}if(ut.name=st.name,st.helperType&&(ut.helperType=st.helperType),st.modeProps)for(var It in st.modeProps)ut[It]=st.modeProps[It];return ut}var Te={};function Ze(it,st){var ht=Te.hasOwnProperty(it)?Te[it]:Te[it]={};fi(st,ht)}function yi(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var ht={};for(var ut in st){var dt=st[ut];dt instanceof Array&&(dt=dt.concat([])),ht[ut]=dt}return ht}function hi(it,st){for(var ht;it.innerMode&&(ht=it.innerMode(st),!(!ht||ht.mode==it));)st=ht.state,it=ht.mode;return ht||{mode:it,state:st}}function Zi(it,st,ht){return it.startState?it.startState(st,ht):!0}var He=function(it,st,ht){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ht};He.prototype.eol=function(){return this.pos>=this.string.length},He.prototype.sol=function(){return this.pos==this.lineStart},He.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},He.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},He.prototype.eat=function(it){var st=this.string.charAt(this.pos),ht;if(typeof it=="string"?ht=st==it:ht=st&&(it.test?it.test(st):it(st)),ht)return++this.pos,st},He.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},He.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},He.prototype.skipToEnd=function(){this.pos=this.string.length},He.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},He.prototype.backUp=function(it){this.pos-=it},He.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ue(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ue(this.string,this.lineStart,this.tabSize):0)},He.prototype.indentation=function(){return ue(this.string,null,this.tabSize)-(this.lineStart?ue(this.string,this.lineStart,this.tabSize):0)},He.prototype.match=function(it,st,ht){if(typeof it=="string"){var ut=function(It){return ht?It.toLowerCase():It},dt=this.string.substr(this.pos,it.length);if(ut(dt)==ut(it))return st!==!1&&(this.pos+=it.length),!0}else{var Ft=this.string.slice(this.pos).match(it);return Ft&&Ft.index>0?null:(Ft&&st!==!1&&(this.pos+=Ft[0].length),Ft)}},He.prototype.current=function(){return this.string.slice(this.start,this.pos)},He.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},He.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},He.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Le(it,st){if(st-=it.first,st<0||st>=it.size)throw new Error("There is no line "+(st+it.first)+" in the document.");for(var ht=it;!ht.lines;)for(var ut=0;;++ut){var dt=ht.children[ut],Ft=dt.chunkSize();if(st<Ft){ht=dt;break}st-=Ft}return ht.lines[st]}function kn(it,st,ht){var ut=[],dt=st.line;return it.iter(st.line,ht.line+1,function(Ft){var It=Ft.text;dt==ht.line&&(It=It.slice(0,ht.ch)),dt==st.line&&(It=It.slice(st.ch)),ut.push(It),++dt}),ut}function Bi(it,st,ht){var ut=[];return it.iter(st,ht,function(dt){ut.push(dt.text)}),ut}function sn(it,st){var ht=st-it.height;if(ht)for(var ut=it;ut;ut=ut.parent)ut.height+=ht}function Yt(it){if(it.parent==null)return null;for(var st=it.parent,ht=dn(st.lines,it),ut=st.parent;ut;st=ut,ut=ut.parent)for(var dt=0;ut.children[dt]!=st;++dt)ht+=ut.children[dt].chunkSize();return ht+st.first}function he(it,st){var ht=it.first;t:do{for(var ut=0;ut<it.children.length;++ut){var dt=it.children[ut],Ft=dt.height;if(st<Ft){it=dt;continue t}st-=Ft,ht+=dt.chunkSize()}return ht}while(!it.lines);for(var It=0;It<it.lines.length;++It){var zt=it.lines[It],Rt=zt.height;if(st<Rt)break;st-=Rt}return ht+It}function wn(it,st){return st>=it.first&&st<it.first+it.size}function un(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function Ne(it,st,ht){if(ht===void 0&&(ht=null),!(this instanceof Ne))return new Ne(it,st,ht);this.line=it,this.ch=st,this.sticky=ht}function mn(it,st){return it.line-st.line||it.ch-st.ch}function xi(it,st){return it.sticky==st.sticky&&mn(it,st)==0}function Mi(it){return Ne(it.line,it.ch)}function Gi(it,st){return mn(it,st)<0?st:it}function bn(it,st){return mn(it,st)<0?it:st}function Ln(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function On(it,st){if(st.line<it.first)return Ne(it.first,0);var ht=it.first+it.size-1;return st.line>ht?Ne(ht,Le(it,ht).text.length):Yi(st,Le(it,st.line).text.length)}function Yi(it,st){var ht=it.ch;return ht==null||ht>st?Ne(it.line,st):ht<0?Ne(it.line,0):it}function ki(it,st){for(var ht=[],ut=0;ut<st.length;ut++)ht[ut]=On(it,st[ut]);return ht}var hn=function(it,st){this.state=it,this.lookAhead=st},Vn=function(it,st,ht,ut){this.state=st,this.doc=it,this.line=ht,this.maxLookAhead=ut||0,this.baseTokens=null,this.baseTokenPos=1};Vn.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},Vn.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var st=this.baseTokens[this.baseTokenPos+1];return{type:st&&st.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},Vn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Vn.fromSaved=function(it,st,ht){return st instanceof hn?new Vn(it,yi(it.mode,st.state),ht,st.lookAhead):new Vn(it,yi(it.mode,st),ht)},Vn.prototype.save=function(it){var st=it!==!1?yi(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new hn(st,this.maxLookAhead):st};function Fr(it,st,ht,ut){var dt=[it.state.modeGen],Ft={};xr(it,st.text,it.doc.mode,ht,function(ee,Ie){return dt.push(ee,Ie)},Ft,ut);for(var It=ht.state,zt=function(ee){ht.baseTokens=dt;var Ie=it.state.overlays[ee],oe=1,Ye=0;ht.state=!0,xr(it,st.text,Ie.mode,ht,function(ze,Hn){for(var Xn=oe;Ye<ze;){var di=dt[oe];di>ze&&dt.splice(oe,1,ze,dt[oe+1],di),oe+=2,Ye=Math.min(ze,di)}if(Hn)if(Ie.opaque)dt.splice(Xn,oe-Xn,ze,"overlay "+Hn),oe=Xn+2;else for(;Xn<oe;Xn+=2){var Li=dt[Xn+1];dt[Xn+1]=(Li?Li+" ":"")+"overlay "+Hn}},Ft),ht.state=It,ht.baseTokens=null,ht.baseTokenPos=1},Rt=0;Rt<it.state.overlays.length;++Rt)zt(Rt);return{styles:dt,classes:Ft.bgClass||Ft.textClass?Ft:null}}function Ur(it,st,ht){if(!st.styles||st.styles[0]!=it.state.modeGen){var ut=vo(it,Yt(st)),dt=st.text.length>it.options.maxHighlightLength&&yi(it.doc.mode,ut.state),Ft=Fr(it,st,ut);dt&&(ut.state=dt),st.stateAfter=ut.save(!dt),st.styles=Ft.styles,Ft.classes?st.styleClasses=Ft.classes:st.styleClasses&&(st.styleClasses=null),ht===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function vo(it,st,ht){var ut=it.doc,dt=it.display;if(!ut.mode.startState)return new Vn(ut,!0,st);var Ft=Ar(it,st,ht),It=Ft>ut.first&&Le(ut,Ft-1).stateAfter,zt=It?Vn.fromSaved(ut,It,Ft):new Vn(ut,Zi(ut.mode),Ft);return ut.iter(Ft,st,function(Rt){Be(it,Rt.text,zt);var ee=zt.line;Rt.stateAfter=ee==st-1||ee%5==0||ee>=dt.viewFrom&&ee<dt.viewTo?zt.save():null,zt.nextLine()}),ht&&(ut.modeFrontier=zt.line),zt}function Be(it,st,ht,ut){var dt=it.doc.mode,Ft=new He(st,it.options.tabSize,ht);for(Ft.start=Ft.pos=ut||0,st==""&&wi(dt,ht.state);!Ft.eol();)ir(dt,Ft,ht.state),Ft.start=Ft.pos}function wi(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ht=hi(it,st);if(ht.mode.blankLine)return ht.mode.blankLine(ht.state)}}function ir(it,st,ht,ut){for(var dt=0;dt<10;dt++){ut&&(ut[0]=hi(it,ht).mode);var Ft=it.token(st,ht);if(st.pos>st.start)return Ft}throw new Error("Mode "+it.name+" failed to advance stream.")}var li=function(it,st,ht){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ht};function br(it,st,ht,ut){var dt=it.doc,Ft=dt.mode,It;st=On(dt,st);var zt=Le(dt,st.line),Rt=vo(it,st.line,ht),ee=new He(zt.text,it.options.tabSize,Rt),Ie;for(ut&&(Ie=[]);(ut||ee.pos<st.ch)&&!ee.eol();)ee.start=ee.pos,It=ir(Ft,ee,Rt.state),ut&&Ie.push(new li(ee,It,yi(dt.mode,Rt.state)));return ut?Ie:new li(ee,It,Rt.state)}function lr(it,st){if(it)for(;;){var ht=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ht)break;it=it.slice(0,ht.index)+it.slice(ht.index+ht[0].length);var ut=ht[1]?"bgClass":"textClass";st[ut]==null?st[ut]=ht[2]:new RegExp("(?:^|\\s)"+ht[2]+"(?:$|\\s)").test(st[ut])||(st[ut]+=" "+ht[2])}return it}function xr(it,st,ht,ut,dt,Ft,It){var zt=ht.flattenSpans;zt==null&&(zt=it.options.flattenSpans);var Rt=0,ee=null,Ie=new He(st,it.options.tabSize,ut),oe,Ye=it.options.addModeClass&&[null];for(st==""&&lr(wi(ht,ut.state),Ft);!Ie.eol();){if(Ie.pos>it.options.maxHighlightLength?(zt=!1,It&&Be(it,st,ut,Ie.pos),Ie.pos=st.length,oe=null):oe=lr(ir(ht,Ie,ut.state,Ye),Ft),Ye){var ze=Ye[0].name;ze&&(oe="m-"+(oe?ze+" "+oe:ze))}if(!zt||ee!=oe){for(;Rt<Ie.start;)Rt=Math.min(Ie.start,Rt+5e3),dt(Rt,ee);ee=oe}Ie.start=Ie.pos}for(;Rt<Ie.pos;){var Hn=Math.min(Ie.pos,Rt+5e3);dt(Hn,ee),Rt=Hn}}function Ar(it,st,ht){for(var ut,dt,Ft=it.doc,It=ht?-1:st-(it.doc.mode.innerMode?1e3:100),zt=st;zt>It;--zt){if(zt<=Ft.first)return Ft.first;var Rt=Le(Ft,zt-1),ee=Rt.stateAfter;if(ee&&(!ht||zt+(ee instanceof hn?ee.lookAhead:0)<=Ft.modeFrontier))return zt;var Ie=ue(Rt.text,null,it.options.tabSize);(dt==null||ut>Ie)&&(dt=zt-1,ut=Ie)}return dt}function qt(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var ht=it.first,ut=st-1;ut>ht;ut--){var dt=Le(it,ut).stateAfter;if(dt&&(!(dt instanceof hn)||ut+dt.lookAhead<st)){ht=ut+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ht)}}var $t=!1,_t=!1;function Qe(){$t=!0}function le(){_t=!0}function rn(it,st,ht){this.marker=it,this.from=st,this.to=ht}function Wn(it,st){if(it)for(var ht=0;ht<it.length;++ht){var ut=it[ht];if(ut.marker==st)return ut}}function Un(it,st){for(var ht,ut=0;ut<it.length;++ut)it[ut]!=st&&(ht||(ht=[])).push(it[ut]);return ht}function mi(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function zn(it,st,ht){var ut;if(it)for(var dt=0;dt<it.length;++dt){var Ft=it[dt],It=Ft.marker,zt=Ft.from==null||(It.inclusiveLeft?Ft.from<=st:Ft.from<st);if(zt||Ft.from==st&&It.type=="bookmark"&&(!ht||!Ft.marker.insertLeft)){var Rt=Ft.to==null||(It.inclusiveRight?Ft.to>=st:Ft.to>st);(ut||(ut=[])).push(new rn(It,Ft.from,Rt?null:Ft.to))}}return ut}function cn(it,st,ht){var ut;if(it)for(var dt=0;dt<it.length;++dt){var Ft=it[dt],It=Ft.marker,zt=Ft.to==null||(It.inclusiveRight?Ft.to>=st:Ft.to>st);if(zt||Ft.from==st&&It.type=="bookmark"&&(!ht||Ft.marker.insertLeft)){var Rt=Ft.from==null||(It.inclusiveLeft?Ft.from<=st:Ft.from<st);(ut||(ut=[])).push(new rn(It,Rt?null:Ft.from-st,Ft.to==null?null:Ft.to-st))}}return ut}function Yn(it,st){if(st.full)return null;var ht=wn(it,st.from.line)&&Le(it,st.from.line).markedSpans,ut=wn(it,st.to.line)&&Le(it,st.to.line).markedSpans;if(!ht&&!ut)return null;var dt=st.from.ch,Ft=st.to.ch,It=mn(st.from,st.to)==0,zt=zn(ht,dt,It),Rt=cn(ut,Ft,It),ee=st.text.length==1,Ie=Fe(st.text).length+(ee?dt:0);if(zt)for(var oe=0;oe<zt.length;++oe){var Ye=zt[oe];if(Ye.to==null){var ze=Wn(Rt,Ye.marker);ze?ee&&(Ye.to=ze.to==null?null:ze.to+Ie):Ye.to=dt}}if(Rt)for(var Hn=0;Hn<Rt.length;++Hn){var Xn=Rt[Hn];if(Xn.to!=null&&(Xn.to+=Ie),Xn.from==null){var di=Wn(zt,Xn.marker);di||(Xn.from=Ie,ee&&(zt||(zt=[])).push(Xn))}else Xn.from+=Ie,ee&&(zt||(zt=[])).push(Xn)}zt&&(zt=Ki(zt)),Rt&&Rt!=zt&&(Rt=Ki(Rt));var Li=[zt];if(!ee){var Ji=st.text.length-2,Ri;if(Ji>0&&zt)for(var or=0;or<zt.length;++or)zt[or].to==null&&(Ri||(Ri=[])).push(new rn(zt[or].marker,null,null));for(var Ir=0;Ir<Ji;++Ir)Li.push(Ri);Li.push(Rt)}return Li}function Ki(it){for(var st=0;st<it.length;++st){var ht=it[st];ht.from!=null&&ht.from==ht.to&&ht.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function Wi(it,st,ht){var ut=null;if(it.iter(st.line,ht.line+1,function(ze){if(ze.markedSpans)for(var Hn=0;Hn<ze.markedSpans.length;++Hn){var Xn=ze.markedSpans[Hn].marker;Xn.readOnly&&(!ut||dn(ut,Xn)==-1)&&(ut||(ut=[])).push(Xn)}}),!ut)return null;for(var dt=[{from:st,to:ht}],Ft=0;Ft<ut.length;++Ft)for(var It=ut[Ft],zt=It.find(0),Rt=0;Rt<dt.length;++Rt){var ee=dt[Rt];if(!(mn(ee.to,zt.from)<0||mn(ee.from,zt.to)>0)){var Ie=[Rt,1],oe=mn(ee.from,zt.from),Ye=mn(ee.to,zt.to);(oe<0||!It.inclusiveLeft&&!oe)&&Ie.push({from:ee.from,to:zt.from}),(Ye>0||!It.inclusiveRight&&!Ye)&&Ie.push({from:zt.to,to:ee.to}),dt.splice.apply(dt,Ie),Rt+=Ie.length-3}}return dt}function vn(it){var st=it.markedSpans;if(st){for(var ht=0;ht<st.length;++ht)st[ht].marker.detachLine(it);it.markedSpans=null}}function Ht(it,st){if(st){for(var ht=0;ht<st.length;++ht)st[ht].marker.attachLine(it);it.markedSpans=st}}function Ii(it){return it.inclusiveLeft?-1:0}function Mr(it){return it.inclusiveRight?1:0}function Rr(it,st){var ht=it.lines.length-st.lines.length;if(ht!=0)return ht;var ut=it.find(),dt=st.find(),Ft=mn(ut.from,dt.from)||Ii(it)-Ii(st);if(Ft)return-Ft;var It=mn(ut.to,dt.to)||Mr(it)-Mr(st);return It||st.id-it.id}function yr(it,st){var ht=_t&&it.markedSpans,ut;if(ht)for(var dt=void 0,Ft=0;Ft<ht.length;++Ft)dt=ht[Ft],dt.marker.collapsed&&(st?dt.from:dt.to)==null&&(!ut||Rr(ut,dt.marker)<0)&&(ut=dt.marker);return ut}function Ei(it){return yr(it,!0)}function jn(it){return yr(it,!1)}function oi(it,st){var ht=_t&&it.markedSpans,ut;if(ht)for(var dt=0;dt<ht.length;++dt){var Ft=ht[dt];Ft.marker.collapsed&&(Ft.from==null||Ft.from<st)&&(Ft.to==null||Ft.to>st)&&(!ut||Rr(ut,Ft.marker)<0)&&(ut=Ft.marker)}return ut}function Pi(it,st,ht,ut,dt){var Ft=Le(it,st),It=_t&&Ft.markedSpans;if(It)for(var zt=0;zt<It.length;++zt){var Rt=It[zt];if(Rt.marker.collapsed){var ee=Rt.marker.find(0),Ie=mn(ee.from,ht)||Ii(Rt.marker)-Ii(dt),oe=mn(ee.to,ut)||Mr(Rt.marker)-Mr(dt);if(!(Ie>=0&&oe<=0||Ie<=0&&oe>=0)&&(Ie<=0&&(Rt.marker.inclusiveRight&&dt.inclusiveLeft?mn(ee.to,ht)>=0:mn(ee.to,ht)>0)||Ie>=0&&(Rt.marker.inclusiveRight&&dt.inclusiveLeft?mn(ee.from,ut)<=0:mn(ee.from,ut)<0)))return!0}}}function Tn(it){for(var st;st=Ei(it);)it=st.find(-1,!0).line;return it}function ti(it){for(var st;st=jn(it);)it=st.find(1,!0).line;return it}function Jn(it){for(var st,ht;st=jn(it);)it=st.find(1,!0).line,(ht||(ht=[])).push(it);return ht}function Mn(it,st){var ht=Le(it,st),ut=Tn(ht);return ht==ut?st:Yt(ut)}function ci(it,st){if(st>it.lastLine())return st;var ht=Le(it,st),ut;if(!Je(it,ht))return st;for(;ut=jn(ht);)ht=ut.find(1,!0).line;return Yt(ht)+1}function Je(it,st){var ht=_t&&st.markedSpans;if(ht){for(var ut=void 0,dt=0;dt<ht.length;++dt)if(ut=ht[dt],!!ut.marker.collapsed){if(ut.from==null)return!0;if(!ut.marker.widgetNode&&ut.from==0&&ut.marker.inclusiveLeft&&er(it,st,ut))return!0}}}function er(it,st,ht){if(ht.to==null){var ut=ht.marker.find(1,!0);return er(it,ut.line,Wn(ut.line.markedSpans,ht.marker))}if(ht.marker.inclusiveRight&&ht.to==st.text.length)return!0;for(var dt=void 0,Ft=0;Ft<st.markedSpans.length;++Ft)if(dt=st.markedSpans[Ft],dt.marker.collapsed&&!dt.marker.widgetNode&&dt.from==ht.to&&(dt.to==null||dt.to!=ht.from)&&(dt.marker.inclusiveLeft||ht.marker.inclusiveRight)&&er(it,st,dt))return!0}function fr(it){it=Tn(it);for(var st=0,ht=it.parent,ut=0;ut<ht.lines.length;++ut){var dt=ht.lines[ut];if(dt==it)break;st+=dt.height}for(var Ft=ht.parent;Ft;ht=Ft,Ft=ht.parent)for(var It=0;It<Ft.children.length;++It){var zt=Ft.children[It];if(zt==ht)break;st+=zt.height}return st}function Or(it){if(it.height==0)return 0;for(var st=it.text.length,ht,ut=it;ht=Ei(ut);){var dt=ht.find(0,!0);ut=dt.from.line,st+=dt.from.ch-dt.to.ch}for(ut=it;ht=jn(ut);){var Ft=ht.find(0,!0);st-=ut.text.length-Ft.from.ch,ut=Ft.to.line,st+=ut.text.length-Ft.to.ch}return st}function nr(it){var st=it.display,ht=it.doc;st.maxLine=Le(ht,ht.first),st.maxLineLength=Or(st.maxLine),st.maxLineChanged=!0,ht.iter(function(ut){var dt=Or(ut);dt>st.maxLineLength&&(st.maxLineLength=dt,st.maxLine=ut)})}var jr=function(it,st,ht){this.text=it,Ht(this,st),this.height=ht?ht(this):1};jr.prototype.lineNo=function(){return Yt(this)},mr(jr);function Kr(it,st,ht,ut){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),vn(it),Ht(it,ht);var dt=ut?ut(it):1;dt!=it.height&&sn(it,dt)}function Ho(it){it.parent=null,vn(it)}var ao={},bo={};function ho(it,st){if(!it||/^\s*$/.test(it))return null;var ht=st.addModeClass?bo:ao;return ht[it]||(ht[it]=it.replace(/\S+/g,"cm-$&"))}function be(it,st){var ht=De("span",null,null,pe?"padding-right: .1px":null),ut={pre:De("pre",[ht],"CodeMirror-line"),content:ht,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var dt=0;dt<=(st.rest?st.rest.length:0);dt++){var Ft=dt?st.rest[dt-1]:st.line,It=void 0;ut.pos=0,ut.addToken=ls,tr(it.display.measure)&&(It=ai(Ft,it.doc.direction))&&(ut.addToken=lo(ut.addToken,It)),ut.map=[];var zt=st!=it.display.externalMeasured&&Yt(Ft);ta(Ft,ut,Ur(it,Ft,zt)),Ft.styleClasses&&(Ft.styleClasses.bgClass&&(ut.bgClass=In(Ft.styleClasses.bgClass,ut.bgClass||"")),Ft.styleClasses.textClass&&(ut.textClass=In(Ft.styleClasses.textClass,ut.textClass||""))),ut.map.length==0&&ut.map.push(0,0,ut.content.appendChild(ko(it.display.measure))),dt==0?(st.measure.map=ut.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(ut.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(pe){var Rt=ut.content.lastChild;(/\bcm-tab\b/.test(Rt.className)||Rt.querySelector&&Rt.querySelector(".cm-tab"))&&(ut.content.className="cm-tab-wrap-hack")}return ji(it,"renderLine",it,st.line,ut.pre),ut.pre.className&&(ut.textClass=In(ut.pre.className,ut.textClass||"")),ut}function co(it){var st=Ae("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function ls(it,st,ht,ut,dt,Ft,It){if(st){var zt=it.splitSpaces?ks(st,it.trailingSpace):st,Rt=it.cm.state.specialChars,ee=!1,Ie;if(!Rt.test(st))it.col+=st.length,Ie=document.createTextNode(zt),it.map.push(it.pos,it.pos+st.length,Ie),ke&&ye<9&&(ee=!0),it.pos+=st.length;else{Ie=document.createDocumentFragment();for(var oe=0;;){Rt.lastIndex=oe;var Ye=Rt.exec(st),ze=Ye?Ye.index-oe:st.length-oe;if(ze){var Hn=document.createTextNode(zt.slice(oe,oe+ze));ke&&ye<9?Ie.appendChild(Ae("span",[Hn])):Ie.appendChild(Hn),it.map.push(it.pos,it.pos+ze,Hn),it.col+=ze,it.pos+=ze}if(!Ye)break;oe+=ze+1;var Xn=void 0;if(Ye[0]==" "){var di=it.cm.options.tabSize,Li=di-it.col%di;Xn=Ie.appendChild(Ae("span",Se(Li),"cm-tab")),Xn.setAttribute("role","presentation"),Xn.setAttribute("cm-text"," "),it.col+=Li}else Ye[0]=="\r"||Ye[0]==`
|
|
`?(Xn=Ie.appendChild(Ae("span",Ye[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Xn.setAttribute("cm-text",Ye[0]),it.col+=1):(Xn=it.cm.options.specialCharPlaceholder(Ye[0]),Xn.setAttribute("cm-text",Ye[0]),ke&&ye<9?Ie.appendChild(Ae("span",[Xn])):Ie.appendChild(Xn),it.col+=1);it.map.push(it.pos,it.pos+1,Xn),it.pos++}}if(it.trailingSpace=zt.charCodeAt(st.length-1)==32,ht||ut||dt||ee||Ft||It){var Ji=ht||"";ut&&(Ji+=ut),dt&&(Ji+=dt);var Ri=Ae("span",[Ie],Ji,Ft);if(It)for(var or in It)It.hasOwnProperty(or)&&or!="style"&&or!="class"&&Ri.setAttribute(or,It[or]);return it.content.appendChild(Ri)}it.content.appendChild(Ie)}}function ks(it,st){if(it.length>1&&!/ /.test(it))return it;for(var ht=st,ut="",dt=0;dt<it.length;dt++){var Ft=it.charAt(dt);Ft==" "&&ht&&(dt==it.length-1||it.charCodeAt(dt+1)==32)&&(Ft="\xA0"),ut+=Ft,ht=Ft==" "}return ut}function lo(it,st){return function(ht,ut,dt,Ft,It,zt,Rt){dt=dt?dt+" cm-force-border":"cm-force-border";for(var ee=ht.pos,Ie=ee+ut.length;;){for(var oe=void 0,Ye=0;Ye<st.length&&(oe=st[Ye],!(oe.to>ee&&oe.from<=ee));Ye++);if(oe.to>=Ie)return it(ht,ut,dt,Ft,It,zt,Rt);it(ht,ut.slice(0,oe.to-ee),dt,Ft,null,zt,Rt),Ft=null,ut=ut.slice(oe.to-ee),ee=oe.to}}}function xa(it,st,ht,ut){var dt=!ut&&ht.widgetNode;dt&&it.map.push(it.pos,it.pos+st,dt),!ut&&it.cm.display.input.needsContentAttribute&&(dt||(dt=it.content.appendChild(document.createElement("span"))),dt.setAttribute("cm-marker",ht.id)),dt&&(it.cm.display.input.setUneditable(dt),it.content.appendChild(dt)),it.pos+=st,it.trailingSpace=!1}function ta(it,st,ht){var ut=it.markedSpans,dt=it.text,Ft=0;if(!ut){for(var It=1;It<ht.length;It+=2)st.addToken(st,dt.slice(Ft,Ft=ht[It]),ho(ht[It+1],st.cm.options));return}for(var zt=dt.length,Rt=0,ee=1,Ie="",oe,Ye,ze=0,Hn,Xn,di,Li,Ji;;){if(ze==Rt){Hn=Xn=di=Ye="",Ji=null,Li=null,ze=1/0;for(var Ri=[],or=void 0,Ir=0;Ir<ut.length;++Ir){var Hi=ut[Ir],eo=Hi.marker;if(eo.type=="bookmark"&&Hi.from==Rt&&eo.widgetNode)Ri.push(eo);else if(Hi.from<=Rt&&(Hi.to==null||Hi.to>Rt||eo.collapsed&&Hi.to==Rt&&Hi.from==Rt)){if(Hi.to!=null&&Hi.to!=Rt&&ze>Hi.to&&(ze=Hi.to,Xn=""),eo.className&&(Hn+=" "+eo.className),eo.css&&(Ye=(Ye?Ye+";":"")+eo.css),eo.startStyle&&Hi.from==Rt&&(di+=" "+eo.startStyle),eo.endStyle&&Hi.to==ze&&(or||(or=[])).push(eo.endStyle,Hi.to),eo.title&&((Ji||(Ji={})).title=eo.title),eo.attributes)for(var cs in eo.attributes)(Ji||(Ji={}))[cs]=eo.attributes[cs];eo.collapsed&&(!Li||Rr(Li.marker,eo)<0)&&(Li=Hi)}else Hi.from>Rt&&ze>Hi.from&&(ze=Hi.from)}if(or)for(var na=0;na<or.length;na+=2)or[na+1]==ze&&(Xn+=" "+or[na]);if(!Li||Li.from==Rt)for(var ws=0;ws<Ri.length;++ws)xa(st,0,Ri[ws]);if(Li&&(Li.from||0)==Rt){if(xa(st,(Li.to==null?zt+1:Li.to)-Rt,Li.marker,Li.from==null),Li.to==null)return;Li.to==Rt&&(Li=!1)}}if(Rt>=zt)break;for(var qa=Math.min(zt,ze);;){if(Ie){var ua=Rt+Ie.length;if(!Li){var Js=ua>qa?Ie.slice(0,qa-Rt):Ie;st.addToken(st,Js,oe?oe+Hn:Hn,di,Rt+Js.length==ze?Xn:"",Ye,Ji)}if(ua>=qa){Ie=Ie.slice(qa-Rt),Rt=qa;break}Rt=ua,di=""}Ie=dt.slice(Ft,Ft=ht[ee++]),oe=ho(ht[ee++],st.cm.options)}}}function Da(it,st,ht){this.line=st,this.rest=Jn(st),this.size=this.rest?Yt(Fe(this.rest))-ht+1:1,this.node=this.text=null,this.hidden=Je(it,st)}function Gr(it,st,ht){for(var ut=[],dt,Ft=st;Ft<ht;Ft=dt){var It=new Da(it.doc,Le(it.doc,Ft),Ft);dt=Ft+It.size,ut.push(It)}return ut}var Ro=null;function Vs(it){Ro?Ro.ops.push(it):it.ownsGroup=Ro={ops:[it],delayedCallbacks:[]}}function Vl(it){var st=it.delayedCallbacks,ht=0;do{for(;ht<st.length;ht++)st[ht].call(null);for(var ut=0;ut<it.ops.length;ut++){var dt=it.ops[ut];if(dt.cursorActivityHandlers)for(;dt.cursorActivityCalled<dt.cursorActivityHandlers.length;)dt.cursorActivityHandlers[dt.cursorActivityCalled++].call(null,dt.cm)}}while(ht<st.length)}function zA(it,st){var ht=it.ownsGroup;if(ht)try{Vl(ht)}finally{Ro=null,st(ht)}}var Ba=null;function Xi(it,st){var ht=_i(it,st);if(ht.length){var ut=Array.prototype.slice.call(arguments,2),dt;Ro?dt=Ro.delayedCallbacks:Ba?dt=Ba:(dt=Ba=[],setTimeout(xA,0));for(var Ft=function(zt){dt.push(function(){return ht[zt].apply(null,ut)})},It=0;It<ht.length;++It)Ft(It)}}function xA(){var it=Ba;Ba=null;for(var st=0;st<it.length;++st)it[st]()}function jA(it,st,ht,ut){for(var dt=0;dt<st.changes.length;dt++){var Ft=st.changes[dt];Ft=="text"?ni(it,st):Ft=="gutter"?dr(it,st,ht,ut):Ft=="class"?$i(it,st):Ft=="widget"&&Cr(it,st,ut)}st.changes=null}function Wa(it){return it.node==it.text&&(it.node=Ae("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),ke&&ye<8&&(it.node.style.zIndex=2)),it.node}function Hs(it,st){var ht=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(ht&&(ht+=" CodeMirror-linebackground"),st.background)ht?st.background.className=ht:(st.background.parentNode.removeChild(st.background),st.background=null);else if(ht){var ut=Wa(st);st.background=ut.insertBefore(Ae("div",null,ht),ut.firstChild),it.display.input.setUneditable(st.background)}}function hu(it,st){var ht=it.display.externalMeasured;return ht&&ht.line==st.line?(it.display.externalMeasured=null,st.measure=ht.measure,ht.built):be(it,st)}function ni(it,st){var ht=st.text.className,ut=hu(it,st);st.text==st.node&&(st.node=ut.pre),st.text.parentNode.replaceChild(ut.pre,st.text),st.text=ut.pre,ut.bgClass!=st.bgClass||ut.textClass!=st.textClass?(st.bgClass=ut.bgClass,st.textClass=ut.textClass,$i(it,st)):ht&&(st.text.className=ht)}function $i(it,st){Hs(it,st),st.line.wrapClass?Wa(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var ht=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=ht||""}function dr(it,st,ht,ut){if(st.gutter&&(st.node.removeChild(st.gutter),st.gutter=null),st.gutterBackground&&(st.node.removeChild(st.gutterBackground),st.gutterBackground=null),st.line.gutterClass){var dt=Wa(st);st.gutterBackground=Ae("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?ut.fixedPos:-ut.gutterTotalWidth)+"px; width: "+ut.gutterTotalWidth+"px"),it.display.input.setUneditable(st.gutterBackground),dt.insertBefore(st.gutterBackground,st.text)}var Ft=st.line.gutterMarkers;if(it.options.lineNumbers||Ft){var It=Wa(st),zt=st.gutter=Ae("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ut.fixedPos:-ut.gutterTotalWidth)+"px");if(it.display.input.setUneditable(zt),It.insertBefore(zt,st.text),st.line.gutterClass&&(zt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Ft||!Ft["CodeMirror-linenumbers"])&&(st.lineNumber=zt.appendChild(Ae("div",un(it.options,ht),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ut.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Ft)for(var Rt=0;Rt<it.display.gutterSpecs.length;++Rt){var ee=it.display.gutterSpecs[Rt].className,Ie=Ft.hasOwnProperty(ee)&&Ft[ee];Ie&&zt.appendChild(Ae("div",[Ie],"CodeMirror-gutter-elt","left: "+ut.gutterLeft[ee]+"px; width: "+ut.gutterWidth[ee]+"px"))}}}function Cr(it,st,ht){st.alignable&&(st.alignable=null);for(var ut=Vt("CodeMirror-linewidget"),dt=st.node.firstChild,Ft=void 0;dt;dt=Ft)Ft=dt.nextSibling,ut.test(dt.className)&&st.node.removeChild(dt);So(it,st,ht)}function Dr(it,st,ht,ut){var dt=hu(it,st);return st.text=st.node=dt.pre,dt.bgClass&&(st.bgClass=dt.bgClass),dt.textClass&&(st.textClass=dt.textClass),$i(it,st),dr(it,st,ht,ut),So(it,st,ut),st.node}function So(it,st,ht){if(Ui(it,st.line,st,ht,!0),st.rest)for(var ut=0;ut<st.rest.length;ut++)Ui(it,st.rest[ut],st,ht,!1)}function Ui(it,st,ht,ut,dt){if(st.widgets)for(var Ft=Wa(ht),It=0,zt=st.widgets;It<zt.length;++It){var Rt=zt[It],ee=Ae("div",[Rt.node],"CodeMirror-linewidget"+(Rt.className?" "+Rt.className:""));Rt.handleMouseEvents||ee.setAttribute("cm-ignore-events","true"),xo(Rt,ee,ht,ut),it.display.input.setUneditable(ee),dt&&Rt.above?Ft.insertBefore(ee,ht.gutter||ht.text):Ft.appendChild(ee),Xi(Rt,"redraw")}}function xo(it,st,ht,ut){if(it.noHScroll){(ht.alignable||(ht.alignable=[])).push(st);var dt=ut.wrapperWidth;st.style.left=ut.fixedPos+"px",it.coverGutter||(dt-=ut.gutterTotalWidth,st.style.paddingLeft=ut.gutterTotalWidth+"px"),st.style.width=dt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-ut.gutterTotalWidth+"px"))}function ea(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!We(document.body,it.node)){var ht="position: relative;";it.coverGutter&&(ht+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ht+="width: "+st.display.wrapper.clientWidth+"px;"),de(st.display.measure,Ae("div",[it.node],null,ht))}return it.height=it.node.parentNode.offsetHeight}function Bs(it,st){for(var ht=kr(st);ht!=it.wrapper;ht=ht.parentNode)if(!ht||ht.nodeType==1&&ht.getAttribute("cm-ignore-events")=="true"||ht.parentNode==it.sizer&&ht!=it.mover)return!0}function Go(it){return it.lineSpace.offsetTop}function _s(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function bs(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=de(it.measure,Ae("pre","x","CodeMirror-line-like")),ht=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,ut={left:parseInt(ht.paddingLeft),right:parseInt(ht.paddingRight)};return!isNaN(ut.left)&&!isNaN(ut.right)&&(it.cachedPaddingH=ut),ut}function ca(it){return Ai-it.display.nativeBarWidth}function Ws(it){return it.display.scroller.clientWidth-ca(it)-it.display.barWidth}function ns(it){return it.display.scroller.clientHeight-ca(it)-it.display.barHeight}function xl(it,st,ht){var ut=it.options.lineWrapping,dt=ut&&Ws(it);if(!st.measure.heights||ut&&st.measure.width!=dt){var Ft=st.measure.heights=[];if(ut){st.measure.width=dt;for(var It=st.text.firstChild.getClientRects(),zt=0;zt<It.length-1;zt++){var Rt=It[zt],ee=It[zt+1];Math.abs(Rt.bottom-ee.bottom)>2&&Ft.push((Rt.bottom+ee.top)/2-ht.top)}}Ft.push(ht.bottom-ht.top)}}function Ts(it,st,ht){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var ut=0;ut<it.rest.length;ut++)if(it.rest[ut]==st)return{map:it.measure.maps[ut],cache:it.measure.caches[ut]};for(var dt=0;dt<it.rest.length;dt++)if(Yt(it.rest[dt])>ht)return{map:it.measure.maps[dt],cache:it.measure.caches[dt],before:!0}}function Zu(it,st){st=Tn(st);var ht=Yt(st),ut=it.display.externalMeasured=new Da(it.doc,st,ht);ut.lineN=ht;var dt=ut.built=be(it,ut);return ut.text=dt.pre,de(it.display.lineMeasure,dt.pre),ut}function Il(it,st,ht,ut){return al(it,No(it,st),ht,ut)}function Ya(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[Al(it,st)];var ht=it.display.externalMeasured;if(ht&&st>=ht.lineN&&st<ht.lineN+ht.size)return ht}function No(it,st){var ht=Yt(st),ut=Ya(it,ht);ut&&!ut.text?ut=null:ut&&ut.changes&&(jA(it,ut,ht,KA(it)),it.curOp.forceUpdate=!0),ut||(ut=Zu(it,st));var dt=Ts(ut,st,ht);return{line:st,view:ut,rect:null,map:dt.map,cache:dt.cache,before:dt.before,hasHeights:!1}}function al(it,st,ht,ut,dt){st.before&&(ht=-1);var Ft=ht+(ut||""),It;return st.cache.hasOwnProperty(Ft)?It=st.cache[Ft]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(xl(it,st.view,st.rect),st.hasHeights=!0),It=is(it,st,ht,ut),It.bogus||(st.cache[Ft]=It)),{left:It.left,right:It.right,top:dt?It.rtop:It.top,bottom:dt?It.rbottom:It.bottom}}var Ju={left:0,right:0,top:0,bottom:0};function qu(it,st,ht){for(var ut,dt,Ft,It,zt,Rt,ee=0;ee<it.length;ee+=3)if(zt=it[ee],Rt=it[ee+1],st<zt?(dt=0,Ft=1,It="left"):st<Rt?(dt=st-zt,Ft=dt+1):(ee==it.length-3||st==Rt&&it[ee+3]>st)&&(Ft=Rt-zt,dt=Ft-1,st>=Rt&&(It="right")),dt!=null){if(ut=it[ee+2],zt==Rt&&ht==(ut.insertLeft?"left":"right")&&(It=ht),ht=="left"&&dt==0)for(;ee&&it[ee-2]==it[ee-3]&&it[ee-1].insertLeft;)ut=it[(ee-=3)+2],It="left";if(ht=="right"&&dt==Rt-zt)for(;ee<it.length-3&&it[ee+3]==it[ee+4]&&!it[ee+5].insertLeft;)ut=it[(ee+=3)+2],It="right";break}return{node:ut,start:dt,end:Ft,collapse:It,coverStart:zt,coverEnd:Rt}}function Eh(it,st){var ht=Ju;if(st=="left")for(var ut=0;ut<it.length&&(ht=it[ut]).left==ht.right;ut++);else for(var dt=it.length-1;dt>=0&&(ht=it[dt]).left==ht.right;dt--);return ht}function is(it,st,ht,ut){var dt=qu(st.map,ht,ut),Ft=dt.node,It=dt.start,zt=dt.end,Rt=dt.collapse,ee;if(Ft.nodeType==3){for(var Ie=0;Ie<4;Ie++){for(;It&&on(st.line.text.charAt(dt.coverStart+It));)--It;for(;dt.coverStart+zt<dt.coverEnd&&on(st.line.text.charAt(dt.coverStart+zt));)++zt;if(ke&&ye<9&&It==0&&zt==dt.coverEnd-dt.coverStart?ee=Ft.parentNode.getBoundingClientRect():ee=Eh(ve(Ft,It,zt).getClientRects(),ut),ee.left||ee.right||It==0)break;zt=It,It=It-1,Rt="right"}ke&&ye<11&&(ee=Lc(it.display.measure,ee))}else{It>0&&(Rt=ut="right");var oe;it.options.lineWrapping&&(oe=Ft.getClientRects()).length>1?ee=oe[ut=="right"?oe.length-1:0]:ee=Ft.getBoundingClientRect()}if(ke&&ye<9&&!It&&(!ee||!ee.left&&!ee.right)){var Ye=Ft.parentNode.getClientRects()[0];Ye?ee={left:Ye.left,right:Ye.left+_l(it.display),top:Ye.top,bottom:Ye.bottom}:ee=Ju}for(var ze=ee.top-st.rect.top,Hn=ee.bottom-st.rect.top,Xn=(ze+Hn)/2,di=st.view.measure.heights,Li=0;Li<di.length-1&&!(Xn<di[Li]);Li++);var Ji=Li?di[Li-1]:0,Ri=di[Li],or={left:(Rt=="right"?ee.right:ee.left)-st.rect.left,right:(Rt=="left"?ee.left:ee.right)-st.rect.left,top:Ji,bottom:Ri};return!ee.left&&!ee.right&&(or.bogus=!0),it.options.singleCursorHeightPerLine||(or.rtop=ze,or.rbottom=Hn),or}function Lc(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!ri(it))return st;var ht=screen.logicalXDPI/screen.deviceXDPI,ut=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*ht,right:st.right*ht,top:st.top*ut,bottom:st.bottom*ut}}function $u(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var st=0;st<it.rest.length;st++)it.measure.caches[st]={}}function fa(it){it.display.externalMeasure=null,ce(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)$u(it.display.view[st])}function ll(it){fa(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function vs(){return Pe&&et?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Io(){return Pe&&et?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function rs(it){var st=0;if(it.widgets)for(var ht=0;ht<it.widgets.length;++ht)it.widgets[ht].above&&(st+=ea(it.widgets[ht]));return st}function Ys(it,st,ht,ut,dt){if(!dt){var Ft=rs(st);ht.top+=Ft,ht.bottom+=Ft}if(ut=="line")return ht;ut||(ut="local");var It=fr(st);if(ut=="local"?It+=Go(it.display):It-=it.display.viewOffset,ut=="page"||ut=="window"){var zt=it.display.lineSpace.getBoundingClientRect();It+=zt.top+(ut=="window"?0:Io());var Rt=zt.left+(ut=="window"?0:vs());ht.left+=Rt,ht.right+=Rt}return ht.top+=It,ht.bottom+=It,ht}function th(it,st,ht){if(ht=="div")return st;var ut=st.left,dt=st.top;if(ht=="page")ut-=vs(),dt-=Io();else if(ht=="local"||!ht){var Ft=it.display.sizer.getBoundingClientRect();ut+=Ft.left,dt+=Ft.top}var It=it.display.lineSpace.getBoundingClientRect();return{left:ut-It.left,top:dt-It.top}}function BA(it,st,ht,ut,dt){return ut||(ut=Le(it.doc,st.line)),Ys(it,ut,Il(it,ut,st.ch,dt),ht)}function Wo(it,st,ht,ut,dt,Ft){ut=ut||Le(it.doc,st.line),dt||(dt=No(it,ut));function It(Hn,Xn){var di=al(it,dt,Hn,Xn?"right":"left",Ft);return Xn?di.left=di.right:di.right=di.left,Ys(it,ut,di,ht)}var zt=ai(ut,it.doc.direction),Rt=st.ch,ee=st.sticky;if(Rt>=ut.text.length?(Rt=ut.text.length,ee="before"):Rt<=0&&(Rt=0,ee="after"),!zt)return It(ee=="before"?Rt-1:Rt,ee=="before");function Ie(Hn,Xn,di){var Li=zt[Xn],Ji=Li.level==1;return It(di?Hn-1:Hn,Ji!=di)}var oe=Zn(zt,Rt,ee),Ye=_e,ze=Ie(Rt,oe,ee=="before");return Ye!=null&&(ze.other=Ie(Rt,Ye,ee!="before")),ze}function Mo(it,st){var ht=0;st=On(it.doc,st),it.options.lineWrapping||(ht=_l(it.display)*st.ch);var ut=Le(it.doc,st.line),dt=fr(ut)+Go(it.display);return{left:ht,right:ht,top:dt,bottom:dt+ut.height}}function Xr(it,st,ht,ut,dt){var Ft=Ne(it,st,ht);return Ft.xRel=dt,ut&&(Ft.outside=ut),Ft}function ys(it,st,ht){var ut=it.doc;if(ht+=it.display.viewOffset,ht<0)return Xr(ut.first,0,null,-1,-1);var dt=he(ut,ht),Ft=ut.first+ut.size-1;if(dt>Ft)return Xr(ut.first+ut.size-1,Le(ut,Ft).text.length,null,1,1);st<0&&(st=0);for(var It=Le(ut,dt);;){var zt=qe(it,It,dt,st,ht),Rt=oi(It,zt.ch+(zt.xRel>0||zt.outside>0?1:0));if(!Rt)return zt;var ee=Rt.find(1);if(ee.line==dt)return ee;It=Le(ut,dt=ee.line)}}function Fi(it,st,ht,ut){ut-=rs(st);var dt=st.text.length,Ft=Qn(function(It){return al(it,ht,It-1).bottom<=ut},dt,0);return dt=Qn(function(It){return al(it,ht,It).top>ut},Ft,dt),{begin:Ft,end:dt}}function Rs(it,st,ht,ut){ht||(ht=No(it,st));var dt=Ys(it,st,al(it,ht,ut),"line").top;return Fi(it,st,ht,dt)}function se(it,st,ht,ut){return it.bottom<=ht?!1:it.top>ht?!0:(ut?it.left:it.right)>st}function qe(it,st,ht,ut,dt){dt-=fr(st);var Ft=No(it,st),It=rs(st),zt=0,Rt=st.text.length,ee=!0,Ie=ai(st,it.doc.direction);if(Ie){var oe=(it.options.lineWrapping?CA:Nl)(it,st,ht,Ft,Ie,ut,dt);ee=oe.level!=1,zt=ee?oe.from:oe.to-1,Rt=ee?oe.to:oe.from-1}var Ye=null,ze=null,Hn=Qn(function(Ir){var Hi=al(it,Ft,Ir);return Hi.top+=It,Hi.bottom+=It,se(Hi,ut,dt,!1)?(Hi.top<=dt&&Hi.left<=ut&&(Ye=Ir,ze=Hi),!0):!1},zt,Rt),Xn,di,Li=!1;if(ze){var Ji=ut-ze.left<ze.right-ut,Ri=Ji==ee;Hn=Ye+(Ri?0:1),di=Ri?"after":"before",Xn=Ji?ze.left:ze.right}else{!ee&&(Hn==Rt||Hn==zt)&&Hn++,di=Hn==0?"after":Hn==st.text.length?"before":al(it,Ft,Hn-(ee?1:0)).bottom+It<=dt==ee?"after":"before";var or=Wo(it,Ne(ht,Hn,di),"line",st,Ft);Xn=or.left,Li=dt<or.top?-1:dt>=or.bottom?1:0}return Hn=Gn(st.text,Hn,1),Xr(ht,Hn,di,Li,ut-Xn)}function Nl(it,st,ht,ut,dt,Ft,It){var zt=Qn(function(oe){var Ye=dt[oe],ze=Ye.level!=1;return se(Wo(it,Ne(ht,ze?Ye.to:Ye.from,ze?"before":"after"),"line",st,ut),Ft,It,!0)},0,dt.length-1),Rt=dt[zt];if(zt>0){var ee=Rt.level!=1,Ie=Wo(it,Ne(ht,ee?Rt.from:Rt.to,ee?"after":"before"),"line",st,ut);se(Ie,Ft,It,!0)&&Ie.top>It&&(Rt=dt[zt-1])}return Rt}function CA(it,st,ht,ut,dt,Ft,It){var zt=Fi(it,st,ut,It),Rt=zt.begin,ee=zt.end;/\s/.test(st.text.charAt(ee-1))&&ee--;for(var Ie=null,oe=null,Ye=0;Ye<dt.length;Ye++){var ze=dt[Ye];if(!(ze.from>=ee||ze.to<=Rt)){var Hn=ze.level!=1,Xn=al(it,ut,Hn?Math.min(ee,ze.to)-1:Math.max(Rt,ze.from)).right,di=Xn<Ft?Ft-Xn+1e9:Xn-Ft;(!Ie||oe>di)&&(Ie=ze,oe=di)}}return Ie||(Ie=dt[dt.length-1]),Ie.from<Rt&&(Ie={from:Rt,to:Ie.to,level:Ie.level}),Ie.to>ee&&(Ie={from:Ie.from,to:ee,level:Ie.level}),Ie}var Cs;function Ca(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(Cs==null){Cs=Ae("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)Cs.appendChild(document.createTextNode("x")),Cs.appendChild(Ae("br"));Cs.appendChild(document.createTextNode("x"))}de(it.measure,Cs);var ht=Cs.offsetHeight/50;return ht>3&&(it.cachedTextHeight=ht),ce(it.measure),ht||1}function _l(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=Ae("span","xxxxxxxxxx"),ht=Ae("pre",[st],"CodeMirror-line-like");de(it.measure,ht);var ut=st.getBoundingClientRect(),dt=(ut.right-ut.left)/10;return dt>2&&(it.cachedCharWidth=dt),dt||10}function KA(it){for(var st=it.display,ht={},ut={},dt=st.gutters.clientLeft,Ft=st.gutters.firstChild,It=0;Ft;Ft=Ft.nextSibling,++It){var zt=it.display.gutterSpecs[It].className;ht[zt]=Ft.offsetLeft+Ft.clientLeft+dt,ut[zt]=Ft.clientWidth}return{fixedPos:cu(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ht,gutterWidth:ut,wrapperWidth:st.wrapper.clientWidth}}function cu(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function As(it){var st=Ca(it.display),ht=it.options.lineWrapping,ut=ht&&Math.max(5,it.display.scroller.clientWidth/_l(it.display)-3);return function(dt){if(Je(it.doc,dt))return 0;var Ft=0;if(dt.widgets)for(var It=0;It<dt.widgets.length;It++)dt.widgets[It].height&&(Ft+=dt.widgets[It].height);return ht?Ft+(Math.ceil(dt.text.length/ut)||1)*st:Ft+st}}function gr(it){var st=it.doc,ht=As(it);st.iter(function(ut){var dt=ht(ut);dt!=ut.height&&sn(ut,dt)})}function Pa(it,st,ht,ut){var dt=it.display;if(!ht&&kr(st).getAttribute("cm-not-content")=="true")return null;var Ft,It,zt=dt.lineSpace.getBoundingClientRect();try{Ft=st.clientX-zt.left,It=st.clientY-zt.top}catch(oe){return null}var Rt=ys(it,Ft,It),ee;if(ut&&Rt.xRel>0&&(ee=Le(it.doc,Rt.line).text).length==Rt.ch){var Ie=ue(ee,ee.length,it.options.tabSize)-ee.length;Rt=Ne(Rt.line,Math.max(0,Math.round((Ft-bs(it.display).left)/_l(it.display))-Ie))}return Rt}function Al(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var ht=it.display.view,ut=0;ut<ht.length;ut++)if(st-=ht[ut].size,st<0)return ut}function os(it,st,ht,ut){st==null&&(st=it.doc.first),ht==null&&(ht=it.doc.first+it.doc.size),ut||(ut=0);var dt=it.display;if(ut&&ht<dt.viewTo&&(dt.updateLineNumbers==null||dt.updateLineNumbers>st)&&(dt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=dt.viewTo)_t&&Mn(it.doc,st)<dt.viewTo&&Es(it);else if(ht<=dt.viewFrom)_t&&ci(it.doc,ht+ut)>dt.viewFrom?Es(it):(dt.viewFrom+=ut,dt.viewTo+=ut);else if(st<=dt.viewFrom&&ht>=dt.viewTo)Es(it);else if(st<=dt.viewFrom){var Ft=Oa(it,ht,ht+ut,1);Ft?(dt.view=dt.view.slice(Ft.index),dt.viewFrom=Ft.lineN,dt.viewTo+=ut):Es(it)}else if(ht>=dt.viewTo){var It=Oa(it,st,st,-1);It?(dt.view=dt.view.slice(0,It.index),dt.viewTo=It.lineN):Es(it)}else{var zt=Oa(it,st,st,-1),Rt=Oa(it,ht,ht+ut,1);zt&&Rt?(dt.view=dt.view.slice(0,zt.index).concat(Gr(it,zt.lineN,Rt.lineN)).concat(dt.view.slice(Rt.index)),dt.viewTo+=ut):Es(it)}var ee=dt.externalMeasured;ee&&(ht<ee.lineN?ee.lineN+=ut:st<ee.lineN+ee.size&&(dt.externalMeasured=null))}function Vr(it,st,ht){it.curOp.viewChanged=!0;var ut=it.display,dt=it.display.externalMeasured;if(dt&&st>=dt.lineN&&st<dt.lineN+dt.size&&(ut.externalMeasured=null),!(st<ut.viewFrom||st>=ut.viewTo)){var Ft=ut.view[Al(it,st)];if(Ft.node!=null){var It=Ft.changes||(Ft.changes=[]);dn(It,ht)==-1&&It.push(ht)}}}function Es(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Oa(it,st,ht,ut){var dt=Al(it,st),Ft,It=it.display.view;if(!_t||ht==it.doc.first+it.doc.size)return{index:dt,lineN:ht};for(var zt=it.display.viewFrom,Rt=0;Rt<dt;Rt++)zt+=It[Rt].size;if(zt!=st){if(ut>0){if(dt==It.length-1)return null;Ft=zt+It[dt].size-st,dt++}else Ft=zt-st;st+=Ft,ht+=Ft}for(;Mn(it.doc,ht)!=ht;){if(dt==(ut<0?0:It.length-1))return null;ht+=ut*It[dt-(ut<0?1:0)].size,dt+=ut}return{index:dt,lineN:ht}}function zo(it,st,ht){var ut=it.display,dt=ut.view;dt.length==0||st>=ut.viewTo||ht<=ut.viewFrom?(ut.view=Gr(it,st,ht),ut.viewFrom=st):(ut.viewFrom>st?ut.view=Gr(it,st,ut.viewFrom).concat(ut.view):ut.viewFrom<st&&(ut.view=ut.view.slice(Al(it,st))),ut.viewFrom=st,ut.viewTo<ht?ut.view=ut.view.concat(Gr(it,ut.viewTo,ht)):ut.viewTo>ht&&(ut.view=ut.view.slice(0,Al(it,ht)))),ut.viewTo=ht}function ul(it){for(var st=it.display.view,ht=0,ut=0;ut<st.length;ut++){var dt=st[ut];!dt.hidden&&(!dt.node||dt.changes)&&++ht}return ht}function Is(it){it.display.input.showSelection(it.display.input.prepareSelection())}function fu(it,st){st===void 0&&(st=!0);for(var ht=it.doc,ut={},dt=ut.cursors=document.createDocumentFragment(),Ft=ut.selection=document.createDocumentFragment(),It=0;It<ht.sel.ranges.length;It++)if(!(!st&&It==ht.sel.primIndex)){var zt=ht.sel.ranges[It];if(!(zt.from().line>=it.display.viewTo||zt.to().line<it.display.viewFrom)){var Rt=zt.empty();(Rt||it.options.showCursorWhenSelecting)&&yo(it,zt.head,dt),Rt||fo(it,zt,Ft)}}return ut}function yo(it,st,ht){var ut=Wo(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),dt=ht.appendChild(Ae("div","\xA0","CodeMirror-cursor"));if(dt.style.left=ut.left+"px",dt.style.top=ut.top+"px",dt.style.height=Math.max(0,ut.bottom-ut.top)*it.options.cursorHeight+"px",ut.other){var Ft=ht.appendChild(Ae("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Ft.style.display="",Ft.style.left=ut.other.left+"px",Ft.style.top=ut.other.top+"px",Ft.style.height=(ut.other.bottom-ut.other.top)*.85+"px"}}function da(it,st){return it.top-st.top||it.left-st.left}function fo(it,st,ht){var ut=it.display,dt=it.doc,Ft=document.createDocumentFragment(),It=bs(it.display),zt=It.left,Rt=Math.max(ut.sizerWidth,Ws(it)-ut.sizer.offsetLeft)-It.right,ee=dt.direction=="ltr";function Ie(Ri,or,Ir,Hi){or<0&&(or=0),or=Math.round(or),Hi=Math.round(Hi),Ft.appendChild(Ae("div",null,"CodeMirror-selected","position: absolute; left: "+Ri+`px;
|
|
top: `+or+"px; width: "+(Ir==null?Rt-Ri:Ir)+`px;
|
|
height: `+(Hi-or)+"px"))}function oe(Ri,or,Ir){var Hi=Le(dt,Ri),eo=Hi.text.length,cs,na;function ws(Js,Ga){return BA(it,Ne(Ri,Js),"div",Hi,Ga)}function qa(Js,Ga,pa){var Di=Rs(it,Hi,null,Js),wo=Ga=="ltr"==(pa=="after")?"left":"right",fs=pa=="after"?Di.begin:Di.end-(/\s/.test(Hi.text.charAt(Di.end-1))?2:1);return ws(fs,wo)[wo]}var ua=ai(Hi,dt.direction);return _n(ua,or||0,Ir==null?eo:Ir,function(Js,Ga,pa,Di){var wo=pa=="ltr",fs=ws(Js,wo?"left":"right"),es=ws(Ga-1,wo?"right":"left"),ma=or==null&&Js==0,Fo=Ir==null&&Ga==eo,Zr=Di==0,$a=!ua||Di==ua.length-1;if(es.top-fs.top<=3){var Ms=(ee?ma:Fo)&&Zr,Nu=(ee?Fo:ma)&&$a,Ll=Ms?zt:(wo?fs:es).left,La=Nu?Rt:(wo?es:fs).right;Ie(Ll,fs.top,La-Ll,fs.bottom)}else{var tl,Xo,ia,bA;wo?(tl=ee&&ma&&Zr?zt:fs.left,Xo=ee?Rt:qa(Js,pa,"before"),ia=ee?zt:qa(Ga,pa,"after"),bA=ee&&Fo&&$a?Rt:es.right):(tl=ee?qa(Js,pa,"before"):zt,Xo=!ee&&ma&&Zr?Rt:fs.right,ia=!ee&&Fo&&$a?zt:es.left,bA=ee?qa(Ga,pa,"after"):Rt),Ie(tl,fs.top,Xo-tl,fs.bottom),fs.bottom<es.top&&Ie(zt,fs.bottom,null,es.top),Ie(ia,es.top,bA-ia,es.bottom)}(!cs||da(fs,cs)<0)&&(cs=fs),da(es,cs)<0&&(cs=es),(!na||da(fs,na)<0)&&(na=fs),da(es,na)<0&&(na=es)}),{start:cs,end:na}}var Ye=st.from(),ze=st.to();if(Ye.line==ze.line)oe(Ye.line,Ye.ch,ze.ch);else{var Hn=Le(dt,Ye.line),Xn=Le(dt,ze.line),di=Tn(Hn)==Tn(Xn),Li=oe(Ye.line,Ye.ch,di?Hn.text.length+1:null).end,Ji=oe(ze.line,di?0:null,ze.ch).start;di&&(Li.top<Ji.top-2?(Ie(Li.right,Li.top,null,Li.bottom),Ie(zt,Ji.top,Ji.left,Ji.bottom)):Ie(Li.right,Li.top,Ji.left-Li.right,Li.bottom)),Li.bottom<Ji.top&&Ie(zt,Li.bottom,null,Ji.top)}ht.appendChild(Ft)}function Qo(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var ht=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||eh(it),st.cursorDiv.style.visibility=(ht=!ht)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function ts(it){it.state.focused||(it.display.input.focus(),Bo(it))}function ps(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,eh(it))},100)}function Bo(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(ji(it,"focus",it,st),it.state.focused=!0,an(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),pe&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),Qo(it))}function eh(it,st){it.state.delayingBlurEvent||(it.state.focused&&(ji(it,"blur",it,st),it.state.focused=!1,Jt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function ur(it){for(var st=it.display,ht=st.lineDiv.offsetTop,ut=0;ut<st.view.length;ut++){var dt=st.view[ut],Ft=it.options.lineWrapping,It=void 0,zt=0;if(!dt.hidden){if(ke&&ye<8){var Rt=dt.node.offsetTop+dt.node.offsetHeight;It=Rt-ht,ht=Rt}else{var ee=dt.node.getBoundingClientRect();It=ee.bottom-ee.top,!Ft&&dt.text.firstChild&&(zt=dt.text.firstChild.getBoundingClientRect().right-ee.left-1)}var Ie=dt.line.height-It;if((Ie>.005||Ie<-.005)&&(sn(dt.line,It),nh(dt.line),dt.rest))for(var oe=0;oe<dt.rest.length;oe++)nh(dt.rest[oe]);if(zt>it.display.sizerWidth){var Ye=Math.ceil(zt/_l(it.display));Ye>it.display.maxLineLength&&(it.display.maxLineLength=Ye,it.display.maxLine=dt.line,it.display.maxLineChanged=!0)}}}}function nh(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var ht=it.widgets[st],ut=ht.node.parentNode;ut&&(ht.height=ut.offsetHeight)}}function Ao(it,st,ht){var ut=ht&&ht.top!=null?Math.max(0,ht.top):it.scroller.scrollTop;ut=Math.floor(ut-Go(it));var dt=ht&&ht.bottom!=null?ht.bottom:ut+it.wrapper.clientHeight,Ft=he(st,ut),It=he(st,dt);if(ht&&ht.ensure){var zt=ht.ensure.from.line,Rt=ht.ensure.to.line;zt<Ft?(Ft=zt,It=he(st,fr(Le(st,zt))+it.wrapper.clientHeight)):Math.min(Rt,st.lastLine())>=It&&(Ft=he(st,fr(Le(st,Rt))-it.wrapper.clientHeight),It=Rt)}return{from:Ft,to:Math.max(It,Ft+1)}}function ig(it,st){if(!Vi(it,"scrollCursorIntoView")){var ht=it.display,ut=ht.sizer.getBoundingClientRect(),dt=null;if(st.top+ut.top<0?dt=!0:st.bottom+ut.top>(window.innerHeight||document.documentElement.clientHeight)&&(dt=!1),dt!=null&&!xn){var Ft=Ae("div","\u200B",null,`position: absolute;
|
|
top: `+(st.top-ht.viewOffset-Go(it.display))+`px;
|
|
height: `+(st.bottom-st.top+ca(it)+ht.barHeight)+`px;
|
|
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Ft),Ft.scrollIntoView(dt),it.display.lineSpace.removeChild(Ft)}}}function VA(it,st,ht,ut){ut==null&&(ut=0);var dt;!it.options.lineWrapping&&st==ht&&(st=st.ch?Ne(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ht=st.sticky=="before"?Ne(st.line,st.ch+1,"before"):st);for(var Ft=0;Ft<5;Ft++){var It=!1,zt=Wo(it,st),Rt=!ht||ht==st?zt:Wo(it,ht);dt={left:Math.min(zt.left,Rt.left),top:Math.min(zt.top,Rt.top)-ut,right:Math.max(zt.left,Rt.left),bottom:Math.max(zt.bottom,Rt.bottom)+ut};var ee=sd(it,dt),Ie=it.doc.scrollTop,oe=it.doc.scrollLeft;if(ee.scrollTop!=null&&(ih(it,ee.scrollTop),Math.abs(it.doc.scrollTop-Ie)>1&&(It=!0)),ee.scrollLeft!=null&&(WA(it,ee.scrollLeft),Math.abs(it.doc.scrollLeft-oe)>1&&(It=!0)),!It)break}return dt}function Ec(it,st){var ht=sd(it,st);ht.scrollTop!=null&&ih(it,ht.scrollTop),ht.scrollLeft!=null&&WA(it,ht.scrollLeft)}function sd(it,st){var ht=it.display,ut=Ca(it.display);st.top<0&&(st.top=0);var dt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ht.scroller.scrollTop,Ft=ns(it),It={};st.bottom-st.top>Ft&&(st.bottom=st.top+Ft);var zt=it.doc.height+_s(ht),Rt=st.top<ut,ee=st.bottom>zt-ut;if(st.top<dt)It.scrollTop=Rt?0:st.top;else if(st.bottom>dt+Ft){var Ie=Math.min(st.top,(ee?zt:st.bottom)-Ft);Ie!=dt&&(It.scrollTop=Ie)}var oe=it.options.fixedGutter?0:ht.gutters.offsetWidth,Ye=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ht.scroller.scrollLeft-oe,ze=Ws(it)-ht.gutters.offsetWidth,Hn=st.right-st.left>ze;return Hn&&(st.right=st.left+ze),st.left<10?It.scrollLeft=0:st.left<Ye?It.scrollLeft=Math.max(0,st.left+oe-(Hn?0:10)):st.right>ze+Ye-3&&(It.scrollLeft=st.right+(Hn?0:10)-ze),It}function vf(it,st){st!=null&&(FA(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function _A(it){FA(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function PA(it,st,ht){(st!=null||ht!=null)&&FA(it),st!=null&&(it.curOp.scrollLeft=st),ht!=null&&(it.curOp.scrollTop=ht)}function Co(it,st){FA(it),it.curOp.scrollToPos=st}function FA(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ht=Mo(it,st.from),ut=Mo(it,st.to);yf(it,ht,ut,st.margin)}}function yf(it,st,ht,ut){var dt=sd(it,{left:Math.min(st.left,ht.left),top:Math.min(st.top,ht.top)-ut,right:Math.max(st.right,ht.right),bottom:Math.max(st.bottom,ht.bottom)+ut});PA(it,dt.scrollLeft,dt.scrollTop)}function ih(it,st){Math.abs(it.doc.scrollTop-st)<2||(bt||nA(it,{top:st}),Mh(it,st,!0),bt&&nA(it),vu(it,100))}function Mh(it,st,ht){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!ht)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function WA(it,st,ht,ut){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ht?st==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-st)<2)&&!ut)&&(it.doc.scrollLeft=st,xf(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function Ql(it){var st=it.display,ht=st.gutters.offsetWidth,ut=Math.round(it.doc.height+_s(it.display));return{clientHeight:st.scroller.clientHeight,viewHeight:st.wrapper.clientHeight,scrollWidth:st.scroller.scrollWidth,clientWidth:st.scroller.clientWidth,viewWidth:st.wrapper.clientWidth,barLeft:it.options.fixedGutter?ht:0,docHeight:ut,scrollHeight:ut+ca(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ht}}var du=function(it,st,ht){this.cm=ht;var ut=this.vert=Ae("div",[Ae("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),dt=this.horiz=Ae("div",[Ae("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ut.tabIndex=dt.tabIndex=-1,it(ut),it(dt),Rn(ut,"scroll",function(){ut.clientHeight&&st(ut.scrollTop,"vertical")}),Rn(dt,"scroll",function(){dt.clientWidth&&st(dt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ke&&ye<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};du.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,ht=it.scrollHeight>it.clientHeight+1,ut=it.nativeBarWidth;if(ht){this.vert.style.display="block",this.vert.style.bottom=st?ut+"px":"0";var dt=it.viewHeight-(st?ut:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+dt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=ht?ut+"px":"0",this.horiz.style.left=it.barLeft+"px";var Ft=it.viewWidth-it.barLeft-(ht?ut:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Ft)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ut==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ht?ut:0,bottom:st?ut:0}},du.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},du.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},du.prototype.zeroWidthHack=function(){var it=ct&&!we?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Kt,this.disableVert=new Kt},du.prototype.enableZeroWidthBar=function(it,st,ht){it.style.pointerEvents="auto";function ut(){var dt=it.getBoundingClientRect(),Ft=ht=="vert"?document.elementFromPoint(dt.right-1,(dt.top+dt.bottom)/2):document.elementFromPoint((dt.right+dt.left)/2,dt.bottom-1);Ft!=it?it.style.pointerEvents="none":st.set(1e3,ut)}st.set(1e3,ut)},du.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var tA=function(){};tA.prototype.update=function(){return{bottom:0,right:0}},tA.prototype.setScrollLeft=function(){},tA.prototype.setScrollTop=function(){},tA.prototype.clear=function(){};function eA(it,st){st||(st=Ql(it));var ht=it.display.barWidth,ut=it.display.barHeight;wf(it,st);for(var dt=0;dt<4&&ht!=it.display.barWidth||ut!=it.display.barHeight;dt++)ht!=it.display.barWidth&&it.options.lineWrapping&&ur(it),wf(it,Ql(it)),ht=it.display.barWidth,ut=it.display.barHeight}function wf(it,st){var ht=it.display,ut=ht.scrollbars.update(st);ht.sizer.style.paddingRight=(ht.barWidth=ut.right)+"px",ht.sizer.style.paddingBottom=(ht.barHeight=ut.bottom)+"px",ht.heightForcer.style.borderBottom=ut.bottom+"px solid transparent",ut.right&&ut.bottom?(ht.scrollbarFiller.style.display="block",ht.scrollbarFiller.style.height=ut.bottom+"px",ht.scrollbarFiller.style.width=ut.right+"px"):ht.scrollbarFiller.style.display="",ut.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ht.gutterFiller.style.display="block",ht.gutterFiller.style.height=ut.bottom+"px",ht.gutterFiller.style.width=st.gutterWidth+"px"):ht.gutterFiller.style.display=""}var ad={native:du,null:tA};function ld(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Jt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new ad[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),Rn(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,ht){ht=="horizontal"?WA(it,st):ih(it,st)},it),it.display.scrollbars.addClass&&an(it.display.wrapper,it.display.scrollbars.addClass)}var rg=0;function gu(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:++rg},Vs(it.curOp)}function pu(it){var st=it.curOp;st&&zA(st,function(ht){for(var ut=0;ut<ht.ops.length;ut++)ht.ops[ut].cm.curOp=null;Jg(ht)})}function Jg(it){for(var st=it.ops,ht=0;ht<st.length;ht++)qg(st[ht]);for(var ut=0;ut<st.length;ut++)$g(st[ut]);for(var dt=0;dt<st.length;dt++)og(st[dt]);for(var Ft=0;Ft<st.length;Ft++)us(st[Ft]);for(var It=0;It<st.length;It++)mu(st[It])}function qg(it){var st=it.cm,ht=st.display;sg(st),it.updateMaxLine&&nr(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ht.viewFrom||it.scrollToPos.to.line>=ht.viewTo)||ht.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new rh(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function $g(it){it.updatedDisplay=it.mustUpdate&&Sf(it.cm,it.update)}function og(it){var st=it.cm,ht=st.display;it.updatedDisplay&&ur(st),it.barMeasure=Ql(st),ht.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=Il(st,ht.maxLine,ht.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ht.scroller.clientWidth,ht.sizer.offsetLeft+it.adjustWidthTo+ca(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,ht.sizer.offsetLeft+it.adjustWidthTo-Ws(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ht.input.prepareSelection())}function us(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&WA(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ht=it.focus&&it.focus==nn();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ht),(it.updatedDisplay||it.startHeight!=st.doc.height)&&eA(st,it.barMeasure),it.updatedDisplay&&wu(st,it.barMeasure),it.selectionChanged&&Qo(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ht&&ts(it.cm)}function mu(it){var st=it.cm,ht=st.display,ut=st.doc;if(it.updatedDisplay&&jo(st,it.update),ht.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ht.wheelStartX=ht.wheelStartY=null),it.scrollTop!=null&&Mh(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&WA(st,it.scrollLeft,!0,!0),it.scrollToPos){var dt=VA(st,On(ut,it.scrollToPos.from),On(ut,it.scrollToPos.to),it.scrollToPos.margin);ig(st,dt)}var Ft=it.maybeHiddenMarkers,It=it.maybeUnhiddenMarkers;if(Ft)for(var zt=0;zt<Ft.length;++zt)Ft[zt].lines.length||ji(Ft[zt],"hide");if(It)for(var Rt=0;Rt<It.length;++Rt)It[Rt].lines.length&&ji(It[Rt],"unhide");ht.wrapper.offsetHeight&&(ut.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&ji(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function To(it,st){if(it.curOp)return st();gu(it);try{return st()}finally{pu(it)}}function Xs(it,st){return function(){if(it.curOp)return st.apply(it,arguments);gu(it);try{return st.apply(it,arguments)}finally{pu(it)}}}function oa(it){return function(){if(this.curOp)return it.apply(this,arguments);gu(this);try{return it.apply(this,arguments)}finally{pu(this)}}}function sa(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);gu(st);try{return it.apply(this,arguments)}finally{pu(st)}}}function vu(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,ui(Gs,it))}function Gs(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ht=+new Date+it.options.workTime,ut=vo(it,st.highlightFrontier),dt=[];st.iter(ut.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Ft){if(ut.line>=it.display.viewFrom){var It=Ft.styles,zt=Ft.text.length>it.options.maxHighlightLength?yi(st.mode,ut.state):null,Rt=Fr(it,Ft,ut,!0);zt&&(ut.state=zt),Ft.styles=Rt.styles;var ee=Ft.styleClasses,Ie=Rt.classes;Ie?Ft.styleClasses=Ie:ee&&(Ft.styleClasses=null);for(var oe=!It||It.length!=Ft.styles.length||ee!=Ie&&(!ee||!Ie||ee.bgClass!=Ie.bgClass||ee.textClass!=Ie.textClass),Ye=0;!oe&&Ye<It.length;++Ye)oe=It[Ye]!=Ft.styles[Ye];oe&&dt.push(ut.line),Ft.stateAfter=ut.save(),ut.nextLine()}else Ft.text.length<=it.options.maxHighlightLength&&Be(it,Ft.text,ut),Ft.stateAfter=ut.line%5==0?ut.save():null,ut.nextLine();if(+new Date>ht)return vu(it,it.options.workDelay),!0}),st.highlightFrontier=ut.line,st.modeFrontier=Math.max(st.modeFrontier,ut.line),dt.length&&To(it,function(){for(var Ft=0;Ft<dt.length;Ft++)Vr(it,dt[Ft],"text")})}}var rh=function(it,st,ht){var ut=it.display;this.viewport=st,this.visible=Ao(ut,it.doc,st),this.editorIsHidden=!ut.wrapper.offsetWidth,this.wrapperHeight=ut.wrapper.clientHeight,this.wrapperWidth=ut.wrapper.clientWidth,this.oldDisplayWidth=Ws(it),this.force=ht,this.dims=KA(it),this.events=[]};rh.prototype.signal=function(it,st){pr(it,st)&&this.events.push(arguments)},rh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)ji.apply(null,this.events[it])};function sg(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=ca(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=ca(it)+"px",st.scrollbarsClipped=!0)}function ag(it){if(it.hasFocus())return null;var st=nn();if(!st||!We(it.display.lineDiv,st))return null;var ht={activeElt:st};if(window.getSelection){var ut=window.getSelection();ut.anchorNode&&ut.extend&&We(it.display.lineDiv,ut.anchorNode)&&(ht.anchorNode=ut.anchorNode,ht.anchorOffset=ut.anchorOffset,ht.focusNode=ut.focusNode,ht.focusOffset=ut.focusOffset)}return ht}function Xa(it){if(!(!it||!it.activeElt||it.activeElt==nn())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&We(document.body,it.anchorNode)&&We(document.body,it.focusNode))){var st=window.getSelection(),ht=document.createRange();ht.setEnd(it.anchorNode,it.anchorOffset),ht.collapse(!1),st.removeAllRanges(),st.addRange(ht),st.extend(it.focusNode,it.focusOffset)}}function Sf(it,st){var ht=it.display,ut=it.doc;if(st.editorIsHidden)return Es(it),!1;if(!st.force&&st.visible.from>=ht.viewFrom&&st.visible.to<=ht.viewTo&&(ht.updateLineNumbers==null||ht.updateLineNumbers>=ht.viewTo)&&ht.renderedView==ht.view&&ul(it)==0)return!1;zs(it)&&(Es(it),st.dims=KA(it));var dt=ut.first+ut.size,Ft=Math.max(st.visible.from-it.options.viewportMargin,ut.first),It=Math.min(dt,st.visible.to+it.options.viewportMargin);ht.viewFrom<Ft&&Ft-ht.viewFrom<20&&(Ft=Math.max(ut.first,ht.viewFrom)),ht.viewTo>It&&ht.viewTo-It<20&&(It=Math.min(dt,ht.viewTo)),_t&&(Ft=Mn(it.doc,Ft),It=ci(it.doc,It));var zt=Ft!=ht.viewFrom||It!=ht.viewTo||ht.lastWrapHeight!=st.wrapperHeight||ht.lastWrapWidth!=st.wrapperWidth;zo(it,Ft,It),ht.viewOffset=fr(Le(it.doc,ht.viewFrom)),it.display.mover.style.top=ht.viewOffset+"px";var Rt=ul(it);if(!zt&&Rt==0&&!st.force&&ht.renderedView==ht.view&&(ht.updateLineNumbers==null||ht.updateLineNumbers>=ht.viewTo))return!1;var ee=ag(it);return Rt>4&&(ht.lineDiv.style.display="none"),Ad(it,ht.updateLineNumbers,st.dims),Rt>4&&(ht.lineDiv.style.display=""),ht.renderedView=ht.view,Xa(ee),ce(ht.cursorDiv),ce(ht.selectionDiv),ht.gutters.style.height=ht.sizer.style.minHeight=0,zt&&(ht.lastWrapHeight=st.wrapperHeight,ht.lastWrapWidth=st.wrapperWidth,vu(it,400)),ht.updateLineNumbers=null,!0}function jo(it,st){for(var ht=st.viewport,ut=!0;;ut=!1){if(!ut||!it.options.lineWrapping||st.oldDisplayWidth==Ws(it)){if(ht&&ht.top!=null&&(ht={top:Math.min(it.doc.height+_s(it.display)-ns(it),ht.top)}),st.visible=Ao(it.display,it.doc,ht),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ut&&(st.visible=Ao(it.display,it.doc,ht));if(!Sf(it,st))break;ur(it);var dt=Ql(it);Is(it),eA(it,dt),wu(it,dt),st.force=!1}st.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(st.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function nA(it,st){var ht=new rh(it,st);if(Sf(it,ht)){ur(it),jo(it,ht);var ut=Ql(it);Is(it),eA(it,ut),wu(it,ut),ht.finish()}}function Ad(it,st,ht){var ut=it.display,dt=it.options.lineNumbers,Ft=ut.lineDiv,It=Ft.firstChild;function zt(Hn){var Xn=Hn.nextSibling;return pe&&ct&&it.display.currentWheelTarget==Hn?Hn.style.display="none":Hn.parentNode.removeChild(Hn),Xn}for(var Rt=ut.view,ee=ut.viewFrom,Ie=0;Ie<Rt.length;Ie++){var oe=Rt[Ie];if(!oe.hidden)if(!oe.node||oe.node.parentNode!=Ft){var Ye=Dr(it,oe,ee,ht);Ft.insertBefore(Ye,It)}else{for(;It!=oe.node;)It=zt(It);var ze=dt&&st!=null&&st<=ee&&oe.lineNumber;oe.changes&&(dn(oe.changes,"gutter")>-1&&(ze=!1),jA(it,oe,ee,ht)),ze&&(ce(oe.lineNumber),oe.lineNumber.appendChild(document.createTextNode(un(it.options,ee)))),It=oe.node.nextSibling}ee+=oe.size}for(;It;)It=zt(It)}function yu(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function wu(it,st){it.display.sizer.style.minHeight=st.docHeight+"px",it.display.heightForcer.style.top=st.docHeight+"px",it.display.gutters.style.height=st.docHeight+it.display.barHeight+ca(it)+"px"}function xf(it){var st=it.display,ht=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ut=cu(st)-st.scroller.scrollLeft+it.doc.scrollLeft,dt=st.gutters.offsetWidth,Ft=ut+"px",It=0;It<ht.length;It++)if(!ht[It].hidden){it.options.fixedGutter&&(ht[It].gutter&&(ht[It].gutter.style.left=Ft),ht[It].gutterBackground&&(ht[It].gutterBackground.style.left=Ft));var zt=ht[It].alignable;if(zt)for(var Rt=0;Rt<zt.length;Rt++)zt[Rt].style.left=Ft}it.options.fixedGutter&&(st.gutters.style.left=ut+dt+"px")}}function zs(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ht=un(it.options,st.first+st.size-1),ut=it.display;if(ht.length!=ut.lineNumChars){var dt=ut.measure.appendChild(Ae("div",[Ae("div",ht)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Ft=dt.firstChild.offsetWidth,It=dt.offsetWidth-Ft;return ut.lineGutter.style.width="",ut.lineNumInnerWidth=Math.max(Ft,ut.lineGutter.offsetWidth-It)+1,ut.lineNumWidth=ut.lineNumInnerWidth+It,ut.lineNumChars=ut.lineNumInnerWidth?ht.length:-1,ut.lineGutter.style.width=ut.lineNumWidth+"px",yu(it.display),!0}return!1}function aa(it,st){for(var ht=[],ut=!1,dt=0;dt<it.length;dt++){var Ft=it[dt],It=null;if(typeof Ft!="string"&&(It=Ft.style,Ft=Ft.className),Ft=="CodeMirror-linenumbers")if(st)ut=!0;else continue;ht.push({className:Ft,style:It})}return st&&!ut&&ht.push({className:"CodeMirror-linenumbers",style:null}),ht}function oh(it){var st=it.gutters,ht=it.gutterSpecs;ce(st),it.lineGutter=null;for(var ut=0;ut<ht.length;++ut){var dt=ht[ut],Ft=dt.className,It=dt.style,zt=st.appendChild(Ae("div",null,"CodeMirror-gutter "+Ft));It&&(zt.style.cssText=It),Ft=="CodeMirror-linenumbers"&&(it.lineGutter=zt,zt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ht.length?"":"none",yu(it)}function Bl(it){oh(it.display),os(it),xf(it)}function Su(it,st,ht,ut){var dt=this;this.input=ht,dt.scrollbarFiller=Ae("div",null,"CodeMirror-scrollbar-filler"),dt.scrollbarFiller.setAttribute("cm-not-content","true"),dt.gutterFiller=Ae("div",null,"CodeMirror-gutter-filler"),dt.gutterFiller.setAttribute("cm-not-content","true"),dt.lineDiv=De("div",null,"CodeMirror-code"),dt.selectionDiv=Ae("div",null,null,"position: relative; z-index: 1"),dt.cursorDiv=Ae("div",null,"CodeMirror-cursors"),dt.measure=Ae("div",null,"CodeMirror-measure"),dt.lineMeasure=Ae("div",null,"CodeMirror-measure"),dt.lineSpace=De("div",[dt.measure,dt.lineMeasure,dt.selectionDiv,dt.cursorDiv,dt.lineDiv],null,"position: relative; outline: none");var Ft=De("div",[dt.lineSpace],"CodeMirror-lines");dt.mover=Ae("div",[Ft],null,"position: relative"),dt.sizer=Ae("div",[dt.mover],"CodeMirror-sizer"),dt.sizerWidth=null,dt.heightForcer=Ae("div",null,null,"position: absolute; height: "+Ai+"px; width: 1px;"),dt.gutters=Ae("div",null,"CodeMirror-gutters"),dt.lineGutter=null,dt.scroller=Ae("div",[dt.sizer,dt.heightForcer,dt.gutters],"CodeMirror-scroll"),dt.scroller.setAttribute("tabIndex","-1"),dt.wrapper=Ae("div",[dt.scrollbarFiller,dt.gutterFiller,dt.scroller],"CodeMirror"),ke&&ye<8&&(dt.gutters.style.zIndex=-1,dt.scroller.style.paddingRight=0),!pe&&!(bt&&nt)&&(dt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(dt.wrapper):it(dt.wrapper)),dt.viewFrom=dt.viewTo=st.first,dt.reportedViewFrom=dt.reportedViewTo=st.first,dt.view=[],dt.renderedView=null,dt.externalMeasured=null,dt.viewOffset=0,dt.lastWrapHeight=dt.lastWrapWidth=0,dt.updateLineNumbers=null,dt.nativeBarWidth=dt.barHeight=dt.barWidth=0,dt.scrollbarsClipped=!1,dt.lineNumWidth=dt.lineNumInnerWidth=dt.lineNumChars=null,dt.alignWidgets=!1,dt.cachedCharWidth=dt.cachedTextHeight=dt.cachedPaddingH=null,dt.maxLine=null,dt.maxLineLength=0,dt.maxLineChanged=!1,dt.wheelDX=dt.wheelDY=dt.wheelStartX=dt.wheelStartY=null,dt.shift=!1,dt.selForContextMenu=null,dt.activeTouch=null,dt.gutterSpecs=aa(ut.gutters,ut.lineNumbers),oh(dt),ht.init(dt)}var hl=0,Ns=null;ke?Ns=-.53:bt?Ns=15:Pe?Ns=-.7:An&&(Ns=-1/3);function iA(it){var st=it.wheelDeltaX,ht=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),ht==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ht=it.detail:ht==null&&(ht=it.wheelDelta),{x:st,y:ht}}function cl(it){var st=iA(it);return st.x*=Ns,st.y*=Ns,st}function la(it,st){var ht=iA(st),ut=ht.x,dt=ht.y,Ft=it.display,It=Ft.scroller,zt=It.scrollWidth>It.clientWidth,Rt=It.scrollHeight>It.clientHeight;if(ut&&zt||dt&&Rt){if(dt&&ct&&pe){t:for(var ee=st.target,Ie=Ft.view;ee!=It;ee=ee.parentNode)for(var oe=0;oe<Ie.length;oe++)if(Ie[oe].node==ee){it.display.currentWheelTarget=ee;break t}}if(ut&&!bt&&!ie&&Ns!=null){dt&&Rt&&ih(it,Math.max(0,It.scrollTop+dt*Ns)),WA(it,Math.max(0,It.scrollLeft+ut*Ns)),(!dt||dt&&Rt)&&Sr(st),Ft.wheelStartX=null;return}if(dt&&Ns!=null){var Ye=dt*Ns,ze=it.doc.scrollTop,Hn=ze+Ft.wrapper.clientHeight;Ye<0?ze=Math.max(0,ze+Ye-50):Hn=Math.min(it.doc.height,Hn+Ye+50),nA(it,{top:ze,bottom:Hn})}hl<20&&(Ft.wheelStartX==null?(Ft.wheelStartX=It.scrollLeft,Ft.wheelStartY=It.scrollTop,Ft.wheelDX=ut,Ft.wheelDY=dt,setTimeout(function(){if(Ft.wheelStartX!=null){var Xn=It.scrollLeft-Ft.wheelStartX,di=It.scrollTop-Ft.wheelStartY,Li=di&&Ft.wheelDY&&di/Ft.wheelDY||Xn&&Ft.wheelDX&&Xn/Ft.wheelDX;Ft.wheelStartX=Ft.wheelStartY=null,Li&&(Ns=(Ns*hl+Li)/(hl+1),++hl)}},200)):(Ft.wheelDX+=ut,Ft.wheelDY+=dt))}}var Ul=function(it,st){this.ranges=it,this.primIndex=st};Ul.prototype.primary=function(){return this.ranges[this.primIndex]},Ul.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var st=0;st<this.ranges.length;st++){var ht=this.ranges[st],ut=it.ranges[st];if(!xi(ht.anchor,ut.anchor)||!xi(ht.head,ut.head))return!1}return!0},Ul.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new Ko(Mi(this.ranges[st].anchor),Mi(this.ranges[st].head));return new Ul(it,this.primIndex)},Ul.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},Ul.prototype.contains=function(it,st){st||(st=it);for(var ht=0;ht<this.ranges.length;ht++){var ut=this.ranges[ht];if(mn(st,ut.from())>=0&&mn(it,ut.to())<=0)return ht}return-1};var Ko=function(it,st){this.anchor=it,this.head=st};Ko.prototype.from=function(){return bn(this.anchor,this.head)},Ko.prototype.to=function(){return Gi(this.anchor,this.head)},Ko.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Za(it,st,ht){var ut=it&&it.options.selectionsMayTouch,dt=st[ht];st.sort(function(Ye,ze){return mn(Ye.from(),ze.from())}),ht=dn(st,dt);for(var Ft=1;Ft<st.length;Ft++){var It=st[Ft],zt=st[Ft-1],Rt=mn(zt.to(),It.from());if(ut&&!It.empty()?Rt>0:Rt>=0){var ee=bn(zt.from(),It.from()),Ie=Gi(zt.to(),It.to()),oe=zt.empty()?It.from()==It.head:zt.from()==zt.head;Ft<=ht&&--ht,st.splice(--Ft,2,new Ko(oe?Ie:ee,oe?ee:Ie))}}return new Ul(st,ht)}function YA(it,st){return new Ul([new Ko(it,st||it)],0)}function xu(it){return it.text?Ne(it.from.line+it.text.length-1,Fe(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function Bu(it,st){if(mn(it,st.from)<0)return it;if(mn(it,st.to)<=0)return xu(st);var ht=it.line+st.text.length-(st.to.line-st.from.line)-1,ut=it.ch;return it.line==st.to.line&&(ut+=xu(st).ch-st.to.ch),Ne(ht,ut)}function Mc(it,st){for(var ht=[],ut=0;ut<it.sel.ranges.length;ut++){var dt=it.sel.ranges[ut];ht.push(new Ko(Bu(dt.anchor,st),Bu(dt.head,st)))}return Za(it.cm,ht,it.sel.primIndex)}function kh(it,st,ht){return it.line==st.line?Ne(ht.line,it.ch-st.ch+ht.ch):Ne(ht.line+(it.line-st.line),it.ch)}function kc(it,st,ht){for(var ut=[],dt=Ne(it.first,0),Ft=dt,It=0;It<st.length;It++){var zt=st[It],Rt=kh(zt.from,dt,Ft),ee=kh(xu(zt),dt,Ft);if(dt=zt.to,Ft=ee,ht=="around"){var Ie=it.sel.ranges[It],oe=mn(Ie.head,Ie.anchor)<0;ut[It]=new Ko(oe?ee:Rt,oe?Rt:ee)}else ut[It]=new Ko(Rt,Rt)}return new Ul(ut,it.sel.primIndex)}function to(it){it.doc.mode=Oe(it.options,it.doc.modeOption),bc(it)}function bc(it){it.doc.iter(function(st){st.stateAfter&&(st.stateAfter=null),st.styles&&(st.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,vu(it,100),it.state.modeGen++,it.curOp&&os(it)}function ud(it,st){return st.from.ch==0&&st.to.ch==0&&Fe(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Bf(it,st,ht,ut){function dt(Ji){return ht?ht[Ji]:null}function Ft(Ji,Ri,or){Kr(Ji,Ri,or,ut),Xi(Ji,"change",Ji,st)}function It(Ji,Ri){for(var or=[],Ir=Ji;Ir<Ri;++Ir)or.push(new jr(ee[Ir],dt(Ir),ut));return or}var zt=st.from,Rt=st.to,ee=st.text,Ie=Le(it,zt.line),oe=Le(it,Rt.line),Ye=Fe(ee),ze=dt(ee.length-1),Hn=Rt.line-zt.line;if(st.full)it.insert(0,It(0,ee.length)),it.remove(ee.length,it.size-ee.length);else if(ud(it,st)){var Xn=It(0,ee.length-1);Ft(oe,oe.text,ze),Hn&&it.remove(zt.line,Hn),Xn.length&&it.insert(zt.line,Xn)}else if(Ie==oe)if(ee.length==1)Ft(Ie,Ie.text.slice(0,zt.ch)+Ye+Ie.text.slice(Rt.ch),ze);else{var di=It(1,ee.length-1);di.push(new jr(Ye+Ie.text.slice(Rt.ch),ze,ut)),Ft(Ie,Ie.text.slice(0,zt.ch)+ee[0],dt(0)),it.insert(zt.line+1,di)}else if(ee.length==1)Ft(Ie,Ie.text.slice(0,zt.ch)+ee[0]+oe.text.slice(Rt.ch),dt(0)),it.remove(zt.line+1,Hn);else{Ft(Ie,Ie.text.slice(0,zt.ch)+ee[0],dt(0)),Ft(oe,Ye+oe.text.slice(Rt.ch),ze);var Li=It(1,ee.length-1);Hn>1&&it.remove(zt.line+1,Hn-1),it.insert(zt.line+1,Li)}Xi(it,"change",it,st)}function rA(it,st,ht){function ut(dt,Ft,It){if(dt.linked)for(var zt=0;zt<dt.linked.length;++zt){var Rt=dt.linked[zt];if(Rt.doc!=Ft){var ee=It&&Rt.sharedHist;ht&&!ee||(st(Rt.doc,ee),ut(Rt.doc,dt,ee))}}}ut(it,null,!0)}function Zs(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,gr(it),to(it),Tc(it),it.options.lineWrapping||nr(it),it.options.mode=st.modeOption,os(it)}function Tc(it){(it.doc.direction=="rtl"?an:Jt)(it.display.lineDiv,"CodeMirror-rtl")}function tp(it){To(it,function(){Tc(it),os(it)})}function bh(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function Cf(it,st){var ht={from:Mi(st.from),to:xu(st),text:kn(it,st.from,st.to)};return Cu(it,ht,st.from.line,st.to.line+1),rA(it,function(ut){return Cu(ut,ht,st.from.line,st.to.line+1)},!0),ht}function Th(it){for(;it.length;){var st=Fe(it);if(st.ranges)it.pop();else break}}function Ih(it,st){if(st)return Th(it.done),Fe(it.done);if(it.done.length&&!Fe(it.done).ranges)return Fe(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),Fe(it.done)}function Ic(it,st,ht,ut){var dt=it.history;dt.undone.length=0;var Ft=+new Date,It,zt;if((dt.lastOp==ut||dt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&dt.lastModTime>Ft-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(It=Ih(dt,dt.lastOp==ut)))zt=Fe(It.changes),mn(st.from,st.to)==0&&mn(st.from,zt.to)==0?zt.to=xu(st):It.changes.push(Cf(it,st));else{var Rt=Fe(dt.done);for((!Rt||!Rt.ranges)&&Nh(it.sel,dt.done),It={changes:[Cf(it,st)],generation:dt.generation},dt.done.push(It);dt.done.length>dt.undoDepth;)dt.done.shift(),dt.done[0].ranges||dt.done.shift()}dt.done.push(ht),dt.generation=++dt.maxGeneration,dt.lastModTime=dt.lastSelTime=Ft,dt.lastOp=dt.lastSelOp=ut,dt.lastOrigin=dt.lastSelOrigin=st.origin,zt||ji(it,"historyAdded")}function hd(it,st,ht,ut){var dt=st.charAt(0);return dt=="*"||dt=="+"&&ht.ranges.length==ut.ranges.length&&ht.somethingSelected()==ut.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function Nc(it,st,ht,ut){var dt=it.history,Ft=ut&&ut.origin;ht==dt.lastSelOp||Ft&&dt.lastSelOrigin==Ft&&(dt.lastModTime==dt.lastSelTime&&dt.lastOrigin==Ft||hd(it,Ft,Fe(dt.done),st))?dt.done[dt.done.length-1]=st:Nh(st,dt.done),dt.lastSelTime=+new Date,dt.lastSelOrigin=Ft,dt.lastSelOp=ht,ut&&ut.clearRedo!==!1&&Th(dt.undone)}function Nh(it,st){var ht=Fe(st);ht&&ht.ranges&&ht.equals(it)||st.push(it)}function Cu(it,st,ht,ut){var dt=st["spans_"+it.id],Ft=0;it.iter(Math.max(it.first,ht),Math.min(it.first+it.size,ut),function(It){It.markedSpans&&((dt||(dt=st["spans_"+it.id]={}))[Ft]=It.markedSpans),++Ft})}function Ha(it){if(!it)return null;for(var st,ht=0;ht<it.length;++ht)it[ht].marker.explicitlyCleared?st||(st=it.slice(0,ht)):st&&st.push(it[ht]);return st?st.length?st:null:it}function oA(it,st){var ht=st["spans_"+it.id];if(!ht)return null;for(var ut=[],dt=0;dt<st.text.length;++dt)ut.push(Ha(ht[dt]));return ut}function hr(it,st){var ht=oA(it,st),ut=Yn(it,st);if(!ht)return ut;if(!ut)return ht;for(var dt=0;dt<ht.length;++dt){var Ft=ht[dt],It=ut[dt];if(Ft&&It)t:for(var zt=0;zt<It.length;++zt){for(var Rt=It[zt],ee=0;ee<Ft.length;++ee)if(Ft[ee].marker==Rt.marker)continue t;Ft.push(Rt)}else It&&(ht[dt]=It)}return ht}function XA(it,st,ht){for(var ut=[],dt=0;dt<it.length;++dt){var Ft=it[dt];if(Ft.ranges){ut.push(ht?Ul.prototype.deepCopy.call(Ft):Ft);continue}var It=Ft.changes,zt=[];ut.push({changes:zt});for(var Rt=0;Rt<It.length;++Rt){var ee=It[Rt],Ie=void 0;if(zt.push({from:ee.from,to:ee.to,text:ee.text}),st)for(var oe in ee)(Ie=oe.match(/^spans_(\d+)$/))&&dn(st,Number(Ie[1]))>-1&&(Fe(zt)[oe]=ee[oe],delete ee[oe])}}return ut}function Pf(it,st,ht,ut){if(ut){var dt=it.anchor;if(ht){var Ft=mn(st,dt)<0;Ft!=mn(ht,dt)<0?(dt=st,st=ht):Ft!=mn(st,ht)<0&&(st=ht)}return new Ko(dt,st)}else return new Ko(ht||st,st)}function Qh(it,st,ht,ut,dt){dt==null&&(dt=it.cm&&(it.cm.display.shift||it.extend)),Fa(it,new Ul([Pf(it.sel.primary(),st,ht,dt)],0),ut)}function sA(it,st,ht){for(var ut=[],dt=it.cm&&(it.cm.display.shift||it.extend),Ft=0;Ft<it.sel.ranges.length;Ft++)ut[Ft]=Pf(it.sel.ranges[Ft],st[Ft],null,dt);var It=Za(it.cm,ut,it.sel.primIndex);Fa(it,It,ht)}function Pu(it,st,ht,ut){var dt=it.sel.ranges.slice(0);dt[st]=ht,Fa(it,Za(it.cm,dt,it.sel.primIndex),ut)}function Fu(it,st,ht,ut){Fa(it,YA(st,ht),ut)}function Uh(it,st,ht){var ut={ranges:st.ranges,update:function(dt){this.ranges=[];for(var Ft=0;Ft<dt.length;Ft++)this.ranges[Ft]=new Ko(On(it,dt[Ft].anchor),On(it,dt[Ft].head))},origin:ht&&ht.origin};return ji(it,"beforeSelectionChange",it,ut),it.cm&&ji(it.cm,"beforeSelectionChange",it.cm,ut),ut.ranges!=st.ranges?Za(it.cm,ut.ranges,ut.ranges.length-1):st}function sh(it,st,ht){var ut=it.history.done,dt=Fe(ut);dt&&dt.ranges?(ut[ut.length-1]=st,ah(it,st,ht)):Fa(it,st,ht)}function Fa(it,st,ht){ah(it,st,ht),Nc(it,it.sel,it.cm?it.cm.curOp.id:NaN,ht)}function ah(it,st,ht){(pr(it,"beforeSelectionChange")||it.cm&&pr(it.cm,"beforeSelectionChange"))&&(st=Uh(it,st,ht));var ut=ht&&ht.bias||(mn(st.primary().head,it.sel.primary().head)<0?-1:1);cd(it,lh(it,st,ut,!0)),!(ht&&ht.scroll===!1)&&it.cm&&_A(it.cm)}function cd(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,Wr(it.cm)),Xi(it,"cursorActivity",it))}function aA(it){cd(it,lh(it,it.sel,null,!1))}function lh(it,st,ht,ut){for(var dt,Ft=0;Ft<st.ranges.length;Ft++){var It=st.ranges[Ft],zt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Ft],Rt=Qc(it,It.anchor,zt&&zt.anchor,ht,ut),ee=Qc(it,It.head,zt&&zt.head,ht,ut);(dt||Rt!=It.anchor||ee!=It.head)&&(dt||(dt=st.ranges.slice(0,Ft)),dt[Ft]=new Ko(Rt,ee))}return dt?Za(it.cm,dt,st.primIndex):st}function lA(it,st,ht,ut,dt){var Ft=Le(it,st.line);if(Ft.markedSpans)for(var It=0;It<Ft.markedSpans.length;++It){var zt=Ft.markedSpans[It],Rt=zt.marker,ee="selectLeft"in Rt?!Rt.selectLeft:Rt.inclusiveLeft,Ie="selectRight"in Rt?!Rt.selectRight:Rt.inclusiveRight;if((zt.from==null||(ee?zt.from<=st.ch:zt.from<st.ch))&&(zt.to==null||(Ie?zt.to>=st.ch:zt.to>st.ch))){if(dt&&(ji(Rt,"beforeCursorEnter"),Rt.explicitlyCleared))if(Ft.markedSpans){--It;continue}else break;if(!Rt.atomic)continue;if(ht){var oe=Rt.find(ut<0?1:-1),Ye=void 0;if((ut<0?Ie:ee)&&(oe=Ff(it,oe,-ut,oe&&oe.line==st.line?Ft:null)),oe&&oe.line==st.line&&(Ye=mn(oe,ht))&&(ut<0?Ye<0:Ye>0))return lA(it,oe,st,ut,dt)}var ze=Rt.find(ut<0?-1:1);return(ut<0?ee:Ie)&&(ze=Ff(it,ze,ut,ze.line==st.line?Ft:null)),ze?lA(it,ze,st,ut,dt):null}}return st}function Qc(it,st,ht,ut,dt){var Ft=ut||1,It=lA(it,st,ht,Ft,dt)||!dt&&lA(it,st,ht,Ft,!0)||lA(it,st,ht,-Ft,dt)||!dt&&lA(it,st,ht,-Ft,!0);return It||(it.cantEdit=!0,Ne(it.first,0))}function Ff(it,st,ht,ut){return ht<0&&st.ch==0?st.line>it.first?On(it,Ne(st.line-1)):null:ht>0&&st.ch==(ut||Le(it,st.line)).text.length?st.line<it.first+it.size-1?Ne(st.line+1,0):null:new Ne(st.line,st.ch+ht)}function Qs(it){it.setSelection(Ne(it.firstLine(),0),Ne(it.lastLine()),Ke)}function Ah(it,st,ht){var ut={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return ut.canceled=!0}};return ht&&(ut.update=function(dt,Ft,It,zt){dt&&(ut.from=On(it,dt)),Ft&&(ut.to=On(it,Ft)),It&&(ut.text=It),zt!==void 0&&(ut.origin=zt)}),ji(it,"beforeChange",it,ut),it.cm&&ji(it.cm,"beforeChange",it.cm,ut),ut.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ut.from,to:ut.to,text:ut.text,origin:ut.origin}}function Lu(it,st,ht){if(it.cm){if(!it.cm.curOp)return Xs(it.cm,Lu)(it,st,ht);if(it.cm.state.suppressEdits)return}if(!((pr(it,"beforeChange")||it.cm&&pr(it.cm,"beforeChange"))&&(st=Ah(it,st,!0),!st))){var ut=$t&&!ht&&Wi(it,st.from,st.to);if(ut)for(var dt=ut.length-1;dt>=0;--dt)uh(it,{from:ut[dt].from,to:ut[dt].to,text:dt?[""]:st.text,origin:st.origin});else uh(it,st)}}function uh(it,st){if(!(st.text.length==1&&st.text[0]==""&&mn(st.from,st.to)==0)){var ht=Mc(it,st);Ic(it,st,ht,it.cm?it.cm.curOp.id:NaN),Dh(it,st,ht,Yn(it,st));var ut=[];rA(it,function(dt,Ft){!Ft&&dn(ut,dt.history)==-1&&(gd(dt.history,st),ut.push(dt.history)),Dh(dt,st,null,Yn(dt,st))})}}function Uc(it,st,ht){var ut=it.cm&&it.cm.state.suppressEdits;if(!(ut&&!ht)){for(var dt=it.history,Ft,It=it.sel,zt=st=="undo"?dt.done:dt.undone,Rt=st=="undo"?dt.undone:dt.done,ee=0;ee<zt.length&&(Ft=zt[ee],!(ht?Ft.ranges&&!Ft.equals(it.sel):!Ft.ranges));ee++);if(ee!=zt.length){for(dt.lastOrigin=dt.lastSelOrigin=null;;)if(Ft=zt.pop(),Ft.ranges){if(Nh(Ft,Rt),ht&&!Ft.equals(it.sel)){Fa(it,Ft,{clearRedo:!1});return}It=Ft}else if(ut){zt.push(Ft);return}else break;var Ie=[];Nh(It,Rt),Rt.push({changes:Ie,generation:dt.generation}),dt.generation=Ft.generation||++dt.maxGeneration;for(var oe=pr(it,"beforeChange")||it.cm&&pr(it.cm,"beforeChange"),Ye=function(Xn){var di=Ft.changes[Xn];if(di.origin=st,oe&&!Ah(it,di,!1))return zt.length=0,{};Ie.push(Cf(it,di));var Li=Xn?Mc(it,di):Fe(zt);Dh(it,di,Li,hr(it,di)),!Xn&&it.cm&&it.cm.scrollIntoView({from:di.from,to:xu(di)});var Ji=[];rA(it,function(Ri,or){!or&&dn(Ji,Ri.history)==-1&&(gd(Ri.history,di),Ji.push(Ri.history)),Dh(Ri,di,null,hr(Ri,di))})},ze=Ft.changes.length-1;ze>=0;--ze){var Hn=Ye(ze);if(Hn)return Hn.v}}}}function fd(it,st){if(st!=0&&(it.first+=st,it.sel=new Ul(pn(it.sel.ranges,function(dt){return new Ko(Ne(dt.anchor.line+st,dt.anchor.ch),Ne(dt.head.line+st,dt.head.ch))}),it.sel.primIndex),it.cm)){os(it.cm,it.first,it.first-st,st);for(var ht=it.cm.display,ut=ht.viewFrom;ut<ht.viewTo;ut++)Vr(it.cm,ut,"gutter")}}function Dh(it,st,ht,ut){if(it.cm&&!it.cm.curOp)return Xs(it.cm,Dh)(it,st,ht,ut);if(st.to.line<it.first){fd(it,st.text.length-1-(st.to.line-st.from.line));return}if(!(st.from.line>it.lastLine())){if(st.from.line<it.first){var dt=st.text.length-1-(it.first-st.from.line);fd(it,dt),st={from:Ne(it.first,0),to:Ne(st.to.line+dt,st.to.ch),text:[Fe(st.text)],origin:st.origin}}var Ft=it.lastLine();st.to.line>Ft&&(st={from:st.from,to:Ne(Ft,Le(it,Ft).text.length),text:[st.text[0]],origin:st.origin}),st.removed=kn(it,st.from,st.to),ht||(ht=Mc(it,st)),it.cm?lg(it.cm,st,ut):Bf(it,st,ut),ah(it,ht,Ke),it.cantEdit&&Qc(it,Ne(it.firstLine(),0))&&(it.cantEdit=!1)}}function lg(it,st,ht){var ut=it.doc,dt=it.display,Ft=st.from,It=st.to,zt=!1,Rt=Ft.line;it.options.lineWrapping||(Rt=Yt(Tn(Le(ut,Ft.line))),ut.iter(Rt,It.line+1,function(ze){if(ze==dt.maxLine)return zt=!0,!0})),ut.sel.contains(st.from,st.to)>-1&&Wr(it),Bf(ut,st,ht,As(it)),it.options.lineWrapping||(ut.iter(Rt,Ft.line+st.text.length,function(ze){var Hn=Or(ze);Hn>dt.maxLineLength&&(dt.maxLine=ze,dt.maxLineLength=Hn,dt.maxLineChanged=!0,zt=!1)}),zt&&(it.curOp.updateMaxLine=!0)),qt(ut,Ft.line),vu(it,400);var ee=st.text.length-(It.line-Ft.line)-1;st.full?os(it):Ft.line==It.line&&st.text.length==1&&!ud(it.doc,st)?Vr(it,Ft.line,"text"):os(it,Ft.line,It.line+1,ee);var Ie=pr(it,"changes"),oe=pr(it,"change");if(oe||Ie){var Ye={from:Ft,to:It,text:st.text,removed:st.removed,origin:st.origin};oe&&Xi(it,"change",it,Ye),Ie&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(Ye)}it.display.selForContextMenu=null}function hh(it,st,ht,ut,dt){var Ft;ut||(ut=ht),mn(ut,ht)<0&&(Ft=[ut,ht],ht=Ft[0],ut=Ft[1]),typeof st=="string"&&(st=it.splitLines(st)),Lu(it,{from:ht,to:ut,text:st,origin:dt})}function Dl(it,st,ht,ut){ht<it.line?it.line+=ut:st<it.line&&(it.line=st,it.ch=0)}function dd(it,st,ht,ut){for(var dt=0;dt<it.length;++dt){var Ft=it[dt],It=!0;if(Ft.ranges){Ft.copied||(Ft=it[dt]=Ft.deepCopy(),Ft.copied=!0);for(var zt=0;zt<Ft.ranges.length;zt++)Dl(Ft.ranges[zt].anchor,st,ht,ut),Dl(Ft.ranges[zt].head,st,ht,ut);continue}for(var Rt=0;Rt<Ft.changes.length;++Rt){var ee=Ft.changes[Rt];if(ht<ee.from.line)ee.from=Ne(ee.from.line+ut,ee.from.ch),ee.to=Ne(ee.to.line+ut,ee.to.ch);else if(st<=ee.to.line){It=!1;break}}It||(it.splice(0,dt+1),dt=0)}}function gd(it,st){var ht=st.from.line,ut=st.to.line,dt=st.text.length-(ut-ht)-1;dd(it.done,ht,ut,dt),dd(it.undone,ht,ut,dt)}function ch(it,st,ht,ut){var dt=st,Ft=st;return typeof st=="number"?Ft=Le(it,Ln(it,st)):dt=Yt(st),dt==null?null:(ut(Ft,dt)&&it.cm&&Vr(it.cm,dt,ht),Ft)}function Oh(it){this.lines=it,this.parent=null;for(var st=0,ht=0;ht<it.length;++ht)it[ht].parent=this,st+=it[ht].height;this.height=st}Oh.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var ht=it,ut=it+st;ht<ut;++ht){var dt=this.lines[ht];this.height-=dt.height,Ho(dt),Xi(dt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,ht){this.height+=ht,this.lines=this.lines.slice(0,it).concat(st).concat(this.lines.slice(it));for(var ut=0;ut<st.length;++ut)st[ut].parent=this},iterN:function(it,st,ht){for(var ut=it+st;it<ut;++it)if(ht(this.lines[it]))return!0}};function ms(it){this.children=it;for(var st=0,ht=0,ut=0;ut<it.length;++ut){var dt=it[ut];st+=dt.chunkSize(),ht+=dt.height,dt.parent=this}this.size=st,this.height=ht,this.parent=null}ms.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var ht=0;ht<this.children.length;++ht){var ut=this.children[ht],dt=ut.chunkSize();if(it<dt){var Ft=Math.min(st,dt-it),It=ut.height;if(ut.removeInner(it,Ft),this.height-=It-ut.height,dt==Ft&&(this.children.splice(ht--,1),ut.parent=null),(st-=Ft)==0)break;it=0}else it-=dt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Oh))){var zt=[];this.collapse(zt),this.children=[new Oh(zt)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,ht){this.size+=st.length,this.height+=ht;for(var ut=0;ut<this.children.length;++ut){var dt=this.children[ut],Ft=dt.chunkSize();if(it<=Ft){if(dt.insertInner(it,st,ht),dt.lines&&dt.lines.length>50){for(var It=dt.lines.length%25+25,zt=It;zt<dt.lines.length;){var Rt=new Oh(dt.lines.slice(zt,zt+=25));dt.height-=Rt.height,this.children.splice(++ut,0,Rt),Rt.parent=this}dt.lines=dt.lines.slice(0,It),this.maybeSpill()}break}it-=Ft}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),ht=new ms(st);if(it.parent){it.size-=ht.size,it.height-=ht.height;var dt=dn(it.parent.children,it);it.parent.children.splice(dt+1,0,ht)}else{var ut=new ms(it.children);ut.parent=it,it.children=[ut,ht],it=ut}ht.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,ht){for(var ut=0;ut<this.children.length;++ut){var dt=this.children[ut],Ft=dt.chunkSize();if(it<Ft){var It=Math.min(st,Ft-it);if(dt.iterN(it,It,ht))return!0;if((st-=It)==0)break;it=0}else it-=Ft}}};var ZA=function(it,st,ht){if(ht)for(var ut in ht)ht.hasOwnProperty(ut)&&(this[ut]=ht[ut]);this.doc=it,this.node=st};ZA.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ht=this.line,ut=Yt(ht);if(!(ut==null||!st)){for(var dt=0;dt<st.length;++dt)st[dt]==this&&st.splice(dt--,1);st.length||(ht.widgets=null);var Ft=ea(this);sn(ht,Math.max(0,ht.height-Ft)),it&&(To(it,function(){Dc(it,ht,-Ft),Vr(it,ut,"widget")}),Xi(it,"lineWidgetCleared",it,this,ut))}},ZA.prototype.changed=function(){var it=this,st=this.height,ht=this.doc.cm,ut=this.line;this.height=null;var dt=ea(this)-st;dt&&(Je(this.doc,ut)||sn(ut,ut.height+dt),ht&&To(ht,function(){ht.curOp.forceUpdate=!0,Dc(ht,ut,dt),Xi(ht,"lineWidgetChanged",ht,it,Yt(ut))}))},mr(ZA);function Dc(it,st,ht){fr(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&vf(it,ht)}function Lf(it,st,ht,ut){var dt=new ZA(it,ht,ut),Ft=it.cm;return Ft&&dt.noHScroll&&(Ft.display.alignWidgets=!0),ch(it,st,"widget",function(It){var zt=It.widgets||(It.widgets=[]);if(dt.insertAt==null?zt.push(dt):zt.splice(Math.min(zt.length-1,Math.max(0,dt.insertAt)),0,dt),dt.line=It,Ft&&!Je(it,It)){var Rt=fr(It)<it.scrollTop;sn(It,It.height+ea(dt)),Rt&&vf(Ft,dt.height),Ft.curOp.forceUpdate=!0}return!0}),Ft&&Xi(Ft,"lineWidgetAdded",Ft,dt,typeof st=="number"?st:Yt(st)),dt}var Ef=0,ge=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Ef};ge.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&gu(it),pr(this,"clear")){var ht=this.find();ht&&Xi(this,"clear",ht.from,ht.to)}for(var ut=null,dt=null,Ft=0;Ft<this.lines.length;++Ft){var It=this.lines[Ft],zt=Wn(It.markedSpans,this);it&&!this.collapsed?Vr(it,Yt(It),"text"):it&&(zt.to!=null&&(dt=Yt(It)),zt.from!=null&&(ut=Yt(It))),It.markedSpans=Un(It.markedSpans,zt),zt.from==null&&this.collapsed&&!Je(this.doc,It)&&it&&sn(It,Ca(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Rt=0;Rt<this.lines.length;++Rt){var ee=Tn(this.lines[Rt]),Ie=Or(ee);Ie>it.display.maxLineLength&&(it.display.maxLine=ee,it.display.maxLineLength=Ie,it.display.maxLineChanged=!0)}ut!=null&&it&&this.collapsed&&os(it,ut,dt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&aA(it.doc)),it&&Xi(it,"markerCleared",it,this,ut,dt),st&&pu(it),this.parent&&this.parent.clear()}},ge.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var ht,ut,dt=0;dt<this.lines.length;++dt){var Ft=this.lines[dt],It=Wn(Ft.markedSpans,this);if(It.from!=null&&(ht=Ne(st?Ft:Yt(Ft),It.from),it==-1))return ht;if(It.to!=null&&(ut=Ne(st?Ft:Yt(Ft),It.to),it==1))return ut}return ht&&{from:ht,to:ut}},ge.prototype.changed=function(){var it=this,st=this.find(-1,!0),ht=this,ut=this.doc.cm;!st||!ut||To(ut,function(){var dt=st.line,Ft=Yt(st.line),It=Ya(ut,Ft);if(It&&($u(It),ut.curOp.selectionChanged=ut.curOp.forceUpdate=!0),ut.curOp.updateMaxLine=!0,!Je(ht.doc,dt)&&ht.height!=null){var zt=ht.height;ht.height=null;var Rt=ea(ht)-zt;Rt&&sn(dt,dt.height+Rt)}Xi(ut,"markerChanged",ut,it)})},ge.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||dn(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},ge.prototype.detachLine=function(it){if(this.lines.splice(dn(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},mr(ge);function Eu(it,st,ht,ut,dt){if(ut&&ut.shared)return Ag(it,st,ht,ut,dt);if(it.cm&&!it.cm.curOp)return Xs(it.cm,Eu)(it,st,ht,ut,dt);var Ft=new ge(it,dt),It=mn(st,ht);if(ut&&fi(ut,Ft,!1),It>0||It==0&&Ft.clearWhenEmpty!==!1)return Ft;if(Ft.replacedWith&&(Ft.collapsed=!0,Ft.widgetNode=De("span",[Ft.replacedWith],"CodeMirror-widget"),ut.handleMouseEvents||Ft.widgetNode.setAttribute("cm-ignore-events","true"),ut.insertLeft&&(Ft.widgetNode.insertLeft=!0)),Ft.collapsed){if(Pi(it,st.line,st,ht,Ft)||st.line!=ht.line&&Pi(it,ht.line,st,ht,Ft))throw new Error("Inserting collapsed marker partially overlapping an existing one");le()}Ft.addToHistory&&Ic(it,{from:st,to:ht,origin:"markText"},it.sel,NaN);var zt=st.line,Rt=it.cm,ee;if(it.iter(zt,ht.line+1,function(oe){Rt&&Ft.collapsed&&!Rt.options.lineWrapping&&Tn(oe)==Rt.display.maxLine&&(ee=!0),Ft.collapsed&&zt!=st.line&&sn(oe,0),mi(oe,new rn(Ft,zt==st.line?st.ch:null,zt==ht.line?ht.ch:null)),++zt}),Ft.collapsed&&it.iter(st.line,ht.line+1,function(oe){Je(it,oe)&&sn(oe,0)}),Ft.clearOnEnter&&Rn(Ft,"beforeCursorEnter",function(){return Ft.clear()}),Ft.readOnly&&(Qe(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Ft.collapsed&&(Ft.id=++Ef,Ft.atomic=!0),Rt){if(ee&&(Rt.curOp.updateMaxLine=!0),Ft.collapsed)os(Rt,st.line,ht.line+1);else if(Ft.className||Ft.startStyle||Ft.endStyle||Ft.css||Ft.attributes||Ft.title)for(var Ie=st.line;Ie<=ht.line;Ie++)Vr(Rt,Ie,"text");Ft.atomic&&aA(Rt.doc),Xi(Rt,"markerAdded",Rt,Ft)}return Ft}var AA=function(it,st){this.markers=it,this.primary=st;for(var ht=0;ht<it.length;++ht)it[ht].parent=this};AA.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();Xi(this,"clear")}},AA.prototype.find=function(it,st){return this.primary.find(it,st)},mr(AA);function Ag(it,st,ht,ut,dt){ut=fi(ut),ut.shared=!1;var Ft=[Eu(it,st,ht,ut,dt)],It=Ft[0],zt=ut.widgetNode;return rA(it,function(Rt){zt&&(ut.widgetNode=zt.cloneNode(!0)),Ft.push(Eu(Rt,On(Rt,st),On(Rt,ht),ut,dt));for(var ee=0;ee<Rt.linked.length;++ee)if(Rt.linked[ee].isParent)return;It=Fe(Ft)}),new AA(Ft,It)}function Mf(it){return it.findMarks(Ne(it.first,0),it.clipPos(Ne(it.lastLine())),function(st){return st.parent})}function kf(it,st){for(var ht=0;ht<st.length;ht++){var ut=st[ht],dt=ut.find(),Ft=it.clipPos(dt.from),It=it.clipPos(dt.to);if(mn(Ft,It)){var zt=Eu(it,Ft,It,ut.primary,ut.primary.type);ut.markers.push(zt),zt.parent=ut}}}function Oc(it){for(var st=function(ut){var dt=it[ut],Ft=[dt.primary.doc];rA(dt.primary.doc,function(Rt){return Ft.push(Rt)});for(var It=0;It<dt.markers.length;It++){var zt=dt.markers[It];dn(Ft,zt.doc)==-1&&(zt.parent=null,dt.markers.splice(It--,1))}},ht=0;ht<it.length;ht++)st(ht)}var ug=0,Aa=function(it,st,ht,ut,dt){if(!(this instanceof Aa))return new Aa(it,st,ht,ut,dt);ht==null&&(ht=0),ms.call(this,[new Oh([new jr("",null)])]),this.first=ht,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ht;var Ft=Ne(ht,0);this.sel=YA(Ft),this.history=new bh(null),this.id=++ug,this.modeOption=st,this.lineSep=ut,this.direction=dt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Bf(this,{from:Ft,to:Ft,text:it}),Fa(this,YA(Ft),Ke)};Aa.prototype=Lt(ms.prototype,{constructor:Aa,iter:function(it,st,ht){ht?this.iterN(it-this.first,st-it,ht):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var ht=0,ut=0;ut<st.length;++ut)ht+=st[ut].height;this.insertInner(it-this.first,st,ht)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=Bi(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:sa(function(it){var st=Ne(this.first,0),ht=this.first+this.size-1;Lu(this,{from:st,to:Ne(ht,Le(this,ht).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&PA(this.cm,0,0),Fa(this,YA(st),Ke)}),replaceRange:function(it,st,ht,ut){st=On(this,st),ht=ht?On(this,ht):st,hh(this,it,st,ht,ut)},getRange:function(it,st,ht){var ut=kn(this,On(this,it),On(this,st));return ht===!1?ut:ut.join(ht||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(wn(this,it))return Le(this,it)},getLineNumber:function(it){return Yt(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Le(this,it)),Tn(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return On(this,it)},getCursor:function(it){var st=this.sel.primary(),ht;return it==null||it=="head"?ht=st.head:it=="anchor"?ht=st.anchor:it=="end"||it=="to"||it===!1?ht=st.to():ht=st.from(),ht},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:sa(function(it,st,ht){Fu(this,On(this,typeof it=="number"?Ne(it,st||0):it),null,ht)}),setSelection:sa(function(it,st,ht){Fu(this,On(this,it),On(this,st||it),ht)}),extendSelection:sa(function(it,st,ht){Qh(this,On(this,it),st&&On(this,st),ht)}),extendSelections:sa(function(it,st){sA(this,ki(this,it),st)}),extendSelectionsBy:sa(function(it,st){var ht=pn(this.sel.ranges,it);sA(this,ki(this,ht),st)}),setSelections:sa(function(it,st,ht){if(it.length){for(var ut=[],dt=0;dt<it.length;dt++)ut[dt]=new Ko(On(this,it[dt].anchor),On(this,it[dt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Fa(this,Za(this.cm,ut,st),ht)}}),addSelection:sa(function(it,st,ht){var ut=this.sel.ranges.slice(0);ut.push(new Ko(On(this,it),On(this,st||it))),Fa(this,Za(this.cm,ut,ut.length-1),ht)}),getSelection:function(it){for(var st=this.sel.ranges,ht,ut=0;ut<st.length;ut++){var dt=kn(this,st[ut].from(),st[ut].to());ht=ht?ht.concat(dt):dt}return it===!1?ht:ht.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],ht=this.sel.ranges,ut=0;ut<ht.length;ut++){var dt=kn(this,ht[ut].from(),ht[ut].to());it!==!1&&(dt=dt.join(it||this.lineSeparator())),st[ut]=dt}return st},replaceSelection:function(it,st,ht){for(var ut=[],dt=0;dt<this.sel.ranges.length;dt++)ut[dt]=it;this.replaceSelections(ut,st,ht||"+input")},replaceSelections:sa(function(it,st,ht){for(var ut=[],dt=this.sel,Ft=0;Ft<dt.ranges.length;Ft++){var It=dt.ranges[Ft];ut[Ft]={from:It.from(),to:It.to(),text:this.splitLines(it[Ft]),origin:ht}}for(var zt=st&&st!="end"&&kc(this,ut,st),Rt=ut.length-1;Rt>=0;Rt--)Lu(this,ut[Rt]);zt?sh(this,zt):this.cm&&_A(this.cm)}),undo:sa(function(){Uc(this,"undo")}),redo:sa(function(){Uc(this,"redo")}),undoSelection:sa(function(){Uc(this,"undo",!0)}),redoSelection:sa(function(){Uc(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,st=0,ht=0,ut=0;ut<it.done.length;ut++)it.done[ut].ranges||++st;for(var dt=0;dt<it.undone.length;dt++)it.undone[dt].ranges||++ht;return{undo:st,redo:ht}},clearHistory:function(){var it=this;this.history=new bh(this.history.maxGeneration),rA(this,function(st){return st.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:XA(this.history.done),undone:XA(this.history.undone)}},setHistory:function(it){var st=this.history=new bh(this.history.maxGeneration);st.done=XA(it.done.slice(0),null,!0),st.undone=XA(it.undone.slice(0),null,!0)},setGutterMarker:sa(function(it,st,ht){return ch(this,it,"gutter",function(ut){var dt=ut.gutterMarkers||(ut.gutterMarkers={});return dt[st]=ht,!ht&&kt(dt)&&(ut.gutterMarkers=null),!0})}),clearGutter:sa(function(it){var st=this;this.iter(function(ht){ht.gutterMarkers&&ht.gutterMarkers[it]&&ch(st,ht,"gutter",function(){return ht.gutterMarkers[it]=null,kt(ht.gutterMarkers)&&(ht.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!wn(this,it)||(st=it,it=Le(this,it),!it))return null}else if(st=Yt(it),st==null)return null;return{line:st,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:sa(function(it,st,ht){return ch(this,it,st=="gutter"?"gutter":"class",function(ut){var dt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!ut[dt])ut[dt]=ht;else{if(Vt(ht).test(ut[dt]))return!1;ut[dt]+=" "+ht}return!0})}),removeLineClass:sa(function(it,st,ht){return ch(this,it,st=="gutter"?"gutter":"class",function(ut){var dt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Ft=ut[dt];if(Ft)if(ht==null)ut[dt]=null;else{var It=Ft.match(Vt(ht));if(!It)return!1;var zt=It.index+It[0].length;ut[dt]=Ft.slice(0,It.index)+(!It.index||zt==Ft.length?"":" ")+Ft.slice(zt)||null}else return!1;return!0})}),addLineWidget:sa(function(it,st,ht){return Lf(this,it,st,ht)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ht){return Eu(this,On(this,it),On(this,st),ht,ht&&ht.type||"range")},setBookmark:function(it,st){var ht={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=On(this,it),Eu(this,it,it,ht,"bookmark")},findMarksAt:function(it){it=On(this,it);var st=[],ht=Le(this,it.line).markedSpans;if(ht)for(var ut=0;ut<ht.length;++ut){var dt=ht[ut];(dt.from==null||dt.from<=it.ch)&&(dt.to==null||dt.to>=it.ch)&&st.push(dt.marker.parent||dt.marker)}return st},findMarks:function(it,st,ht){it=On(this,it),st=On(this,st);var ut=[],dt=it.line;return this.iter(it.line,st.line+1,function(Ft){var It=Ft.markedSpans;if(It)for(var zt=0;zt<It.length;zt++){var Rt=It[zt];!(Rt.to!=null&&dt==it.line&&it.ch>=Rt.to||Rt.from==null&&dt!=it.line||Rt.from!=null&&dt==st.line&&Rt.from>=st.ch)&&(!ht||ht(Rt.marker))&&ut.push(Rt.marker.parent||Rt.marker)}++dt}),ut},getAllMarks:function(){var it=[];return this.iter(function(st){var ht=st.markedSpans;if(ht)for(var ut=0;ut<ht.length;++ut)ht[ut].from!=null&&it.push(ht[ut].marker)}),it},posFromIndex:function(it){var st,ht=this.first,ut=this.lineSeparator().length;return this.iter(function(dt){var Ft=dt.text.length+ut;if(Ft>it)return st=it,!0;it-=Ft,++ht}),On(this,Ne(ht,st))},indexFromPos:function(it){it=On(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var ht=this.lineSeparator().length;return this.iter(this.first,it.line,function(ut){st+=ut.text.length+ht}),st},copy:function(it){var st=new Aa(Bi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return st.scrollTop=this.scrollTop,st.scrollLeft=this.scrollLeft,st.sel=this.sel,st.extend=!1,it&&(st.history.undoDepth=this.history.undoDepth,st.setHistory(this.getHistory())),st},linkedDoc:function(it){it||(it={});var st=this.first,ht=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<ht&&(ht=it.to);var ut=new Aa(Bi(this,st,ht),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(ut.history=this.history),(this.linked||(this.linked=[])).push({doc:ut,sharedHist:it.sharedHist}),ut.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],kf(ut,Mf(this)),ut},unlinkDoc:function(it){if(it instanceof Po&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var ht=this.linked[st];if(ht.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),Oc(Mf(this));break}}if(it.history==this.history){var ut=[it.id];rA(it,function(dt){return ut.push(dt.id)},!0),it.history=new bh(null),it.history.done=XA(this.history.done,ut),it.history.undone=XA(this.history.undone,ut)}},iterLinkedDocs:function(it){rA(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):Hr(it)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:sa(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&tp(this.cm))})}),Aa.prototype.eachLine=Aa.prototype.iter;var Hh=0;function bf(it){var st=this;if(cg(st),!(Vi(st,it)||Bs(st.display,it))){Sr(it),ke&&(Hh=+new Date);var ht=Pa(st,it,!0),ut=it.dataTransfer.files;if(!(!ht||st.isReadOnly()))if(ut&&ut.length&&window.FileReader&&window.File)for(var dt=ut.length,Ft=Array(dt),It=0,zt=function(){++It==dt&&Xs(st,function(){ht=On(st.doc,ht);var ze={from:ht,to:ht,text:st.doc.splitLines(Ft.filter(function(Hn){return Hn!=null}).join(st.doc.lineSeparator())),origin:"paste"};Lu(st.doc,ze),sh(st.doc,YA(On(st.doc,ht),On(st.doc,xu(ze))))})()},Rt=function(ze,Hn){if(st.options.allowDropFileTypes&&dn(st.options.allowDropFileTypes,ze.type)==-1){zt();return}var Xn=new FileReader;Xn.onerror=function(){return zt()},Xn.onload=function(){var di=Xn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(di)){zt();return}Ft[Hn]=di,zt()},Xn.readAsText(ze)},ee=0;ee<ut.length;ee++)Rt(ut[ee],ee);else{if(st.state.draggingText&&st.doc.sel.contains(ht)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var Ie=it.dataTransfer.getData("Text");if(Ie){var oe;if(st.state.draggingText&&!st.state.draggingText.copy&&(oe=st.listSelections()),ah(st.doc,YA(ht,ht)),oe)for(var Ye=0;Ye<oe.length;++Ye)hh(st.doc,"",oe[Ye].anchor,oe[Ye].head,"drag");st.replaceSelection(Ie,"around","paste"),st.display.input.focus()}}catch(ze){}}}}function Tf(it,st){if(ke&&(!it.state.draggingText||+new Date-Hh<100)){Yr(st);return}if(!(Vi(it,st)||Bs(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!An)){var ht=Ae("img",null,null,"position: fixed; left: 0; top: 0;");ht.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ie&&(ht.width=ht.height=1,it.display.wrapper.appendChild(ht),ht._top=ht.offsetTop),st.dataTransfer.setDragImage(ht,0,0),ie&&ht.parentNode.removeChild(ht)}}function hg(it,st){var ht=Pa(it,st);if(ht){var ut=document.createDocumentFragment();yo(it,ht,ut),it.display.dragCursor||(it.display.dragCursor=Ae("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),de(it.display.dragCursor,ut)}}function cg(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function fg(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),ht=[],ut=0;ut<st.length;ut++){var dt=st[ut].CodeMirror;dt&&ht.push(dt)}ht.length&&ht[0].operation(function(){for(var Ft=0;Ft<ht.length;Ft++)it(ht[Ft])})}}var Cl=!1;function Ja(){Cl||(Rh(),Cl=!0)}function Rh(){var it;Rn(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fg(pd)},100))}),Rn(window,"blur",function(){return fg(eh)})}function pd(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.setSize()}for(var LA={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Hc=0;Hc<10;Hc++)LA[Hc+48]=LA[Hc+96]=String(Hc);for(var If=65;If<=90;If++)LA[If]=String.fromCharCode(If);for(var Rc=1;Rc<=12;Rc++)LA[Rc+111]=LA[Rc+63235]="F"+Rc;var fl={};fl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},fl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},fl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},fl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},fl.default=ct?fl.macDefault:fl.pcDefault;function md(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ht,ut,dt,Ft,It=0;It<st.length-1;It++){var zt=st[It];if(/^(cmd|meta|m)$/i.test(zt))Ft=!0;else if(/^a(lt)?$/i.test(zt))ht=!0;else if(/^(c|ctrl|control)$/i.test(zt))ut=!0;else if(/^s(hift)?$/i.test(zt))dt=!0;else throw new Error("Unrecognized modifier name: "+zt)}return ht&&(it="Alt-"+it),ut&&(it="Ctrl-"+it),Ft&&(it="Cmd-"+it),dt&&(it="Shift-"+it),it}function vd(it){var st={};for(var ht in it)if(it.hasOwnProperty(ht)){var ut=it[ht];if(/^(name|fallthrough|(de|at)tach)$/.test(ht))continue;if(ut=="..."){delete it[ht];continue}for(var dt=pn(ht.split(" "),md),Ft=0;Ft<dt.length;Ft++){var It=void 0,zt=void 0;Ft==dt.length-1?(zt=dt.join(" "),It=ut):(zt=dt.slice(0,Ft+1).join(" "),It="...");var Rt=st[zt];if(!Rt)st[zt]=It;else if(Rt!=It)throw new Error("Inconsistent bindings for "+zt)}delete it[ht]}for(var ee in st)it[ee]=st[ee];return it}function Pl(it,st,ht,ut){st=js(st);var dt=st.call?st.call(it,ut):st[it];if(dt===!1)return"nothing";if(dt==="...")return"multi";if(dt!=null&&ht(dt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return Pl(it,st.fallthrough,ht,ut);for(var Ft=0;Ft<st.fallthrough.length;Ft++){var It=Pl(it,st.fallthrough[Ft],ht,ut);if(It)return It}}}function Gh(it){var st=typeof it=="string"?it:LA[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Gc(it,st,ht){var ut=it;return st.altKey&&ut!="Alt"&&(it="Alt-"+it),(Et?st.metaKey:st.ctrlKey)&&ut!="Ctrl"&&(it="Ctrl-"+it),(Et?st.ctrlKey:st.metaKey)&&ut!="Mod"&&(it="Cmd-"+it),!ht&&st.shiftKey&&ut!="Shift"&&(it="Shift-"+it),it}function yd(it,st){if(ie&&it.keyCode==34&&it.char)return!1;var ht=LA[it.keyCode];return ht==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ht=it.code),Gc(ht,it,st))}function js(it){return typeof it=="string"?fl[it]:it}function ga(it,st){for(var ht=it.doc.sel.ranges,ut=[],dt=0;dt<ht.length;dt++){for(var Ft=st(ht[dt]);ut.length&&mn(Ft.from,Fe(ut).to)<=0;){var It=ut.pop();if(mn(It.from,Ft.from)<0){Ft.from=It.from;break}}ut.push(Ft)}To(it,function(){for(var zt=ut.length-1;zt>=0;zt--)hh(it.doc,"",ut[zt].from,ut[zt].to,"+delete");_A(it)})}function wd(it,st,ht){var ut=Gn(it.text,st+ht,ht);return ut<0||ut>it.text.length?null:ut}function Us(it,st,ht){var ut=wd(it,st.ch,ht);return ut==null?null:new Ne(st.line,ut,ht<0?"after":"before")}function zh(it,st,ht,ut,dt){if(it){st.doc.direction=="rtl"&&(dt=-dt);var Ft=ai(ht,st.doc.direction);if(Ft){var It=dt<0?Fe(Ft):Ft[0],zt=dt<0==(It.level==1),Rt=zt?"after":"before",ee;if(It.level>0||st.doc.direction=="rtl"){var Ie=No(st,ht);ee=dt<0?ht.text.length-1:0;var oe=al(st,Ie,ee).top;ee=Qn(function(Ye){return al(st,Ie,Ye).top==oe},dt<0==(It.level==1)?It.from:It.to-1,ee),Rt=="before"&&(ee=wd(ht,ee,1))}else ee=dt<0?It.to:It.from;return new Ne(ut,ee,Rt)}}return new Ne(ut,dt<0?ht.text.length:0,dt<0?"before":"after")}function jh(it,st,ht,ut){var dt=ai(st,it.doc.direction);if(!dt)return Us(st,ht,ut);ht.ch>=st.text.length?(ht.ch=st.text.length,ht.sticky="before"):ht.ch<=0&&(ht.ch=0,ht.sticky="after");var Ft=Zn(dt,ht.ch,ht.sticky),It=dt[Ft];if(it.doc.direction=="ltr"&&It.level%2==0&&(ut>0?It.to>ht.ch:It.from<ht.ch))return Us(st,ht,ut);var zt=function(Li,Ji){return wd(st,Li instanceof Ne?Li.ch:Li,Ji)},Rt,ee=function(Li){return it.options.lineWrapping?(Rt=Rt||No(it,st),Rs(it,st,Rt,Li)):{begin:0,end:st.text.length}},Ie=ee(ht.sticky=="before"?zt(ht,-1):ht.ch);if(it.doc.direction=="rtl"||It.level==1){var oe=It.level==1==ut<0,Ye=zt(ht,oe?1:-1);if(Ye!=null&&(oe?Ye<=It.to&&Ye<=Ie.end:Ye>=It.from&&Ye>=Ie.begin)){var ze=oe?"before":"after";return new Ne(ht.line,Ye,ze)}}var Hn=function(Li,Ji,Ri){for(var or=function(cs,na){return na?new Ne(ht.line,zt(cs,1),"before"):new Ne(ht.line,cs,"after")};Li>=0&&Li<dt.length;Li+=Ji){var Ir=dt[Li],Hi=Ji>0==(Ir.level!=1),eo=Hi?Ri.begin:zt(Ri.end,-1);if(Ir.from<=eo&&eo<Ir.to||(eo=Hi?Ir.from:zt(Ir.to,-1),Ri.begin<=eo&&eo<Ri.end))return or(eo,Hi)}},Xn=Hn(Ft+ut,ut,Ie);if(Xn)return Xn;var di=ut>0?Ie.end:zt(Ie.begin,-1);return di!=null&&!(ut>0&&di==st.text.length)&&(Xn=Hn(ut>0?0:dt.length-1,ut,ee(di)),Xn)?Xn:null}var Mu={selectAll:Qs,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),Ke)},killLine:function(it){return ga(it,function(st){if(st.empty()){var ht=Le(it.doc,st.head.line).text.length;return st.head.ch==ht&&st.head.line<it.lastLine()?{from:st.head,to:Ne(st.head.line+1,0)}:{from:st.head,to:Ne(st.head.line,ht)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return ga(it,function(st){return{from:Ne(st.from().line,0),to:On(it.doc,Ne(st.to().line+1,0))}})},delLineLeft:function(it){return ga(it,function(st){return{from:Ne(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return ga(it,function(st){var ht=it.charCoords(st.head,"div").top+5,ut=it.coordsChar({left:0,top:ht},"div");return{from:ut,to:st.from()}})},delWrappedLineRight:function(it){return ga(it,function(st){var ht=it.charCoords(st.head,"div").top+5,ut=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ht},"div");return{from:st.from(),to:ut}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(Ne(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(Ne(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return Kh(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Sd(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return Vh(it,st.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ht},"div")},Sn)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:ht},"div")},Sn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var ht=it.cursorCoords(st.head,"div").top+5,ut=it.coordsChar({left:0,top:ht},"div");return ut.ch<it.getLine(ut.line).search(/\S/)?Sd(it,st.head):ut},Sn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var st=[],ht=it.listSelections(),ut=it.options.tabSize,dt=0;dt<ht.length;dt++){var Ft=ht[dt].from(),It=ue(it.getLine(Ft.line),Ft.ch,ut);st.push(Se(ut-It%ut))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return To(it,function(){for(var st=it.listSelections(),ht=[],ut=0;ut<st.length;ut++)if(st[ut].empty()){var dt=st[ut].head,Ft=Le(it.doc,dt.line).text;if(Ft){if(dt.ch==Ft.length&&(dt=new Ne(dt.line,dt.ch-1)),dt.ch>0)dt=new Ne(dt.line,dt.ch+1),it.replaceRange(Ft.charAt(dt.ch-1)+Ft.charAt(dt.ch-2),Ne(dt.line,dt.ch-2),dt,"+transpose");else if(dt.line>it.doc.first){var It=Le(it.doc,dt.line-1).text;It&&(dt=new Ne(dt.line,1),it.replaceRange(Ft.charAt(0)+it.doc.lineSeparator()+It.charAt(It.length-1),Ne(dt.line-1,It.length-1),dt,"+transpose"))}}ht.push(new Ko(dt,dt))}it.setSelections(ht)})},newlineAndIndent:function(it){return To(it,function(){for(var st=it.listSelections(),ht=st.length-1;ht>=0;ht--)it.replaceRange(it.doc.lineSeparator(),st[ht].anchor,st[ht].head,"+input");st=it.listSelections();for(var ut=0;ut<st.length;ut++)it.indentLine(st[ut].from().line,null,!0);_A(it)})},openLine:function(it){return it.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function Kh(it,st){var ht=Le(it.doc,st),ut=Tn(ht);return ut!=ht&&(st=Yt(ut)),zh(!0,it,ut,st,1)}function Vh(it,st){var ht=Le(it.doc,st),ut=ti(ht);return ut!=ht&&(st=Yt(ut)),zh(!0,it,ht,st,-1)}function Sd(it,st){var ht=Kh(it,st.line),ut=Le(it.doc,ht.line),dt=ai(ut,it.doc.direction);if(!dt||dt[0].level==0){var Ft=Math.max(ht.ch,ut.text.search(/\S/)),It=st.line==ht.line&&st.ch<=Ft&&st.ch;return Ne(ht.line,It?0:Ft,ht.sticky)}return ht}function _h(it,st,ht){if(typeof st=="string"&&(st=Mu[st],!st))return!1;it.display.input.ensurePolled();var ut=it.display.shift,dt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ht&&(it.display.shift=!1),dt=st(it)!=qn}finally{it.display.shift=ut,it.state.suppressEdits=!1}return dt}function xd(it,st,ht){for(var ut=0;ut<it.state.keyMaps.length;ut++){var dt=Pl(st,it.state.keyMaps[ut],ht,it);if(dt)return dt}return it.options.extraKeys&&Pl(st,it.options.extraKeys,ht,it)||Pl(st,it.options.keyMap,ht,it)}var EA=new Kt;function fh(it,st,ht,ut){var dt=it.state.keySeq;if(dt){if(Gh(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:EA.set(50,function(){it.state.keySeq==dt&&(it.state.keySeq=null,it.display.input.reset())}),zc(it,dt+" "+st,ht,ut))return!0}return zc(it,st,ht,ut)}function zc(it,st,ht,ut){var dt=xd(it,st,ut);return dt=="multi"&&(it.state.keySeq=st),dt=="handled"&&Xi(it,"keyHandled",it,st,ht),(dt=="handled"||dt=="multi")&&(Sr(ht),Qo(it)),!!dt}function jc(it,st){var ht=yd(st,!0);return ht?st.shiftKey&&!it.state.keySeq?fh(it,"Shift-"+ht,st,function(ut){return _h(it,ut,!0)})||fh(it,ht,st,function(ut){if(typeof ut=="string"?/^go[A-Z]/.test(ut):ut.motion)return _h(it,ut)}):fh(it,ht,st,function(ut){return _h(it,ut)}):!1}function Kc(it,st,ht){return fh(it,"'"+ht+"'",st,function(ut){return _h(it,ut,!0)})}var ku=null;function Vc(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=nn(),!Vi(st,it))){ke&&ye<11&&it.keyCode==27&&(it.returnValue=!1);var ht=it.keyCode;st.display.shift=ht==16||it.shiftKey;var ut=jc(st,it);ie&&(ku=ut?ht:null,!ut&&ht==88&&!so&&(ct?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),bt&&!ct&&!ut&&ht==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ht==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Bd(st)}}function Bd(it){var st=it.display.lineDiv;an(st,"CodeMirror-crosshair");function ht(ut){(ut.keyCode==18||!ut.altKey)&&(Jt(st,"CodeMirror-crosshair"),ii(document,"keyup",ht),ii(document,"mouseover",ht))}Rn(document,"keyup",ht),Rn(document,"mouseover",ht)}function Cd(it){it.keyCode==16&&(this.doc.sel.shift=!1),Vi(this,it)}function uA(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(Bs(st.display,it)||Vi(st,it)||it.ctrlKey&&!it.altKey||ct&&it.metaKey)){var ht=it.keyCode,ut=it.charCode;if(ie&&ht==ku){ku=null,Sr(it);return}if(!(ie&&(!it.which||it.which<10)&&jc(st,it))){var dt=String.fromCharCode(ut==null?ht:ut);dt!="\b"&&(Kc(st,it,dt)||st.display.input.onKeyPress(it))}}}var dg=400,Wh=function(it,st,ht){this.time=it,this.pos=st,this.button=ht};Wh.prototype.compare=function(it,st,ht){return this.time+dg>it&&mn(st,this.pos)==0&&ht==this.button};var JA,dh;function Nf(it,st){var ht=+new Date;return dh&&dh.compare(ht,it,st)?(JA=dh=null,"triple"):JA&&JA.compare(ht,it,st)?(dh=new Wh(ht,it,st),JA=null,"double"):(JA=new Wh(ht,it,st),dh=null,"single")}function Ol(it){var st=this,ht=st.display;if(!(Vi(st,it)||ht.activeTouch&&ht.input.supportsTouch())){if(ht.input.ensurePolled(),ht.shift=it.shiftKey,Bs(ht,it)){pe||(ht.scroller.draggable=!1,setTimeout(function(){return ht.scroller.draggable=!0},100));return}if(!Df(st,it)){var ut=Pa(st,it),dt=no(it),Ft=ut?Nf(ut,dt):"single";window.focus(),dt==1&&st.state.selectingText&&st.state.selectingText(it),!(ut&&Qf(st,dt,ut,Ft,it))&&(dt==1?ut?Pd(st,ut,Ft,it):kr(it)==ht.scroller&&Sr(it):dt==2?(ut&&Qh(st.doc,ut),setTimeout(function(){return ht.input.focus()},20)):dt==3&&(Nt?st.display.input.onContextMenu(it):ps(st)))}}}function Qf(it,st,ht,ut,dt){var Ft="Click";return ut=="double"?Ft="Double"+Ft:ut=="triple"&&(Ft="Triple"+Ft),Ft=(st==1?"Left":st==2?"Middle":"Right")+Ft,fh(it,Gc(Ft,dt),dt,function(It){if(typeof It=="string"&&(It=Mu[It]),!It)return!1;var zt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),zt=It(it,ht)!=qn}finally{it.state.suppressEdits=!1}return zt})}function _c(it,st,ht){var ut=it.getOption("configureMouse"),dt=ut?ut(it,st,ht):{};if(dt.unit==null){var Ft=lt?ht.shiftKey&&ht.metaKey:ht.altKey;dt.unit=Ft?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(dt.extend==null||it.doc.extend)&&(dt.extend=it.doc.extend||ht.shiftKey),dt.addNew==null&&(dt.addNew=ct?ht.metaKey:ht.ctrlKey),dt.moveOnDrag==null&&(dt.moveOnDrag=!(ct?ht.altKey:ht.ctrlKey)),dt}function Pd(it,st,ht,ut){ke?setTimeout(ui(ts,it),0):it.curOp.focus=nn();var dt=_c(it,ht,ut),Ft=it.doc.sel,It;it.options.dragDrop&&Oo&&!it.isReadOnly()&&ht=="single"&&(It=Ft.contains(st))>-1&&(mn((It=Ft.ranges[It]).from(),st)<0||st.xRel>0)&&(mn(It.to(),st)>0||st.xRel<0)?Fd(it,ut,st,dt):gg(it,ut,st,dt)}function Fd(it,st,ht,ut){var dt=it.display,Ft=!1,It=Xs(it,function(ee){pe&&(dt.scroller.draggable=!1),it.state.draggingText=!1,ii(dt.wrapper.ownerDocument,"mouseup",It),ii(dt.wrapper.ownerDocument,"mousemove",zt),ii(dt.scroller,"dragstart",Rt),ii(dt.scroller,"drop",It),Ft||(Sr(ee),ut.addNew||Qh(it.doc,ht,null,null,ut.extend),pe&&!An||ke&&ye==9?setTimeout(function(){dt.wrapper.ownerDocument.body.focus({preventScroll:!0}),dt.input.focus()},20):dt.input.focus())}),zt=function(ee){Ft=Ft||Math.abs(st.clientX-ee.clientX)+Math.abs(st.clientY-ee.clientY)>=10},Rt=function(){return Ft=!0};pe&&(dt.scroller.draggable=!0),it.state.draggingText=It,It.copy=!ut.moveOnDrag,dt.scroller.dragDrop&&dt.scroller.dragDrop(),Rn(dt.wrapper.ownerDocument,"mouseup",It),Rn(dt.wrapper.ownerDocument,"mousemove",zt),Rn(dt.scroller,"dragstart",Rt),Rn(dt.scroller,"drop",It),ps(it),setTimeout(function(){return dt.input.focus()},20)}function Yh(it,st,ht){if(ht=="char")return new Ko(st,st);if(ht=="word")return it.findWordAt(st);if(ht=="line")return new Ko(Ne(st.line,0),On(it.doc,Ne(st.line+1,0)));var ut=ht(it,st);return new Ko(ut.from,ut.to)}function gg(it,st,ht,ut){var dt=it.display,Ft=it.doc;Sr(st);var It,zt,Rt=Ft.sel,ee=Rt.ranges;if(ut.addNew&&!ut.extend?(zt=Ft.sel.contains(ht),zt>-1?It=ee[zt]:It=new Ko(ht,ht)):(It=Ft.sel.primary(),zt=Ft.sel.primIndex),ut.unit=="rectangle")ut.addNew||(It=new Ko(ht,ht)),ht=Pa(it,st,!0,!0),zt=-1;else{var Ie=Yh(it,ht,ut.unit);ut.extend?It=Pf(It,Ie.anchor,Ie.head,ut.extend):It=Ie}ut.addNew?zt==-1?(zt=ee.length,Fa(Ft,Za(it,ee.concat([It]),zt),{scroll:!1,origin:"*mouse"})):ee.length>1&&ee[zt].empty()&&ut.unit=="char"&&!ut.extend?(Fa(Ft,Za(it,ee.slice(0,zt).concat(ee.slice(zt+1)),0),{scroll:!1,origin:"*mouse"}),Rt=Ft.sel):Pu(Ft,zt,It,yn):(zt=0,Fa(Ft,new Ul([It],0),yn),Rt=Ft.sel);var oe=ht;function Ye(Ri){if(mn(oe,Ri)!=0)if(oe=Ri,ut.unit=="rectangle"){for(var or=[],Ir=it.options.tabSize,Hi=ue(Le(Ft,ht.line).text,ht.ch,Ir),eo=ue(Le(Ft,Ri.line).text,Ri.ch,Ir),cs=Math.min(Hi,eo),na=Math.max(Hi,eo),ws=Math.min(ht.line,Ri.line),qa=Math.min(it.lastLine(),Math.max(ht.line,Ri.line));ws<=qa;ws++){var ua=Le(Ft,ws).text,Js=si(ua,cs,Ir);cs==na?or.push(new Ko(Ne(ws,Js),Ne(ws,Js))):ua.length>Js&&or.push(new Ko(Ne(ws,Js),Ne(ws,si(ua,na,Ir))))}or.length||or.push(new Ko(ht,ht)),Fa(Ft,Za(it,Rt.ranges.slice(0,zt).concat(or),zt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Ri)}else{var Ga=It,pa=Yh(it,Ri,ut.unit),Di=Ga.anchor,wo;mn(pa.anchor,Di)>0?(wo=pa.head,Di=bn(Ga.from(),pa.anchor)):(wo=pa.anchor,Di=Gi(Ga.to(),pa.head));var fs=Rt.ranges.slice(0);fs[zt]=Ld(it,new Ko(On(Ft,Di),wo)),Fa(Ft,Za(it,fs,zt),yn)}}var ze=dt.wrapper.getBoundingClientRect(),Hn=0;function Xn(Ri){var or=++Hn,Ir=Pa(it,Ri,!0,ut.unit=="rectangle");if(Ir)if(mn(Ir,oe)!=0){it.curOp.focus=nn(),Ye(Ir);var Hi=Ao(dt,Ft);(Ir.line>=Hi.to||Ir.line<Hi.from)&&setTimeout(Xs(it,function(){Hn==or&&Xn(Ri)}),150)}else{var eo=Ri.clientY<ze.top?-20:Ri.clientY>ze.bottom?20:0;eo&&setTimeout(Xs(it,function(){Hn==or&&(dt.scroller.scrollTop+=eo,Xn(Ri))}),50)}}function di(Ri){it.state.selectingText=!1,Hn=1/0,Ri&&(Sr(Ri),dt.input.focus()),ii(dt.wrapper.ownerDocument,"mousemove",Li),ii(dt.wrapper.ownerDocument,"mouseup",Ji),Ft.history.lastSelOrigin=null}var Li=Xs(it,function(Ri){Ri.buttons===0||!no(Ri)?di(Ri):Xn(Ri)}),Ji=Xs(it,di);it.state.selectingText=Ji,Rn(dt.wrapper.ownerDocument,"mousemove",Li),Rn(dt.wrapper.ownerDocument,"mouseup",Ji)}function Ld(it,st){var ht=st.anchor,ut=st.head,dt=Le(it.doc,ht.line);if(mn(ht,ut)==0&&ht.sticky==ut.sticky)return st;var Ft=ai(dt);if(!Ft)return st;var It=Zn(Ft,ht.ch,ht.sticky),zt=Ft[It];if(zt.from!=ht.ch&&zt.to!=ht.ch)return st;var Rt=It+(zt.from==ht.ch==(zt.level!=1)?0:1);if(Rt==0||Rt==Ft.length)return st;var ee;if(ut.line!=ht.line)ee=(ut.line-ht.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var Ie=Zn(Ft,ut.ch,ut.sticky),oe=Ie-It||(ut.ch-ht.ch)*(zt.level==1?-1:1);Ie==Rt-1||Ie==Rt?ee=oe<0:ee=oe>0}var Ye=Ft[Rt+(ee?-1:0)],ze=ee==(Ye.level==1),Hn=ze?Ye.from:Ye.to,Xn=ze?"after":"before";return ht.ch==Hn&&ht.sticky==Xn?st:new Ko(new Ne(ht.line,Hn,Xn),ut)}function Uf(it,st,ht,ut){var dt,Ft;if(st.touches)dt=st.touches[0].clientX,Ft=st.touches[0].clientY;else try{dt=st.clientX,Ft=st.clientY}catch(Ye){return!1}if(dt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ut&&Sr(st);var It=it.display,zt=It.lineDiv.getBoundingClientRect();if(Ft>zt.bottom||!pr(it,ht))return ar(st);Ft-=zt.top-It.viewOffset;for(var Rt=0;Rt<it.display.gutterSpecs.length;++Rt){var ee=It.gutters.childNodes[Rt];if(ee&&ee.getBoundingClientRect().right>=dt){var Ie=he(it.doc,Ft),oe=it.display.gutterSpecs[Rt];return ji(it,ht,it,Ie,oe.className,st),ar(st)}}}function Df(it,st){return Uf(it,st,"gutterClick",!0)}function Wc(it,st){Bs(it.display,st)||gh(it,st)||Vi(it,st,"contextmenu")||Nt||it.display.input.onContextMenu(st)}function gh(it,st){return pr(it,"gutterContextMenu")?Uf(it,st,"gutterContextMenu",!1):!1}function Xh(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ll(it)}var hA={toString:function(){return"CodeMirror.Init"}},Ed={},Yc={};function pg(it){var st=it.optionHandlers;function ht(ut,dt,Ft,It){it.defaults[ut]=dt,Ft&&(st[ut]=It?function(zt,Rt,ee){ee!=hA&&Ft(zt,Rt,ee)}:Ft)}it.defineOption=ht,it.Init=hA,ht("value","",function(ut,dt){return ut.setValue(dt)},!0),ht("mode",null,function(ut,dt){ut.doc.modeOption=dt,to(ut)},!0),ht("indentUnit",2,to,!0),ht("indentWithTabs",!1),ht("smartIndent",!0),ht("tabSize",4,function(ut){bc(ut),ll(ut),os(ut)},!0),ht("lineSeparator",null,function(ut,dt){if(ut.doc.lineSep=dt,!!dt){var Ft=[],It=ut.doc.first;ut.doc.iter(function(Rt){for(var ee=0;;){var Ie=Rt.text.indexOf(dt,ee);if(Ie==-1)break;ee=Ie+dt.length,Ft.push(Ne(It,Ie))}It++});for(var zt=Ft.length-1;zt>=0;zt--)hh(ut.doc,dt,Ft[zt],Ne(Ft[zt].line,Ft[zt].ch+dt.length))}}),ht("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ut,dt,Ft){ut.state.specialChars=new RegExp(dt.source+(dt.test(" ")?"":"| "),"g"),Ft!=hA&&ut.refresh()}),ht("specialCharPlaceholder",co,function(ut){return ut.refresh()},!0),ht("electricChars",!0),ht("inputStyle",nt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ht("spellcheck",!1,function(ut,dt){return ut.getInputField().spellcheck=dt},!0),ht("autocorrect",!1,function(ut,dt){return ut.getInputField().autocorrect=dt},!0),ht("autocapitalize",!1,function(ut,dt){return ut.getInputField().autocapitalize=dt},!0),ht("rtlMoveVisually",!gt),ht("wholeLineUpdateBefore",!0),ht("theme","default",function(ut){Xh(ut),Bl(ut)},!0),ht("keyMap","default",function(ut,dt,Ft){var It=js(dt),zt=Ft!=hA&&js(Ft);zt&&zt.detach&&zt.detach(ut,It),It.attach&&It.attach(ut,zt||null)}),ht("extraKeys",null),ht("configureMouse",null),ht("lineWrapping",!1,Md,!0),ht("gutters",[],function(ut,dt){ut.display.gutterSpecs=aa(dt,ut.options.lineNumbers),Bl(ut)},!0),ht("fixedGutter",!0,function(ut,dt){ut.display.gutters.style.left=dt?cu(ut.display)+"px":"0",ut.refresh()},!0),ht("coverGutterNextToScrollbar",!1,function(ut){return eA(ut)},!0),ht("scrollbarStyle","native",function(ut){ld(ut),eA(ut),ut.display.scrollbars.setScrollTop(ut.doc.scrollTop),ut.display.scrollbars.setScrollLeft(ut.doc.scrollLeft)},!0),ht("lineNumbers",!1,function(ut,dt){ut.display.gutterSpecs=aa(ut.options.gutters,dt),Bl(ut)},!0),ht("firstLineNumber",1,Bl,!0),ht("lineNumberFormatter",function(ut){return ut},Bl,!0),ht("showCursorWhenSelecting",!1,Is,!0),ht("resetSelectionOnContextMenu",!0),ht("lineWiseCopyCut",!0),ht("pasteLinesPerSelection",!0),ht("selectionsMayTouch",!1),ht("readOnly",!1,function(ut,dt){dt=="nocursor"&&(eh(ut),ut.display.input.blur()),ut.display.input.readOnlyChanged(dt)}),ht("screenReaderLabel",null,function(ut,dt){dt=dt===""?null:dt,ut.display.input.screenReaderLabelChanged(dt)}),ht("disableInput",!1,function(ut,dt){dt||ut.display.input.reset()},!0),ht("dragDrop",!0,Of),ht("allowDropFileTypes",null),ht("cursorBlinkRate",530),ht("cursorScrollMargin",0),ht("cursorHeight",1,Is,!0),ht("singleCursorHeightPerLine",!0,Is,!0),ht("workTime",100),ht("workDelay",100),ht("flattenSpans",!0,bc,!0),ht("addModeClass",!1,bc,!0),ht("pollInterval",100),ht("undoDepth",200,function(ut,dt){return ut.doc.history.undoDepth=dt}),ht("historyEventDelay",1250),ht("viewportMargin",10,function(ut){return ut.refresh()},!0),ht("maxHighlightLength",1e4,bc,!0),ht("moveInputWithCursor",!0,function(ut,dt){dt||ut.display.input.resetPosition()}),ht("tabindex",null,function(ut,dt){return ut.display.input.getField().tabIndex=dt||""}),ht("autofocus",null),ht("direction","ltr",function(ut,dt){return ut.doc.setDirection(dt)},!0),ht("phrases",null)}function Of(it,st,ht){var ut=ht&&ht!=hA;if(!st!=!ut){var dt=it.display.dragFunctions,Ft=st?Rn:ii;Ft(it.display.scroller,"dragstart",dt.start),Ft(it.display.scroller,"dragenter",dt.enter),Ft(it.display.scroller,"dragover",dt.over),Ft(it.display.scroller,"dragleave",dt.leave),Ft(it.display.scroller,"drop",dt.drop)}}function Md(it){it.options.lineWrapping?(an(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Jt(it.display.wrapper,"CodeMirror-wrap"),nr(it)),gr(it),os(it),ll(it),setTimeout(function(){return eA(it)},100)}function Po(it,st){var ht=this;if(!(this instanceof Po))return new Po(it,st);this.options=st=st?fi(st):{},fi(Ed,st,!1);var ut=st.value;typeof ut=="string"?ut=new Aa(ut,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ut.modeOption=st.mode),this.doc=ut;var dt=new Po.inputStyles[st.inputStyle](this),Ft=this.display=new Su(it,ut,dt,st);Ft.wrapper.CodeMirror=this,Xh(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ld(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 Kt,keySeq:null,specialChars:null},st.autofocus&&!nt&&Ft.input.focus(),ke&&ye<11&&setTimeout(function(){return ht.display.input.reset(!0)},20),ph(this),Ja(),gu(this),this.curOp.forceUpdate=!0,Zs(this,ut),st.autofocus&&!nt||this.hasFocus()?setTimeout(function(){ht.hasFocus()&&!ht.state.focused&&Bo(ht)},20):eh(this);for(var It in Yc)Yc.hasOwnProperty(It)&&Yc[It](this,st[It],hA);zs(this),st.finishInit&&st.finishInit(this);for(var zt=0;zt<bu.length;++zt)bu[zt](this);pu(this),pe&&st.lineWrapping&&getComputedStyle(Ft.lineDiv).textRendering=="optimizelegibility"&&(Ft.lineDiv.style.textRendering="auto")}Po.defaults=Ed,Po.optionHandlers=Yc;function ph(it){var st=it.display;Rn(st.scroller,"mousedown",Xs(it,Ol)),ke&&ye<11?Rn(st.scroller,"dblclick",Xs(it,function(Rt){if(!Vi(it,Rt)){var ee=Pa(it,Rt);if(!(!ee||Df(it,Rt)||Bs(it.display,Rt))){Sr(Rt);var Ie=it.findWordAt(ee);Qh(it.doc,Ie.anchor,Ie.head)}}})):Rn(st.scroller,"dblclick",function(Rt){return Vi(it,Rt)||Sr(Rt)}),Rn(st.scroller,"contextmenu",function(Rt){return Wc(it,Rt)}),Rn(st.input.getField(),"contextmenu",function(Rt){st.scroller.contains(Rt.target)||Wc(it,Rt)});var ht,ut={end:0};function dt(){st.activeTouch&&(ht=setTimeout(function(){return st.activeTouch=null},1e3),ut=st.activeTouch,ut.end=+new Date)}function Ft(Rt){if(Rt.touches.length!=1)return!1;var ee=Rt.touches[0];return ee.radiusX<=1&&ee.radiusY<=1}function It(Rt,ee){if(ee.left==null)return!0;var Ie=ee.left-Rt.left,oe=ee.top-Rt.top;return Ie*Ie+oe*oe>20*20}Rn(st.scroller,"touchstart",function(Rt){if(!Vi(it,Rt)&&!Ft(Rt)&&!Df(it,Rt)){st.input.ensurePolled(),clearTimeout(ht);var ee=+new Date;st.activeTouch={start:ee,moved:!1,prev:ee-ut.end<=300?ut:null},Rt.touches.length==1&&(st.activeTouch.left=Rt.touches[0].pageX,st.activeTouch.top=Rt.touches[0].pageY)}}),Rn(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),Rn(st.scroller,"touchend",function(Rt){var ee=st.activeTouch;if(ee&&!Bs(st,Rt)&&ee.left!=null&&!ee.moved&&new Date-ee.start<300){var Ie=it.coordsChar(st.activeTouch,"page"),oe;!ee.prev||It(ee,ee.prev)?oe=new Ko(Ie,Ie):!ee.prev.prev||It(ee,ee.prev.prev)?oe=it.findWordAt(Ie):oe=new Ko(Ne(Ie.line,0),On(it.doc,Ne(Ie.line+1,0))),it.setSelection(oe.anchor,oe.head),it.focus(),Sr(Rt)}dt()}),Rn(st.scroller,"touchcancel",dt),Rn(st.scroller,"scroll",function(){st.scroller.clientHeight&&(ih(it,st.scroller.scrollTop),WA(it,st.scroller.scrollLeft,!0),ji(it,"scroll",it))}),Rn(st.scroller,"mousewheel",function(Rt){return la(it,Rt)}),Rn(st.scroller,"DOMMouseScroll",function(Rt){return la(it,Rt)}),Rn(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Rt){Vi(it,Rt)||Yr(Rt)},over:function(Rt){Vi(it,Rt)||(hg(it,Rt),Yr(Rt))},start:function(Rt){return Tf(it,Rt)},drop:Xs(it,bf),leave:function(Rt){Vi(it,Rt)||cg(it)}};var zt=st.input.getField();Rn(zt,"keyup",function(Rt){return Cd.call(it,Rt)}),Rn(zt,"keydown",Xs(it,Vc)),Rn(zt,"keypress",Xs(it,uA)),Rn(zt,"focus",function(Rt){return Bo(it,Rt)}),Rn(zt,"blur",function(Rt){return eh(it,Rt)})}var bu=[];Po.defineInitHook=function(it){return bu.push(it)};function Ks(it,st,ht,ut){var dt=it.doc,Ft;ht==null&&(ht="add"),ht=="smart"&&(dt.mode.indent?Ft=vo(it,st).state:ht="prev");var It=it.options.tabSize,zt=Le(dt,st),Rt=ue(zt.text,null,It);zt.stateAfter&&(zt.stateAfter=null);var ee=zt.text.match(/^\s*/)[0],Ie;if(!ut&&!/\S/.test(zt.text))Ie=0,ht="not";else if(ht=="smart"&&(Ie=dt.mode.indent(Ft,zt.text.slice(ee.length),zt.text),Ie==qn||Ie>150)){if(!ut)return;ht="prev"}ht=="prev"?st>dt.first?Ie=ue(Le(dt,st-1).text,null,It):Ie=0:ht=="add"?Ie=Rt+it.options.indentUnit:ht=="subtract"?Ie=Rt-it.options.indentUnit:typeof ht=="number"&&(Ie=Rt+ht),Ie=Math.max(0,Ie);var oe="",Ye=0;if(it.options.indentWithTabs)for(var ze=Math.floor(Ie/It);ze;--ze)Ye+=It,oe+=" ";if(Ye<Ie&&(oe+=Se(Ie-Ye)),oe!=ee)return hh(dt,oe,Ne(st,0),Ne(st,ee.length),"+input"),zt.stateAfter=null,!0;for(var Hn=0;Hn<dt.sel.ranges.length;Hn++){var Xn=dt.sel.ranges[Hn];if(Xn.head.line==st&&Xn.head.ch<ee.length){var di=Ne(st,ee.length);Pu(dt,Hn,new Ko(di,di));break}}}var Ra=null;function Tu(it){Ra=it}function Xc(it,st,ht,ut,dt){var Ft=it.doc;it.display.shift=!1,ut||(ut=Ft.sel);var It=+new Date-200,zt=dt=="paste"||it.state.pasteIncoming>It,Rt=Hr(st),ee=null;if(zt&&ut.ranges.length>1)if(Ra&&Ra.text.join(`
|
|
`)==st){if(ut.ranges.length%Ra.text.length==0){ee=[];for(var Ie=0;Ie<Ra.text.length;Ie++)ee.push(Ft.splitLines(Ra.text[Ie]))}}else Rt.length==ut.ranges.length&&it.options.pasteLinesPerSelection&&(ee=pn(Rt,function(Li){return[Li]}));for(var oe=it.curOp.updateInput,Ye=ut.ranges.length-1;Ye>=0;Ye--){var ze=ut.ranges[Ye],Hn=ze.from(),Xn=ze.to();ze.empty()&&(ht&&ht>0?Hn=Ne(Hn.line,Hn.ch-ht):it.state.overwrite&&!zt?Xn=Ne(Xn.line,Math.min(Le(Ft,Xn.line).text.length,Xn.ch+Fe(Rt).length)):zt&&Ra&&Ra.lineWise&&Ra.text.join(`
|
|
`)==Rt.join(`
|
|
`)&&(Hn=Xn=Ne(Hn.line,0)));var di={from:Hn,to:Xn,text:ee?ee[Ye%ee.length]:Rt,origin:dt||(zt?"paste":it.state.cutIncoming>It?"cut":"+input")};Lu(it.doc,di),Xi(it,"inputRead",it,di)}st&&!zt&&Jh(it,st),_A(it),it.curOp.updateInput<2&&(it.curOp.updateInput=oe),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function Zh(it,st){var ht=it.clipboardData&&it.clipboardData.getData("Text");if(ht)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&To(st,function(){return Xc(st,ht,0,null,"paste")}),!0}function Jh(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ht=it.doc.sel,ut=ht.ranges.length-1;ut>=0;ut--){var dt=ht.ranges[ut];if(!(dt.head.ch>100||ut&&ht.ranges[ut-1].head.line==dt.head.line)){var Ft=it.getModeAt(dt.head),It=!1;if(Ft.electricChars){for(var zt=0;zt<Ft.electricChars.length;zt++)if(st.indexOf(Ft.electricChars.charAt(zt))>-1){It=Ks(it,dt.head.line,"smart");break}}else Ft.electricInput&&Ft.electricInput.test(Le(it.doc,dt.head.line).text.slice(0,dt.head.ch))&&(It=Ks(it,dt.head.line,"smart"));It&&Xi(it,"electricInput",it,dt.head.line)}}}function Hf(it){for(var st=[],ht=[],ut=0;ut<it.doc.sel.ranges.length;ut++){var dt=it.doc.sel.ranges[ut].head.line,Ft={anchor:Ne(dt,0),head:Ne(dt+1,0)};ht.push(Ft),st.push(it.getRange(Ft.anchor,Ft.head))}return{text:st,ranges:ht}}function Rf(it,st,ht,ut){it.setAttribute("autocorrect",ht?"":"off"),it.setAttribute("autocapitalize",ut?"":"off"),it.setAttribute("spellcheck",!!st)}function kd(){var it=Ae("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=Ae("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return pe?it.style.width="1000px":it.setAttribute("wrap","off"),Dt&&(it.style.border="1px solid black"),Rf(it),st}function qA(it){var st=it.optionHandlers,ht=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ut,dt){var Ft=this.options,It=Ft[ut];Ft[ut]==dt&&ut!="mode"||(Ft[ut]=dt,st.hasOwnProperty(ut)&&Xs(this,st[ut])(this,dt,It),ji(this,"optionChange",this,ut))},getOption:function(ut){return this.options[ut]},getDoc:function(){return this.doc},addKeyMap:function(ut,dt){this.state.keyMaps[dt?"push":"unshift"](js(ut))},removeKeyMap:function(ut){for(var dt=this.state.keyMaps,Ft=0;Ft<dt.length;++Ft)if(dt[Ft]==ut||dt[Ft].name==ut)return dt.splice(Ft,1),!0},addOverlay:oa(function(ut,dt){var Ft=ut.token?ut:it.getMode(this.options,ut);if(Ft.startState)throw new Error("Overlays may not be stateful.");Cn(this.state.overlays,{mode:Ft,modeSpec:ut,opaque:dt&&dt.opaque,priority:dt&&dt.priority||0},function(It){return It.priority}),this.state.modeGen++,os(this)}),removeOverlay:oa(function(ut){for(var dt=this.state.overlays,Ft=0;Ft<dt.length;++Ft){var It=dt[Ft].modeSpec;if(It==ut||typeof ut=="string"&&It.name==ut){dt.splice(Ft,1),this.state.modeGen++,os(this);return}}}),indentLine:oa(function(ut,dt,Ft){typeof dt!="string"&&typeof dt!="number"&&(dt==null?dt=this.options.smartIndent?"smart":"prev":dt=dt?"add":"subtract"),wn(this.doc,ut)&&Ks(this,ut,dt,Ft)}),indentSelection:oa(function(ut){for(var dt=this.doc.sel.ranges,Ft=-1,It=0;It<dt.length;It++){var zt=dt[It];if(zt.empty())zt.head.line>Ft&&(Ks(this,zt.head.line,ut,!0),Ft=zt.head.line,It==this.doc.sel.primIndex&&_A(this));else{var Rt=zt.from(),ee=zt.to(),Ie=Math.max(Ft,Rt.line);Ft=Math.min(this.lastLine(),ee.line-(ee.ch?0:1))+1;for(var oe=Ie;oe<Ft;++oe)Ks(this,oe,ut);var Ye=this.doc.sel.ranges;Rt.ch==0&&dt.length==Ye.length&&Ye[It].from().ch>0&&Pu(this.doc,It,new Ko(Rt,Ye[It].to()),Ke)}}}),getTokenAt:function(ut,dt){return br(this,ut,dt)},getLineTokens:function(ut,dt){return br(this,Ne(ut),dt,!0)},getTokenTypeAt:function(ut){ut=On(this.doc,ut);var dt=Ur(this,Le(this.doc,ut.line)),Ft=0,It=(dt.length-1)/2,zt=ut.ch,Rt;if(zt==0)Rt=dt[2];else for(;;){var ee=Ft+It>>1;if((ee?dt[ee*2-1]:0)>=zt)It=ee;else if(dt[ee*2+1]<zt)Ft=ee+1;else{Rt=dt[ee*2+2];break}}var Ie=Rt?Rt.indexOf("overlay "):-1;return Ie<0?Rt:Ie==0?null:Rt.slice(0,Ie-1)},getModeAt:function(ut){var dt=this.doc.mode;return dt.innerMode?it.innerMode(dt,this.getTokenAt(ut).state).mode:dt},getHelper:function(ut,dt){return this.getHelpers(ut,dt)[0]},getHelpers:function(ut,dt){var Ft=[];if(!ht.hasOwnProperty(dt))return Ft;var It=ht[dt],zt=this.getModeAt(ut);if(typeof zt[dt]=="string")It[zt[dt]]&&Ft.push(It[zt[dt]]);else if(zt[dt])for(var Rt=0;Rt<zt[dt].length;Rt++){var ee=It[zt[dt][Rt]];ee&&Ft.push(ee)}else zt.helperType&&It[zt.helperType]?Ft.push(It[zt.helperType]):It[zt.name]&&Ft.push(It[zt.name]);for(var Ie=0;Ie<It._global.length;Ie++){var oe=It._global[Ie];oe.pred(zt,this)&&dn(Ft,oe.val)==-1&&Ft.push(oe.val)}return Ft},getStateAfter:function(ut,dt){var Ft=this.doc;return ut=Ln(Ft,ut==null?Ft.first+Ft.size-1:ut),vo(this,ut+1,dt).state},cursorCoords:function(ut,dt){var Ft,It=this.doc.sel.primary();return ut==null?Ft=It.head:typeof ut=="object"?Ft=On(this.doc,ut):Ft=ut?It.from():It.to(),Wo(this,Ft,dt||"page")},charCoords:function(ut,dt){return BA(this,On(this.doc,ut),dt||"page")},coordsChar:function(ut,dt){return ut=th(this,ut,dt||"page"),ys(this,ut.left,ut.top)},lineAtHeight:function(ut,dt){return ut=th(this,{top:ut,left:0},dt||"page").top,he(this.doc,ut+this.display.viewOffset)},heightAtLine:function(ut,dt,Ft){var It=!1,zt;if(typeof ut=="number"){var Rt=this.doc.first+this.doc.size-1;ut<this.doc.first?ut=this.doc.first:ut>Rt&&(ut=Rt,It=!0),zt=Le(this.doc,ut)}else zt=ut;return Ys(this,zt,{top:0,left:0},dt||"page",Ft||It).top+(It?this.doc.height-fr(zt):0)},defaultTextHeight:function(){return Ca(this.display)},defaultCharWidth:function(){return _l(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ut,dt,Ft,It,zt){var Rt=this.display;ut=Wo(this,On(this.doc,ut));var ee=ut.bottom,Ie=ut.left;if(dt.style.position="absolute",dt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(dt),Rt.sizer.appendChild(dt),It=="over")ee=ut.top;else if(It=="above"||It=="near"){var oe=Math.max(Rt.wrapper.clientHeight,this.doc.height),Ye=Math.max(Rt.sizer.clientWidth,Rt.lineSpace.clientWidth);(It=="above"||ut.bottom+dt.offsetHeight>oe)&&ut.top>dt.offsetHeight?ee=ut.top-dt.offsetHeight:ut.bottom+dt.offsetHeight<=oe&&(ee=ut.bottom),Ie+dt.offsetWidth>Ye&&(Ie=Ye-dt.offsetWidth)}dt.style.top=ee+"px",dt.style.left=dt.style.right="",zt=="right"?(Ie=Rt.sizer.clientWidth-dt.offsetWidth,dt.style.right="0px"):(zt=="left"?Ie=0:zt=="middle"&&(Ie=(Rt.sizer.clientWidth-dt.offsetWidth)/2),dt.style.left=Ie+"px"),Ft&&Ec(this,{left:Ie,top:ee,right:Ie+dt.offsetWidth,bottom:ee+dt.offsetHeight})},triggerOnKeyDown:oa(Vc),triggerOnKeyPress:oa(uA),triggerOnKeyUp:Cd,triggerOnMouseDown:oa(Ol),execCommand:function(ut){if(Mu.hasOwnProperty(ut))return Mu[ut].call(null,this)},triggerElectric:oa(function(ut){Jh(this,ut)}),findPosH:function(ut,dt,Ft,It){var zt=1;dt<0&&(zt=-1,dt=-dt);for(var Rt=On(this.doc,ut),ee=0;ee<dt&&(Rt=qh(this.doc,Rt,zt,Ft,It),!Rt.hitSide);++ee);return Rt},moveH:oa(function(ut,dt){var Ft=this;this.extendSelectionsBy(function(It){return Ft.display.shift||Ft.doc.extend||It.empty()?qh(Ft.doc,It.head,ut,dt,Ft.options.rtlMoveVisually):ut<0?It.from():It.to()},Sn)}),deleteH:oa(function(ut,dt){var Ft=this.doc.sel,It=this.doc;Ft.somethingSelected()?It.replaceSelection("",null,"+delete"):ga(this,function(zt){var Rt=qh(It,zt.head,ut,dt,!1);return ut<0?{from:Rt,to:zt.head}:{from:zt.head,to:Rt}})}),findPosV:function(ut,dt,Ft,It){var zt=1,Rt=It;dt<0&&(zt=-1,dt=-dt);for(var ee=On(this.doc,ut),Ie=0;Ie<dt;++Ie){var oe=Wo(this,ee,"div");if(Rt==null?Rt=oe.left:oe.left=Rt,ee=Iu(this,oe,zt,Ft),ee.hitSide)break}return ee},moveV:oa(function(ut,dt){var Ft=this,It=this.doc,zt=[],Rt=!this.display.shift&&!It.extend&&It.sel.somethingSelected();if(It.extendSelectionsBy(function(Ie){if(Rt)return ut<0?Ie.from():Ie.to();var oe=Wo(Ft,Ie.head,"div");Ie.goalColumn!=null&&(oe.left=Ie.goalColumn),zt.push(oe.left);var Ye=Iu(Ft,oe,ut,dt);return dt=="page"&&Ie==It.sel.primary()&&vf(Ft,BA(Ft,Ye,"div").top-oe.top),Ye},Sn),zt.length)for(var ee=0;ee<It.sel.ranges.length;ee++)It.sel.ranges[ee].goalColumn=zt[ee]}),findWordAt:function(ut){var dt=this.doc,Ft=Le(dt,ut.line).text,It=ut.ch,zt=ut.ch;if(Ft){var Rt=this.getHelper(ut,"wordChars");(ut.sticky=="before"||zt==Ft.length)&&It?--It:++zt;for(var ee=Ft.charAt(It),Ie=jt(ee,Rt)?function(oe){return jt(oe,Rt)}:/\s/.test(ee)?function(oe){return/\s/.test(oe)}:function(oe){return!/\s/.test(oe)&&!jt(oe)};It>0&&Ie(Ft.charAt(It-1));)--It;for(;zt<Ft.length&&Ie(Ft.charAt(zt));)++zt}return new Ko(Ne(ut.line,It),Ne(ut.line,zt))},toggleOverwrite:function(ut){ut!=null&&ut==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?an(this.display.cursorDiv,"CodeMirror-overwrite"):Jt(this.display.cursorDiv,"CodeMirror-overwrite"),ji(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==nn()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:oa(function(ut,dt){PA(this,ut,dt)}),getScrollInfo:function(){var ut=this.display.scroller;return{left:ut.scrollLeft,top:ut.scrollTop,height:ut.scrollHeight-ca(this)-this.display.barHeight,width:ut.scrollWidth-ca(this)-this.display.barWidth,clientHeight:ns(this),clientWidth:Ws(this)}},scrollIntoView:oa(function(ut,dt){ut==null?(ut={from:this.doc.sel.primary().head,to:null},dt==null&&(dt=this.options.cursorScrollMargin)):typeof ut=="number"?ut={from:Ne(ut,0),to:null}:ut.from==null&&(ut={from:ut,to:null}),ut.to||(ut.to=ut.from),ut.margin=dt||0,ut.from.line!=null?Co(this,ut):yf(this,ut.from,ut.to,ut.margin)}),setSize:oa(function(ut,dt){var Ft=this,It=function(Rt){return typeof Rt=="number"||/^\d+$/.test(String(Rt))?Rt+"px":Rt};ut!=null&&(this.display.wrapper.style.width=It(ut)),dt!=null&&(this.display.wrapper.style.height=It(dt)),this.options.lineWrapping&&fa(this);var zt=this.display.viewFrom;this.doc.iter(zt,this.display.viewTo,function(Rt){if(Rt.widgets){for(var ee=0;ee<Rt.widgets.length;ee++)if(Rt.widgets[ee].noHScroll){Vr(Ft,zt,"widget");break}}++zt}),this.curOp.forceUpdate=!0,ji(this,"refresh",this)}),operation:function(ut){return To(this,ut)},startOperation:function(){return gu(this)},endOperation:function(){return pu(this)},refresh:oa(function(){var ut=this.display.cachedTextHeight;os(this),this.curOp.forceUpdate=!0,ll(this),PA(this,this.doc.scrollLeft,this.doc.scrollTop),yu(this.display),(ut==null||Math.abs(ut-Ca(this.display))>.5||this.options.lineWrapping)&&gr(this),ji(this,"refresh",this)}),swapDoc:oa(function(ut){var dt=this.doc;return dt.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,ut),ll(this),this.display.input.reset(),PA(this,ut.scrollLeft,ut.scrollTop),this.curOp.forceScroll=!0,Xi(this,"swapDoc",this,dt),dt}),phrase:function(ut){var dt=this.options.phrases;return dt&&Object.prototype.hasOwnProperty.call(dt,ut)?dt[ut]:ut},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}},mr(it),it.registerHelper=function(ut,dt,Ft){ht.hasOwnProperty(ut)||(ht[ut]=it[ut]={_global:[]}),ht[ut][dt]=Ft},it.registerGlobalHelper=function(ut,dt,Ft,It){it.registerHelper(ut,dt,It),ht[ut]._global.push({pred:Ft,val:It})}}function qh(it,st,ht,ut,dt){var Ft=st,It=ht,zt=Le(it,st.line),Rt=dt&&it.direction=="rtl"?-ht:ht;function ee(){var Ji=st.line+Rt;return Ji<it.first||Ji>=it.first+it.size?!1:(st=new Ne(Ji,st.ch,st.sticky),zt=Le(it,Ji))}function Ie(Ji){var Ri;if(ut=="codepoint"){var or=zt.text.charCodeAt(st.ch+(ut>0?0:-1));isNaN(or)?Ri=null:Ri=new Ne(st.line,Math.max(0,Math.min(zt.text.length,st.ch+ht*(or>=55296&&or<56320?2:1))),-ht)}else dt?Ri=jh(it.cm,zt,st,ht):Ri=Us(zt,st,ht);if(Ri==null)if(!Ji&&ee())st=zh(dt,it.cm,zt,st.line,Rt);else return!1;else st=Ri;return!0}if(ut=="char"||ut=="codepoint")Ie();else if(ut=="column")Ie(!0);else if(ut=="word"||ut=="group")for(var oe=null,Ye=ut=="group",ze=it.cm&&it.cm.getHelper(st,"wordChars"),Hn=!0;!(ht<0&&!Ie(!Hn));Hn=!1){var Xn=zt.text.charAt(st.ch)||`
|
|
`,di=jt(Xn,ze)?"w":Ye&&Xn==`
|
|
`?"n":!Ye||/\s/.test(Xn)?null:"p";if(Ye&&!Hn&&!di&&(di="s"),oe&&oe!=di){ht<0&&(ht=1,Ie(),st.sticky="after");break}if(di&&(oe=di),ht>0&&!Ie(!Hn))break}var Li=Qc(it,st,Ft,It,!0);return xi(Ft,Li)&&(Li.hitSide=!0),Li}function Iu(it,st,ht,ut){var dt=it.doc,Ft=st.left,It;if(ut=="page"){var zt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Rt=Math.max(zt-.5*Ca(it.display),3);It=(ht>0?st.bottom:st.top)+ht*Rt}else ut=="line"&&(It=ht>0?st.bottom+3:st.top-3);for(var ee;ee=ys(it,Ft,It),!!ee.outside;){if(ht<0?It<=0:It>=dt.height){ee.hitSide=!0;break}It+=ht*5}return ee}var Yo=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Kt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Yo.prototype.init=function(it){var st=this,ht=this,ut=ht.cm,dt=ht.div=it.lineDiv;Rf(dt,ut.options.spellcheck,ut.options.autocorrect,ut.options.autocapitalize);function Ft(zt){for(var Rt=zt.target;Rt;Rt=Rt.parentNode){if(Rt==dt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Rt.className))break}return!1}Rn(dt,"paste",function(zt){!Ft(zt)||Vi(ut,zt)||Zh(zt,ut)||ye<=11&&setTimeout(Xs(ut,function(){return st.updateFromDOM()}),20)}),Rn(dt,"compositionstart",function(zt){st.composing={data:zt.data,done:!1}}),Rn(dt,"compositionupdate",function(zt){st.composing||(st.composing={data:zt.data,done:!1})}),Rn(dt,"compositionend",function(zt){st.composing&&(zt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),Rn(dt,"touchstart",function(){return ht.forceCompositionEnd()}),Rn(dt,"input",function(){st.composing||st.readFromDOMSoon()});function It(zt){if(!(!Ft(zt)||Vi(ut,zt))){if(ut.somethingSelected())Tu({lineWise:!1,text:ut.getSelections()}),zt.type=="cut"&&ut.replaceSelection("",null,"cut");else if(ut.options.lineWiseCopyCut){var Rt=Hf(ut);Tu({lineWise:!0,text:Rt.text}),zt.type=="cut"&&ut.operation(function(){ut.setSelections(Rt.ranges,0,Ke),ut.replaceSelection("",null,"cut")})}else return;if(zt.clipboardData){zt.clipboardData.clearData();var ee=Ra.text.join(`
|
|
`);if(zt.clipboardData.setData("Text",ee),zt.clipboardData.getData("Text")==ee){zt.preventDefault();return}}var Ie=kd(),oe=Ie.firstChild;ut.display.lineSpace.insertBefore(Ie,ut.display.lineSpace.firstChild),oe.value=Ra.text.join(`
|
|
`);var Ye=document.activeElement;En(oe),setTimeout(function(){ut.display.lineSpace.removeChild(Ie),Ye.focus(),Ye==dt&&ht.showPrimarySelection()},50)}}Rn(dt,"copy",It),Rn(dt,"cut",It)},Yo.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Yo.prototype.prepareSelection=function(){var it=fu(this.cm,!1);return it.focus=document.activeElement==this.div,it},Yo.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Yo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Yo.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,ht=st.doc.sel.primary(),ut=ht.from(),dt=ht.to();if(st.display.viewTo==st.display.viewFrom||ut.line>=st.display.viewTo||dt.line<st.display.viewFrom){it.removeAllRanges();return}var Ft=MA(st,it.anchorNode,it.anchorOffset),It=MA(st,it.focusNode,it.focusOffset);if(!(Ft&&!Ft.bad&&It&&!It.bad&&mn(bn(Ft,It),ut)==0&&mn(Gi(Ft,It),dt)==0)){var zt=st.display.view,Rt=ut.line>=st.display.viewFrom&&$A(st,ut)||{node:zt[0].measure.map[2],offset:0},ee=dt.line<st.display.viewTo&&$A(st,dt);if(!ee){var Ie=zt[zt.length-1].measure,oe=Ie.maps?Ie.maps[Ie.maps.length-1]:Ie.map;ee={node:oe[oe.length-1],offset:oe[oe.length-2]-oe[oe.length-3]}}if(!Rt||!ee){it.removeAllRanges();return}var Ye=it.rangeCount&&it.getRangeAt(0),ze;try{ze=ve(Rt.node,Rt.offset,ee.offset,ee.node)}catch(Hn){}ze&&(!bt&&st.state.focused?(it.collapse(Rt.node,Rt.offset),ze.collapsed||(it.removeAllRanges(),it.addRange(ze))):(it.removeAllRanges(),it.addRange(ze)),Ye&&it.anchorNode==null?it.addRange(Ye):bt&&this.startGracePeriod()),this.rememberSelection()}},Yo.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},Yo.prototype.showMultipleSelections=function(it){de(this.cm.display.cursorDiv,it.cursors),de(this.cm.display.selectionDiv,it.selection)},Yo.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Yo.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return We(this.div,st)},Yo.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Yo.prototype.blur=function(){this.div.blur()},Yo.prototype.getField=function(){return this.div},Yo.prototype.supportsTouch=function(){return!0},Yo.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():To(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function st(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,st))}this.polling.set(this.cm.options.pollInterval,st)},Yo.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Yo.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(et&&Pe&&this.cm.display.gutterSpecs.length&&Gf(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ht=MA(st,it.anchorNode,it.anchorOffset),ut=MA(st,it.focusNode,it.focusOffset);ht&&ut&&To(st,function(){Fa(st.doc,YA(ht,ut),Ke),(ht.bad||ut.bad)&&(st.curOp.selectionChanged=!0)})}}},Yo.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,ht=it.doc.sel.primary(),ut=ht.from(),dt=ht.to();if(ut.ch==0&&ut.line>it.firstLine()&&(ut=Ne(ut.line-1,Le(it.doc,ut.line-1).length)),dt.ch==Le(it.doc,dt.line).text.length&&dt.line<it.lastLine()&&(dt=Ne(dt.line+1,0)),ut.line<st.viewFrom||dt.line>st.viewTo-1)return!1;var Ft,It,zt;ut.line==st.viewFrom||(Ft=Al(it,ut.line))==0?(It=Yt(st.view[0].line),zt=st.view[0].node):(It=Yt(st.view[Ft].line),zt=st.view[Ft-1].node.nextSibling);var Rt=Al(it,dt.line),ee,Ie;if(Rt==st.view.length-1?(ee=st.viewTo-1,Ie=st.lineDiv.lastChild):(ee=Yt(st.view[Rt+1].line)-1,Ie=st.view[Rt+1].node.previousSibling),!zt)return!1;for(var oe=it.doc.splitLines(Wl(it,zt,Ie,It,ee)),Ye=kn(it.doc,Ne(It,0),Ne(ee,Le(it.doc,ee).text.length));oe.length>1&&Ye.length>1;)if(Fe(oe)==Fe(Ye))oe.pop(),Ye.pop(),ee--;else if(oe[0]==Ye[0])oe.shift(),Ye.shift(),It++;else break;for(var ze=0,Hn=0,Xn=oe[0],di=Ye[0],Li=Math.min(Xn.length,di.length);ze<Li&&Xn.charCodeAt(ze)==di.charCodeAt(ze);)++ze;for(var Ji=Fe(oe),Ri=Fe(Ye),or=Math.min(Ji.length-(oe.length==1?ze:0),Ri.length-(Ye.length==1?ze:0));Hn<or&&Ji.charCodeAt(Ji.length-Hn-1)==Ri.charCodeAt(Ri.length-Hn-1);)++Hn;if(oe.length==1&&Ye.length==1&&It==ut.line)for(;ze&&ze>ut.ch&&Ji.charCodeAt(Ji.length-Hn-1)==Ri.charCodeAt(Ri.length-Hn-1);)ze--,Hn++;oe[oe.length-1]=Ji.slice(0,Ji.length-Hn).replace(/^\u200b+/,""),oe[0]=oe[0].slice(ze).replace(/\u200b+$/,"");var Ir=Ne(It,ze),Hi=Ne(ee,Ye.length?Fe(Ye).length-Hn:0);if(oe.length>1||oe[0]||mn(Ir,Hi))return hh(it.doc,oe,Ir,Hi,"+input"),!0},Yo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Yo.prototype.reset=function(){this.forceCompositionEnd()},Yo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Yo.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))},Yo.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&To(this.cm,function(){return os(it.cm)})},Yo.prototype.setUneditable=function(it){it.contentEditable="false"},Yo.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||Xs(this.cm,Xc)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Yo.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Yo.prototype.onContextMenu=function(){},Yo.prototype.resetPosition=function(){},Yo.prototype.needsContentAttribute=!0;function $A(it,st){var ht=Ya(it,st.line);if(!ht||ht.hidden)return null;var ut=Le(it.doc,st.line),dt=Ts(ht,ut,st.line),Ft=ai(ut,it.doc.direction),It="left";if(Ft){var zt=Zn(Ft,st.ch);It=zt%2?"right":"left"}var Rt=qu(dt.map,st.ch,It);return Rt.offset=Rt.collapse=="right"?Rt.end:Rt.start,Rt}function Gf(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function Ps(it,st){return st&&(it.bad=!0),it}function Wl(it,st,ht,ut,dt){var Ft="",It=!1,zt=it.doc.lineSeparator(),Rt=!1;function ee(ze){return function(Hn){return Hn.id==ze}}function Ie(){It&&(Ft+=zt,Rt&&(Ft+=zt),It=Rt=!1)}function oe(ze){ze&&(Ie(),Ft+=ze)}function Ye(ze){if(ze.nodeType==1){var Hn=ze.getAttribute("cm-text");if(Hn){oe(Hn);return}var Xn=ze.getAttribute("cm-marker"),di;if(Xn){var Li=it.findMarks(Ne(ut,0),Ne(dt+1,0),ee(+Xn));Li.length&&(di=Li[0].find(0))&&oe(kn(it.doc,di.from,di.to).join(zt));return}if(ze.getAttribute("contenteditable")=="false")return;var Ji=/^(pre|div|p|li|table|br)$/i.test(ze.nodeName);if(!/^br$/i.test(ze.nodeName)&&ze.textContent.length==0)return;Ji&&Ie();for(var Ri=0;Ri<ze.childNodes.length;Ri++)Ye(ze.childNodes[Ri]);/^(pre|p)$/i.test(ze.nodeName)&&(Rt=!0),Ji&&(It=!0)}else ze.nodeType==3&&oe(ze.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ye(st),st!=ht;)st=st.nextSibling,Rt=!1;return Ft}function MA(it,st,ht){var ut;if(st==it.display.lineDiv){if(ut=it.display.lineDiv.childNodes[ht],!ut)return Ps(it.clipPos(Ne(it.display.viewTo-1)),!0);st=null,ht=0}else for(ut=st;;ut=ut.parentNode){if(!ut||ut==it.display.lineDiv)return null;if(ut.parentNode&&ut.parentNode==it.display.lineDiv)break}for(var dt=0;dt<it.display.view.length;dt++){var Ft=it.display.view[dt];if(Ft.node==ut)return tu(Ft,st,ht)}}function tu(it,st,ht){var ut=it.text.firstChild,dt=!1;if(!st||!We(ut,st))return Ps(Ne(Yt(it.line),0),!0);if(st==ut&&(dt=!0,st=ut.childNodes[ht],ht=0,!st)){var Ft=it.rest?Fe(it.rest):it.line;return Ps(Ne(Yt(Ft),Ft.text.length),dt)}var It=st.nodeType==3?st:null,zt=st;for(!It&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(It=st.firstChild,ht&&(ht=It.nodeValue.length));zt.parentNode!=ut;)zt=zt.parentNode;var Rt=it.measure,ee=Rt.maps;function Ie(di,Li,Ji){for(var Ri=-1;Ri<(ee?ee.length:0);Ri++)for(var or=Ri<0?Rt.map:ee[Ri],Ir=0;Ir<or.length;Ir+=3){var Hi=or[Ir+2];if(Hi==di||Hi==Li){var eo=Yt(Ri<0?it.line:it.rest[Ri]),cs=or[Ir]+Ji;return(Ji<0||Hi!=di)&&(cs=or[Ir+(Ji?1:0)]),Ne(eo,cs)}}}var oe=Ie(It,zt,ht);if(oe)return Ps(oe,dt);for(var Ye=zt.nextSibling,ze=It?It.nodeValue.length-ht:0;Ye;Ye=Ye.nextSibling){if(oe=Ie(Ye,Ye.firstChild,0),oe)return Ps(Ne(oe.line,oe.ch-ze),dt);ze+=Ye.textContent.length}for(var Hn=zt.previousSibling,Xn=ht;Hn;Hn=Hn.previousSibling){if(oe=Ie(Hn,Hn.firstChild,-1),oe)return Ps(Ne(oe.line,oe.ch+Xn),dt);Xn+=Hn.textContent.length}}var hs=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new Kt,this.hasSelection=!1,this.composing=null};hs.prototype.init=function(it){var st=this,ht=this,ut=this.cm;this.createField(it);var dt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Dt&&(dt.style.width="0px"),Rn(dt,"input",function(){ke&&ye>=9&&st.hasSelection&&(st.hasSelection=null),ht.poll()}),Rn(dt,"paste",function(It){Vi(ut,It)||Zh(It,ut)||(ut.state.pasteIncoming=+new Date,ht.fastPoll())});function Ft(It){if(!Vi(ut,It)){if(ut.somethingSelected())Tu({lineWise:!1,text:ut.getSelections()});else if(ut.options.lineWiseCopyCut){var zt=Hf(ut);Tu({lineWise:!0,text:zt.text}),It.type=="cut"?ut.setSelections(zt.ranges,null,Ke):(ht.prevInput="",dt.value=zt.text.join(`
|
|
`),En(dt))}else return;It.type=="cut"&&(ut.state.cutIncoming=+new Date)}}Rn(dt,"cut",Ft),Rn(dt,"copy",Ft),Rn(it.scroller,"paste",function(It){if(!(Bs(it,It)||Vi(ut,It))){if(!dt.dispatchEvent){ut.state.pasteIncoming=+new Date,ht.focus();return}var zt=new Event("paste");zt.clipboardData=It.clipboardData,dt.dispatchEvent(zt)}}),Rn(it.lineSpace,"selectstart",function(It){Bs(it,It)||Sr(It)}),Rn(dt,"compositionstart",function(){var It=ut.getCursor("from");ht.composing&&ht.composing.range.clear(),ht.composing={start:It,range:ut.markText(It,ut.getCursor("to"),{className:"CodeMirror-composing"})}}),Rn(dt,"compositionend",function(){ht.composing&&(ht.poll(),ht.composing.range.clear(),ht.composing=null)})},hs.prototype.createField=function(it){this.wrapper=kd(),this.textarea=this.wrapper.firstChild},hs.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},hs.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ht=it.doc,ut=fu(it);if(it.options.moveInputWithCursor){var dt=Wo(it,ht.sel.primary().head,"div"),Ft=st.wrapper.getBoundingClientRect(),It=st.lineDiv.getBoundingClientRect();ut.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,dt.top+It.top-Ft.top)),ut.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,dt.left+It.left-Ft.left))}return ut},hs.prototype.showSelection=function(it){var st=this.cm,ht=st.display;de(ht.cursorDiv,it.cursors),de(ht.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},hs.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var ht=st.getSelection();this.textarea.value=ht,st.state.focused&&En(this.textarea),ke&&ye>=9&&(this.hasSelection=ht)}else it||(this.prevInput=this.textarea.value="",ke&&ye>=9&&(this.hasSelection=null))}},hs.prototype.getField=function(){return this.textarea},hs.prototype.supportsTouch=function(){return!1},hs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!nt||nn()!=this.textarea))try{this.textarea.focus()}catch(it){}},hs.prototype.blur=function(){this.textarea.blur()},hs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},hs.prototype.receivedFocus=function(){this.slowPoll()},hs.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},hs.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function ht(){var ut=st.poll();!ut&&!it?(it=!0,st.polling.set(60,ht)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,ht)},hs.prototype.poll=function(){var it=this,st=this.cm,ht=this.textarea,ut=this.prevInput;if(this.contextMenuPending||!st.state.focused||Pt(ht)&&!ut&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var dt=ht.value;if(dt==ut&&!st.somethingSelected())return!1;if(ke&&ye>=9&&this.hasSelection===dt||ct&&/[\uf700-\uf7ff]/.test(dt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Ft=dt.charCodeAt(0);if(Ft==8203&&!ut&&(ut="\u200B"),Ft==8666)return this.reset(),this.cm.execCommand("undo")}for(var It=0,zt=Math.min(ut.length,dt.length);It<zt&&ut.charCodeAt(It)==dt.charCodeAt(It);)++It;return To(st,function(){Xc(st,dt.slice(It),ut.length-It,null,it.composing?"*compose":null),dt.length>1e3||dt.indexOf(`
|
|
`)>-1?ht.value=it.prevInput="":it.prevInput=dt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},hs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},hs.prototype.onKeyPress=function(){ke&&ye>=9&&(this.hasSelection=null),this.fastPoll()},hs.prototype.onContextMenu=function(it){var st=this,ht=st.cm,ut=ht.display,dt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Ft=Pa(ht,it),It=ut.scroller.scrollTop;if(!Ft||ie)return;var zt=ht.options.resetSelectionOnContextMenu;zt&&ht.doc.sel.contains(Ft)==-1&&Xs(ht,Fa)(ht.doc,YA(Ft),Ke);var Rt=dt.style.cssText,ee=st.wrapper.style.cssText,Ie=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",dt.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(it.clientY-Ie.top-5)+"px; left: "+(it.clientX-Ie.left-5)+`px;
|
|
z-index: 1000; background: `+(ke?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var oe;pe&&(oe=window.scrollY),ut.input.focus(),pe&&window.scrollTo(null,oe),ut.input.reset(),ht.somethingSelected()||(dt.value=st.prevInput=" "),st.contextMenuPending=ze,ut.selForContextMenu=ht.doc.sel,clearTimeout(ut.detectingSelectAll);function Ye(){if(dt.selectionStart!=null){var Xn=ht.somethingSelected(),di="\u200B"+(Xn?dt.value:"");dt.value="\u21DA",dt.value=di,st.prevInput=Xn?"":"\u200B",dt.selectionStart=1,dt.selectionEnd=di.length,ut.selForContextMenu=ht.doc.sel}}function ze(){if(st.contextMenuPending==ze&&(st.contextMenuPending=!1,st.wrapper.style.cssText=ee,dt.style.cssText=Rt,ke&&ye<9&&ut.scrollbars.setScrollTop(ut.scroller.scrollTop=It),dt.selectionStart!=null)){(!ke||ke&&ye<9)&&Ye();var Xn=0,di=function(){ut.selForContextMenu==ht.doc.sel&&dt.selectionStart==0&&dt.selectionEnd>0&&st.prevInput=="\u200B"?Xs(ht,Qs)(ht):Xn++<10?ut.detectingSelectAll=setTimeout(di,500):(ut.selForContextMenu=null,ut.input.reset())};ut.detectingSelectAll=setTimeout(di,200)}}if(ke&&ye>=9&&Ye(),Nt){Yr(it);var Hn=function(){ii(window,"mouseup",Hn),setTimeout(ze,20)};Rn(window,"mouseup",Hn)}else setTimeout(ze,50)},hs.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},hs.prototype.setUneditable=function(){},hs.prototype.needsContentAttribute=!1;function $h(it,st){if(st=st?fi(st):{},st.value=it.value,!st.tabindex&&it.tabIndex&&(st.tabindex=it.tabIndex),!st.placeholder&&it.placeholder&&(st.placeholder=it.placeholder),st.autofocus==null){var ht=nn();st.autofocus=ht==it||it.getAttribute("autofocus")!=null&&ht==document.body}function ut(){it.value=zt.getValue()}var dt;if(it.form&&(Rn(it.form,"submit",ut),!st.leaveSubmitMethodAlone)){var Ft=it.form;dt=Ft.submit;try{var It=Ft.submit=function(){ut(),Ft.submit=dt,Ft.submit(),Ft.submit=It}}catch(Rt){}}st.finishInit=function(Rt){Rt.save=ut,Rt.getTextArea=function(){return it},Rt.toTextArea=function(){Rt.toTextArea=isNaN,ut(),it.parentNode.removeChild(Rt.getWrapperElement()),it.style.display="",it.form&&(ii(it.form,"submit",ut),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=dt))}},it.style.display="none";var zt=Po(function(Rt){return it.parentNode.insertBefore(Rt,it.nextSibling)},st);return zt}function Fl(it){it.off=ii,it.on=Rn,it.wheelEventPixels=cl,it.Doc=Aa,it.splitLines=Hr,it.countColumn=ue,it.findColumn=si,it.isWordChar=Tt,it.Pass=qn,it.signal=ji,it.Line=jr,it.changeEnd=xu,it.scrollbarModel=ad,it.Pos=Ne,it.cmpPos=mn,it.modes=pi,it.mimeModes=Ci,it.resolveMode=Re,it.getMode=Oe,it.modeExtensions=Te,it.extendMode=Ze,it.copyState=yi,it.startState=Zi,it.innerMode=hi,it.commands=Mu,it.keyMap=fl,it.keyName=yd,it.isModifierKey=Gh,it.lookupKey=Pl,it.normalizeKeyMap=vd,it.StringStream=He,it.SharedTextMarker=AA,it.TextMarker=ge,it.LineWidget=ZA,it.e_preventDefault=Sr,it.e_stopPropagation=$r,it.e_stop=Yr,it.addClass=an,it.contains=We,it.rmClass=Jt,it.keyNames=LA}pg(Po),qA(Po);var kA="iter insert remove copy getEditor constructor".split(" ");for(var tc in Aa.prototype)Aa.prototype.hasOwnProperty(tc)&&dn(kA,tc)<0&&(Po.prototype[tc]=function(it){return function(){return it.apply(this.doc,arguments)}}(Aa.prototype[tc]));return mr(Aa),Po.inputStyles={textarea:hs,contenteditable:Yo},Po.defineMode=function(it){!Po.defaults.mode&&it!="null"&&(Po.defaults.mode=it),Qi.apply(this,arguments)},Po.defineMIME=Tr,Po.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Po.defineMIME("text/plain","null"),Po.defineExtension=function(it,st){Po.prototype[it]=st},Po.defineDocExtension=function(it,st){Aa.prototype[it]=st},Po.fromTextArea=$h,Fl(Po),Po.version="5.58.2",Po})},25419:function(Pn,gi,ne){(function(bt){bt(ne(89780),ne(15525),ne(98101))})(function(bt){"use strict";bt.defineMode("markdown",function(xe,Me){var je=bt.getMode(xe,"text/html"),ke=je.name=="null";function ye(ue){if(bt.findModeByName){var Kt=bt.findModeByName(ue);Kt&&(ue=Kt.mime||Kt.mimes[0])}var dn=bt.getMode(xe,ue);return dn.name=="null"?null:dn}Me.highlightFormatting===void 0&&(Me.highlightFormatting=!1),Me.maxBlockquoteDepth===void 0&&(Me.maxBlockquoteDepth=0),Me.taskLists===void 0&&(Me.taskLists=!1),Me.strikethrough===void 0&&(Me.strikethrough=!1),Me.emoji===void 0&&(Me.emoji=!1),Me.fencedCodeBlockHighlighting===void 0&&(Me.fencedCodeBlockHighlighting=!0),Me.fencedCodeBlockDefaultMode===void 0&&(Me.fencedCodeBlockDefaultMode="text/plain"),Me.xml===void 0&&(Me.xml=!0),Me.tokenTypeOverrides===void 0&&(Me.tokenTypeOverrides={});var pe={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 Ue in pe)pe.hasOwnProperty(Ue)&&Me.tokenTypeOverrides[Ue]&&(pe[Ue]=Me.tokenTypeOverrides[Ue]);var Pe=/^([*\-_])(?:\s*\1){2,}\s*$/,ie=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,An=/^\[(x| )\](?=\s)/i,we=Me.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,xn=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Dt=/^[^#!\[\]*_\\<>` "'(~:]+/,et=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,nt=/^\s*\[[^\]]+?\]:.*$/,ct=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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(ue,Kt,dn){return Kt.f=Kt.inline=dn,dn(ue,Kt)}function yt(ue,Kt,dn){return Kt.f=Kt.block=dn,dn(ue,Kt)}function Et(ue){return!ue||!/\S/.test(ue.string)}function Nt(ue){if(ue.linkTitle=!1,ue.linkHref=!1,ue.linkText=!1,ue.em=!1,ue.strong=!1,ue.strikethrough=!1,ue.quote=0,ue.indentedCode=!1,ue.f==Jt){var Kt=ke;if(!Kt){var dn=bt.innerMode(je,ue.htmlState);Kt=dn.mode.name=="xml"&&dn.state.tagStart===null&&!dn.state.context&&dn.state.tokenize.isInText}Kt&&(ue.f=De,ue.block=Vt,ue.htmlState=null)}return ue.trailingSpace=0,ue.trailingSpaceNewLine=!1,ue.prevLine=ue.thisLine,ue.thisLine={stream:null},null}function Vt(ue,Kt){var dn=ue.column()===Kt.indentation,Ai=Et(Kt.prevLine.stream),qn=Kt.indentedCode,Ke=Kt.prevLine.hr,yn=Kt.list!==!1,Sn=(Kt.listStack[Kt.listStack.length-1]||0)+3;Kt.indentedCode=!1;var si=Kt.indentation;if(Kt.indentationDiff===null&&(Kt.indentationDiff=Kt.indentation,yn)){for(Kt.list=null;si<Kt.listStack[Kt.listStack.length-1];)Kt.listStack.pop(),Kt.listStack.length?Kt.indentation=Kt.listStack[Kt.listStack.length-1]:Kt.list=!1;Kt.list!==!1&&(Kt.indentationDiff=si-Kt.listStack[Kt.listStack.length-1])}var Bn=!Ai&&!Ke&&!Kt.prevLine.header&&(!yn||!qn)&&!Kt.prevLine.fencedCodeEnd,Se=(Kt.list===!1||Ke||Ai)&&Kt.indentation<=Sn&&ue.match(Pe),Fe=null;if(Kt.indentationDiff>=4&&(qn||Kt.prevLine.fencedCodeEnd||Kt.prevLine.header||Ai))return ue.skipToEnd(),Kt.indentedCode=!0,pe.code;if(ue.eatSpace())return null;if(dn&&Kt.indentation<=Sn&&(Fe=ue.match(we))&&Fe[1].length<=6)return Kt.quote=0,Kt.header=Fe[1].length,Kt.thisLine.header=!0,Me.highlightFormatting&&(Kt.formatting="header"),Kt.f=Kt.inline,de(Kt);if(Kt.indentation<=Sn&&ue.eat(">"))return Kt.quote=dn?1:Kt.quote+1,Me.highlightFormatting&&(Kt.formatting="quote"),ue.eatSpace(),de(Kt);if(!Se&&!Kt.setext&&dn&&Kt.indentation<=Sn&&(Fe=ue.match(ie))){var pn=Fe[1]?"ol":"ul";return Kt.indentation=si+ue.current().length,Kt.list=!0,Kt.quote=0,Kt.listStack.push(Kt.indentation),Kt.em=!1,Kt.strong=!1,Kt.code=!1,Kt.strikethrough=!1,Me.taskLists&&ue.match(An,!1)&&(Kt.taskList=!0),Kt.f=Kt.inline,Me.highlightFormatting&&(Kt.formatting=["list","list-"+pn]),de(Kt)}else{if(dn&&Kt.indentation<=Sn&&(Fe=ue.match(et,!0)))return Kt.quote=0,Kt.fencedEndRE=new RegExp(Fe[1]+"+ *$"),Kt.localMode=Me.fencedCodeBlockHighlighting&&ye(Fe[2]||Me.fencedCodeBlockDefaultMode),Kt.localMode&&(Kt.localState=bt.startState(Kt.localMode)),Kt.f=Kt.block=ce,Me.highlightFormatting&&(Kt.formatting="code-block"),Kt.code=-1,de(Kt);if(Kt.setext||(!Bn||!yn)&&!Kt.quote&&Kt.list===!1&&!Kt.code&&!Se&&!nt.test(ue.string)&&(Fe=ue.lookAhead(1))&&(Fe=Fe.match(xn)))return Kt.setext?(Kt.header=Kt.setext,Kt.setext=0,ue.skipToEnd(),Me.highlightFormatting&&(Kt.formatting="header")):(Kt.header=Fe[0].charAt(0)=="="?1:2,Kt.setext=Kt.header),Kt.thisLine.header=!0,Kt.f=Kt.inline,de(Kt);if(Se)return ue.skipToEnd(),Kt.hr=!0,Kt.thisLine.hr=!0,pe.hr;if(ue.peek()==="[")return gt(ue,Kt,In)}return gt(ue,Kt,Kt.inline)}function Jt(ue,Kt){var dn=je.token(ue,Kt.htmlState);if(!ke){var Ai=bt.innerMode(je,Kt.htmlState);(Ai.mode.name=="xml"&&Ai.state.tagStart===null&&!Ai.state.context&&Ai.state.tokenize.isInText||Kt.md_inside&&ue.current().indexOf(">")>-1)&&(Kt.f=De,Kt.block=Vt,Kt.htmlState=null)}return dn}function ce(ue,Kt){var dn=Kt.listStack[Kt.listStack.length-1]||0,Ai=Kt.indentation<dn,qn=dn+3;if(Kt.fencedEndRE&&Kt.indentation<=qn&&(Ai||ue.match(Kt.fencedEndRE))){Me.highlightFormatting&&(Kt.formatting="code-block");var Ke;return Ai||(Ke=de(Kt)),Kt.localMode=Kt.localState=null,Kt.block=Vt,Kt.f=De,Kt.fencedEndRE=null,Kt.code=0,Kt.thisLine.fencedCodeEnd=!0,Ai?yt(ue,Kt,Kt.block):Ke}else return Kt.localMode?Kt.localMode.token(ue,Kt.localState):(ue.skipToEnd(),pe.code)}function de(ue){var Kt=[];if(ue.formatting){Kt.push(pe.formatting),typeof ue.formatting=="string"&&(ue.formatting=[ue.formatting]);for(var dn=0;dn<ue.formatting.length;dn++)Kt.push(pe.formatting+"-"+ue.formatting[dn]),ue.formatting[dn]==="header"&&Kt.push(pe.formatting+"-"+ue.formatting[dn]+"-"+ue.header),ue.formatting[dn]==="quote"&&(!Me.maxBlockquoteDepth||Me.maxBlockquoteDepth>=ue.quote?Kt.push(pe.formatting+"-"+ue.formatting[dn]+"-"+ue.quote):Kt.push("error"))}if(ue.taskOpen)return Kt.push("meta"),Kt.length?Kt.join(" "):null;if(ue.taskClosed)return Kt.push("property"),Kt.length?Kt.join(" "):null;if(ue.linkHref?Kt.push(pe.linkHref,"url"):(ue.strong&&Kt.push(pe.strong),ue.em&&Kt.push(pe.em),ue.strikethrough&&Kt.push(pe.strikethrough),ue.emoji&&Kt.push(pe.emoji),ue.linkText&&Kt.push(pe.linkText),ue.code&&Kt.push(pe.code),ue.image&&Kt.push(pe.image),ue.imageAltText&&Kt.push(pe.imageAltText,"link"),ue.imageMarker&&Kt.push(pe.imageMarker)),ue.header&&Kt.push(pe.header,pe.header+"-"+ue.header),ue.quote&&(Kt.push(pe.quote),!Me.maxBlockquoteDepth||Me.maxBlockquoteDepth>=ue.quote?Kt.push(pe.quote+"-"+ue.quote):Kt.push(pe.quote+"-"+Me.maxBlockquoteDepth)),ue.list!==!1){var Ai=(ue.listStack.length-1)%3;Ai?Ai===1?Kt.push(pe.list2):Kt.push(pe.list3):Kt.push(pe.list1)}return ue.trailingSpaceNewLine?Kt.push("trailing-space-new-line"):ue.trailingSpace&&Kt.push("trailing-space-"+(ue.trailingSpace%2?"a":"b")),Kt.length?Kt.join(" "):null}function Ae(ue,Kt){if(ue.match(Dt,!0))return de(Kt)}function De(ue,Kt){var dn=Kt.text(ue,Kt);if(typeof dn!="undefined")return dn;if(Kt.list)return Kt.list=null,de(Kt);if(Kt.taskList){var Ai=ue.match(An,!0)[1]===" ";return Ai?Kt.taskOpen=!0:Kt.taskClosed=!0,Me.highlightFormatting&&(Kt.formatting="task"),Kt.taskList=!1,de(Kt)}if(Kt.taskOpen=!1,Kt.taskClosed=!1,Kt.header&&ue.match(/^#+$/,!0))return Me.highlightFormatting&&(Kt.formatting="header"),de(Kt);var qn=ue.next();if(Kt.linkTitle){Kt.linkTitle=!1;var Ke=qn;qn==="("&&(Ke=")"),Ke=(Ke+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var yn="^\\s*(?:[^"+Ke+"\\\\]+|\\\\\\\\|\\\\.)"+Ke;if(ue.match(new RegExp(yn),!0))return pe.linkHref}if(qn==="`"){var Sn=Kt.formatting;Me.highlightFormatting&&(Kt.formatting="code"),ue.eatWhile("`");var si=ue.current().length;if(Kt.code==0&&(!Kt.quote||si==1))return Kt.code=si,de(Kt);if(si==Kt.code){var Bn=de(Kt);return Kt.code=0,Bn}else return Kt.formatting=Sn,de(Kt)}else if(Kt.code)return de(Kt);if(qn==="\\"&&(ue.next(),Me.highlightFormatting)){var Se=de(Kt),Fe=pe.formatting+"-escape";return Se?Se+" "+Fe:Fe}if(qn==="!"&&ue.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Kt.imageMarker=!0,Kt.image=!0,Me.highlightFormatting&&(Kt.formatting="image"),de(Kt);if(qn==="["&&Kt.imageMarker&&ue.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Kt.imageMarker=!1,Kt.imageAltText=!0,Me.highlightFormatting&&(Kt.formatting="image"),de(Kt);if(qn==="]"&&Kt.imageAltText){Me.highlightFormatting&&(Kt.formatting="image");var Se=de(Kt);return Kt.imageAltText=!1,Kt.image=!1,Kt.inline=Kt.f=We,Se}if(qn==="["&&!Kt.image)return Kt.linkText&&ue.match(/^.*?\]/)||(Kt.linkText=!0,Me.highlightFormatting&&(Kt.formatting="link")),de(Kt);if(qn==="]"&&Kt.linkText){Me.highlightFormatting&&(Kt.formatting="link");var Se=de(Kt);return Kt.linkText=!1,Kt.inline=Kt.f=ue.match(/\(.*?\)| ?\[.*?\]/,!1)?We:De,Se}if(qn==="<"&&ue.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Kt.f=Kt.inline=ve,Me.highlightFormatting&&(Kt.formatting="link");var Se=de(Kt);return Se?Se+=" ":Se="",Se+pe.linkInline}if(qn==="<"&&ue.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Kt.f=Kt.inline=ve,Me.highlightFormatting&&(Kt.formatting="link");var Se=de(Kt);return Se?Se+=" ":Se="",Se+pe.linkEmail}if(Me.xml&&qn==="<"&&ue.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var pn=ue.string.indexOf(">",ue.pos);if(pn!=-1){var Cn=ue.string.substring(ue.start,pn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Cn)&&(Kt.md_inside=!0)}return ue.backUp(1),Kt.htmlState=bt.startState(je),yt(ue,Kt,Jt)}if(Me.xml&&qn==="<"&&ue.match(/^\/\w*?>/))return Kt.md_inside=!1,"tag";if(qn==="*"||qn==="_"){for(var Ut=1,Lt=ue.pos==1?" ":ue.string.charAt(ue.pos-2);Ut<3&&ue.eat(qn);)Ut++;var Bt=ue.peek()||" ",Tt=!/\s/.test(Bt)&&(!ct.test(Bt)||/\s/.test(Lt)||ct.test(Lt)),jt=!/\s/.test(Lt)&&(!ct.test(Lt)||/\s/.test(Bt)||ct.test(Bt)),kt=null,Ce=null;if(Ut%2&&(!Kt.em&&Tt&&(qn==="*"||!jt||ct.test(Lt))?kt=!0:Kt.em==qn&&jt&&(qn==="*"||!Tt||ct.test(Bt))&&(kt=!1)),Ut>1&&(!Kt.strong&&Tt&&(qn==="*"||!jt||ct.test(Lt))?Ce=!0:Kt.strong==qn&&jt&&(qn==="*"||!Tt||ct.test(Bt))&&(Ce=!1)),Ce!=null||kt!=null){Me.highlightFormatting&&(Kt.formatting=kt==null?"strong":Ce==null?"em":"strong em"),kt===!0&&(Kt.em=qn),Ce===!0&&(Kt.strong=qn);var Bn=de(Kt);return kt===!1&&(Kt.em=!1),Ce===!1&&(Kt.strong=!1),Bn}}else if(qn===" "&&(ue.eat("*")||ue.eat("_"))){if(ue.peek()===" ")return de(Kt);ue.backUp(1)}if(Me.strikethrough){if(qn==="~"&&ue.eatWhile(qn)){if(Kt.strikethrough){Me.highlightFormatting&&(Kt.formatting="strikethrough");var Bn=de(Kt);return Kt.strikethrough=!1,Bn}else if(ue.match(/^[^\s]/,!1))return Kt.strikethrough=!0,Me.highlightFormatting&&(Kt.formatting="strikethrough"),de(Kt)}else if(qn===" "&&ue.match(/^~~/,!0)){if(ue.peek()===" ")return de(Kt);ue.backUp(2)}}if(Me.emoji&&qn===":"&&ue.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Kt.emoji=!0,Me.highlightFormatting&&(Kt.formatting="emoji");var on=de(Kt);return Kt.emoji=!1,on}return qn===" "&&(ue.match(/^ +$/,!1)?Kt.trailingSpace++:Kt.trailingSpace&&(Kt.trailingSpaceNewLine=!0)),de(Kt)}function ve(ue,Kt){var dn=ue.next();if(dn===">"){Kt.f=Kt.inline=De,Me.highlightFormatting&&(Kt.formatting="link");var Ai=de(Kt);return Ai?Ai+=" ":Ai="",Ai+pe.linkInline}return ue.match(/^[^>]+/,!0),pe.linkInline}function We(ue,Kt){if(ue.eatSpace())return null;var dn=ue.next();return dn==="("||dn==="["?(Kt.f=Kt.inline=an(dn==="("?")":"]"),Me.highlightFormatting&&(Kt.formatting="link-string"),Kt.linkHref=!0,de(Kt)):"error"}var nn={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function an(ue){return function(Kt,dn){var Ai=Kt.next();if(Ai===ue){dn.f=dn.inline=De,Me.highlightFormatting&&(dn.formatting="link-string");var qn=de(dn);return dn.linkHref=!1,qn}return Kt.match(nn[ue]),dn.linkHref=!0,de(dn)}}function In(ue,Kt){return ue.match(/^([^\]\\]|\\.)*\]:/,!1)?(Kt.f=En,ue.next(),Me.highlightFormatting&&(Kt.formatting="link"),Kt.linkText=!0,de(Kt)):gt(ue,Kt,De)}function En(ue,Kt){if(ue.match(/^\]:/,!0)){Kt.f=Kt.inline=ui,Me.highlightFormatting&&(Kt.formatting="link");var dn=de(Kt);return Kt.linkText=!1,dn}return ue.match(/^([^\]\\]|\\.)+/,!0),pe.linkText}function ui(ue,Kt){return ue.eatSpace()?null:(ue.match(/^[^\s]+/,!0),ue.peek()===void 0?Kt.linkTitle=!0:ue.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Kt.f=Kt.inline=De,pe.linkHref+" url")}var fi={startState:function(){return{f:Vt,prevLine:{stream:null},thisLine:{stream:null},block:Vt,htmlState:null,indentation:0,inline:De,text:Ae,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(ue){return{f:ue.f,prevLine:ue.prevLine,thisLine:ue.thisLine,block:ue.block,htmlState:ue.htmlState&&bt.copyState(je,ue.htmlState),indentation:ue.indentation,localMode:ue.localMode,localState:ue.localMode?bt.copyState(ue.localMode,ue.localState):null,inline:ue.inline,text:ue.text,formatting:!1,linkText:ue.linkText,linkTitle:ue.linkTitle,linkHref:ue.linkHref,code:ue.code,em:ue.em,strong:ue.strong,strikethrough:ue.strikethrough,emoji:ue.emoji,header:ue.header,setext:ue.setext,hr:ue.hr,taskList:ue.taskList,list:ue.list,listStack:ue.listStack.slice(0),quote:ue.quote,indentedCode:ue.indentedCode,trailingSpace:ue.trailingSpace,trailingSpaceNewLine:ue.trailingSpaceNewLine,md_inside:ue.md_inside,fencedEndRE:ue.fencedEndRE}},token:function(ue,Kt){if(Kt.formatting=!1,ue!=Kt.thisLine.stream){if(Kt.header=0,Kt.hr=!1,ue.match(/^\s*$/,!0))return Nt(Kt),null;if(Kt.prevLine=Kt.thisLine,Kt.thisLine={stream:ue},Kt.taskList=!1,Kt.trailingSpace=0,Kt.trailingSpaceNewLine=!1,!Kt.localState&&(Kt.f=Kt.block,Kt.f!=Jt)){var dn=ue.match(/^\s*/,!0)[0].replace(/\t/g,lt).length;if(Kt.indentation=dn,Kt.indentationDiff=null,dn>0)return null}}return Kt.f(ue,Kt)},innerMode:function(ue){return ue.block==Jt?{state:ue.htmlState,mode:je}:ue.localState?{state:ue.localState,mode:ue.localMode}:{state:ue,mode:fi}},indent:function(ue,Kt,dn){return ue.block==Jt&&je.indent?je.indent(ue.htmlState,Kt,dn):ue.localState&&ue.localMode.indent?ue.localMode.indent(ue.localState,Kt,dn):bt.Pass},blankLine:Nt,getType:de,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return fi},"xml"),bt.defineMIME("text/markdown","markdown"),bt.defineMIME("text/x-markdown","markdown")})},98101:function(Pn,gi,ne){(function(bt){bt(ne(89780))})(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 xe=0;xe<bt.modeInfo.length;xe++){var Me=bt.modeInfo[xe];Me.mimes&&(Me.mime=Me.mimes[0])}bt.findModeByMIME=function(je){je=je.toLowerCase();for(var ke=0;ke<bt.modeInfo.length;ke++){var ye=bt.modeInfo[ke];if(ye.mime==je)return ye;if(ye.mimes){for(var pe=0;pe<ye.mimes.length;pe++)if(ye.mimes[pe]==je)return ye}}if(/\+xml$/.test(je))return bt.findModeByMIME("application/xml");if(/\+json$/.test(je))return bt.findModeByMIME("application/json")},bt.findModeByExtension=function(je){je=je.toLowerCase();for(var ke=0;ke<bt.modeInfo.length;ke++){var ye=bt.modeInfo[ke];if(ye.ext){for(var pe=0;pe<ye.ext.length;pe++)if(ye.ext[pe]==je)return ye}}},bt.findModeByFileName=function(je){for(var ke=0;ke<bt.modeInfo.length;ke++){var ye=bt.modeInfo[ke];if(ye.file&&ye.file.test(je))return ye}var pe=je.lastIndexOf("."),Ue=pe>-1&&je.substring(pe+1,je.length);if(Ue)return bt.findModeByExtension(Ue)},bt.findModeByName=function(je){je=je.toLowerCase();for(var ke=0;ke<bt.modeInfo.length;ke++){var ye=bt.modeInfo[ke];if(ye.name.toLowerCase()==je)return ye;if(ye.alias){for(var pe=0;pe<ye.alias.length;pe++)if(ye.alias[pe].toLowerCase()==je)return ye}}}})},67549:function(Pn,gi,ne){(function(bt){bt(ne(89780))})(function(bt){"use strict";bt.defineMode("stex",function(xe,Me){"use strict";function je(Dt,et){Dt.cmdState.push(et)}function ke(Dt){return Dt.cmdState.length>0?Dt.cmdState[Dt.cmdState.length-1]:null}function ye(Dt){var et=Dt.cmdState.pop();et&&et.closeBracket()}function pe(Dt){for(var et=Dt.cmdState,nt=et.length-1;nt>=0;nt--){var ct=et[nt];if(ct.name!="DEFAULT")return ct}return{styleIdentifier:function(){return null}}}function Ue(Dt,et,nt){return function(){this.name=Dt,this.bracketNo=0,this.style=et,this.styles=nt,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Pe={};Pe.importmodule=Ue("importmodule","tag",["string","builtin"]),Pe.documentclass=Ue("documentclass","tag",["","atom"]),Pe.usepackage=Ue("usepackage","tag",["atom"]),Pe.begin=Ue("begin","tag",["atom"]),Pe.end=Ue("end","tag",["atom"]),Pe.label=Ue("label","tag",["atom"]),Pe.ref=Ue("ref","tag",["atom"]),Pe.eqref=Ue("eqref","tag",["atom"]),Pe.cite=Ue("cite","tag",["atom"]),Pe.bibitem=Ue("bibitem","tag",["atom"]),Pe.Bibitem=Ue("Bibitem","tag",["atom"]),Pe.RBibitem=Ue("RBibitem","tag",["atom"]),Pe.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function ie(Dt,et){Dt.f=et}function An(Dt,et){var nt;if(Dt.match(/^\\[a-zA-Z@]+/)){var ct=Dt.current().slice(1);return nt=Pe.hasOwnProperty(ct)?Pe[ct]:Pe.DEFAULT,nt=new nt,je(et,nt),ie(et,xn),nt.style}if(Dt.match(/^\\[$&%#{}_]/)||Dt.match(/^\\[,;!\/\\]/))return"tag";if(Dt.match("\\["))return ie(et,function(gt,yt){return we(gt,yt,"\\]")}),"keyword";if(Dt.match("\\("))return ie(et,function(gt,yt){return we(gt,yt,"\\)")}),"keyword";if(Dt.match("$$"))return ie(et,function(gt,yt){return we(gt,yt,"$$")}),"keyword";if(Dt.match("$"))return ie(et,function(gt,yt){return we(gt,yt,"$")}),"keyword";var lt=Dt.next();if(lt=="%")return Dt.skipToEnd(),"comment";if(lt=="}"||lt=="]"){if(nt=ke(et),nt)nt.closeBracket(lt),ie(et,xn);else return"error";return"bracket"}else return lt=="{"||lt=="["?(nt=Pe.DEFAULT,nt=new nt,je(et,nt),"bracket"):/\d/.test(lt)?(Dt.eatWhile(/[\w.%]/),"atom"):(Dt.eatWhile(/[\w\-_]/),nt=pe(et),nt.name=="begin"&&(nt.argument=Dt.current()),nt.styleIdentifier())}function we(Dt,et,nt){if(Dt.eatSpace())return null;if(nt&&Dt.match(nt))return ie(et,An),"keyword";if(Dt.match(/^\\[a-zA-Z@]+/))return"tag";if(Dt.match(/^[a-zA-Z]+/))return"variable-2";if(Dt.match(/^\\[$&%#{}_]/)||Dt.match(/^\\[,;!\/]/)||Dt.match(/^[\^_&]/))return"tag";if(Dt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Dt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ct=Dt.next();return ct=="{"||ct=="}"||ct=="["||ct=="]"||ct=="("||ct==")"?"bracket":ct=="%"?(Dt.skipToEnd(),"comment"):"error"}function xn(Dt,et){var nt=Dt.peek(),ct;return nt=="{"||nt=="["?(ct=ke(et),ct.openBracket(nt),Dt.eat(nt),ie(et,An),"bracket"):/[ \t\r]/.test(nt)?(Dt.eat(nt),null):(ie(et,An),ye(et),An(Dt,et))}return{startState:function(){var Dt=Me.inMathMode?function(et,nt){return we(et,nt)}:An;return{cmdState:[],f:Dt}},copyState:function(Dt){return{cmdState:Dt.cmdState.slice(),f:Dt.f}},token:function(Dt,et){return et.f(Dt,et)},blankLine:function(Dt){Dt.f=An,Dt.cmdState.length=0},lineComment:"%"}}),bt.defineMIME("text/x-stex","stex"),bt.defineMIME("text/x-latex","stex")})},15525:function(Pn,gi,ne){(function(bt){bt(ne(89780))})(function(bt){"use strict";var xe={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},Me={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};bt.defineMode("xml",function(je,ke){var ye=je.indentUnit,pe={},Ue=ke.htmlMode?xe:Me;for(var Pe in Ue)pe[Pe]=Ue[Pe];for(var Pe in ke)pe[Pe]=ke[Pe];var ie,An;function we(ve,We){function nn(En){return We.tokenize=En,En(ve,We)}var an=ve.next();if(an=="<")return ve.eat("!")?ve.eat("[")?ve.match("CDATA[")?nn(et("atom","]]>")):null:ve.match("--")?nn(et("comment","-->")):ve.match("DOCTYPE",!0,!0)?(ve.eatWhile(/[\w\._\-]/),nn(nt(1))):null:ve.eat("?")?(ve.eatWhile(/[\w\._\-]/),We.tokenize=et("meta","?>"),"meta"):(ie=ve.eat("/")?"closeTag":"openTag",We.tokenize=xn,"tag bracket");if(an=="&"){var In;return ve.eat("#")?ve.eat("x")?In=ve.eatWhile(/[a-fA-F\d]/)&&ve.eat(";"):In=ve.eatWhile(/[\d]/)&&ve.eat(";"):In=ve.eatWhile(/[\w\.\-:]/)&&ve.eat(";"),In?"atom":"error"}else return ve.eatWhile(/[^&<]/),null}we.isInText=!0;function xn(ve,We){var nn=ve.next();if(nn==">"||nn=="/"&&ve.eat(">"))return We.tokenize=we,ie=nn==">"?"endTag":"selfcloseTag","tag bracket";if(nn=="=")return ie="equals",null;if(nn=="<"){We.tokenize=we,We.state=yt,We.tagName=We.tagStart=null;var an=We.tokenize(ve,We);return an?an+" tag error":"tag error"}else return/[\'\"]/.test(nn)?(We.tokenize=Dt(nn),We.stringStartCol=ve.column(),We.tokenize(ve,We)):(ve.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Dt(ve){var We=function(nn,an){for(;!nn.eol();)if(nn.next()==ve){an.tokenize=xn;break}return"string"};return We.isInAttribute=!0,We}function et(ve,We){return function(nn,an){for(;!nn.eol();){if(nn.match(We)){an.tokenize=we;break}nn.next()}return ve}}function nt(ve){return function(We,nn){for(var an;(an=We.next())!=null;){if(an=="<")return nn.tokenize=nt(ve+1),nn.tokenize(We,nn);if(an==">")if(ve==1){nn.tokenize=we;break}else return nn.tokenize=nt(ve-1),nn.tokenize(We,nn)}return"meta"}}function ct(ve,We,nn){this.prev=ve.context,this.tagName=We,this.indent=ve.indented,this.startOfLine=nn,(pe.doNotIndent.hasOwnProperty(We)||ve.context&&ve.context.noIndent)&&(this.noIndent=!0)}function lt(ve){ve.context&&(ve.context=ve.context.prev)}function gt(ve,We){for(var nn;;){if(!ve.context||(nn=ve.context.tagName,!pe.contextGrabbers.hasOwnProperty(nn)||!pe.contextGrabbers[nn].hasOwnProperty(We)))return;lt(ve)}}function yt(ve,We,nn){return ve=="openTag"?(nn.tagStart=We.column(),Et):ve=="closeTag"?Nt:yt}function Et(ve,We,nn){return ve=="word"?(nn.tagName=We.current(),An="tag",ce):pe.allowMissingTagName&&ve=="endTag"?(An="tag bracket",ce(ve,We,nn)):(An="error",Et)}function Nt(ve,We,nn){if(ve=="word"){var an=We.current();return nn.context&&nn.context.tagName!=an&&pe.implicitlyClosed.hasOwnProperty(nn.context.tagName)&<(nn),nn.context&&nn.context.tagName==an||pe.matchClosing===!1?(An="tag",Vt):(An="tag error",Jt)}else return pe.allowMissingTagName&&ve=="endTag"?(An="tag bracket",Vt(ve,We,nn)):(An="error",Jt)}function Vt(ve,We,nn){return ve!="endTag"?(An="error",Vt):(lt(nn),yt)}function Jt(ve,We,nn){return An="error",Vt(ve,We,nn)}function ce(ve,We,nn){if(ve=="word")return An="attribute",de;if(ve=="endTag"||ve=="selfcloseTag"){var an=nn.tagName,In=nn.tagStart;return nn.tagName=nn.tagStart=null,ve=="selfcloseTag"||pe.autoSelfClosers.hasOwnProperty(an)?gt(nn,an):(gt(nn,an),nn.context=new ct(nn,an,In==nn.indented)),yt}return An="error",ce}function de(ve,We,nn){return ve=="equals"?Ae:(pe.allowMissing||(An="error"),ce(ve,We,nn))}function Ae(ve,We,nn){return ve=="string"?De:ve=="word"&&pe.allowUnquoted?(An="string",ce):(An="error",ce(ve,We,nn))}function De(ve,We,nn){return ve=="string"?De:ce(ve,We,nn)}return{startState:function(ve){var We={tokenize:we,state:yt,indented:ve||0,tagName:null,tagStart:null,context:null};return ve!=null&&(We.baseIndent=ve),We},token:function(ve,We){if(!We.tagName&&ve.sol()&&(We.indented=ve.indentation()),ve.eatSpace())return null;ie=null;var nn=We.tokenize(ve,We);return(nn||ie)&&nn!="comment"&&(An=null,We.state=We.state(ie||nn,ve,We),An&&(nn=An=="error"?nn+" error":An)),nn},indent:function(ve,We,nn){var an=ve.context;if(ve.tokenize.isInAttribute)return ve.tagStart==ve.indented?ve.stringStartCol+1:ve.indented+ye;if(an&&an.noIndent)return bt.Pass;if(ve.tokenize!=xn&&ve.tokenize!=we)return nn?nn.match(/^(\s*)/)[0].length:0;if(ve.tagName)return pe.multilineTagIndentPastTag!==!1?ve.tagStart+ve.tagName.length+2:ve.tagStart+ye*(pe.multilineTagIndentFactor||1);if(pe.alignCDATA&&/<!\[CDATA\[/.test(We))return 0;var In=We&&/^<(\/)?([\w_:\.-]*)/.exec(We);if(In&&In[1])for(;an;)if(an.tagName==In[2]){an=an.prev;break}else if(pe.implicitlyClosed.hasOwnProperty(an.tagName))an=an.prev;else break;else if(In)for(;an;){var En=pe.contextGrabbers[an.tagName];if(En&&En.hasOwnProperty(In[2]))an=an.prev;else break}for(;an&&an.prev&&!an.startOfLine;)an=an.prev;return an?an.indent+ye:ve.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:pe.htmlMode?"html":"xml",helperType:pe.htmlMode?"html":"xml",skipAttribute:function(ve){ve.state==Ae&&(ve.state=ce)},xmlCurrentTag:function(ve){return ve.tagName?{name:ve.tagName,close:ve.type=="closeTag"}:null},xmlCurrentContext:function(ve){for(var We=[],nn=ve.context;nn;nn=nn.prev)nn.tagName&&We.push(nn.tagName);return We.reverse()}}}),bt.defineMIME("text/xml","xml"),bt.defineMIME("application/xml","xml"),bt.mimeModes.hasOwnProperty("text/html")||bt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},6330:function(Pn,gi,ne){"use strict";ne.d(gi,{HT:function(){return hi},iZ:function(){return Oe}});var bt={},xe=function(qt,$t,_t,Qe,le){var rn=new Worker(bt[$t]||(bt[$t]=URL.createObjectURL(new Blob([qt+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return rn.onmessage=function(Wn){var Un=Wn.data,mi=Un.$e$;if(mi){var zn=new Error(mi[0]);zn.code=mi[1],zn.stack=mi[2],le(zn,null)}else le(null,Un)},rn.postMessage(_t,Qe),rn},Me=Uint8Array,je=Uint16Array,ke=Int32Array,ye=new Me([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),pe=new Me([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ue=new Me([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Pe=function(qt,$t){for(var _t=new je(31),Qe=0;Qe<31;++Qe)_t[Qe]=$t+=1<<qt[Qe-1];for(var le=new ke(_t[30]),Qe=1;Qe<30;++Qe)for(var rn=_t[Qe];rn<_t[Qe+1];++rn)le[rn]=rn-_t[Qe]<<5|Qe;return{b:_t,r:le}},ie=Pe(ye,2),An=ie.b,we=ie.r;An[28]=258,we[258]=28;for(var xn=Pe(pe,0),Dt=xn.b,et=xn.r,nt=new je(32768),ct=0;ct<32768;++ct){var lt=(ct&43690)>>1|(ct&21845)<<1;lt=(lt&52428)>>2|(lt&13107)<<2,lt=(lt&61680)>>4|(lt&3855)<<4,nt[ct]=((lt&65280)>>8|(lt&255)<<8)>>1}for(var gt=function(qt,$t,_t){for(var Qe=qt.length,le=0,rn=new je($t);le<Qe;++le)qt[le]&&++rn[qt[le]-1];var Wn=new je($t);for(le=1;le<$t;++le)Wn[le]=Wn[le-1]+rn[le-1]<<1;var Un;if(_t){Un=new je(1<<$t);var mi=15-$t;for(le=0;le<Qe;++le)if(qt[le])for(var zn=le<<4|qt[le],cn=$t-qt[le],Yn=Wn[qt[le]-1]++<<cn,Ki=Yn|(1<<cn)-1;Yn<=Ki;++Yn)Un[nt[Yn]>>mi]=zn}else for(Un=new je(Qe),le=0;le<Qe;++le)qt[le]&&(Un[le]=nt[Wn[qt[le]-1]++]>>15-qt[le]);return Un},yt=new Me(288),ct=0;ct<144;++ct)yt[ct]=8;for(var ct=144;ct<256;++ct)yt[ct]=9;for(var ct=256;ct<280;++ct)yt[ct]=7;for(var ct=280;ct<288;++ct)yt[ct]=8;for(var Et=new Me(32),ct=0;ct<32;++ct)Et[ct]=5;var Nt=gt(yt,9,0),Vt=gt(yt,9,1),Jt=gt(Et,5,0),ce=gt(Et,5,1),de=function(qt){for(var $t=qt[0],_t=1;_t<qt.length;++_t)qt[_t]>$t&&($t=qt[_t]);return $t},Ae=function(qt,$t,_t){var Qe=$t/8|0;return(qt[Qe]|qt[Qe+1]<<8)>>($t&7)&_t},De=function(qt,$t){var _t=$t/8|0;return(qt[_t]|qt[_t+1]<<8|qt[_t+2]<<16)>>($t&7)},ve=function(qt){return(qt+7)/8|0},We=function(qt,$t,_t){return($t==null||$t<0)&&($t=0),(_t==null||_t>qt.length)&&(_t=qt.length),new Me(qt.subarray($t,_t))},nn={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},an=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],In=function(qt,$t,_t){var Qe=new Error($t||an[qt]);if(Qe.code=qt,Error.captureStackTrace&&Error.captureStackTrace(Qe,In),!_t)throw Qe;return Qe},En=function(qt,$t,_t,Qe){var le=qt.length,rn=Qe?Qe.length:0;if(!le||$t.f&&!$t.l)return _t||new Me(0);var Wn=!_t,Un=Wn||$t.i!=2,mi=$t.i;Wn&&(_t=new Me(le*3));var zn=function(Da){var Gr=_t.length;if(Da>Gr){var Ro=new Me(Math.max(Gr*2,Da));Ro.set(_t),_t=Ro}},cn=$t.f||0,Yn=$t.p||0,Ki=$t.b||0,Wi=$t.l,vn=$t.d,Ht=$t.m,Ii=$t.n,Mr=le*8;do{if(!Wi){cn=Ae(qt,Yn,1);var Rr=Ae(qt,Yn+1,3);if(Yn+=3,Rr)if(Rr==1)Wi=Vt,vn=ce,Ht=9,Ii=5;else if(Rr==2){var oi=Ae(qt,Yn,31)+257,Pi=Ae(qt,Yn+10,15)+4,Tn=oi+Ae(qt,Yn+5,31)+1;Yn+=14;for(var ti=new Me(Tn),Jn=new Me(19),Mn=0;Mn<Pi;++Mn)Jn[Ue[Mn]]=Ae(qt,Yn+Mn*3,7);Yn+=Pi*3;for(var ci=de(Jn),Je=(1<<ci)-1,er=gt(Jn,ci,1),Mn=0;Mn<Tn;){var fr=er[Ae(qt,Yn,Je)];Yn+=fr&15;var yr=fr>>4;if(yr<16)ti[Mn++]=yr;else{var Or=0,nr=0;for(yr==16?(nr=3+Ae(qt,Yn,3),Yn+=2,Or=ti[Mn-1]):yr==17?(nr=3+Ae(qt,Yn,7),Yn+=3):yr==18&&(nr=11+Ae(qt,Yn,127),Yn+=7);nr--;)ti[Mn++]=Or}}var jr=ti.subarray(0,oi),Kr=ti.subarray(oi);Ht=de(jr),Ii=de(Kr),Wi=gt(jr,Ht,1),vn=gt(Kr,Ii,1)}else In(1);else{var yr=ve(Yn)+4,Ei=qt[yr-4]|qt[yr-3]<<8,jn=yr+Ei;if(jn>le){mi&&In(0);break}Un&&zn(Ki+Ei),_t.set(qt.subarray(yr,jn),Ki),$t.b=Ki+=Ei,$t.p=Yn=jn*8,$t.f=cn;continue}if(Yn>Mr){mi&&In(0);break}}Un&&zn(Ki+131072);for(var Ho=(1<<Ht)-1,ao=(1<<Ii)-1,bo=Yn;;bo=Yn){var Or=Wi[De(qt,Yn)&Ho],ho=Or>>4;if(Yn+=Or&15,Yn>Mr){mi&&In(0);break}if(Or||In(2),ho<256)_t[Ki++]=ho;else if(ho==256){bo=Yn,Wi=null;break}else{var be=ho-254;if(ho>264){var Mn=ho-257,co=ye[Mn];be=Ae(qt,Yn,(1<<co)-1)+An[Mn],Yn+=co}var ls=vn[De(qt,Yn)&ao],ks=ls>>4;ls||In(3),Yn+=ls&15;var Kr=Dt[ks];if(ks>3){var co=pe[ks];Kr+=De(qt,Yn)&(1<<co)-1,Yn+=co}if(Yn>Mr){mi&&In(0);break}Un&&zn(Ki+131072);var lo=Ki+be;if(Ki<Kr){var xa=rn-Kr,ta=Math.min(Kr,lo);for(xa+Ki<0&&In(3);Ki<ta;++Ki)_t[Ki]=Qe[xa+Ki]}for(;Ki<lo;++Ki)_t[Ki]=_t[Ki-Kr]}}$t.l=Wi,$t.p=bo,$t.b=Ki,$t.f=cn,Wi&&(cn=1,$t.m=Ht,$t.d=vn,$t.n=Ii)}while(!cn);return Ki!=_t.length&&Wn?We(_t,0,Ki):_t.subarray(0,Ki)},ui=function(qt,$t,_t){_t<<=$t&7;var Qe=$t/8|0;qt[Qe]|=_t,qt[Qe+1]|=_t>>8},fi=function(qt,$t,_t){_t<<=$t&7;var Qe=$t/8|0;qt[Qe]|=_t,qt[Qe+1]|=_t>>8,qt[Qe+2]|=_t>>16},ue=function(qt,$t){for(var _t=[],Qe=0;Qe<qt.length;++Qe)qt[Qe]&&_t.push({s:Qe,f:qt[Qe]});var le=_t.length,rn=_t.slice();if(!le)return{t:Sn,l:0};if(le==1){var Wn=new Me(_t[0].s+1);return Wn[_t[0].s]=1,{t:Wn,l:1}}_t.sort(function(jn,oi){return jn.f-oi.f}),_t.push({s:-1,f:25001});var Un=_t[0],mi=_t[1],zn=0,cn=1,Yn=2;for(_t[0]={s:-1,f:Un.f+mi.f,l:Un,r:mi};cn!=le-1;)Un=_t[_t[zn].f<_t[Yn].f?zn++:Yn++],mi=_t[zn!=cn&&_t[zn].f<_t[Yn].f?zn++:Yn++],_t[cn++]={s:-1,f:Un.f+mi.f,l:Un,r:mi};for(var Ki=rn[0].s,Qe=1;Qe<le;++Qe)rn[Qe].s>Ki&&(Ki=rn[Qe].s);var Wi=new je(Ki+1),vn=Kt(_t[cn-1],Wi,0);if(vn>$t){var Qe=0,Ht=0,Ii=vn-$t,Mr=1<<Ii;for(rn.sort(function(oi,Pi){return Wi[Pi.s]-Wi[oi.s]||oi.f-Pi.f});Qe<le;++Qe){var Rr=rn[Qe].s;if(Wi[Rr]>$t)Ht+=Mr-(1<<vn-Wi[Rr]),Wi[Rr]=$t;else break}for(Ht>>=Ii;Ht>0;){var yr=rn[Qe].s;Wi[yr]<$t?Ht-=1<<$t-Wi[yr]++-1:++Qe}for(;Qe>=0&&Ht;--Qe){var Ei=rn[Qe].s;Wi[Ei]==$t&&(--Wi[Ei],++Ht)}vn=$t}return{t:new Me(Wi),l:vn}},Kt=function(qt,$t,_t){return qt.s==-1?Math.max(Kt(qt.l,$t,_t+1),Kt(qt.r,$t,_t+1)):$t[qt.s]=_t},dn=function(qt){for(var $t=qt.length;$t&&!qt[--$t];);for(var _t=new je(++$t),Qe=0,le=qt[0],rn=1,Wn=function(mi){_t[Qe++]=mi},Un=1;Un<=$t;++Un)if(qt[Un]==le&&Un!=$t)++rn;else{if(!le&&rn>2){for(;rn>138;rn-=138)Wn(32754);rn>2&&(Wn(rn>10?rn-11<<5|28690:rn-3<<5|12305),rn=0)}else if(rn>3){for(Wn(le),--rn;rn>6;rn-=6)Wn(8304);rn>2&&(Wn(rn-3<<5|8208),rn=0)}for(;rn--;)Wn(le);rn=1,le=qt[Un]}return{c:_t.subarray(0,Qe),n:$t}},Ai=function(qt,$t){for(var _t=0,Qe=0;Qe<$t.length;++Qe)_t+=qt[Qe]*$t[Qe];return _t},qn=function(qt,$t,_t){var Qe=_t.length,le=ve($t+2);qt[le]=Qe&255,qt[le+1]=Qe>>8,qt[le+2]=qt[le]^255,qt[le+3]=qt[le+1]^255;for(var rn=0;rn<Qe;++rn)qt[le+rn+4]=_t[rn];return(le+4+Qe)*8},Ke=function(qt,$t,_t,Qe,le,rn,Wn,Un,mi,zn,cn){ui($t,cn++,_t),++le[256];for(var Yn=ue(le,15),Ki=Yn.t,Wi=Yn.l,vn=ue(rn,15),Ht=vn.t,Ii=vn.l,Mr=dn(Ki),Rr=Mr.c,yr=Mr.n,Ei=dn(Ht),jn=Ei.c,oi=Ei.n,Pi=new je(19),Tn=0;Tn<Rr.length;++Tn)++Pi[Rr[Tn]&31];for(var Tn=0;Tn<jn.length;++Tn)++Pi[jn[Tn]&31];for(var ti=ue(Pi,7),Jn=ti.t,Mn=ti.l,ci=19;ci>4&&!Jn[Ue[ci-1]];--ci);var Je=zn+5<<3,er=Ai(le,yt)+Ai(rn,Et)+Wn,fr=Ai(le,Ki)+Ai(rn,Ht)+Wn+14+3*ci+Ai(Pi,Jn)+2*Pi[16]+3*Pi[17]+7*Pi[18];if(mi>=0&&Je<=er&&Je<=fr)return qn($t,cn,qt.subarray(mi,mi+zn));var Or,nr,jr,Kr;if(ui($t,cn,1+(fr<er)),cn+=2,fr<er){Or=gt(Ki,Wi,0),nr=Ki,jr=gt(Ht,Ii,0),Kr=Ht;var Ho=gt(Jn,Mn,0);ui($t,cn,yr-257),ui($t,cn+5,oi-1),ui($t,cn+10,ci-4),cn+=14;for(var Tn=0;Tn<ci;++Tn)ui($t,cn+3*Tn,Jn[Ue[Tn]]);cn+=3*ci;for(var ao=[Rr,jn],bo=0;bo<2;++bo)for(var ho=ao[bo],Tn=0;Tn<ho.length;++Tn){var be=ho[Tn]&31;ui($t,cn,Ho[be]),cn+=Jn[be],be>15&&(ui($t,cn,ho[Tn]>>5&127),cn+=ho[Tn]>>12)}}else Or=Nt,nr=yt,jr=Jt,Kr=Et;for(var Tn=0;Tn<Un;++Tn){var co=Qe[Tn];if(co>255){var be=co>>18&31;fi($t,cn,Or[be+257]),cn+=nr[be+257],be>7&&(ui($t,cn,co>>23&31),cn+=ye[be]);var ls=co&31;fi($t,cn,jr[ls]),cn+=Kr[ls],ls>3&&(fi($t,cn,co>>5&8191),cn+=pe[ls])}else fi($t,cn,Or[co]),cn+=nr[co]}return fi($t,cn,Or[256]),cn+nr[256]},yn=new ke([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Sn=new Me(0),si=function(qt,$t,_t,Qe,le,rn){var Wn=rn.z||qt.length,Un=new Me(Qe+Wn+5*(1+Math.ceil(Wn/7e3))+le),mi=Un.subarray(Qe,Un.length-le),zn=rn.l,cn=(rn.r||0)&7;if($t){cn&&(mi[0]=rn.r>>3);for(var Yn=yn[$t-1],Ki=Yn>>13,Wi=Yn&8191,vn=(1<<_t)-1,Ht=rn.p||new je(32768),Ii=rn.h||new je(vn+1),Mr=Math.ceil(_t/3),Rr=2*Mr,yr=function(Vs){return(qt[Vs]^qt[Vs+1]<<Mr^qt[Vs+2]<<Rr)&vn},Ei=new ke(25e3),jn=new je(288),oi=new je(32),Pi=0,Tn=0,ti=rn.i||0,Jn=0,Mn=rn.w||0,ci=0;ti+2<Wn;++ti){var Je=yr(ti),er=ti&32767,fr=Ii[Je];if(Ht[er]=fr,Ii[Je]=er,Mn<=ti){var Or=Wn-ti;if((Pi>7e3||Jn>24576)&&(Or>423||!zn)){cn=Ke(qt,mi,0,Ei,jn,oi,Tn,Jn,ci,ti-ci,cn),Jn=Pi=Tn=0,ci=ti;for(var nr=0;nr<286;++nr)jn[nr]=0;for(var nr=0;nr<30;++nr)oi[nr]=0}var jr=2,Kr=0,Ho=Wi,ao=er-fr&32767;if(Or>2&&Je==yr(ti-ao))for(var bo=Math.min(Ki,Or)-1,ho=Math.min(32767,ti),be=Math.min(258,Or);ao<=ho&&--Ho&&er!=fr;){if(qt[ti+jr]==qt[ti+jr-ao]){for(var co=0;co<be&&qt[ti+co]==qt[ti+co-ao];++co);if(co>jr){if(jr=co,Kr=ao,co>bo)break;for(var ls=Math.min(ao,co-2),ks=0,nr=0;nr<ls;++nr){var lo=ti-ao+nr&32767,xa=Ht[lo],ta=lo-xa&32767;ta>ks&&(ks=ta,fr=lo)}}}er=fr,fr=Ht[er],ao+=er-fr&32767}if(Kr){Ei[Jn++]=268435456|we[jr]<<18|et[Kr];var Da=we[jr]&31,Gr=et[Kr]&31;Tn+=ye[Da]+pe[Gr],++jn[257+Da],++oi[Gr],Mn=ti+jr,++Pi}else Ei[Jn++]=qt[ti],++jn[qt[ti]]}}for(ti=Math.max(ti,Mn);ti<Wn;++ti)Ei[Jn++]=qt[ti],++jn[qt[ti]];cn=Ke(qt,mi,zn,Ei,jn,oi,Tn,Jn,ci,ti-ci,cn),zn||(rn.r=cn&7|mi[cn/8|0]<<3,cn-=7,rn.h=Ii,rn.p=Ht,rn.i=ti,rn.w=Mn)}else{for(var ti=rn.w||0;ti<Wn+zn;ti+=65535){var Ro=ti+65535;Ro>=Wn&&(mi[cn/8|0]=zn,Ro=Wn),cn=qn(mi,cn+1,qt.subarray(ti,Ro))}rn.i=Wn}return We(Un,0,Qe+ve(cn)+le)},Bn=null,Se=function(){var qt=-1;return{p:function($t){for(var _t=qt,Qe=0;Qe<$t.length;++Qe)_t=Bn[_t&255^$t[Qe]]^_t>>>8;qt=_t},d:function(){return~qt}}},Fe=function(){var qt=1,$t=0;return{p:function(_t){for(var Qe=qt,le=$t,rn=_t.length|0,Wn=0;Wn!=rn;){for(var Un=Math.min(Wn+2655,rn);Wn<Un;++Wn)le+=Qe+=_t[Wn];Qe=(Qe&65535)+15*(Qe>>16),le=(le&65535)+15*(le>>16)}qt=Qe,$t=le},d:function(){return qt%=65521,$t%=65521,(qt&255)<<24|(qt&65280)<<8|($t&255)<<8|$t>>8}}},pn=function(qt,$t,_t,Qe,le){if(!le&&(le={l:1},$t.dictionary)){var rn=$t.dictionary.subarray(-32768),Wn=new Me(rn.length+qt.length);Wn.set(rn),Wn.set(qt,rn.length),qt=Wn,le.w=rn.length}return si(qt,$t.level==null?6:$t.level,$t.mem==null?le.l?Math.ceil(Math.max(8,Math.min(13,Math.log(qt.length)))*1.5):20:12+$t.mem,_t,Qe,le)},Cn=function(qt,$t){var _t={};for(var Qe in qt)_t[Qe]=qt[Qe];for(var Qe in $t)_t[Qe]=$t[Qe];return _t},Ut=function(qt,$t,_t){for(var Qe=qt(),le=qt.toString(),rn=le.slice(le.indexOf("[")+1,le.lastIndexOf("]")).replace(/\s+/g,"").split(","),Wn=0;Wn<Qe.length;++Wn){var Un=Qe[Wn],mi=rn[Wn];if(typeof Un=="function"){$t+=";"+mi+"=";var zn=Un.toString();if(Un.prototype)if(zn.indexOf("[native code]")!=-1){var cn=zn.indexOf(" ",8)+1;$t+=zn.slice(cn,zn.indexOf("(",cn))}else{$t+=zn;for(var Yn in Un.prototype)$t+=";"+mi+".prototype."+Yn+"="+Un.prototype[Yn].toString()}else $t+=zn}else _t[mi]=Un}return $t},Lt=null,Bt=function(qt){var $t=[];for(var _t in qt)qt[_t].buffer&&$t.push((qt[_t]=new qt[_t].constructor(qt[_t])).buffer);return $t},Tt=function(qt,$t,_t,Qe){if(!Lt[_t]){for(var le="",rn={},Wn=qt.length-1,Un=0;Un<Wn;++Un)le=Ut(qt[Un],le,rn);Lt[_t]={c:Ut(qt[Wn],le,rn),e:rn}}var mi=Cn({},Lt[_t].e);return xe(Lt[_t].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+$t.toString()+"}",_t,mi,Bt(mi),Qe)},jt=function(){return[Me,je,ke,ye,pe,Ue,An,Dt,Vt,ce,nt,an,gt,de,Ae,De,ve,We,In,En,oo,_n,_e]},kt=function(){return[Me,je,ke,ye,pe,Ue,we,et,Nt,yt,Jt,Et,nt,yn,Sn,gt,ui,fi,ue,Kt,dn,Ai,qn,Ke,ve,We,si,pn,no,_n]},Ce=function(){return[ji,pr,ii,Se,Bn]},on=function(){return[Vi,Wr]},Gn=function(){return[mr,ii,Fe]},Qn=function(){return[Sr]},_n=function(qt){return postMessage(qt,[qt.buffer])},_e=function(qt){return qt&&{out:qt.size&&new Me(qt.size),dictionary:qt.dictionary}},Zn=function(qt,$t,_t,Qe,le,rn){var Wn=Tt(_t,Qe,le,function(Un,mi){Wn.terminate(),rn(Un,mi)});return Wn.postMessage([qt,$t],$t.consume?[qt.buffer]:[]),function(){Wn.terminate()}},Dn=function(qt){return qt.ondata=function($t,_t){return postMessage([$t,_t],[$t.buffer])},function($t){$t.data.length?(qt.push($t.data[0],$t.data[1]),postMessage([$t.data[0].length])):qt.flush()}},ai=function(qt,$t,_t,Qe,le,rn,Wn){var Un,mi=Tt(qt,Qe,le,function(zn,cn){zn?(mi.terminate(),$t.ondata.call($t,zn)):Array.isArray(cn)?cn.length==1?($t.queuedSize-=cn[0],$t.ondrain&&$t.ondrain(cn[0])):(cn[1]&&mi.terminate(),$t.ondata.call($t,zn,cn[0],cn[1])):Wn(cn)});mi.postMessage(_t),$t.queuedSize=0,$t.push=function(zn,cn){$t.ondata||In(5),Un&&$t.ondata(In(4,0,1),null,!!cn),$t.queuedSize+=zn.length,mi.postMessage([zn,Un=cn],[zn.buffer])},$t.terminate=function(){mi.terminate()},rn&&($t.flush=function(){mi.postMessage([])})},vi=function(qt,$t){return qt[$t]|qt[$t+1]<<8},Rn=function(qt,$t){return(qt[$t]|qt[$t+1]<<8|qt[$t+2]<<16|qt[$t+3]<<24)>>>0},_i=function(qt,$t){return Rn(qt,$t)+Rn(qt,$t+4)*4294967296},ii=function(qt,$t,_t){for(;_t;++$t)qt[$t]=_t,_t>>>=8},ji=function(qt,$t){var _t=$t.filename;if(qt[0]=31,qt[1]=139,qt[2]=8,qt[8]=$t.level<2?4:$t.level==9?2:0,qt[9]=3,$t.mtime!=0&&ii(qt,4,Math.floor(new Date($t.mtime||Date.now())/1e3)),_t){qt[3]=8;for(var Qe=0;Qe<=_t.length;++Qe)qt[Qe+10]=_t.charCodeAt(Qe)}},Vi=function(qt){(qt[0]!=31||qt[1]!=139||qt[2]!=8)&&In(6,"invalid gzip data");var $t=qt[3],_t=10;$t&4&&(_t+=(qt[10]|qt[11]<<8)+2);for(var Qe=($t>>3&1)+($t>>4&1);Qe>0;Qe-=!qt[_t++]);return _t+($t&2)},Wr=function(qt){var $t=qt.length;return(qt[$t-4]|qt[$t-3]<<8|qt[$t-2]<<16|qt[$t-1]<<24)>>>0},pr=function(qt){return 10+(qt.filename?qt.filename.length+1:0)},mr=function(qt,$t){var _t=$t.level,Qe=_t==0?0:_t<6?1:_t==9?3:2;if(qt[0]=120,qt[1]=Qe<<6|($t.dictionary&&32),qt[1]|=31-(qt[0]<<8|qt[1])%31,$t.dictionary){var le=Fe();le.p($t.dictionary),ii(qt,2,le.d())}},Sr=function(qt,$t){return((qt[0]&15)!=8||qt[0]>>4>7||(qt[0]<<8|qt[1])%31)&&In(6,"invalid zlib data"),(qt[1]>>5&1)==+!$t&&In(6,"invalid zlib data: "+(qt[1]&32?"need":"unexpected")+" dictionary"),(qt[1]>>3&4)+2};function $r(qt,$t){return typeof qt=="function"&&($t=qt,qt={}),this.ondata=$t,qt}var ar=null,Yr=null;function kr(qt,$t,_t){return _t||(_t=$t,$t={}),typeof _t!="function"&&In(7),Zn(qt,$t,[kt],function(Qe){return _n(no(Qe.data[0],Qe.data[1]))},0,_t)}function no(qt,$t){return pn(qt,$t||{},0,0)}var Oo=null,$o=null;function ko(qt,$t,_t){return _t||(_t=$t,$t={}),typeof _t!="function"&&In(7),Zn(qt,$t,[jt],function(Qe){return _n(oo(Qe.data[0],_e(Qe.data[1])))},1,_t)}function oo(qt,$t){return En(qt,{i:2},$t&&$t.out,$t&&$t.dictionary)}var tr=null,Hr=null;function Pt(qt,$t,_t){return _t||(_t=$t,$t={}),typeof _t!="function"&&In(7),Zn(qt,$t,[kt,Ce,function(){return[so]}],function(Qe){return _n(so(Qe.data[0],Qe.data[1]))},2,_t)}function so(qt,$t){$t||($t={});var _t=Se(),Qe=qt.length;_t.p(qt);var le=pn(qt,$t,pr($t),8),rn=le.length;return ji(le,$t),ii(le,rn-8,_t.d()),ii(le,rn-4,Qe),le}var zr=null,ri=null;function pi(qt,$t,_t){return _t||(_t=$t,$t={}),typeof _t!="function"&&In(7),Zn(qt,$t,[jt,on,function(){return[Ci]}],function(Qe){return _n(Ci(Qe.data[0],Qe.data[1]))},3,_t)}function Ci(qt,$t){var _t=Vi(qt);return _t+8>qt.length&&In(6,"invalid gzip data"),En(qt.subarray(_t,-8),{i:2},$t&&$t.out||new Me(Wr(qt)),$t&&$t.dictionary)}var Qi=null,Tr=null;function Re(qt,$t,_t){return _t||(_t=$t,$t={}),typeof _t!="function"&&In(7),Zn(qt,$t,[kt,Gn,function(){return[Oe]}],function(Qe){return _n(Oe(Qe.data[0],Qe.data[1]))},4,_t)}function Oe(qt,$t){$t||($t={});var _t=Fe();_t.p(qt);var Qe=pn(qt,$t,$t.dictionary?6:2,4);return mr(Qe,$t),ii(Qe,Qe.length-4,_t.d()),Qe}var Te=null,Ze=null;function yi(qt,$t,_t){return _t||(_t=$t,$t={}),typeof _t!="function"&&In(7),Zn(qt,$t,[jt,Qn,function(){return[hi]}],function(Qe){return _n(hi(Qe.data[0],_e(Qe.data[1])))},5,_t)}function hi(qt,$t){return En(qt.subarray(Sr(qt,$t&&$t.dictionary),-4),{i:2},$t&&$t.out,$t&&$t.dictionary)}var Zi=null,He=null;function Le(qt,$t,_t){return _t||(_t=$t,$t={}),typeof _t!="function"&&In(7),qt[0]==31&&qt[1]==139&&qt[2]==8?pi(qt,$t,_t):(qt[0]&15)!=8||qt[0]>>4>7||(qt[0]<<8|qt[1])%31?ko(qt,$t,_t):yi(qt,$t,_t)}function kn(qt,$t){return qt[0]==31&&qt[1]==139&&qt[2]==8?Ci(qt,$t):(qt[0]&15)!=8||qt[0]>>4>7||(qt[0]<<8|qt[1])%31?oo(qt,$t):hi(qt,$t)}var Bi=function(qt,$t,_t,Qe){for(var le in qt){var rn=qt[le],Wn=$t+le,Un=Qe;Array.isArray(rn)&&(Un=Cn(Qe,rn[1]),rn=rn[0]),rn instanceof Me?_t[Wn]=[rn,Un]:(_t[Wn+="/"]=[new Me(0),Un],Bi(rn,Wn,_t,Qe))}},sn=typeof TextEncoder!="undefined"&&new TextEncoder,Yt=typeof TextDecoder!="undefined"&&new TextDecoder,he=0;try{Yt.decode(Sn,{stream:!0}),he=1}catch(qt){}var wn=function(qt){for(var $t="",_t=0;;){var Qe=qt[_t++],le=(Qe>127)+(Qe>223)+(Qe>239);if(_t+le>qt.length)return{s:$t,r:We(qt,_t-1)};le?le==3?(Qe=((Qe&15)<<18|(qt[_t++]&63)<<12|(qt[_t++]&63)<<6|qt[_t++]&63)-65536,$t+=String.fromCharCode(55296|Qe>>10,56320|Qe&1023)):le&1?$t+=String.fromCharCode((Qe&31)<<6|qt[_t++]&63):$t+=String.fromCharCode((Qe&15)<<12|(qt[_t++]&63)<<6|qt[_t++]&63):$t+=String.fromCharCode(Qe)}},un=null,Ne=null;function mn(qt,$t){if($t){for(var _t=new Me(qt.length),Qe=0;Qe<qt.length;++Qe)_t[Qe]=qt.charCodeAt(Qe);return _t}if(sn)return sn.encode(qt);for(var le=qt.length,rn=new Me(qt.length+(qt.length>>1)),Wn=0,Un=function(cn){rn[Wn++]=cn},Qe=0;Qe<le;++Qe){if(Wn+5>rn.length){var mi=new Me(Wn+8+(le-Qe<<1));mi.set(rn),rn=mi}var zn=qt.charCodeAt(Qe);zn<128||$t?Un(zn):zn<2048?(Un(192|zn>>6),Un(128|zn&63)):zn>55295&&zn<57344?(zn=65536+(zn&1047552)|qt.charCodeAt(++Qe)&1023,Un(240|zn>>18),Un(128|zn>>12&63),Un(128|zn>>6&63),Un(128|zn&63)):(Un(224|zn>>12),Un(128|zn>>6&63),Un(128|zn&63))}return We(rn,0,Wn)}function xi(qt,$t){if($t){for(var _t="",Qe=0;Qe<qt.length;Qe+=16384)_t+=String.fromCharCode.apply(null,qt.subarray(Qe,Qe+16384));return _t}else{if(Yt)return Yt.decode(qt);var le=wn(qt),rn=le.s,_t=le.r;return _t.length&&In(8),rn}}var Mi=function(qt){return qt==1?3:qt<6?2:qt==9?1:0},Gi=function(qt,$t){return $t+30+vi(qt,$t+26)+vi(qt,$t+28)},bn=function(qt,$t,_t){var Qe=vi(qt,$t+28),le=xi(qt.subarray($t+46,$t+46+Qe),!(vi(qt,$t+8)&2048)),rn=$t+46+Qe,Wn=Rn(qt,$t+20),Un=_t&&Wn==4294967295?Ln(qt,rn):[Wn,Rn(qt,$t+24),Rn(qt,$t+42)],mi=Un[0],zn=Un[1],cn=Un[2];return[vi(qt,$t+10),mi,zn,le,rn+vi(qt,$t+30)+vi(qt,$t+32),cn]},Ln=function(qt,$t){for(;vi(qt,$t)!=1;$t+=4+vi(qt,$t+2));return[_i(qt,$t+12),_i(qt,$t+4),_i(qt,$t+20)]},On=function(qt){var $t=0;if(qt)for(var _t in qt){var Qe=qt[_t].length;Qe>65535&&In(9),$t+=Qe+4}return $t},Yi=function(qt,$t,_t,Qe,le,rn,Wn,Un){var mi=Qe.length,zn=_t.extra,cn=Un&&Un.length,Yn=On(zn);ii(qt,$t,Wn!=null?33639248:67324752),$t+=4,Wn!=null&&(qt[$t++]=20,qt[$t++]=_t.os),qt[$t]=20,$t+=2,qt[$t++]=_t.flag<<1|(rn<0&&8),qt[$t++]=le&&8,qt[$t++]=_t.compression&255,qt[$t++]=_t.compression>>8;var Ki=new Date(_t.mtime==null?Date.now():_t.mtime),Wi=Ki.getFullYear()-1980;if((Wi<0||Wi>119)&&In(10),ii(qt,$t,Wi<<25|Ki.getMonth()+1<<21|Ki.getDate()<<16|Ki.getHours()<<11|Ki.getMinutes()<<5|Ki.getSeconds()>>1),$t+=4,rn!=-1&&(ii(qt,$t,_t.crc),ii(qt,$t+4,rn<0?-rn-2:rn),ii(qt,$t+8,_t.size)),ii(qt,$t+12,mi),ii(qt,$t+14,Yn),$t+=16,Wn!=null&&(ii(qt,$t,cn),ii(qt,$t+6,_t.attrs),ii(qt,$t+10,Wn),$t+=14),qt.set(Qe,$t),$t+=mi,Yn)for(var vn in zn){var Ht=zn[vn],Ii=Ht.length;ii(qt,$t,+vn),ii(qt,$t+2,Ii),qt.set(Ht,$t+4),$t+=4+Ii}return cn&&(qt.set(Un,$t),$t+=cn),$t},ki=function(qt,$t,_t,Qe,le){ii(qt,$t,101010256),ii(qt,$t+8,_t),ii(qt,$t+10,_t),ii(qt,$t+12,Qe),ii(qt,$t+16,le)},hn=null,Vn=null,Fr=null,Ur=null;function vo(qt,$t,_t){_t||(_t=$t,$t={}),typeof _t!="function"&&In(7);var Qe={};Bi(qt,"",Qe,$t);var le=Object.keys(Qe),rn=le.length,Wn=0,Un=0,mi=rn,zn=new Array(rn),cn=[],Yn=function(){for(var Ii=0;Ii<cn.length;++Ii)cn[Ii]()},Ki=function(Ii,Mr){lr(function(){_t(Ii,Mr)})};lr(function(){Ki=_t});var Wi=function(){var Ii=new Me(Un+22),Mr=Wn,Rr=Un-Wn;Un=0;for(var yr=0;yr<mi;++yr){var Ei=zn[yr];try{var jn=Ei.c.length;Yi(Ii,Un,Ei,Ei.f,Ei.u,jn);var oi=30+Ei.f.length+On(Ei.extra),Pi=Un+oi;Ii.set(Ei.c,Pi),Yi(Ii,Wn,Ei,Ei.f,Ei.u,jn,Un,Ei.m),Wn+=16+oi+(Ei.m?Ei.m.length:0),Un=Pi+jn}catch(Tn){return Ki(Tn,null)}}ki(Ii,Wn,zn.length,Rr,Mr),Ki(null,Ii)};rn||Wi();for(var vn=function(Ii){var Mr=le[Ii],Rr=Qe[Mr],yr=Rr[0],Ei=Rr[1],jn=Se(),oi=yr.length;jn.p(yr);var Pi=mn(Mr),Tn=Pi.length,ti=Ei.comment,Jn=ti&&mn(ti),Mn=Jn&&Jn.length,ci=On(Ei.extra),Je=Ei.level==0?0:8,er=function(fr,Or){if(fr)Yn(),Ki(fr,null);else{var nr=Or.length;zn[Ii]=Cn(Ei,{size:oi,crc:jn.d(),c:Or,f:Pi,m:Jn,u:Tn!=Mr.length||Jn&&ti.length!=Mn,compression:Je}),Wn+=30+Tn+ci+nr,Un+=76+2*(Tn+ci)+(Mn||0)+nr,--rn||Wi()}};if(Tn>65535&&er(In(11,0,1),null),!Je)er(null,yr);else if(oi<16e4)try{er(null,no(yr,Ei))}catch(fr){er(fr,null)}else cn.push(kr(yr,Ei,er))},Ht=0;Ht<mi;++Ht)vn(Ht);return Yn}function Be(qt,$t){$t||($t={});var _t={},Qe=[];Bi(qt,"",_t,$t);var le=0,rn=0;for(var Wn in _t){var Un=_t[Wn],mi=Un[0],zn=Un[1],cn=zn.level==0?0:8,Yn=mn(Wn),Ki=Yn.length,Wi=zn.comment,vn=Wi&&mn(Wi),Ht=vn&&vn.length,Ii=On(zn.extra);Ki>65535&&In(11);var Mr=cn?no(mi,zn):mi,Rr=Mr.length,yr=Se();yr.p(mi),Qe.push(Cn(zn,{size:mi.length,crc:yr.d(),c:Mr,f:Yn,m:vn,u:Ki!=Wn.length||vn&&Wi.length!=Ht,o:le,compression:cn})),le+=30+Ki+Ii+Rr,rn+=76+2*(Ki+Ii)+(Ht||0)+Rr}for(var Ei=new Me(rn+22),jn=le,oi=rn-le,Pi=0;Pi<Qe.length;++Pi){var Yn=Qe[Pi];Yi(Ei,Yn.o,Yn,Yn.f,Yn.u,Yn.c.length);var Tn=30+Yn.f.length+On(Yn.extra);Ei.set(Yn.c,Yn.o+Tn),Yi(Ei,le,Yn,Yn.f,Yn.u,Yn.c.length,Yn.o,Yn.m),le+=16+Tn+(Yn.m?Yn.m.length:0)}return ki(Ei,le,Qe.length,oi,jn),Ei}var wi=null,ir=null,li=null,br=null,lr=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(qt){qt()};function xr(qt,$t,_t){_t||(_t=$t,$t={}),typeof _t!="function"&&In(7);var Qe=[],le=function(){for(var Ii=0;Ii<Qe.length;++Ii)Qe[Ii]()},rn={},Wn=function(Ii,Mr){lr(function(){_t(Ii,Mr)})};lr(function(){Wn=_t});for(var Un=qt.length-22;Rn(qt,Un)!=101010256;--Un)if(!Un||qt.length-Un>65558)return Wn(In(13,0,1),null),le;var mi=vi(qt,Un+8);if(mi){var zn=mi,cn=Rn(qt,Un+16),Yn=cn==4294967295||zn==65535;if(Yn){var Ki=Rn(qt,Un-12);Yn=Rn(qt,Ki)==101075792,Yn&&(zn=mi=Rn(qt,Ki+32),cn=Rn(qt,Ki+48))}for(var Wi=$t&&$t.filter,vn=function(Ii){var Mr=bn(qt,cn,Yn),Rr=Mr[0],yr=Mr[1],Ei=Mr[2],jn=Mr[3],oi=Mr[4],Pi=Mr[5],Tn=Gi(qt,Pi);cn=oi;var ti=function(Mn,ci){Mn?(le(),Wn(Mn,null)):(ci&&(rn[jn]=ci),--mi||Wn(null,rn))};if(!Wi||Wi({name:jn,size:yr,originalSize:Ei,compression:Rr}))if(!Rr)ti(null,We(qt,Tn,Tn+yr));else if(Rr==8){var Jn=qt.subarray(Tn,Tn+yr);if(Ei<524288||yr>.8*Ei)try{ti(null,oo(Jn,{out:new Me(Ei)}))}catch(Mn){ti(Mn,null)}else Qe.push(ko(Jn,{size:Ei},ti))}else ti(In(14,"unknown compression type "+Rr,1),null);else ti(null,null)},Ht=0;Ht<zn;++Ht)vn(Ht)}else Wn(null,{});return le}function Ar(qt,$t){for(var _t={},Qe=qt.length-22;Rn(qt,Qe)!=101010256;--Qe)(!Qe||qt.length-Qe>65558)&&In(13);var le=vi(qt,Qe+8);if(!le)return{};var rn=Rn(qt,Qe+16),Wn=rn==4294967295||le==65535;if(Wn){var Un=Rn(qt,Qe-12);Wn=Rn(qt,Un)==101075792,Wn&&(le=Rn(qt,Un+32),rn=Rn(qt,Un+48))}for(var mi=$t&&$t.filter,zn=0;zn<le;++zn){var cn=bn(qt,rn,Wn),Yn=cn[0],Ki=cn[1],Wi=cn[2],vn=cn[3],Ht=cn[4],Ii=cn[5],Mr=Gi(qt,Ii);rn=Ht,(!mi||mi({name:vn,size:Ki,originalSize:Wi,compression:Yn}))&&(Yn?Yn==8?_t[vn]=oo(qt.subarray(Mr,Mr+Ki),{out:new Me(Wi)}):In(14,"unknown compression type "+Yn):_t[vn]=We(qt,Mr,Mr+Ki))}return _t}},12378:function(Pn,gi,ne){"use strict";ne.d(gi,{$u:function(){return Pe},BD:function(){return Ut},E9:function(){return Ue},FF:function(){return $o},FJ:function(){return yt},Hn:function(){return gt},KX:function(){return Nt},NB:function(){return _n},S0:function(){return Fe},UL:function(){return ie},Vk:function(){return lt},Vm:function(){return Zn},YI:function(){return pn},ZA:function(){return Me},Zt:function(){return An},al:function(){return kt},bn:function(){return jt},bx:function(){return Lt},g2:function(){return Cn},h1:function(){return Ae},hD:function(){return mr},l4:function(){return ye},rU:function(){return _e},s_:function(){return Bt},uz:function(){return Qn},z6:function(){return we}}),Pn=ne.hmd(Pn),function(){var Pt;function so(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function zr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:so(a)}}function ri(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var pi=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Ci;if(typeof Object.setPrototypeOf=="function")Ci=Object.setPrototypeOf;else{var Qi;t:{var Tr={a:!0},Re={};try{Re.__proto__=Tr,Qi=Re.a;break t}catch(a){}Qi=!1}Ci=Qi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Oe=Ci;function Te(a,y){if(a.prototype=pi(y.prototype),a.prototype.constructor=a,Oe)Oe(a,y);else for(var x in y)if(x!="prototype")if(Object.defineProperties){var E=Object.getOwnPropertyDescriptor(y,x);E&&Object.defineProperty(a,x,E)}else a[x]=y[x];a.QA=y.prototype}var Ze=typeof ne.g!="undefined"&&ne.g!=null?ne.g:self,yi=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},hi=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Zi(a,y){if(y){var x=Ze;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&hi(x,a,{writable:!0,value:y})}}Zi("Object.assign",function(a){return a||yi}),Zi("Array.prototype.fill",function(a){return a||function(y,x,E){var b=this.length||0;for(0>x&&(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<E;x++)this[x]=y;return this}});var He=typeof globalThis=="object"&&globalThis||typeof ne.g=="object"&&ne.g.global===ne.g&&ne.g||typeof self=="object"&&self.self===self&&self||{};He.requestAnimationFrame===void 0&&(He.setImmediate===void 0?He.requestAnimationFrame=function(a){He.setTimeout(a,0)}:He.requestAnimationFrame=He.setImmediate);function Le(){}function kn(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&He.clearTimeout(x),x=Bi(function(){x=-1,a.apply(E,b)},y)}}function Bi(a,y){return He.setTimeout(a,y)}function sn(a){return He.document.createElement(a)}function Yt(a){throw Error(a)}function he(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Yt(a)}function wn(a,y,x,E){x=x===null?"*":typeof x=="string"?x:typeof x=="function"&&typeof x.className=="string"?x.className:"",E!==void 0&&(x+="."+E),Yt(x+" is not in the range "+y+": "+a)}function un(a){He.console&&He.console.log(a)}function Ne(a){return typeof a=="object"&&a!==null}function mn(a){return Array.isArray(a)||He.NodeList&&a instanceof He.NodeList||He.HTMLCollection&&a instanceof He.HTMLCollection}function xi(a){return Array.prototype.slice.call(a)}function Mi(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Yt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Gi(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Yt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function bn(){var a=vo.pop();return a===void 0?[]:a}function Ln(a){a.length=0,vo.push(a)}function On(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(Ne(a)&&a.constructor)return On(a.constructor);return typeof a}function Yi(a){var y=a;return Ne(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 ki(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 hn(a,y,x){Object.defineProperty(Ao.prototype,a,{get:y,set:x})}function Vn(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;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;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<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-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 Fr=He.navigator!==void 0&&0<He.navigator.userAgent.indexOf("Trident/7"),Ur=He.navigator!==void 0&&He.navigator.platform!==void 0&&He.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,vo=[];Object.freeze([]),Le.className="Util",Le.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Le.adym="gojs.net",Le.vfo="28e645fdb266",Le.className="Util";function Be(a,y,x){rn(this),this.j=a,this.xa=y,this.o=x}Be.prototype.toString=function(){return"EnumValue."+this.xa};function wi(a,y){return y==null||y===""?null:a[y]}Ze.Object.defineProperties(Be.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Be.className="EnumValue";function ir(){this.ew=[]}ir.prototype.toString=function(){return this.ew.join("")},ir.prototype.add=function(a){a!==""&&this.ew.push(a)},ir.className="StringBuilder";function li(){}li.className="PropertyCollection";var br={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){He.console&&He.console.log(a)},HA:function(a,y,x,E){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,rt){return function(){throw Error("Property "+tt.Zl[rt.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function lr(){}lr.prototype.reset=function(){},lr.prototype.next=function(){return!1},lr.prototype.Ad=function(){return!1},lr.prototype.first=function(){return null},lr.prototype.any=function(){return!1},lr.prototype.all=function(){return!0},lr.prototype.each=function(){return this},lr.prototype.map=function(){return this},lr.prototype.filter=function(){return this},lr.prototype.de=function(){},lr.prototype.toString=function(){return"EmptyIterator"},Ze.Object.defineProperties(lr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),lr.prototype.first=lr.prototype.first,lr.prototype.hasNext=lr.prototype.Ad,lr.prototype.next=lr.prototype.next,lr.prototype.reset=lr.prototype.reset;var xr=null;lr.className="EmptyIterator",xr=new lr;function Ar(a){this.key=-1,this.value=a}Ar.prototype.reset=function(){this.key=-1},Ar.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Ar.prototype.Ad=function(){return this.next()},Ar.prototype.first=function(){return this.key=0,this.value},Ar.prototype.any=function(a){return this.key=-1,a(this.value)},Ar.prototype.all=function(a){return this.key=-1,a(this.value)},Ar.prototype.each=function(a){return this.key=-1,a(this.value),this},Ar.prototype.map=function(a){return new Ar(a(this.value))},Ar.prototype.filter=function(a){return a(this.value)?new Ar(this.value):xr},Ar.prototype.de=function(){this.value=null},Ar.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Ze.Object.defineProperties(Ar.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Ar.prototype.first=Ar.prototype.first,Ar.prototype.hasNext=Ar.prototype.Ad,Ar.prototype.next=Ar.prototype.next,Ar.prototype.reset=Ar.prototype.reset,Ar.className="SingletonIterator";function qt(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}qt.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},qt.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;x<y;){var b=a[x];if(E(b))return this.key=this.Za=x,this.value=b,!0;x++}else{if(x<y)return this.key=x,this.value=a[x],!0;this.de()}return!1},qt.prototype.Ad=function(){return this.next()},qt.prototype.first=function(){var a=this.Bb;this.qa=a.Ja,this.Za=0,a=a.s;var y=a.length,x=this.qf;if(x!==null){for(var E=0;E<y;){var b=a[E];if(x(b))return this.key=this.Za=E,this.value=b;E++}return null}return 0<y?(a=a[0],this.key=0,this.value=a):null},qt.prototype.any=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&a(z))return!0}return!1},qt.prototype.all=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];if((E===null||E(z))&&!a(z))return!1}return!0},qt.prototype.each=function(a){var y=this.Bb;y.Sa=null,this.Za=-1,y=y.s;for(var x=y.length,E=this.qf,b=0;b<x;b++){var z=y[b];(E===null||E(z))&&a(z)}return this},qt.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new _t,a.s=x,a.xb(),a.iterator},qt.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new _t,a.s=x,a.xb(),a.iterator},qt.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},qt.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Ze.Object.defineProperties(qt.prototype,{iterator:{get:function(){return this}},predicate:{get:function(){return this.qf},set:function(a){this.qf=a}},count:{get:function(){var a=this.qf;if(a!==null){for(var y=0,x=this.Bb.s,E=x.length,b=0;b<E;b++)a(x[b])&&y++;return y}return this.Bb.s.length}}}),qt.prototype.first=qt.prototype.first,qt.prototype.hasNext=qt.prototype.Ad,qt.prototype.next=qt.prototype.next,qt.prototype.reset=qt.prototype.reset,qt.className="ListIterator";function $t(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}$t.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},$t.prototype.next=function(){var a=this.Bb;if(a.Ja!==this.qa&&0>this.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},$t.prototype.Ad=function(){return this.next()},$t.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},$t.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},$t.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},$t.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},$t.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 _t,a.s=x,a.xb(),a.iterator},$t.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 _t,a.s=x,a.xb(),a.iterator},$t.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},$t.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Ze.Object.defineProperties($t.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),$t.prototype.first=$t.prototype.first,$t.prototype.hasNext=$t.prototype.Ad,$t.prototype.next=$t.prototype.next,$t.prototype.reset=$t.prototype.reset,$t.className="ListIteratorBackwards";function _t(a){rn(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=_t.prototype,Pt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.toString=function(){return"List()#"+Un(this)},Pt.add=function(a){return a===null?this:(this._isFrozen&&he(this,a),this.s.push(a),this.xb(),this)},Pt.push=function(a){this.add(a)},Pt.addAll=function(a){if(a===null)return this;this._isFrozen&&he(this);var y=this.s;if(mn(a))for(var x=a.length,E=0;E<x;E++)y.push(a[E]);else for(a=a.iterator;a.next();)y.push(a.value);return this.xb(),this},Pt.clear=function(){this._isFrozen&&he(this),this.s.length=0,this.xb()},Pt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Pt.has=function(a){return this.contains(a)},Pt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Pt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&wn(a,"0 <= i < length",_t,"elt:i"),y[a]},Pt.get=function(a){return this.M(a)},Pt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&wn(a,"0 <= i < length",_t,"setElt:i"),this._isFrozen&&he(this,a),x[a]=y},Pt.set=function(a,y){this.cd(a,y)},Pt.first=function(){var a=this.s;return a.length===0?null:a[0]},Pt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Pt.pop=function(){this._isFrozen&&he(this);var a=this.s;return 0<a.length?a.pop():null},_t.prototype.any=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(a(y[E]))return!0;return!1},_t.prototype.all=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)if(!a(y[E]))return!1;return!0},_t.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},_t.prototype.map=function(a){for(var y=new _t,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},_t.prototype.filter=function(a){for(var y=new _t,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},Pt=_t.prototype,Pt.Gb=function(a,y){0>a&&wn(a,">= 0",_t,"insertAt:i"),this._isFrozen&&he(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Pt.remove=function(a){if(a===null)return!1;this._isFrozen&&he(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)},Pt.delete=function(a){return this.remove(a)},Pt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&wn(a,"0 <= i < length",_t,"removeAt:i"),this._isFrozen&&he(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Pt.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&&he(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},_t.prototype.copy=function(){var a=new _t,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Pt=_t.prototype,Pt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Pt.Iv=function(){for(var a=new le,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Pt.sort=function(a){return this._isFrozen&&he(this),this.s.sort(a),this.xb(),this},Pt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&he(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&wn(y,"0 <= from < length",_t,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0<a(x,b)&&(E[y]=b,E[y+1]=x,this.xb()),this;if(y===0)if(x>=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a<x;a++)E[a]=y[a];else if(x>=b)for(x=E.slice(y),x.sort(a),a=y;a<b;a++)E[a]=x[a-y];else for(b=E.slice(y,x),b.sort(a),a=y;a<x;a++)E[a]=b[a-y];return this.xb(),this},Pt.reverse=function(){return this._isFrozen&&he(this),this.s.reverse(),this.xb(),this},Ze.Object.defineProperties(_t.prototype,{_dataArray:{get:function(){return this.s}},count:{get:function(){return this.s.length}},size:{get:function(){return this.s.length}},length:{get:function(){return this.s.length}},iterator:{get:function(){if(0>=this.s.length)return xr;var a=this.Sa;return a!==null?(a.reset(),a):new qt(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return xr;var a=this.Hg;return a!==null?(a.reset(),a):new $t(this)}}}),_t.prototype.reverse=_t.prototype.reverse,_t.prototype.sortRange=_t.prototype.zi,_t.prototype.sort=_t.prototype.sort,_t.prototype.toSet=_t.prototype.Iv,_t.prototype.toArray=_t.prototype.Fa,_t.prototype.removeRange=_t.prototype.removeRange,_t.prototype.removeAt=_t.prototype.mb,_t.prototype.delete=_t.prototype.delete,_t.prototype.remove=_t.prototype.remove,_t.prototype.insertAt=_t.prototype.Gb,_t.prototype.pop=_t.prototype.pop,_t.prototype.last=_t.prototype.jc,_t.prototype.first=_t.prototype.first,_t.prototype.set=_t.prototype.set,_t.prototype.setElt=_t.prototype.cd,_t.prototype.get=_t.prototype.get,_t.prototype.elt=_t.prototype.M,_t.prototype.indexOf=_t.prototype.indexOf,_t.prototype.has=_t.prototype.has,_t.prototype.contains=_t.prototype.contains,_t.prototype.clear=_t.prototype.clear,_t.prototype.addAll=_t.prototype.addAll,_t.prototype.push=_t.prototype.push,_t.prototype.add=_t.prototype.add,_t.prototype.thaw=_t.prototype.ka,_t.prototype.freeze=_t.prototype.freeze,_t.className="List";function Qe(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Qe.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Qe.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)},Qe.prototype.Ad=function(){return this.next()},Qe.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},Qe.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},Qe.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},Qe.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},Qe.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new _t;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Qe.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new _t;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Qe.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Qe.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Ze.Object.defineProperties(Qe.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Qe.prototype.first=Qe.prototype.first,Qe.prototype.hasNext=Qe.prototype.Ad,Qe.prototype.next=Qe.prototype.next,Qe.prototype.reset=Qe.prototype.reset,Qe.className="SetIterator";function le(a){rn(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=le.prototype,Pt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.toString=function(){return"Set()#"+Un(this)},Pt.add=function(a){if(a===null)return this;this._isFrozen&&he(this,a);var y=a;return Ne(a)&&(y=Wn(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Ki(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Pt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&he(this),mn(a))for(var y=a.length,x=0;x<y;x++)this.add(a[x]);else for(a=a.iterator;a.next();)this.add(a.value);return this},Pt.contains=function(a){if(a===null)return!1;var y=a;return Ne(a)&&(y=Un(a),y===void 0)?!1:this.Tb[y]!==void 0},Pt.has=function(a){return this.contains(a)},Pt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Pt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Pt.first=function(){var a=this.ea;return a===null?null:a.value},le.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},le.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},le.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},le.prototype.map=function(a){for(var y=new le,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},le.prototype.filter=function(a){for(var y=new le,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Pt=le.prototype,Pt.remove=function(a){if(a===null)return!1;this._isFrozen&&he(this,a);var y=a;if(Ne(a)&&(y=Un(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Pt.delete=function(a){return this.remove(a)},Pt.hp=function(a){if(a===null)return this;if(this._isFrozen&&he(this),mn(a))for(var y=a.length,x=0;x<y;x++)this.remove(a[x]);else for(a=a.iterator;a.next();)this.remove(a.value);return this},Pt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&he(this);var y=new le;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Pt.clear=function(){this._isFrozen&&he(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},le.prototype.copy=function(){var a=new le,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},le.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},le.prototype.Hv=function(){var a=new _t,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function rn(a){a.__gohashid=mi++}function Wn(a){var y=a.__gohashid;return y===void 0&&(y=mi++,a.__gohashid=y),y}function Un(a){return a.__gohashid}Ze.Object.defineProperties(le.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return xr;var a=this.Sa;return a!==null?(a.reset(),a):new Qe(this)}}}),le.prototype.toList=le.prototype.Hv,le.prototype.toArray=le.prototype.Fa,le.prototype.clear=le.prototype.clear,le.prototype.retainAll=le.prototype.pA,le.prototype.removeAll=le.prototype.hp,le.prototype.delete=le.prototype.delete,le.prototype.remove=le.prototype.remove,le.prototype.first=le.prototype.first,le.prototype.containsAny=le.prototype.Ty,le.prototype.containsAll=le.prototype.Sy,le.prototype.has=le.prototype.has,le.prototype.contains=le.prototype.contains,le.prototype.addAll=le.prototype.addAll,le.prototype.add=le.prototype.add,le.prototype.thaw=le.prototype.ka,le.prototype.freeze=le.prototype.freeze;var mi=1;le.className="Set",le.uniqueHash=rn,le.hashIdUnique=Wn,le.hashId=Un;function zn(a){this.ma=a,this.qa=a.Ja,this.sa=null}zn.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},zn.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)},zn.prototype.Ad=function(){return this.next()},zn.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},zn.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},zn.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},zn.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},zn.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new _t;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},zn.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new _t;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},zn.prototype.de=function(){this.value=this.key=null,this.qa=-1},zn.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Ze.Object.defineProperties(zn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),zn.prototype.first=zn.prototype.first,zn.prototype.hasNext=zn.prototype.Ad,zn.prototype.next=zn.prototype.next,zn.prototype.reset=zn.prototype.reset,zn.className="MapKeySetIterator";function cn(a){le.call(this),rn(this),this._isFrozen=!0,this.ma=a}Te(cn,le),Pt=cn.prototype,Pt.freeze=function(){return this},Pt.ka=function(){return this},Pt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Pt.add=function(){Yt("This Set is read-only: "+this.toString())},Pt.contains=function(a){return this.ma.contains(a)},Pt.has=function(a){return this.contains(a)},Pt.remove=function(){Yt("This Set is read-only: "+this.toString())},Pt.delete=function(a){return this.remove(a)},Pt.clear=function(){Yt("This Set is read-only: "+this.toString())},Pt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},cn.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},cn.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},cn.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},cn.prototype.map=function(a){for(var y=new le,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},cn.prototype.filter=function(a){for(var y=new le,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},cn.prototype.copy=function(){return new cn(this.ma)},cn.prototype.Iv=function(){var a=new le,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},cn.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},cn.prototype.Hv=function(){var a=new _t,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ze.Object.defineProperties(cn.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?xr:new zn(this.ma)}}}),cn.prototype.toList=cn.prototype.Hv,cn.prototype.toArray=cn.prototype.Fa,cn.prototype.toSet=cn.prototype.Iv,cn.prototype.first=cn.prototype.first,cn.prototype.clear=cn.prototype.clear,cn.prototype.delete=cn.prototype.delete,cn.prototype.remove=cn.prototype.remove,cn.prototype.has=cn.prototype.has,cn.prototype.contains=cn.prototype.contains,cn.prototype.add=cn.prototype.add,cn.prototype.thaw=cn.prototype.ka,cn.prototype.freeze=cn.prototype.freeze,cn.className="MapKeySet";function Yn(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Yn.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Yn.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)},Yn.prototype.Ad=function(){return this.next()},Yn.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},Yn.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},Yn.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},Yn.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},Yn.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new _t;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Yn.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new _t;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Yn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Yn.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Ze.Object.defineProperties(Yn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Yn.prototype.first=Yn.prototype.first,Yn.prototype.hasNext=Yn.prototype.Ad,Yn.prototype.next=Yn.prototype.next,Yn.prototype.reset=Yn.prototype.reset,Yn.className="MapValueSetIterator";function Ki(a,y){this.key=a,this.value=y,this.ll=this.va=null}Ki.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Ki.className="KeyValuePair";function Wi(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Wi.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Wi.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)},Wi.prototype.Ad=function(){return this.next()},Wi.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},Wi.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},Wi.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},Wi.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},Wi.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new _t;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Wi.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new _t;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Wi.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Wi.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Ze.Object.defineProperties(Wi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Wi.prototype.first=Wi.prototype.first,Wi.prototype.hasNext=Wi.prototype.Ad,Wi.prototype.next=Wi.prototype.next,Wi.prototype.reset=Wi.prototype.reset,Wi.className="MapIterator";function vn(a){rn(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"&&Yt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Pt=vn.prototype,Pt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.toString=function(){return"Map()#"+Un(this)},Pt.add=function(a,y){this._isFrozen&&he(this,a);var x=a;Ne(a)&&(x=Wn(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Ki(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Pt.set=function(a,y){return this.add(a,y)},Pt.addAll=function(a){if(a===null)return this;if(mn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];this.add(E.key,E.value)}else if(a instanceof vn)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},Pt.first=function(){return this.ea},vn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},vn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},vn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},vn.prototype.map=function(a){for(var y=new vn,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},vn.prototype.filter=function(a){for(var y=new vn,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Pt=vn.prototype,Pt.contains=function(a){var y=a;return Ne(a)&&(y=Un(a),y===void 0)?!1:this.Tb[y]!==void 0},Pt.has=function(a){return this.contains(a)},Pt.I=function(a){var y=a;return Ne(a)&&(y=Un(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Pt.get=function(a){return this.I(a)},Pt.remove=function(a){if(a===null)return!1;this._isFrozen&&he(this,a);var y=a;if(Ne(a)&&(y=Un(a),y===void 0)||(a=this.Tb[y],a===void 0))return!1;var x=a.va,E=a.ll;return x!==null&&(x.ll=E),E!==null&&(E.va=x),this.ea===a&&(this.ea=x),this.kf===a&&(this.kf=E),delete this.Tb[y],this.Sb--,this.xb(),!0},Pt.delete=function(a){return this.remove(a)},Pt.clear=function(){this._isFrozen&&he(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},vn.prototype.copy=function(){var a=new vn,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},vn.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new Ki(b.key,b.value),x++}return y},vn.prototype.Lf=function(){return new cn(this)},Ze.Object.defineProperties(vn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return xr;var a=this.Sa;return a!==null?(a.reset(),a):new Wi(this)}},iteratorKeys:{get:function(){return 0>=this.count?xr:new zn(this)}},iteratorValues:{get:function(){if(0>=this.count)return xr;var a=this.jf;return a!==null?(a.reset(),a):new Yn(this)}}}),vn.prototype.toKeySet=vn.prototype.Lf,vn.prototype.toArray=vn.prototype.Fa,vn.prototype.clear=vn.prototype.clear,vn.prototype.delete=vn.prototype.delete,vn.prototype.remove=vn.prototype.remove,vn.prototype.get=vn.prototype.get,vn.prototype.getValue=vn.prototype.I,vn.prototype.has=vn.prototype.has,vn.prototype.contains=vn.prototype.contains,vn.prototype.first=vn.prototype.first,vn.prototype.addAll=vn.prototype.addAll,vn.prototype.set=vn.prototype.set,vn.prototype.add=vn.prototype.add,vn.prototype.thaw=vn.prototype.ka,vn.prototype.freeze=vn.prototype.freeze,vn.className="Map";function Ht(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Yt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var Ii,Mr,Rr,yr,Ei;Ht.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Ht.prototype.h=function(a,y){return this.x=a,this.y=y,this},Ht.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Ht.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Ht.prototype.copy=function(){var a=new Ht;return a.x=this.x,a.y=this.y,a},Pt=Ht.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function jn(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 Ht(x,b)}return new Ht}function oi(a){return a.x.toString()+" "+a.y.toString()}Pt.toString=function(){return"Point("+this.x+","+this.y+")"},Pt.D=function(a){return a instanceof Ht?this.x===a.x&&this.y===a.y:!1},Pt.hi=function(a,y){return this.x===a&&this.y===y},Pt.Xa=function(a){return se.B(this.x,a.x)&&se.B(this.y,a.y)},Pt.add=function(a){return this.x+=a.x,this.y+=a.y,this},Pt.re=function(a){return this.x-=a.x,this.y-=a.y,this},Pt.offset=function(a,y){return this.x+=a,this.y+=y,this},Ht.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},Pt=Ht.prototype,Pt.scale=function(a,y){return this.x*=a,this.y*=y,this},Pt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Pt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Pt.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0<x&&(this.x=a/x,this.y=y/x),this},Pt.ab=function(a){return Pi(a.x-this.x,a.y-this.y)},Pt.direction=function(a,y){return Pi(a-this.x,y-this.y)};function Pi(a,y){if(a===0)return 0<y?90:0>y?270:0;if(y===0)return 0<a?0:180;if(isNaN(a)||isNaN(y))return 0;var x=180*Math.atan(Math.abs(y/a))/Math.PI;return 0>a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Pt.Ry=function(a,y){return se.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Pt.fA=function(a,y,x,E){return se.qh(a,y,x,E,this.x,this.y,this),this},Pt.gA=function(a,y){return se.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Pt.uA=function(a,y,x,E){return se.No(this.x,this.y,a,y,x,E,this),this},Pt.vA=function(a,y){return se.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Pt.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},Pt.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},Pt.transform=function(a){return a.Ga(this),this};function Tn(a,y){return y.Cd(a),a}function ti(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var at=-x*tt-E*rt;return 0>=at||at>=ot?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/ot)}function Jn(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Mn(a,y,x,E){return a=x-a,y=E-y,a===0?0<y?90:0>y?270:0:y===0?0<a?0:180:isNaN(a)||isNaN(y)?0:(E=180*Math.atan(Math.abs(y/a))/Math.PI,0>a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Pt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Ht.alloc=function(){var a=ci.pop();return a===void 0?new Ht:a},Ht.allocAt=function(a,y){var x=ci.pop();return x===void 0?new Ht(a,y):(x.x=a,x.y=y,x)},Ht.free=function(a){ci.push(a)},Ht.prototype.isReal=Ht.prototype.w,Ht.prototype.setSpot=Ht.prototype.yi,Ht.prototype.setRectSpot=Ht.prototype.xi,Ht.prototype.snapToGridPoint=Ht.prototype.vA,Ht.prototype.snapToGrid=Ht.prototype.uA,Ht.prototype.projectOntoLineSegmentPoint=Ht.prototype.gA,Ht.prototype.projectOntoLineSegment=Ht.prototype.fA,Ht.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return se.Rl(a,y,x,E,b,z,tt,rt)},Ht.prototype.compareWithLineSegmentPoint=Ht.prototype.Ry,Ht.compareWithLineSegment=function(a,y,x,E,b,z){return se.Fl(a,y,x,E,b,z)},Ht.prototype.direction=Ht.prototype.direction,Ht.prototype.directionPoint=Ht.prototype.ab,Ht.prototype.normalize=Ht.prototype.normalize,Ht.prototype.distanceSquared=Ht.prototype.zd,Ht.prototype.distanceSquaredPoint=Ht.prototype.Bf,Ht.prototype.scale=Ht.prototype.scale,Ht.prototype.rotate=Ht.prototype.rotate,Ht.prototype.offset=Ht.prototype.offset,Ht.prototype.subtract=Ht.prototype.re,Ht.prototype.add=Ht.prototype.add,Ht.prototype.equalsApprox=Ht.prototype.Xa,Ht.prototype.equalTo=Ht.prototype.hi,Ht.prototype.equals=Ht.prototype.D,Ht.prototype.set=Ht.prototype.set,Ht.prototype.setTo=Ht.prototype.sg;var ci=[];Ht.className="Point",Ht.parse=jn,Ht.stringify=oi,Ht.distanceLineSegmentSquared=ti,Ht.distanceSquared=Jn,Ht.direction=Mn,Ht.Origin=Ii=new Ht(0,0).ja(),Ht.InfiniteTopLeft=Mr=new Ht(-1/0,-1/0).ja(),Ht.InfiniteBottomRight=Rr=new Ht(1/0,1/0).ja(),Ht.SixPoint=yr=new Ht(6,6).ja(),Ht.NoPoint=Ei=new Ht(NaN,NaN).ja(),Ht.parse=jn,Ht.stringify=oi,Ht.distanceLineSegmentSquared=ti,Ht.distanceSquared=Jn,Ht.direction=Mn;function Je(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):Yt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var er,fr,Or,nr,jr,Kr,Ho;Je.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Je.prototype.h=function(a,y){return this.width=a,this.height=y,this},Je.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Je.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Je.prototype.copy=function(){var a=new Je;return a.width=this.width,a.height=this.height,a},Pt=Je.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ao(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 Je(x,b)}return new Je}function bo(a){return a.width.toString()+" "+a.height.toString()}Pt.toString=function(){return"Size("+this.width+","+this.height+")"},Pt.D=function(a){return a instanceof Je?this.width===a.width&&this.height===a.height:!1},Pt.hi=function(a,y){return this.width===a&&this.height===y},Pt.Xa=function(a){return se.B(this.width,a.width)&&se.B(this.height,a.height)},Pt.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},Pt.w=function(){return isFinite(this.width)&&isFinite(this.height)},Je.alloc=function(){var a=ho.pop();return a===void 0?new Je:a},Je.free=function(a){ho.push(a)},Je.prototype.isReal=Je.prototype.w,Je.prototype.inflate=Je.prototype.Bc,Je.prototype.equalsApprox=Je.prototype.Xa,Je.prototype.equalTo=Je.prototype.hi,Je.prototype.equals=Je.prototype.D,Je.prototype.set=Je.prototype.set,Je.prototype.setTo=Je.prototype.sg;var ho=[];Je.className="Size",Je.parse=ao,Je.stringify=bo,Je.ZeroSize=er=new Je(0,0).ja(),Je.OneSize=fr=new Je(1,1).ja(),Je.SixSize=Or=new Je(6,6).ja(),Je.EightSize=nr=new Je(8,8).ja(),Je.TenSize=jr=new Je(10,10).ja(),Je.InfiniteSize=Kr=new Je(1/0,1/0).ja(),Je.NoSize=Ho=new Je(NaN,NaN).ja(),Je.parse=ao,Je.stringify=bo;function be(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 Ht?(x=a.x,a=a.y,y instanceof Ht?(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 Je?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Yt("Incorrect second argument supplied to Rect constructor "+y)):Yt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Pt=be.prototype,Pt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Pt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function co(a,y,x){a.width=y,a.height=x}Pt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Pt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Pt.dd=function(a){return this.x=a.x,this.y=a.y,this},Pt.tA=function(a){return this.width=a.width,this.height=a.height,this},be.prototype.copy=function(){var a=new be;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Pt=be.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ls(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 be(x,b,z,tt)}return new be}function ks(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Pt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Pt.D=function(a){return a instanceof be?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Pt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Pt.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 lo(a,y){return se.$(a.x,y.x)&&se.$(a.y,y.y)&&se.$(a.width,y.width)&&se.$(a.height,y.height)}Pt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Pt.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},Pt.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},Pt.offset=function(a,y){return this.x+=a,this.y+=y,this},Pt.Bc=function(a,y){return xa(this,y,a,y,a)},Pt.Co=function(a){return xa(this,a.top,a.right,a.bottom,a.left)},Pt.Fv=function(a){return xa(this,-a.top,-a.right,-a.bottom,-a.left)},Pt.Hz=function(a,y,x,E){return xa(this,a,y,x,E)};function xa(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}Pt.Ex=function(a){return ta(this,a.x,a.y,a.width,a.height)},Pt.Uu=function(a,y,x,E){return ta(this,a,y,x,E)};function ta(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}Pt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Pt.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 Da(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))}Pt.Ye=function(a){return Gr(this,a.x,a.y,0,0)},Pt.ed=function(a){return Gr(this,a.x,a.y,a.width,a.height)},Pt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Gr(this,a,y,x,E)};function Gr(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}Pt.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 Ro(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 Vs(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}Pt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Pt.Mz=function(){return this.width===0&&this.height===0},be.alloc=function(){var a=Ba.pop();return a===void 0?new be:a},be.allocAt=function(a,y,x,E){var b=Ba.pop();return b===void 0?new be(a,y,x,E):b.h(a,y,x,E)},be.free=function(a){Ba.push(a)},Ze.Object.defineProperties(be.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 Ht(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Je(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Ht(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}}}),be.prototype.isEmpty=be.prototype.Mz,be.prototype.isReal=be.prototype.w,be.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return se.Fx(a,y,x,E,b,z,tt,rt)},be.prototype.setSpot=be.prototype.yi,be.prototype.union=be.prototype.Kv,be.prototype.unionRect=be.prototype.ed,be.prototype.unionPoint=be.prototype.Ye,be.prototype.intersects=be.prototype.Vu,be.prototype.intersectsRect=be.prototype.Yc,be.prototype.intersect=be.prototype.Uu,be.prototype.intersectRect=be.prototype.Ex,be.prototype.grow=be.prototype.Hz,be.prototype.subtractMargin=be.prototype.Fv,be.prototype.addMargin=be.prototype.Co,be.prototype.inflate=be.prototype.Bc,be.prototype.offset=be.prototype.offset,be.prototype.contains=be.prototype.contains,be.prototype.containsRect=be.prototype.Re,be.prototype.containsPoint=be.prototype.ca,be.prototype.equalsApprox=be.prototype.Xa,be.prototype.equalTo=be.prototype.hi,be.prototype.equals=be.prototype.D,be.prototype.setSize=be.prototype.tA,be.prototype.setPoint=be.prototype.dd,be.prototype.set=be.prototype.set,be.prototype.setTo=be.prototype.sg;var Vl=null,zA=null,Ba=[];be.className="Rect",be.parse=ls,be.stringify=ks,be.contains=Ro,be.intersects=Vs,be.ZeroRect=Vl=new be(0,0,0,0).ja(),be.NoRect=zA=new be(NaN,NaN,NaN,NaN).ja(),be.parse=ls,be.stringify=ks,be.contains=Ro,be.intersects=Vs;function Xi(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):Yt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Xi.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Xi.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Xi.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Xi.prototype.copy=function(){var a=new Xi;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Pt=Xi.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function xA(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 Xi;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Xi(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Xi(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new Xi(x,b):new Xi(x,b,z,tt)}return new Xi}function jA(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Pt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Pt.D=function(a){return a instanceof Xi?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Pt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Pt.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)},Pt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Xi.alloc=function(){var a=hu.pop();return a===void 0?new Xi:a},Xi.free=function(a){hu.push(a)},Xi.prototype.isReal=Xi.prototype.w,Xi.prototype.equalsApprox=Xi.prototype.Xa,Xi.prototype.equalTo=Xi.prototype.hi,Xi.prototype.equals=Xi.prototype.D,Xi.prototype.set=Xi.prototype.set,Xi.prototype.setTo=Xi.prototype.sg;var Wa=null,Hs=null,hu=[];Xi.className="Margin",Xi.parse=xA,Xi.stringify=jA,Xi.ZeroMargin=Wa=new Xi(0,0,0,0).ja(),Xi.TwoMargin=Hs=new Xi(2,2,2,2).ja(),Xi.parse=xA,Xi.stringify=jA;function ni(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 $i,dr,Cr,Dr,So,Ui,xo,ea,Bs,Go,_s,bs,ca,Ws,ns,xl,Ts,Zu,Il,Ya,No,al,Ju,qu,Eh,is,Lc,$u,fa,ll,vs,Io,rs,Ys,th,BA;ni.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ni.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},ni.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},ni.prototype.copy=function(){var a=new ni;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Pt=ni.prototype,Pt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Pt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Wo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Mo(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return $i;if(a==="TopLeft")return dr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Cr;if(a==="TopRight")return Dr;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return So;if(a==="Center")return Ui;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return xo;if(a==="BottomLeft")return ea;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Bs;if(a==="BottomRight")return Go;if(a==="TopSide")return _s;if(a==="LeftSide")return bs;if(a==="RightSide")return ca;if(a==="BottomSide")return Ws;if(a==="TopBottomSides")return ns;if(a==="LeftRightSides")return xl;if(a==="TopLeftSides")return Ts;if(a==="TopRightSides")return Zu;if(a==="BottomLeftSides")return Il;if(a==="BottomRightSides")return Ya;if(a==="NotTopSide")return No;if(a==="NotLeftSide")return al;if(a==="NotRightSide")return Ju;if(a==="NotBottomSide")return qu;if(a==="AllSides")return Eh;if(a==="Default")return is;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new ni(x,b,z,tt)}return new ni}function Xr(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Pt.toString=function(){return this.sb()?this.offsetX===0&&this.offsetY===0?"Spot("+this.x+","+this.y+")":"Spot("+this.x+","+this.y+","+this.offsetX+","+this.offsetY+")":this.D($i)?"None":this.D(dr)?"TopLeft":this.D(Cr)?"Top":this.D(Dr)?"TopRight":this.D(So)?"Left":this.D(Ui)?"Center":this.D(xo)?"Right":this.D(ea)?"BottomLeft":this.D(Bs)?"Bottom":this.D(Go)?"BottomRight":this.D(_s)?"TopSide":this.D(bs)?"LeftSide":this.D(ca)?"RightSide":this.D(Ws)?"BottomSide":this.D(ns)?"TopBottomSides":this.D(xl)?"LeftRightSides":this.D(Ts)?"TopLeftSides":this.D(Zu)?"TopRightSides":this.D(Il)?"BottomLeftSides":this.D(Ya)?"BottomRightSides":this.D(No)?"NotTopSide":this.D(al)?"NotLeftSide":this.D(Ju)?"NotRightSide":this.D(qu)?"NotBottomSide":this.D(Eh)?"AllSides":this.D(is)?"Default":"None"},Pt.D=function(a){return a instanceof ni?(this.x===a.x||isNaN(this.x)&&isNaN(a.x))&&(this.y===a.y||isNaN(this.y)&&isNaN(a.y))&&this.offsetX===a.offsetX&&this.offsetY===a.offsetY:!1},Pt.gv=function(){return new ni(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Pt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Lc))a=bs;else if(a.D($u))a=ca;else if(a.D(fa))a=_s;else if(a.D(ll))a=Ws;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Pt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Pt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Pt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Pt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Pt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},ni.alloc=function(){var a=ys.pop();return a===void 0?new ni:a},ni.free=function(a){ys.push(a)},ni.prototype.isDefault=ni.prototype.Xb,ni.prototype.isNone=ni.prototype.ys,ni.prototype.isSide=ni.prototype.$c,ni.prototype.isNoSpot=ni.prototype.Mc,ni.prototype.isSpot=ni.prototype.sb,ni.prototype.includesSide=ni.prototype.Hf,ni.prototype.opposite=ni.prototype.gv,ni.prototype.equals=ni.prototype.D,ni.prototype.set=ni.prototype.set,ni.prototype.setTo=ni.prototype.sg;var ys=[];ni.className="Spot",ni.parse=Mo,ni.stringify=Xr,ni.None=$i=Wo(new ni(0,0,0,0),0).ja(),ni.Default=is=Wo(new ni(0,0,-1,0),-1).ja(),ni.TopLeft=dr=new ni(0,0,0,0).ja(),ni.TopCenter=Cr=new ni(.5,0,0,0).ja(),ni.TopRight=Dr=new ni(1,0,0,0).ja(),ni.LeftCenter=So=new ni(0,.5,0,0).ja(),ni.Center=Ui=new ni(.5,.5,0,0).ja(),ni.RightCenter=xo=new ni(1,.5,0,0).ja(),ni.BottomLeft=ea=new ni(0,1,0,0).ja(),ni.BottomCenter=Bs=new ni(.5,1,0,0).ja(),ni.BottomRight=Go=new ni(1,1,0,0).ja(),ni.MiddleTop=vs=Cr,ni.MiddleLeft=Io=So,ni.MiddleRight=rs=xo,ni.MiddleBottom=Ys=Bs,ni.Top=fa=Cr,ni.Left=Lc=So,ni.Right=$u=xo,ni.Bottom=ll=Bs,ni.TopSide=_s=Wo(new ni(0,0,1,1),1).ja(),ni.LeftSide=bs=Wo(new ni(0,0,1,2),1).ja(),ni.RightSide=ca=Wo(new ni(0,0,1,4),1).ja(),ni.BottomSide=Ws=Wo(new ni(0,0,1,8),1).ja(),ni.TopBottomSides=ns=Wo(new ni(0,0,1,9),1).ja(),ni.LeftRightSides=xl=Wo(new ni(0,0,1,6),1).ja(),ni.TopLeftSides=Ts=Wo(new ni(0,0,1,3),1).ja(),ni.TopRightSides=Zu=Wo(new ni(0,0,1,5),1).ja(),ni.BottomLeftSides=Il=Wo(new ni(0,0,1,10),1).ja(),ni.BottomRightSides=Ya=Wo(new ni(0,0,1,12),1).ja(),ni.NotTopSide=No=Wo(new ni(0,0,1,14),1).ja(),ni.NotLeftSide=al=Wo(new ni(0,0,1,13),1).ja(),ni.NotRightSide=Ju=Wo(new ni(0,0,1,11),1).ja(),ni.NotBottomSide=qu=Wo(new ni(0,0,1,7),1).ja(),ni.AllSides=Eh=Wo(new ni(0,0,1,15),1).ja(),th=new ni(.156,.156).ja(),BA=new ni(.844,.844).ja(),ni.parse=Mo,ni.stringify=Xr;function Fi(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Fi.prototype.set=function(a){return this.m11=a.m11,this.m12=a.m12,this.m21=a.m21,this.m22=a.m22,this.dx=a.dx,this.dy=a.dy,this},Fi.prototype.setTransform=function(a,y,x,E,b,z){return this.m11=a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Fi.prototype.copy=function(){var a=new Fi;return a.m11=this.m11,a.m12=this.m12,a.m21=this.m21,a.m22=this.m22,a.dx=this.dx,a.dy=this.dy,a},Fi.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Fi.prototype.D=function(a){return this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy},Fi.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Fi.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Fi.prototype.multiply=function(a){var y=this.m11*a.m11+this.m21*a.m12,x=this.m12*a.m11+this.m22*a.m12,E=this.m11*a.m21+this.m21*a.m22,b=this.m12*a.m21+this.m22*a.m22;return this.dx=this.m11*a.dx+this.m21*a.dy+this.dx,this.dy=this.m12*a.dx+this.m22*a.dy+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Fi.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},Fi.prototype.Vj=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),y=-this.m12*a,x=-this.m21*a,E=this.m11*a,b=a*(this.m21*this.dy-this.m22*this.dx),z=a*(this.m12*this.dx-this.m11*this.dy);return this.m11=this.m22*a,this.m12=y,this.m21=x,this.m22=E,this.dx=b,this.dy=z,this},Fi.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(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},Pt=Fi.prototype,Pt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Pt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Pt.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)},Pt.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))},Pt.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))},Pt.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,ot=this.m22,at=this.dx,At=this.dy,ft=y*z+x*rt+at,pt=y*tt+x*ot+At,xt=E*z+x*rt+at,Ct=E*tt+x*ot+At;return x=y*z+b*rt+at,y=y*tt+b*ot+At,z=E*z+b*rt+at,E=E*tt+b*ot+At,b=Math.min(ft,xt),ft=Math.max(ft,xt),xt=Math.min(pt,Ct),pt=Math.max(pt,Ct),b=Math.min(b,x),ft=Math.max(ft,x),xt=Math.min(xt,y),pt=Math.max(pt,y),b=Math.min(b,z),ft=Math.max(ft,z),xt=Math.min(xt,E),pt=Math.max(pt,E),a.h(b,xt,ft-b,pt-xt),a},Fi.alloc=function(){var a=Rs.pop();return a===void 0?new Fi:a},Fi.free=function(a){Rs.push(a)},Fi.prototype.transformRect=Fi.prototype.pp,Fi.prototype.transformPoint=Fi.prototype.Ga,Fi.prototype.scale=Fi.prototype.scale,Fi.prototype.translate=Fi.prototype.translate,Fi.prototype.rotate=Fi.prototype.rotate,Fi.prototype.invert=Fi.prototype.Vj,Fi.prototype.multiplyInverted=Fi.prototype.bv,Fi.prototype.multiply=Fi.prototype.multiply,Fi.prototype.reset=Fi.prototype.reset,Fi.prototype.isIdentity=Fi.prototype.ws,Fi.prototype.equals=Fi.prototype.D,Fi.prototype.setTransform=Fi.prototype.setTransform,Fi.prototype.set=Fi.prototype.set;var Rs=[];Fi.className="Transform",Fi.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&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var rt=a,ot=x;else rt=x,ot=a;if(y<E)var at=y,At=E;else at=E,At=y;if(a===x)return at<=tt&&tt<=At&&a-b<=z&&z<=a+b;if(y===E)return rt<=z&&z<=ot&&y-b<=tt&&tt<=y+b;if(ot+=b,rt-=b,rt<=z&&z<=ot&&(At+=b,at-=b,at<=tt&&tt<=At))if(ot-rt>At-at)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,ot,at,At,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,at,At);var pt=(a+x)/2,xt=(y+E)/2,Ct=(x+b)/2,Mt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(pt+Ct)/2,x=(xt+Mt)/2,Ct=(Ct+b)/2,Mt=(Mt+z)/2;var Gt=(E+Ct)/2,Ot=(x+Mt)/2;return se.cs(a,y,pt,xt,E,x,Gt,Ot,ot,at,At,ft)||se.cs(Gt,Ot,Ct,Mt,b,z,tt,rt,ot,at,At,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var at=(x+b)/2,At=(E+z)/2;return ot.h((((a+x)/2+at)/2+(at+(b+tt)/2)/2)/2,(((y+E)/2+At)/2+(At+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,at=(E+z)/2;return Mn(((a+x)/2+ot)/2,((y+E)/2+at)/2,(ot+(b+tt)/2)/2,(at+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,at){if(se.Yb(a,y,tt,rt,ot,x,E)&&se.Yb(a,y,tt,rt,ot,b,z))Gr(at,a,y,0,0),Gr(at,tt,rt,0,0);else{var At=(a+x)/2,ft=(y+E)/2,pt=(x+b)/2,xt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(At+pt)/2,x=(ft+xt)/2,pt=(pt+b)/2,xt=(xt+z)/2;var Ct=(E+pt)/2,Mt=(x+xt)/2;se.Dl(a,y,At,ft,E,x,Ct,Mt,ot,at),se.Dl(Ct,Mt,pt,xt,b,z,tt,rt,ot,at)}return at},Qe:function(a,y,x,E,b,z,tt,rt,ot,at){if(se.Yb(a,y,tt,rt,ot,x,E)&&se.Yb(a,y,tt,rt,ot,b,z))at.length===0&&(at.push(a),at.push(y)),at.push(tt),at.push(rt);else{var At=(a+x)/2,ft=(y+E)/2,pt=(x+b)/2,xt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(At+pt)/2,x=(ft+xt)/2,pt=(pt+b)/2,xt=(xt+z)/2;var Ct=(E+pt)/2,Mt=(x+xt)/2;se.Qe(a,y,At,ft,E,x,Ct,Mt,ot,at),se.Qe(Ct,Mt,pt,xt,b,z,tt,rt,ot,at)}return at},jv:function(a,y,x,E,b,z,tt,rt,ot,at){if(se.Yb(a,y,b,z,at,x,E))return se.Yb(a,y,b,z,at,rt,ot);var At=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var pt=(At+x)/2,xt=(ft+E)/2;return se.jv(a,y,At,ft,pt,xt,tt,rt,ot,at)||se.jv(pt,xt,x,E,b,z,tt,rt,ot,at)},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))Gr(rt,a,y,0,0),Gr(rt,b,z,0,0);else{var ot=(a+x)/2,at=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var At=(ot+x)/2,ft=(at+E)/2;se.iv(a,y,ot,at,At,ft,tt,rt),se.iv(At,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 ot=(a+x)/2,at=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var At=(ot+x)/2,ft=(at+E)/2;se.ep(a,y,ot,at,At,ft,tt,rt),se.ep(At,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,at,At,ft,pt,xt){if(se.Yb(a,y,tt,rt,pt,x,E)&&se.Yb(a,y,tt,rt,pt,b,z))return!se.Rl(a,y,tt,rt,ot,at,At,ft)||(pt=(a-tt)*(at-ft)-(y-rt)*(ot-At),pt===0)?!1:(xt.h(((a*rt-y*tt)*(ot-At)-(a-tt)*(ot*ft-at*At))/pt,((a*rt-y*tt)*(at-ft)-(y-rt)*(ot*ft-at*At))/pt),!0);var Ct=(a+x)/2,Mt=(y+E)/2,Gt=(x+b)/2,Ot=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Ct+Gt)/2,x=(Mt+Ot)/2,Gt=(Gt+b)/2,Ot=(Ot+z)/2;var Wt=(E+Gt)/2,Zt=(x+Ot)/2,te=1/0,re=!1,me=0,ln=0;return se.Eo(a,y,Ct,Mt,E,x,Wt,Zt,ot,at,At,ft,pt,xt)&&(a=(xt.x-ot)*(xt.x-ot)+(xt.y-at)*(xt.y-at),a<te&&(te=a,re=!0,me=xt.x,ln=xt.y)),se.Eo(Wt,Zt,Gt,Ot,b,z,tt,rt,ot,at,At,ft,pt,xt)&&(xt.x-ot)*(xt.x-ot)+(xt.y-at)*(xt.y-at)<te&&(re=!0,me=xt.x,ln=xt.y),re&&(xt.x=me,xt.y=ln),re},Fo:function(a,y,x,E,b,z,tt,rt,ot,at,At,ft,pt){var xt=0;if(se.Yb(a,y,tt,rt,pt,x,E)&&se.Yb(a,y,tt,rt,pt,b,z)){if(pt=(a-tt)*(at-ft)-(y-rt)*(ot-At),pt===0)return xt;var Ct=((a*rt-y*tt)*(ot-At)-(a-tt)*(ot*ft-at*At))/pt,Mt=((a*rt-y*tt)*(at-ft)-(y-rt)*(ot*ft-at*At))/pt;if(Ct>=At)return xt;if((ot>At?ot-At:At-ot)<(at>ft?at-ft:ft-at)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),Mt<ot||Mt>a)return xt}else if(a<tt?(ot=a,a=tt):ot=tt,Ct<ot||Ct>a)return xt;0<pt?xt++:0>pt&&xt--}else{Ct=(a+x)/2,Mt=(y+E)/2;var Gt=(x+b)/2,Ot=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Ct+Gt)/2,x=(Mt+Ot)/2,Gt=(Gt+b)/2,Ot=(Ot+z)/2;var Wt=(E+Gt)/2,Zt=(x+Ot)/2;xt+=se.Fo(a,y,Ct,Mt,E,x,Wt,Zt,ot,at,At,ft,pt),xt+=se.Fo(Wt,Zt,Gt,Ot,b,z,tt,rt,ot,at,At,ft,pt)}return xt},qh:function(a,y,x,E,b,z,tt){return se.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):se.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(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.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,rt,ot){return se.B(a,x)&&se.B(y,E)?(ot.h(a,y),!1):se.$(b,tt)?se.$(a,x)?(se.qh(a,y,x,E,b,z,ot),!1):se.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),se.$(a,x)?(x=rt*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(ot.h(a,b),!1):x>y?(ot.h(a,y),!1):(ot.h(a,x),!0)):(tt=(E-y)/(x-a),se.$(rt,tt)?(se.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),se.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(ot.h(E,y),!1):b>a?(ot.h(a,y),!1):(ot.h(b,y),!0)):se.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},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,ot,at){function At(Gt,Ot){var Wt=(Gt-a)*(Gt-a)+(Ot-y)*(Ot-y);Wt<ft&&(ft=Wt,ot.h(Gt,Ot))}var ft=1/0;At(ot.x,ot.y);var pt=0,xt=0,Ct=0,Mt=0;if(b<tt?(pt=b,xt=tt):(pt=tt,xt=b),z<rt?(Ct=b,Mt=tt):(Ct=tt,Mt=b),pt=(xt-pt)/2+at,at=(Mt-Ct)/2+at,b=(b+tt)/2,z=(z+rt)/2,pt===0||at===0)return ot;if(.5>(x>a?x-a:a-x)){if(pt=1-(x-b)*(x-b)/(pt*pt),0>pt)return ot;pt=Math.sqrt(pt),E=-at*pt+z,At(x,at*pt+z),At(x,E)}else{if(x=(E-y)/(x-a),E=1/(pt*pt)+x*x/(at*at),rt=2*x*(y-x*a)/(at*at)-2*x*z/(at*at)-2*b/(pt*pt),pt=rt*rt-4*E*(2*x*a*z/(at*at)-2*y*z/(at*at)+z*z/(at*at)+b*b/(pt*pt)-1+(y-x*a)*(y-x*a)/(at*at)),0>pt)return ot;pt=Math.sqrt(pt),at=(-rt+pt)/(2*E),At(at,x*at-x*a+y),pt=(-rt-pt)/(2*E),At(pt,x*pt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var at=1e21,At=a,ft=y;if(se.Ve(a,y,a,E,b,z,tt,rt,ot)){var pt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);pt<at&&(at=pt,At=ot.x,ft=ot.y)}return se.Ve(x,y,x,E,b,z,tt,rt,ot)&&(pt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),pt<at&&(at=pt,At=ot.x,ft=ot.y)),se.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<at&&(at=y,At=ot.x,ft=ot.y)),se.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<at&&(at=a,At=ot.x,ft=ot.y)),ot.h(At,ft),1e21>at},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 ot=a+x,at=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=at&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=at&&rt<=ot&&b>=a):!!(Ro(a,y,x,E,b,z)||Ro(a,y,x,E,tt,rt)||se.Rl(a,y,ot,y,b,z,tt,rt)||se.Rl(ot,y,ot,at,b,z,tt,rt)||se.Rl(ot,at,a,at,b,z,tt,rt)||se.Rl(a,at,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,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(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 ot=tt/2,at=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=at+rt*Math.min(E,ot),rt=a+x*Math.cos(at),at=y+x*Math.sin(at),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(at+y)/2,z.push([rt,at,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=at+rt*Math.min(E,ot),z.push(se.Vy(x,at,b,a,y)),E-=Math.abs(b-at),at=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),rt=a*Math.sin(z),ot=-rt,at=tt*tt+ot*ot,At=at+tt*tt+ot*rt;return at=4/3*(Math.sqrt(2*at*At)-At)/(tt*rt-ot*tt),rt=tt-at*ot,tt=ot+at*tt,ot=-tt,at=z+y,z=Math.cos(at),at=Math.sin(at),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*at,b+rt*at+tt*z,E+rt*z-ot*at,b+rt*at+ot*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var rt=x;return x+b-a<b/2&&(rt=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(rt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,rt=0;else tt=0,rt=1;var ot=tt===0?a:y,at=tt===0?x:E;return(tt===0?b:z)&&(at=-at),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),se.az(ot,tt===0?a:y,at,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,rt=-z+tt,ot=-z+Math.sqrt(a*a+tt*tt);y=rt;for(var at=0;9999999999>at&&(y=.5*(rt+ot),!(y===rt||y===ot));++at){var At=a/(y+b),ft=tt/(y+z);if(At=At*At+ft*ft-1,0<At)rt=y;else if(0>At)ot=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,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new li,um:new li,Mf:new li,Nf:0,vm:100};se.za=se.AA;function qe(a){rn(this),this.l=2,a===void 0&&(a=qe.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===qe.o?this.ee=new _t:(qe.V===null&&(qe.V=new _t().freeze()),this.ee=qe.V),this.aq=this.ee.Ja,this.Ip=new be().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=dr,this.gg=Go,this.Rk=this.Sk=NaN,this.Uf=Ye}qe.prototype.copy=function(){var a=new qe;if(a.l=this.l&-2,a.na=this.na,a.od=this.od,a.pd=this.pd,a.Dc=this.Dc,a.Ec=this.Ec,this.na===qe.o){for(var y=this.ee.s,x=a.ee,E=0;E<y.length;E++)x.add(y[E].copy());a.ee=x}else a.ee=this.ee;return a.aq=this.aq,a.Ip.assign(this.Ip),a.tk=this.tk,a.ym=this.ym,a.zm=this.zm,a.fg=this.fg.J(),a.gg=this.gg.J(),a.Sk=this.Sk,a.Rk=this.Rk,a.Uf=this.Uf,a},qe.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},qe.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==qe.o)return this;var a=this.figures;a.freeze(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].freeze();return this},qe.prototype.ka=function(){if(Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==qe.o)return this;var a=this.figures;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},qe.prototype.Xa=function(a){if(!(a instanceof qe))return!1;if(this.type!==a.type)return this.type===qe.j&&a.type===qe.o?Nl(this,a):a.type===qe.j&&this.type===qe.o?Nl(a,this):!1;if(this.type===qe.o){var y=this.figures.s;a=a.figures.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0}return se.B(this.startX,a.startX)&&se.B(this.startY,a.startY)&&se.B(this.endX,a.endX)&&se.B(this.endY,a.endY)};function Nl(a,y){return a.type!==qe.j||y.type!==qe.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&se.B(a.startX,y.startX)&&se.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Vr&&se.B(a.endX,y.endX)&&se.B(a.endY,y.endY))))}qe.ia=function(a){return a.toString()},qe.prototype.qb=function(a){a.classType===qe&&(this.type=a)},qe.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case qe.j:return 0>a?"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 qe.u:var y=new be(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 qe.F:if(y=new be(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 qe.o:y="",x=this.figures.s;for(var E=x.length,b=0;b<E;b++){var z=x[b];0<b&&(y+=" x "),z.isFilled&&(y+="F "),y+=z.toString(a)}return y;default:return this.type.toString()}},qe.nb=function(a){a=a.split(/[Xx]/);for(var y=a.length,x="",E=0;E<y;E++){var b=a[E];x=b.match(/[Ff]/)!==null?E===0?x+b:x+("X"+(b[0]===" "?"":" ")+b):x+((E===0?"":"X ")+"F"+(b[0]===" "?"":" ")+b)}return x},qe.parse=function(a,y){function x(){return Mt>=te-1?!0:at[Mt+1].match(re)!==null}function E(){return Mt++,at[Mt]}function b(bi){var Si=parseFloat(E()),wr=parseFloat(E());Gt===Gt.toLowerCase()&&(Si=Zt.x+Si,wr=Zt.y+wr),bi.h(Si,wr)}function z(){return b(Zt),Zt}function tt(){return b(Wt),Wt}function rt(){var bi=Ot.toLowerCase();return bi!=="c"&&bi!=="s"&&bi!=="q"&&bi!=="t"?Zt:new Ht(2*Zt.x-Wt.x,2*Zt.y-Wt.y)}y===void 0&&(y=!1);var ot=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ot,"$1 $2"),a=a.replace(ot,"$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 at=a.split(" ");for(a=0;a<at.length;a++){var At=at[a];if(At.match(/(\.[0-9]*)(\.)/gm)!==null){ot=bn();for(var ft="",pt=!1,xt=0;xt<At.length;xt++){var Ct=At[xt];Ct!=="."||pt?Ct==="."?(ot.push(ft),ft="."):ft+=Ct:(pt=!0,ft+=Ct)}for(ot.push(ft),at.splice(a,1),At=0;At<ot.length;At++)at.splice(a+At,0,ot[At]);a+=ot.length-1,Ln(ot)}}var Mt=-1,Gt="",Ot="";ot=new Ht(0,0);var Wt=new Ht(0,0),Zt=new Ht(0,0),te=at.length;a=by(null),pt=ft=At=!1,xt=!0,Ct=null;for(var re=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Mt>=te-1);)if(Ot=Gt,Gt=E(),Gt!=="")switch(Gt.toUpperCase()){case"X":xt=!0,ft=At=!1;break;case"M":for(Ct=z(),a.mc===null||xt===!0?(Cg(a,Ct.x,Ct.y,At,!ft,pt),xt=!1):a.moveTo(Ct.x,Ct.y),ot.assign(Zt);!x();)Ct=z(),a.lineTo(Ct.x,Ct.y);break;case"L":for(;!x();)Ct=z(),a.lineTo(Ct.x,Ct.y);break;case"H":for(;!x();)Zt=new Ht((Gt===Gt.toLowerCase()?Zt.x:0)+parseFloat(E()),Zt.y),a.lineTo(Zt.x,Zt.y);break;case"V":for(;!x();)Zt=new Ht(Zt.x,(Gt===Gt.toLowerCase()?Zt.y:0)+parseFloat(E())),a.lineTo(Zt.x,Zt.y);break;case"C":for(;!x();){Ct=new Ht,b(Ct);var me=tt(),ln=z();Ac(a,Ct.x,Ct.y,me.x,me.y,ln.x,ln.y)}break;case"S":for(;!x();)Ct=rt(),me=tt(),ln=z(),Ac(a,Ct.x,Ct.y,me.x,me.y,ln.x,ln.y);break;case"Q":for(;!x();)Ct=tt(),me=z(),p0(a,Ct.x,Ct.y,me.x,me.y);break;case"T":for(;!x();)Wt=Ct=rt(),me=z(),p0(a,Ct.x,Ct.y,me.x,me.y);break;case"B":for(;!x();){Ct=parseFloat(E()),me=parseFloat(E()),ln=parseFloat(E());var Nn=parseFloat(E()),Fn=parseFloat(E()),tn=Fn,Ge=!1;x()||(tn=parseFloat(E()),x()||(Ge=parseFloat(E())!==0)),Gt===Gt.toLowerCase()&&(ln+=Zt.x,Nn+=Zt.y),a.arcTo(Ct,me,ln,Nn,Fn,tn,Ge)}break;case"A":for(;!x();)Ct=Math.abs(parseFloat(E())),me=Math.abs(parseFloat(E())),ln=parseFloat(E()),Fn=Nn=!1,Ge=tn=0,tn=E(),tn.length===1?(Nn=!!parseFloat(tn),Fn=!!parseFloat(E()),tn=parseFloat(E())):tn.length===2?(Nn=!!parseFloat(tn[0]),Fn=!!parseFloat(tn[1]),tn=parseFloat(E())):(Nn=!!parseFloat(tn[0]),Fn=!!parseFloat(tn[1]),tn=parseFloat(tn.slice(2))),Ge=parseFloat(E()),Gt===Gt.toLowerCase()&&(tn=Zt.x+tn,Ge=Zt.y+Ge),Zt.h(tn,Ge),x1(a,Ct,me,ln,Nn,Fn,tn,Ge);break;case"Z":S1(a),Zt.assign(ot);break;case"F":for(Ct="",me=1;at[Mt+me];)if(at[Mt+me]==="0")pt=!0,me++;else if(at[Mt+me].match(/[Uu]/)!==null)me++;else if(at[Mt+me].match(re)===null)me++;else{Ct=at[Mt+me];break}Ct.match(/[Mm]/)?At=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Ct="",me=1;at[Mt+me];)if(at[Mt+me].match(/[Ff]/)!==null)me++;else if(at[Mt+me].match(re)===null)me++;else{Ct=at[Mt+me];break}Ct.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,m0=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},qe.Ha=function(a,y){for(var x=a.length,E=Ht.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}Ht.free(E)},qe.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===qe.o){if(this.aq!==this.figures.Ja)return!0;for(var a=this.figures.s,y=a.length,x=0;x<y;x++)if(a[x].Zu())return!0}return!1},qe.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===qe.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),CA(this,a,!1),Gr(a,0,0,0,0),a.freeze()},qe.prototype.ix=function(){var a=new be;return CA(this,a,!0),a};function CA(a,y,x){switch(a.type){case qe.j:case qe.u:case qe.F:x?y.h(a.od,a.pd,0,0):Gr(y,a.od,a.pd,0,0),Gr(y,a.Dc,a.Ec,0,0);break;case qe.o:var E=a.figures;a=E.s,E=E.length;for(var b=0;b<E;b++){var z=a[b];x&&b===0?y.h(z.startX,z.startY,0,0):Gr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,at=z.startY,At=0;At<rt;At++){var ft=tt[At];switch(ft.type){case Vr:case os:ot=ft.endX,at=ft.endY,Gr(y,ot,at,0,0);break;case Es:se.Dl(ot,at,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,at=ft.endY;break;case Oa:se.iv(ot,at,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,at=ft.endY;break;case zo:case ul:var pt=ft.type===zo?Pa(ft,z):Al(ft,z,ot,at),xt=pt.length;if(xt===0){ot=ft.type===zo?ft.centerX:ft.endX,at=ft.type===zo?ft.centerY:ft.endY,Gr(y,ot,at,0,0);break}ft=null;for(var Ct=0;Ct<xt;Ct++)ft=pt[Ct],se.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],at=ft[7]);break;default:Yt("Unknown Segment type: "+ft.type)}}}break;default:Yt("Unknown Geometry type: "+a.type)}}qe.prototype.normalize=function(){this._isFrozen&&he(this);var a=this.ix();return this.offset(-a.x,-a.y),new Ht(-a.x,-a.y)},qe.prototype.offset=function(a,y){return this._isFrozen&&he(this),this.transform(1,0,0,1,a,y),this},qe.prototype.scale=function(a,y){return this._isFrozen&&he(this),this.transform(a,0,0,y,0,0),this},qe.prototype.rotate=function(a,y,x){this._isFrozen&&he(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Fi.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Fi.free(E),this},Pt=qe.prototype,Pt.transform=function(a,y,x,E,b,z){switch(this.type){case qe.j:case qe.u:case qe.F:var tt=this.od,rt=this.pd;this.od=tt*a+rt*x+b,this.pd=tt*y+rt*E+z,tt=this.Dc,rt=this.Ec,this.Dc=tt*a+rt*x+b,this.Ec=tt*y+rt*E+z;break;case qe.o:for(var ot=this.figures.s,at=ot.length,At=0;At<at;At++){var ft=ot[At];tt=ft.startX,rt=ft.startY,ft.startX=tt*a+rt*x+b,ft.startY=tt*y+rt*E+z,ft=ft.segments.s;for(var pt=ft.length,xt=0;xt<pt;xt++){var Ct=ft[xt];switch(Ct.type){case Vr:case os:tt=Ct.endX,rt=Ct.endY,Ct.endX=tt*a+rt*x+b,Ct.endY=tt*y+rt*E+z;break;case Es:tt=Ct.point1X,rt=Ct.point1Y,Ct.point1X=tt*a+rt*x+b,Ct.point1Y=tt*y+rt*E+z,tt=Ct.point2X,rt=Ct.point2Y,Ct.point2X=tt*a+rt*x+b,Ct.point2Y=tt*y+rt*E+z,tt=Ct.endX,rt=Ct.endY,Ct.endX=tt*a+rt*x+b,Ct.endY=tt*y+rt*E+z;break;case Oa:tt=Ct.point1X,rt=Ct.point1Y,Ct.point1X=tt*a+rt*x+b,Ct.point1Y=tt*y+rt*E+z,tt=Ct.endX,rt=Ct.endY,Ct.endX=tt*a+rt*x+b,Ct.endY=tt*y+rt*E+z;break;case zo:tt=Ct.centerX,rt=Ct.centerY,Ct.centerX=tt*a+rt*x+b,Ct.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Ct.startAngle+=tt),0>a&&(Ct.startAngle=180-Ct.startAngle,Ct.sweepAngle=-Ct.sweepAngle),0>E&&(Ct.startAngle=-Ct.startAngle,Ct.sweepAngle=-Ct.sweepAngle),Ct.radiusX*=Math.sqrt(a*a+x*x),Ct.radiusY!==void 0&&(Ct.radiusY*=Math.sqrt(y*y+E*E));break;case ul:if(tt=Ct.endX,rt=Ct.endY,Ct.endX=tt*a+rt*x+b,Ct.endY=tt*y+rt*E+z,Ct.radiusX===0||Ct.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Ct.xAxisRotation+=tt),0>a&&(Ct.xAxisRotation=180-Ct.xAxisRotation,Ct.isClockwiseArc=!Ct.isClockwiseArc),0>E&&(Ct.xAxisRotation=-Ct.xAxisRotation,Ct.isClockwiseArc=!Ct.isClockwiseArc),Ct.radiusX*=Math.sqrt(a*a+x*x),Ct.radiusY*=Math.sqrt(y*y+E*E);break;default:Yt("Unknown Segment type: "+Ct.type)}}}}return this._isInvalidBounds=!0,this},Pt.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 qe.j:return se.Yb(x,E,b,z,y,a.x,a.y);case qe.u:var tt=be.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),be.free(tt),a;case qe.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 qe.o:return Cs(this,a,y,!0,!1);default:return!1}};function Cs(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,at,At,ft,pt=a.figures.s,xt=pt.length,Ct=0;Ct<xt;Ct++){var Mt=pt[Ct],Gt=!Mt.isEvenOdd;if(Mt.isFilled){if(E&&Mt.ca(z,y,x))return!0;var Ot=Mt.segments;ot=Mt.startX,at=Mt.startY;for(var Wt=ot,Zt=at,te=Ot.s,re=0;re<=Ot.length;re++){var me=void 0;if(re!==Ot.length){me=te[re];var ln=me.type;a=me.endX,ft=me.endY}else ln=Vr,a=Wt,ft=Zt;switch(ln){case os:if(Wt=Ca(z,y,tt,y,ot,at,Wt,Zt),isNaN(Wt))return!0;rt+=Wt,Wt=a,Zt=ft;break;case Vr:if(ot=Ca(z,y,tt,y,ot,at,a,ft),isNaN(ot))return!0;rt+=ot;break;case Es:At=se.Fo(ot,at,me.point1X,me.point1Y,me.point2X,me.point2Y,a,ft,tt,y,z,y,.5),rt+=At;break;case Oa:At=se.Fo(ot,at,(ot+2*me.point1X)/3,(at+2*me.point1Y)/3,(2*me.point1X+a)/3,(2*me.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=At;break;case zo:case ul:ln=me.type===zo?Pa(me,Mt):Al(me,Mt,ot,at);var Nn=ln.length;if(Nn===0){if(ot=Ca(z,y,tt,y,ot,at,me.type===zo?me.centerX:me.endX,me.type===zo?me.centerY:me.endY),isNaN(ot))return!0;rt+=ot;break}me=null;for(var Fn=0;Fn<Nn;Fn++){if(me=ln[Fn],Fn===0){if(At=Ca(z,y,tt,y,ot,at,me[0],me[1]),isNaN(At))return!0;rt+=At}At=se.Fo(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],tt,y,z,y,.5),rt+=At}me!==null&&(a=me[6],ft=me[7]);break;default:Yt("Unknown Segment type: "+me.type)}ot=a,at=ft}if(Gt){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(Mt.ca(z,y,b?x:x+2))return!0}return!1}function Ca(a,y,x,E,b,z,tt,rt){if(se.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var at=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,at>=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(z<rt){if(y<z||y>rt)return 0}else if(y<rt||y>z)return 0}else if(b<tt){if(at<b||at>tt)return 0}else if(at<tt||at>b)return 0;return 0<ot?1:-1}function _l(a,y,x,E){a=a.figures.s;for(var b=a.length,z=0;z<b;z++)if(a[z].ca(y,x,E))return!0;return!1}Pt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Ht),this.type===qe.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],at=ot.length;for(a=0;a<at;a++){var At=ot[a];if(tt+At>=z)return E=z-tt,E=At===0?0:E/At,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+=At}}return y},Pt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===qe.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var at=rt[a];if(z+at>=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+=at}}return NaN},Pt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===qe.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],at=ot.length;for(a=0;a<at;a++){var At=ot[a];if(tt+At>=z)return E=z-tt,E=At===0?0:E/At,At=x[rt],x=At[2*a],rt=At[2*a+1],b=At[2*a+2],a=At[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+=At}}return y},Pt.xx=function(a){if(this.type===qe.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<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=Ht.alloc();return se.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Ht.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===qe.u){tt=this.startX,rt=this.startY;var ot=this.endX;if(b=this.endY,tt!==ot||rt!==b){y=ot-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),ot),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),ot=Math.abs(E-ot),rt=Math.abs(a-rt),b=Math.abs(a-b);var at=Math.min(tt,ot,rt,b);if(at===rt)return E/z;if(at===ot)return(y+a)/z;if(at===b)return(2*y+x-E)/z;if(at===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Ht.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var At=at=0,ft=0;ft<ot;ft++)for(var pt=y[ft],xt=x[ft],Ct=pt.length,Mt=0;Mt<Ct;Mt+=2){var Gt=pt[Mt],Ot=pt[Mt+1];if(Mt!==0){se.qh(at,At,Gt,Ot,a.x,a.y,E);var Wt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);Wt<b&&(b=Wt,tt=rt,tt+=Math.sqrt((E.x-at)*(E.x-at)+(E.y-At)*(E.y-At))),rt+=xt[(Mt-2)/2]}at=Gt,At=Ot}return Ht.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function KA(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===qe.j)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.endY),y.push(E),b.push(Math.sqrt((a.startX-a.endX)*(a.startX-a.endX)+(a.startY-a.endY)*(a.startY-a.endY))),x.push(b);else if(a.type===qe.u)E.push(a.startX),E.push(a.startY),E.push(a.endX),E.push(a.startY),E.push(a.endX),E.push(a.endY),E.push(a.startX),E.push(a.endY),E.push(a.startX),E.push(a.startY),y.push(E),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),b.push(Math.abs(a.startX-a.endX)),b.push(Math.abs(a.startY-a.endY)),x.push(b);else if(a.type===qe.F){var z=new As;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new gr(zo);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=Pa(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var rt=0;rt<b;rt++){var ot=a[rt];se.Qe(tt,z,ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],.5,E),tt=ot[6],z=ot[7]}}y.push(E),x.push(cu(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,rt=tt,ot=z;for(var at=b.segments.s,At=at.length,ft=0;ft<At;ft++){var pt=at[ft];switch(pt.type){case os:4<=E.length&&(y.push(E),x.push(cu(E))),E=[],E.push(pt.endX),E.push(pt.endY),tt=pt.endX,z=pt.endY,rt=tt,ot=z;break;case Vr:E.push(pt.endX),E.push(pt.endY),tt=pt.endX,z=pt.endY;break;case Es:se.Qe(tt,z,pt.point1X,pt.point1Y,pt.point2X,pt.point2Y,pt.endX,pt.endY,.5,E),tt=pt.endX,z=pt.endY;break;case Oa:se.ep(tt,z,pt.point1X,pt.point1Y,pt.endX,pt.endY,.5,E),tt=pt.endX,z=pt.endY;break;case zo:var xt=Pa(pt,b),Ct=xt.length;if(Ct===0){E.push(pt.centerX),E.push(pt.centerY),tt=pt.centerX,z=pt.centerY;break}for(var Mt=0;Mt<Ct;Mt++){var Gt=xt[Mt];se.Qe(tt,z,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],z=Gt[7]}break;case ul:if(xt=Al(pt,b,tt,z),Ct=xt.length,Mt=pt.endX,Gt=pt.endY,Ct===0){E.push(Mt),E.push(Gt),tt=Mt,z=Gt;break}for(Mt=0;Mt<Ct;Mt++)Gt=xt[Mt],se.Qe(tt,z,Gt[2],Gt[3],Gt[4],Gt[5],Gt[6],Gt[7],.5,E),tt=Gt[6],z=Gt[7];break;default:Yt("Segment not of valid type: "+pt.type)}pt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(cu(E)))}}}function cu(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],rt=a[z+1];z!==0&&y.push(Math.sqrt(Jn(x,E,tt,rt))),x=tt,E=rt}return y}Pt.add=function(a){return this.ee.add(a),this},Pt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&he(this),this.fg=new ni(a,y,b,z).freeze(),this.gg=new ni(x,E,tt,rt).freeze(),this},Ze.Object.defineProperties(qe.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}},flattenedSegments:{get:function(){return KA(this),this.tk}},flattenedLengths:{get:function(){return KA(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===qe.j){a=Math.abs(this.endX-this.startX);var y=Math.abs(this.endY-this.startY);a=Math.sqrt(a*a+y*y)}else if(this.type===qe.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&he(this,a),this.na=a,a===qe.o?this.ee=new _t:(qe.V===null&&(qe.V=new _t().freeze()),this.ee=qe.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&he(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&he(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&he(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&he(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&he(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&he(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&he(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&he(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),qe.prototype.setSpots=qe.prototype.pm,qe.prototype.add=qe.prototype.add,qe.prototype.getFractionForPoint=qe.prototype.xx,qe.prototype.getPointAndAngleAlongPath=qe.prototype.Qu,qe.prototype.getAngleAlongPath=qe.prototype.wx,qe.prototype.getPointAlongPath=qe.prototype.Pu,qe.prototype.containsPoint=qe.prototype.ca,qe.prototype.transform=qe.prototype.transform,qe.prototype.rotate=qe.prototype.rotate,qe.prototype.scale=qe.prototype.scale,qe.prototype.offset=qe.prototype.offset,qe.prototype.normalize=qe.prototype.normalize,qe.prototype.computeBoundsWithoutOrigin=qe.prototype.ix,qe.prototype.equalsApprox=qe.prototype.Xa,qe.className="Geometry",qe.j=new Be(qe,"Line",0),qe.u=new Be(qe,"Rectangle",1),qe.F=new Be(qe,"Ellipse",2),qe.o=new Be(qe,"Path",3),qe.V=null,qe.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",qe.className="Geometry",qe.stringify=qe.ia,qe.fillPath=qe.nb,qe.parse=qe.parse,qe.Line=qe.j,qe.Rectangle=qe.u,qe.Ellipse=qe.F,qe.Path=qe.o;function As(a,y,x,E,b){rn(this),x===void 0&&(x=!0),E===void 0&&(E=!0),b===void 0&&(b=!1),this.l=2|(x?4:0)|(E?8:0)|(b?16:0),a!==void 0?this.od=a:this.od=0,y!==void 0?this.pd=y:this.pd=0,this.pl=new _t,this.sr=this.pl.Ja,this.fw=null}As.prototype.copy=function(){var a=new As;a.l=this.l&-2,a.od=this.od,a.pd=this.pd;for(var y=this.pl.s,x=y.length,E=a.pl,b=0;b<x;b++){var z=y[b].copy();E.add(z)}return a.sr=this.sr,a.fw=this.fw,a},Pt=As.prototype,Pt.Xa=function(a){if(!(a instanceof As&&se.B(this.startX,a.startX)&&se.B(this.startY,a.startY)))return!1;var y=this.segments.s;a=a.segments.s;var x=y.length;if(x!==a.length)return!1;for(var E=0;E<x;E++)if(!y[E].Xa(a[E]))return!1;return!0},Pt.toString=function(a){a===void 0&&(a=-1);for(var y=0>a?"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;b<E;b++)y+=" "+x[b].toString(a);return y},Pt.freeze=function(){this._isFrozen=!0;var a=this.segments;a.freeze();var y=a.s;a=a.length;for(var x=0;x<a;x++)y[x].freeze();return this},Pt.ka=function(){this._isFrozen=!1;var a=this.segments;a.ka(),a=a.s;for(var y=a.length,x=0;x<y;x++)a[x].ka();return this},Pt.Zu=function(){if(this._isInvalidBounds)return!0;var a=this.segments;if(this.sr!==a.Ja)return!0;a=a.s;for(var y=a.length,x=0;x<y;x++)if(a[x]._isInvalidBounds)return!0;return!1},Pt.add=function(a){return this.pl.add(a),this},Pt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,at=0;at<ot;at++){var At=rt[at];switch(At.type){case os:z=At.endX,tt=At.endY,E=At.endX,b=At.endY;break;case Vr:if(se.Yb(E,b,At.endX,At.endY,x,a,y))return!0;E=At.endX,b=At.endY;break;case Es:if(se.cs(E,b,At.point1X,At.point1Y,At.point2X,At.point2Y,At.endX,At.endY,.5,a,y,x))return!0;E=At.endX,b=At.endY;break;case Oa:if(se.jv(E,b,At.point1X,At.point1Y,At.endX,At.endY,.5,a,y,x))return!0;E=At.endX,b=At.endY;break;case zo:case ul:var ft=At.type===zo?Pa(At,this):Al(At,this,E,b),pt=ft.length,xt=At.type===zo?At.centerX:At.endX,Ct=At.type===zo?At.centerY:At.endY;if(pt===0){if(se.Yb(E,b,xt,Ct,x,a,y))return!0;E=xt,b=Ct;break}for(xt=null,Ct=0;Ct<pt;Ct++)if(xt=ft[Ct],Ct===0&&se.Yb(E,b,xt[0],xt[1],x,a,y)||se.cs(xt[0],xt[1],xt[2],xt[3],xt[4],xt[5],xt[6],xt[7],.5,a,y,x))return!0;xt!==null&&(E=xt[6],b=xt[7]);break;default:Yt("Unknown Segment type: "+At.type)}if(At.isClosed&&(E!==z||b!==tt)&&se.Yb(E,b,z,tt,x,a,y))return!0}return!1},Ze.Object.defineProperties(As.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}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&he(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&he(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&he(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&he(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&he(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&he(this,a),this.pl=a,this._isInvalidBounds=!0}}}),As.prototype.add=As.prototype.add,As.prototype.equalsApprox=As.prototype.Xa,As.className="PathFigure";function gr(a,y,x,E,b,z,tt,rt){rn(this),a===void 0&&(a=Vr),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===ul?(a=z%360,0>a&&(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===zo&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===zo&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}gr.prototype.copy=function(){var a=new gr;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},Pt=gr.prototype,Pt.Xa=function(a){if(!(a instanceof gr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case os:case Vr:return se.B(this.endX,a.endX)&&se.B(this.endY,a.endY);case Es: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 Oa: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 zo: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 ul: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}},Pt.qb=function(a){a.classType===gr&&(this.type=a)},Pt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case os:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Vr:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Es: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 Oa: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 zo: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 ul: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":"")},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.close=function(){return this.isClosed=!0,this};function Pa(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<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=Fi.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),qe.Ha(z,tt),Fi.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function Al(a,y,x,E){function b(Mt,Gt,Ot,Wt){return(Mt*Wt<Gt*Ot?-1:1)*Math.acos((Mt*Ot+Gt*Wt)/(Math.sqrt(Mt*Mt+Gt*Gt)*Math.sqrt(Ot*Ot+Wt*Wt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,rt=a.isLargeArc,ot=a.isClockwiseArc,at=a.Dc,At=a.Ec,ft=Math.cos(tt),pt=Math.sin(tt),xt=ft*(x-at)/2+pt*(E-At)/2;tt=-pt*(x-at)/2+ft*(E-At)/2;var Ct=xt*xt/(y*y)+tt*tt/(z*z);return 1<Ct&&(y*=Math.sqrt(Ct),z*=Math.sqrt(Ct)),Ct=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*xt*xt)/(y*y*tt*tt+z*z*xt*xt)),isNaN(Ct)&&(Ct=0),rt=Ct*y*tt/z,Ct=Ct*-z*xt/y,isNaN(rt)&&(rt=0),isNaN(Ct)&&(Ct=0),x=(x+at)/2+ft*rt-pt*Ct,E=(E+At)/2+pt*rt+ft*Ct,At=b(1,0,(xt-rt)/y,(tt-Ct)/z),ft=(xt-rt)/y,at=(tt-Ct)/z,xt=(-xt-rt)/y,rt=(-tt-Ct)/z,tt=b(ft,at,xt,rt),xt=(ft*xt+at*rt)/(Math.sqrt(ft*ft+at*at)*Math.sqrt(xt*xt+rt*rt)),-1>=xt?tt=Math.PI:1<=xt&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,xt=y>z?z/y:1,y=se.jx(0,0,y>z?y:z,At,At+tt,!0),z=Fi.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,xt),qe.Ha(y,z),Fi.free(z),a.ae=y,a.ae}Ze.Object.defineProperties(gr.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&&he(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&he(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&he(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&he(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&he(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&he(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&he(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&he(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&he(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&wn(a,">= zero",gr,"radiusX"),this._isFrozen&&he(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&wn(a,">= zero",gr,"radiusY"),this._isFrozen&&he(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&he(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&&he(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&he(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&&he(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&&he(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),gr.prototype.equalsApprox=gr.prototype.Xa;var os=new Be(gr,"Move",0),Vr=new Be(gr,"Line",1),Es=new Be(gr,"Bezier",2),Oa=new Be(gr,"QuadraticBezier",3),zo=new Be(gr,"Arc",4),ul=new Be(gr,"SvgArc",4);gr.className="PathSegment",gr.Move=os,gr.Line=Vr,gr.Bezier=Es,gr.QuadraticBezier=Oa,gr.Arc=zo,gr.SvgArc=ul;function Is(){this.H=null,this.xu=new Ht(0,0).freeze(),this.mt=new Ht(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}Is.prototype.copy=function(){var a=new Is;return this.clone(a)},Is.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},Is.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},Is.prototype.So=function(a,y){var x=this.diagram;return x===null||Gc(x,a,y),y},Is.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Gc(x,a,y),y.assign(x.Ps(y))),y},Ze.Object.defineProperties(Is.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}}}),Is.prototype.getMultiTouchDocumentPoint=Is.prototype.Bz,Is.prototype.getMultiTouchViewPoint=Is.prototype.So,Is.className="InputEvent";function fu(){this.H=null,this.xa="",this.ar=this.Lr=null}fu.prototype.copy=function(){var a=new fu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},fu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Ze.Object.defineProperties(fu.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}}}),fu.className="DiagramEvent";function yo(){this.Fm=fo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}yo.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},yo.prototype.copy=function(){var a=new yo;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=Ne(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Ne(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Ne(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Ne(y)&&typeof y.J=="function"?y.J():y,a},yo.prototype.qb=function(a){a.classType===yo&&(this.change=a)},yo.prototype.toString=function(){var a="";return a=this.change===da?a+"* ":this.change===fo?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===da?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Yi(this.object)),this.oldValue!==null&&(a+=" old: "+Yi(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Yi(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},yo.prototype.I=function(a){return a?this.oldValue:this.newValue},yo.prototype.Dz=function(a){return a?this.oldParam:this.newParam},yo.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},yo.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},yo.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},yo.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Ze.Object.defineProperties(yo.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===da&&(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}}}),yo.prototype.redo=yo.prototype.redo,yo.prototype.canRedo=yo.prototype.canRedo,yo.prototype.undo=yo.prototype.undo,yo.prototype.canUndo=yo.prototype.canUndo,yo.prototype.getParam=yo.prototype.Dz,yo.prototype.getValue=yo.prototype.I,yo.prototype.clear=yo.prototype.clear;var da=new Be(yo,"Transaction",-1),fo=new Be(yo,"Property",0),Qo=new Be(yo,"Insert",1),ts=new Be(yo,"Remove",2);yo.className="ChangedEvent",yo.Transaction=da,yo.Property=fo,yo.Insert=Qo,yo.Remove=ts;function ps(){this.o=new _t().freeze(),this.xa="",this.j=!1}ps.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0<a){a=this.changes.count;for(var x=0;x<a;x++){var E=this.changes.M(x);E!==null&&(y+=`
|
|
`+E.toString())}}return y},ps.prototype.clear=function(){var a=this.changes;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),a.freeze()},ps.prototype.canUndo=function(){return this.isComplete},ps.prototype.undo=function(){if(this.canUndo())for(var a=this.changes.count-1;0<=a;a--){var y=this.changes.M(a);y!==null&&y.undo()}},ps.prototype.canRedo=function(){return this.isComplete},ps.prototype.redo=function(){if(this.canRedo())for(var a=this.changes.count,y=0;y<a;y++){var x=this.changes.M(y);x!==null&&x.redo()}},ps.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new vn,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===fo&&E.object){var b=y.get(E.object);b||(b=new vn,y.set(E.object,b));var z=b.get(E.propertyName);z===null?b.set(E.propertyName,-1):(0<z&&a.cd(z,null),b.set(E.propertyName,x))}}for(x=y=0;x<a.count;x++)E=a.M(x),E!==null&&(x>y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},Ze.Object.defineProperties(ps.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}}}),ps.prototype.optimize=ps.prototype.ak,ps.prototype.redo=ps.prototype.redo,ps.prototype.canRedo=ps.prototype.canRedo,ps.prototype.undo=ps.prototype.undo,ps.prototype.canUndo=ps.prototype.canUndo,ps.prototype.clear=ps.prototype.clear,ps.className="Transaction";function Bo(){this.Pt=new le,this.Jd=!1,this.u=new _t().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new _t().freeze(),this.hl=new _t,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Bo.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;E<x;E++)0<E&&(y+=" "),y+=this.nestedTransactionNames.M(E);if(y+="]",a!==void 0&&0<a)for(x=this.history.count,E=0;E<x;E++)y+=`
|
|
`+this.history.M(E).toString(a-1);return y},Bo.prototype.clear=function(){var a=this.history;a.ka();for(var y=a.count-1;0<=y;y--){var x=a.M(y);x!==null&&x.clear()}a.clear(),this.Ce=-1,a.freeze(),this.Fe=!1,this.Np=null,this.bi=0,this.Ie.ka(),this.Ie.clear(),this.Ie.freeze(),this.hl.clear(),this.Dt=this.rq=this.Gt=this.Ft=!1},Bo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Pt=Bo.prototype,Pt.Xw=function(a){this.Pt.add(a)},Pt.Rx=function(a){this.Pt.remove(a)},Pt.Ea=function(a){if(a===void 0&&(a=""),a===null&&(a=""),this.isUndoingRedoing)return!1;this.tt===!0&&(this.tt=!1,this.bi++,this.isInternalTransaction||this.Ob("StartingFirstTransaction",a,this.currentTransaction),0<this.bi&&this.bi--),this.isEnabled&&(this.Ie.ka(),this.Ie.add(a),this.Ie.freeze(),this.currentTransaction===null?this.hl.add(0):this.hl.add(this.currentTransaction.changes.count)),this.bi++;var y=this.transactionLevel===1;return y&&(this.isInternalTransaction||this.Ob("StartedTransaction",a,this.currentTransaction)),y},Pt.eb=function(a){return a===void 0&&(a=""),eh(this,!0,a)},Pt.Kf=function(){return eh(this,!1,"")};function eh(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&un("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<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=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}Pt.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()}},Bo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Bo.prototype.undo=function(){if(this.canUndo()){var a=this.transactionToUndo;try{this.Fe=!0,this.Ob("StartingUndo","Undo",a),this.Ce--,a.undo()}catch(y){un("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Bo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Bo.prototype.redo=function(){if(this.canRedo()){var a=this.transactionToRedo;try{this.Fe=!0,this.Ob("StartingRedo","Redo",a),this.Ce++,a.redo()}catch(y){un("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Bo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new yo;for(E.change=da,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Bo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new ps);var x=a.copy();y=y.changes,y.ka(),y.add(x),y.freeze(),this.checksTransactionLevel&&0>=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||un("Change not within a transaction: "+x.toString()))}},Bo.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},Ze.Object.defineProperties(Bo.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.historyIndex<this.history.count-1?this.history.M(this.historyIndex+1):null}},isUndoingRedoing:{get:function(){return this.Fe}},history:{get:function(){return this.u}},maxHistoryLength:{get:function(){return this.o},set:function(a){this.o=a}},historyIndex:{get:function(){return this.Ce}},currentTransaction:{get:function(){return this.Np}},transactionLevel:{get:function(){return this.bi}},isInTransaction:{get:function(){return 0<this.bi}},checksTransactionLevel:{get:function(){return this.j},set:function(a){this.j=a}},nestedTransactionNames:{get:function(){return this.Ie}},isPendingClear:{get:function(){return this.Ft},set:function(a){this.Ft=a}},isPendingUnmodified:{get:function(){return this.Gt},set:function(a){this.Gt=a}},isInternalTransaction:{get:function(){return this.Dt},set:function(a){this.Dt=a}},isJustDiscarded:{get:function(){return this.rq}}}),Bo.prototype.handleChanged=Bo.prototype.Tu,Bo.prototype.redo=Bo.prototype.redo,Bo.prototype.undo=Bo.prototype.undo,Bo.prototype.canUndo=Bo.prototype.canUndo,Bo.prototype.discardHistoryAfterIndex=Bo.prototype.lx,Bo.prototype.rollbackTransaction=Bo.prototype.Kf,Bo.prototype.commitTransaction=Bo.prototype.eb,Bo.prototype.startTransaction=Bo.prototype.Ea,Bo.prototype.removeModel=Bo.prototype.Rx,Bo.prototype.addModel=Bo.prototype.Xw,Bo.prototype.clear=Bo.prototype.clear,Bo.className="UndoManager";function ur(){rn(this),this.H=AA,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Is,this.Zr=-1}ur.prototype.toString=function(){return this.name!==""?this.name+" Tool":On(this.constructor)},ur.prototype.updateAdornments=function(){},ur.prototype.canStart=function(){return this.isEnabled},ur.prototype.doStart=function(){},ur.prototype.doActivate=function(){this.isActive=!0},ur.prototype.doDeactivate=function(){this.isActive=!1},ur.prototype.doStop=function(){},ur.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},ur.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},ur.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},ur.prototype.doMouseMove=function(){},ur.prototype.doMouseUp=function(){this.stopTool()},ur.prototype.doMouseWheel=function(){},ur.prototype.canStartMultiTouch=function(){return!0},ur.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ht.allocAt(NaN,NaN)),E=y.So(1,Ht.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}Ht.free(x),Ht.free(E)},ur.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ht.allocAt(NaN,NaN)),E=y.So(1,Ht.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new Ht((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var rt=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=rt}y.bubbles=!1}Ht.free(x),Ht.free(E)},ur.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},ur.prototype.doKeyUp=function(){},ur.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},ur.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},ur.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Ur?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(Ur?y.meta:y.control)||y.shift||a.clearSelection()}},ur.prototype.standardMouseClick=function(a,y){a===void 0&&(a=null),y===void 0&&(y=function(b){return!b.layer.isTemporary});var x=this.diagram,E=x.lastInput;return a=x.ic(E.documentPoint,a,y),E.targetObject=a,nh(a,E,x),E.handled};function nh(a,y,x){if(y.handled=!1,a===null||a.If()){var E=0;y.left?E=y.clickCount===1?1:y.clickCount===2?2:1:y.right&&y.clickCount===1&&(E=3);var b="ObjectSingleClicked";if(a!==null){switch(E){case 1:b="ObjectSingleClicked";break;case 2:b="ObjectDoubleClicked";break;case 3:b="ObjectContextClicked"}E!==0&&x.R(b,a)}else{switch(E){case 1:b="BackgroundSingleClicked";break;case 2:b="BackgroundDoubleClicked";break;case 3:b="BackgroundContextClicked"}E!==0&&x.R(b)}if(a!==null)for(;a!==null;){switch(x=null,E){case 1:x=a.click;break;case 2:x=a.doubleClick?a.doubleClick:a.click;break;case 3:x=a.contextClick}if(x!==null&&(x(y,a),y.handled))break;a=a.panel}else{switch(a=null,E){case 1:a=x.click;break;case 2:a=x.doubleClick?x.doubleClick:x.click;break;case 3:a=x.contextClick}a!==null&&a(y)}}}ur.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var rt=z.mouseLeave;if(rt!==null&&(E===z||E!==null&&E.rg(z)||(rt(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},ur.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},ur.prototype.doCurrentObjectChanged=function(){},ur.prototype.standardMouseWheel=function(){var a=this.diagram,y=a.lastInput,x=y.delta;if(x!==0&&a.documentBounds.w()){var E=a.commandHandler,b=a.toolManager.mouseWheelBehavior;if(E!==null&&(b===Ec&&!y.shift||b===VA&&y.control))(0<x?E.canIncreaseZoom():E.canDecreaseZoom())&&(b=a.zoomPoint,a.zoomPoint=y.viewPoint,0<x?E.increaseZoom():E.decreaseZoom(),a.zoomPoint=b),y.bubbles=!1;else if(b===Ec&&y.shift||b===VA&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var rt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(rt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(rt,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:rt="pixel";break;case 1:rt="line";break;case 2:rt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(rt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(rt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},ur.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},ur.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Bi(function(){x.doWaitAfter(E)},a)},ur.prototype.cancelWaitAfter=function(){this.Zr!==-1&&He.clearTimeout(this.Zr),this.Zr=-1},ur.prototype.doWaitAfter=function(){},ur.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof vr);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},ur.prototype.isBeyondDragSize=function(a,y){var x=this.diagram;a===void 0&&(a=x.firstInput.viewPoint),y===void 0&&(y=x.lastInput.viewPoint);var E=x.toolManager.dragSize,b=E.width;return E=E.height,x.firstInput.isTouchEvent&&(b+=6,E+=6),Math.abs(y.x-a.x)>b||Math.abs(y.y-a.y)>E},Ze.Object.defineProperties(ur.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}}}),ur.prototype.startTransaction=ur.prototype.Ea,ur.className="Tool";function Ao(){ur.call(this),this.name="ToolManager",this.hb=new _t,this.ob=new _t,this.Hb=new _t,this.F=this.V=850,this.o=new Je(2,2).ja(),this.Ha=5e3,this.ia=VA,this.u=vf,this.Mp=this.j=null,this.zj=-1}Te(Ao,ur),Ao.prototype.initializeStandardTools=function(){},Ao.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof vr&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Ao.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===_A&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===PA){y.bubbles=!0;return}if(this.gestureBehavior===_A)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseDown());return}}a.lastInput.button===1&&(this.mouseWheelBehavior===VA?this.mouseWheelBehavior=Ec:this.mouseWheelBehavior===Ec&&(this.mouseWheelBehavior=VA)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Ao.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===PA){y.bubbles=!0;return}if(this.gestureBehavior===_A)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomMove();return}}if(this.isActive)for(var x=this.mouseMoveTools.length,E=0;E<x;E++){var b=this.mouseMoveTools.M(E);if(b.diagram=this.diagram,b.canStart()){a.doFocus(),a.currentTool=b,a.currentTool===b&&(b.isActive||b.doActivate(),b.doMouseMove());return}}ig(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function ig(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Ao.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof vr&&(y===a||y.rg(a))||this.hideToolTip()},Ao.prototype.doWaitAfter=function(a){var y=this.diagram;y.ta!==null&&(this.doMouseHover(),this.isActive||this.doToolTip(),a.isTouchEvent&&!y.lastInput.handled&&(a=a.copy(),a.button=2,a.buttons=2,y.lastInput=a,y.qu=!0,y.doMouseUp()))},Ao.prototype.doMouseHover=function(){var a=this.diagram,y=a.lastInput;y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null));var x=y.targetObject;if(x!==null)for(y.handled=!1;x!==null&&(a=this.isActive?x.mouseHold:x.mouseHover,!(a!==null&&(a(y,x),y.handled)));)x=x.panel;else x=this.isActive?a.mouseHold:a.mouseHover,x!==null&&x(y)},Ao.prototype.doToolTip=function(){var a=this.diagram,y=a.lastInput;if(y.targetObject===null&&(y.targetObject=a.ic(y.documentPoint,null,null)),y=y.targetObject,y!==null){if(a=this.currentToolTip,!(a instanceof vr)||y!==a&&!y.rg(a)){for(;y!==null;){if(a=y.toolTip,a!==null){this.showToolTip(a,y);return}y=y.panel}this.hideToolTip()}}else y=a.toolTip,y!==null?this.showToolTip(y,null):this.hideToolTip()},Ao.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof vr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category="ToolTip",a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionToolTip(a,y)}else a instanceof iA&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(He.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=Bi(function(){b.hideToolTip()},a)}},Ao.prototype.positionToolTip=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y=x.y+20/y.scale+E.height>b.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.y<b.y&&(x.y=b.y),a.position=x}},Ao.prototype.hideToolTip=function(){this.zj!==-1&&(He.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof vr?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof iA&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Ao.prototype.doMouseUp=function(){this.cancelWaitAfter();var a=this.diagram;if(this.isActive)for(var y=this.mouseUpTools.length,x=0;x<y;x++){var E=this.mouseUpTools.M(x);if(E.diagram=this.diagram,E.canStart()){a.doFocus(),a.currentTool=E,a.currentTool===E&&(E.isActive||E.doActivate(),E.doMouseUp());return}}a.doFocus(),this.doDeactivate()},Ao.prototype.doMouseWheel=function(){this.standardMouseWheel()},Ao.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Ao.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Ao.prototype.findTool=function(a){for(var y=this.mouseDownTools.length,x=0;x<y;x++){var E=this.mouseDownTools.M(x);if(E.name===a)return E}for(y=this.mouseMoveTools.length,x=0;x<y;x++)if(E=this.mouseMoveTools.M(x),E.name===a)return E;for(y=this.mouseUpTools.length,x=0;x<y;x++)if(E=this.mouseUpTools.M(x),E.name===a)return E;return null},Ao.prototype.replaceTool=function(a,y){y!==null&&(y.diagram=this.diagram);for(var x=this.mouseDownTools.length,E=0;E<x;E++){var b=this.mouseDownTools.M(E);if(b.name===a)return y!==null?this.mouseDownTools.cd(E,y):this.mouseDownTools.mb(E),b}for(x=this.mouseMoveTools.length,E=0;E<x;E++)if(b=this.mouseMoveTools.M(E),b.name===a)return y!==null?this.mouseMoveTools.cd(E,y):this.mouseMoveTools.mb(E),b;for(x=this.mouseUpTools.length,E=0;E<x;E++)if(b=this.mouseUpTools.M(E),b.name===a)return y!==null?this.mouseUpTools.cd(E,y):this.mouseUpTools.mb(E),b;return null},Ao.prototype.gb=function(a,y,x){y!==null&&(y.name=a,y.diagram=this.diagram),this.findTool(a)?this.replaceTool(a,y):y!==null&&x.add(y)},Ze.Object.defineProperties(Ao.prototype,{mouseWheelBehavior:{get:function(){return this.ia},set:function(a){this.ia=a}},gestureBehavior:{get:function(){return this.u},set:function(a){this.u=a}},currentToolTip:{get:function(){return this.j},set:function(a){this.j=a,this.Mp=a!==null&&a instanceof vr?a.adornedPart:null}},mouseDownTools:{get:function(){return this.hb}},mouseMoveTools:{get:function(){return this.ob}},mouseUpTools:{get:function(){return this.Hb}},hoverDelay:{get:function(){return this.V},set:function(a){this.V=a}},holdDelay:{get:function(){return this.F},set:function(a){this.F=a}},dragSize:{get:function(){return this.o},set:function(a){this.o=a.J()}},toolTipDuration:{get:function(){return this.Ha},set:function(a){this.Ha=a}}}),Ao.prototype.replaceStandardTool=Ao.prototype.gb;var VA=new Be(Ao,"WheelScroll",0),Ec=new Be(Ao,"WheelZoom",1),sd=new Be(Ao,"WheelNone",2),vf=new Be(Ao,"GestureZoom",3),_A=new Be(Ao,"GestureCancel",4),PA=new Be(Ao,"GestureNone",5);Ao.className="ToolManager",Ao.WheelScroll=VA,Ao.WheelZoom=Ec,Ao.WheelNone=sd,Ao.GestureZoom=vf,Ao.GestureCancel=_A,Ao.GestureNone=PA;function Co(){ur.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new Ht(NaN,NaN),this.Fr=new Ht,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new le().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var FA;Te(Co,ur),Co.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly&&!a.allowDragOut||!a.allowMove&&!a.allowCopy&&!a.allowDragOut||!a.allowSelect)return!1;var y=a.lastInput;return!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.isTouchEvent&&y.timestamp-a.firstInput.timestamp<this.Ik)?!1:this.findDraggablePart()!==null},Co.prototype.findDraggablePart=function(){var a=this.diagram;if(a=a.Ol(a.firstInput.documentPoint,!1),a===null)return null;for(;a!==null&&!a.canSelect();)a=a.containingGroup;return a!==null&&(a.canMove()||a.canCopy())?a:null},Co.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(Ur?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Co.prototype.doActivate=function(){var a=this.diagram;this.Bn=null,this.currentPart===null&&this.standardMouseSelect();var y=this.currentPart;y!==null&&(y.canMove()||y.canCopy())&&(a.Fu(!0),us=null,this.isActive=!0,this.tl.set(a.position),yf(this,a.selection),this.Cg.length=0,a.animationManager.Cc(),this.draggedParts=this.computeEffectiveCollection(a.selection,this.dragOptions),this.Sw=this.diagram.layout.isRealtime,this.diagram.layout.isRealtime=!1,a.Ns=!0,a.Gf("temporaryPixelRatio")===!0&&30<a.$w&&Aa(a),Kc(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,us=this,mu=this.diagram,this.doSimulatedDragOut()))};function yf(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof en?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Xa,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Co.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Co.prototype.Pd=function(a){return a===void 0?new kA(Ii):this.isGridSnapEnabled?new kA(new Ht(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new kA(a.copy())},Co.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),ih(this),ku(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<FA.count){for(var y=FA,x=y.length,E=0;E<x;E++){var b=y.M(E);du(b),Ql(b),ih(b),b.diagram.ug()}y.clear()}du(this),this.tl.h(NaN,NaN),mu!==null&&(mu.currentCursor=""),us=mu=null,Ql(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Hh(a,!0)},Co.prototype.stopTransaction=function(){var a=this.diagram,y=ur.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function ih(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,ad(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Mh(){var a=us;Ql(a),eA(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Co.prototype.doCancel=function(){Ql(this),eA(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Co.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Co.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function WA(a,y){if(a.copiedParts===null){var x=a.diagram;if((!y||!x.isReadOnly&&!x.isModelReadOnly)&&a.draggedParts!==null){var E=x.undoManager;for(E.isEnabled&&E.isInTransaction?E.currentTransaction!==null&&0<E.currentTransaction.changes.count&&(x.undoManager.Kf(),x.Ea("Drag")):eA(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new vn,E=a.draggedParts.iterator;E.next();){var b=E.key;if(b.Zc()&&b.canCopy()){var z=y.I(b);z!==null&&(z.location=b.location,z.Va(),x.add(z,a.Pd(z.location)))}}for(y=y.iterator;y.next();)E=y.value,E instanceof en&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,yf(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,cc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Ql(a){var y=a.diagram;if(a.copiedParts!==null){if(y.Is(a.copiedParts.Lf(),!1),a.copiedParts=null,a.draggedParts!==null)for(var x=a.draggedParts.iterator;x.next();)x.key instanceof en&&(x.value.point=new Ht(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function du(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function tA(a,y,x){var E=a.diagram,b=a.startPoint,z=Ht.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Ht.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Aa(E),E.hk())}Co.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&fh(E,a,y,this.dragOptions,x)};function eA(a){if(a.draggedParts!==null){for(var y=a.diagram,x=a.draggedParts.iterator;x.next();){var E=x.key;E.Zc()&&(E.location=x.value.point)}for(x=a.draggedParts.iterator;x.next();)if(E=x.key,E instanceof en&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),cc(E,-b.x,-b.y)}y.bd()}}function wf(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),gu(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=ad(a,b,E),!a.isActive&&us===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof Ti)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&us===null||(a.doDragOver(y,E),!a.isActive&&us===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}Co.prototype.findDragOverObject=function(a){var y=this;return LA(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof vr||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Co.prototype.doUpdateCursor=function(a){var y=this.diagram;(a===null||this.Bn!==a)&&(!this.diagram.currentTool.isActive||this.mayCopy()?y.currentCursor=this.copyCursor:this.mayMove()?y.currentCursor=this.moveCursor:this.mayDragOut()&&(y.currentCursor=this.nodropCursor))};function ad(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var rt=a.Cg[tt],ot=rt.mouseDragLeave;if(ot!==null&&(ot(y,rt,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&us===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=ld(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],rt=tt.mouseDragEnter,rt===null||(rt(y,tt,z),E=!0,!y.handled));x++);return E}function ld(a){var y=a.panel;return y!==null?y:a instanceof ei&&!(a instanceof Ti)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function rg(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(at){return E.findValidLinkablePort(at,x)});a=Ht.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var rt=b.value;if(rt.part!==null){var ot=rt.ga(Ui,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Ht.free(a),tt}function gu(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=rg(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=rg(a,x.i(x.pointsCount-1),!0),rt!==null&&(ot=rt.part)),b.isValidLink(tt,z,ot,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=ot,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)):Sf(b,tt,z,ot,rt):Sf(b,null,null,null,null)}}}}Co.prototype.doDragOver=function(){};function pu(a,y){var x=a.diagram;a.dragsLink&&gu(a,!0),ih(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;Jg(a,b,z),z=ld(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||us!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof fn&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||us!==null){for(a=be.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof fn&&qg(x,E,a);be.free(a)}}}function Jg(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Ti||(x=a.mouseDrop,x!==null&&x(y))}function qg(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 en},!0,function(b){return b instanceof en},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Co.prototype.doDropOnto=function(){},Co.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()?(WA(this,!1),Kc(a,this.copiedParts),tA(this,this.copiedParts,!1),ku(a,this.copiedParts)):this.mayMove()?(Ql(this),tA(this,this.draggedParts,!0)):this.mayDragOut()?(WA(this,!1),tA(this,this.copiedParts,!1)):Ql(this),wf(this,a.lastInput.documentPoint))}},Co.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?(Ql(this),WA(this,!0),Kc(a,this.copiedParts),tA(this,this.copiedParts,!1),ku(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,Ql(this),this.mayMove()&&(tA(this,this.draggedParts,!0),wf(this,a.lastInput.documentPoint))),this.Ym=!0,pu(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&$g(this),a.Ya(),ku(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Co.prototype.simulatedMouseMove=function(a,y,x){if(us===null)return!1;var E=us.diagram;x instanceof ge||(x=null);var b=mu;return x!==b&&(b!==null&&b!==E&&(b.ug(),us.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),mu=x,x!==null&&x!==E&&(Mh(),b=x.toolManager.findTool("Dragging"),b!==null&&(FA.contains(b)||FA.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&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!1,E.doSimulatedDragOver()),!0)},Co.prototype.simulatedMouseUp=function(a,y,x){if(us===null)return!1;var E=mu,b=us.diagram;if(x===null)return us.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),us.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;mu=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Mh(),FA.contains(E)||FA.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new Ht),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=us,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function $g(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof fn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Co.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Ur?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Co.prototype.mayDragOut=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(!a.allowDragOut||!a.allowCopy||a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},Co.prototype.mayMove=function(){var a=this.diagram;if(a.isReadOnly||!a.allowMove)return!1;for(a=a.selection.iterator;a.next();)if(a.value.canMove())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canMove())},Co.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Co.prototype.Az=function(){return us},Co.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=us;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Co.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),ga(a),a.animationManager.Cc(),a=us,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Co.prototype.doSimulatedDragLeave=function(){var a=us;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Co.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=us;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;og(this,y.draggedParts.Lf(),!1,a.firstInput),tA(this,this.copiedParts,!1),wf(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Co.prototype.doSimulatedDrop=function(){var a=this.diagram,y=us;if(y!==null){var x=y.diagram;if(y.Ym=!0,Ql(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),og(this,y.draggedParts.Lf(),!0,a.lastInput),tA(this,this.copiedParts,!1);var E=new le;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),pu(this,a.lastInput.documentPoint),a.Ya(),this.copiedParts!==null&&(this.transactionResult="ExternalCopy"),this.copiedParts=null,a.doFocus(),a.R("ExternalObjectsDropped",E,x),this.stopTransaction(),a.R("ChangedSelection",a.selection)}a.animationManager.Dm=!1};function og(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=be.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var at=ot.value;if(at.isVisible()){var At=at.location;at=At.x,At=At.y,isNaN(at)||isNaN(At)||(at<E&&(E=at),At<b&&(b=At),at>tt&&(tt=at),At>rt&&(rt=At))}}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,be.free(z),z=a.Fr,tt=new vn,rt=Ht.alloc(),ot=y.iterator;ot.next();)at=ot.value,at instanceof en&&at.canCopy()&&(At=x.I(at),At!==null&&(At.points=at.points,cc(At,z.x-E,z.y-b),At.suspendsRouting=!0,tt.add(At,a.Pd())));for(y=y.iterator;y.next();)at=y.value,at.Zc()&&at.canCopy()&&(ot=x.I(at),ot!==null&&(at=at.location,rt.h(z.x-(E-at.x),z.y-(b-at.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Ht.free(rt),a.copiedParts=tt,yf(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,cc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Co.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Co.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Ht},Ze.Object.defineProperties(Co.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}}}),Co.prototype.getDraggingSource=Co.prototype.Az;var us=null,mu=null;Co.className="DraggingTool",FA=new _t,hn("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Ao.prototype.doCancel=function(){us!==null&&us.doCancel(),ur.prototype.doCancel.call(this)};function To(){ur.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new en,y=new Oi;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Oi,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new fn,y=new Oi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=fr,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new fn,y=new Oi,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=fr,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 vn,this.Of=this.gj=this.Pf=null}Te(To,ur),To.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},To.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=Je.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,Je.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Ui,z=Ht.alloc(),x.location=y.ga(Ui,z),Ht.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},To.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=fr,y.fromSpot=$i,y.toSpot=$i),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},To.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},To.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof fn){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)}},To.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof fn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof fn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},To.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 fn){var ot=tt.ga(Ui,Ht.alloc()),at=x.x-ot.x,At=x.y-ot.y;Ht.free(ot),ot=at*at+At*At,ot<E&&(at=this.validPortsCache.I(tt),at!==null?at&&(y=tt,E=ot):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,rt,tt)||!a&&this.isValidLink(rt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=ot):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof fn&&(x.layer===null||x.layer.allowLink))?y:null},To.prototype.isValidFrom=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.fromLinkable!==!0))return!1;var x=y.fromMaxLinks;if(1/0>x){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},To.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},To.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},To.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof fn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof fn))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},To.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)},To.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 le;return E.add(a),Xs(this,x,y,E)};function Xs(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Xs(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Xs(a,y.labeledLink,x,E))))}To.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!==Xc){if(E===Rf){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!oa(this,a,y,x,!0)}if(E===kd){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!oa(this,a,y,x,!0)}if(E===Zh)return a===y?a=!0:(E=new le,E.add(y),a=sa(this,E,a,y,x)),!a;if(E===Jh)return!oa(this,a,y,x,!1);if(E===Hf)return a===y?a=!0:(E=new le,E.add(y),a=vu(this,E,a,y,x)),!a}return!0};function oa(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&&oa(a,tt,x,E,b)))return!0}return!1}function sa(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&&sa(a,y,tt,E,b)))return!0}return!1}function vu(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&&vu(a,y,rt,E,b))return!0}}return!1}Ze.Object.defineProperties(To.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}}}),To.className="LinkingBaseTool";function Gs(){To.call(this),this.name="Linking",this.V={},this.F=null,this.K=rh,this.Xd=null}Te(Gs,To),Gs.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},Gs.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 fn)))return null;var x=this.direction;if(x===rh||x===sg){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===rh||x===ag)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Gs.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 fn&&(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 fn&&(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)},Gs.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()},Gs.prototype.doStop=function(){To.prototype.doStop.call(this),this.startObject=null},Gs.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 fn&&(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)}}},Gs.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof en)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)},Gs.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Gs.prototype.doNoLink=function(){},Ze.Object.defineProperties(Gs.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 rh=new Be(Gs,"Either",0),sg=new Be(Gs,"ForwardsOnly",0),ag=new Be(Gs,"BackwardsOnly",0);Gs.className="LinkingTool",Gs.Either=rh,Gs.ForwardsOnly=sg,Gs.BackwardsOnly=ag;function Xa(){To.call(this),this.name="Relinking";var a=new Oi;a.figure="Diamond",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Oi,a.figure="Diamond",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new be}Te(Xa,To),Xa.prototype.updateAdornments=function(a){if(a!==null&&a instanceof en){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)}},Xa.prototype.makeAdornment=function(a,y){var x=new vr;return x.type=Ve.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Xa.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},Xa.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 vr&&x.adornedPart instanceof en))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&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=er),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=er),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},Xa.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Lg||x===fc)&&(x=ka),y.curve=x,y.curviness=a.curviness,y.isTreeLink=a.isTreeLink,y.points=a.points,y.routing=a.routing,y.smoothness=a.smoothness,y.fromSpot=a.fromSpot,y.fromEndSegmentLength=a.fromEndSegmentLength,y.fromShortLength=a.fromShortLength,y.toSpot=a.toSpot,y.toEndSegmentLength=a.toEndSegmentLength,y.toShortLength=a.toShortLength}},Xa.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()},Xa.prototype.doStop=function(){To.prototype.doStop.call(this),this.handle=null},Xa.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof fn&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Xa.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Xa.prototype.doNoRelink=function(){};function Sf(a,y,x,E,b){y!==null?(a.copyPortProperties(y,x,a.temporaryFromNode,a.temporaryFromPort,!1),a.diagram.add(a.temporaryFromNode)):a.diagram.remove(a.temporaryFromNode),E!==null?(a.copyPortProperties(E,b,a.temporaryToNode,a.temporaryToPort,!0),a.diagram.add(a.temporaryToNode)):a.diagram.remove(a.temporaryToNode)}Ze.Object.defineProperties(Xa.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof vr))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Xa.className="RelinkingTool",hn("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),hn("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function jo(){ur.call(this),this.name="LinkReshaping";var a=new Oi;a.figure="Rectangle",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Oi,a.figure="Diamond",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Ht,this.Yq=new _t}Te(jo,ur),jo.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:Ad},jo.prototype.om=function(a,y){a.reshapingBehavior=y},jo.prototype.updateAdornments=function(a){if(a!==null&&a instanceof en){var y=null;if(a.isSelected&&!this.diagram.isReadOnly){var x=a.path;x!==null&&a.canReshape()&&a.actualBounds.w()&&a.isVisible()&&x.actualBounds.w()&&x.Ed()&&(y=a.Pj(this.name),y===null||y.Aw!==a.pointsCount||y.Uw!==a.resegmentable)&&(y=this.makeAdornment(x),y!==null&&(y.Aw=a.pointsCount,y.Uw=a.resegmentable,a.bh(this.name,y)))}y===null&&a.Jf(this.name)}},jo.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new vr,b.type=Ve.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==kl)for(var rt=x+tt;rt<z-tt;rt++){var ot=this.makeResegmentHandle(a,rt);ot!==null&&(ot.segmentIndex=rt,ot.segmentFraction=.5,ot.fromMaxLinks=999,b.add(ot))}for(tt=x+1;tt<z;tt++)if(rt=this.makeHandle(a,tt),rt!==null){if(rt.segmentIndex=tt,tt!==x)if(tt===x+1&&E){ot=y.i(x);var at=y.i(x+1);se.B(ot.x,at.x)&&se.B(ot.y,at.y)&&(at=y.i(x-1)),se.B(ot.x,at.x)?(this.om(rt,wu),rt.cursor="n-resize"):se.B(ot.y,at.y)&&(this.om(rt,yu),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),at=y.i(z),se.B(ot.x,at.x)&&se.B(ot.y,at.y)&&(ot=y.i(z+1)),se.B(ot.x,at.x)?(this.om(rt,wu),rt.cursor="n-resize"):se.B(ot.y,at.y)&&(this.om(rt,yu),rt.cursor="w-resize")):tt!==z&&(this.om(rt,xf),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},jo.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},jo.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},jo.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowReshape&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},jo.prototype.doActivate=function(){var a=this.diagram;if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null){var y=this.handle.part.adornedPart;if(y instanceof en){if(this.Ts=y,a.isMouseCaptured=!0,this.Ea(this.name),y.resegmentable&&this.handle.fromMaxLinks===999){var x=y.points.copy(),E=this.getResegmentingPoint();if(x.Gb(this.handle.segmentIndex+1,E),y.isOrthogonal&&x.Gb(this.handle.segmentIndex+1,E),y.points=x,y.Wb(),y.updateAdornments(),this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name),this.handle===null){this.doDeactivate();return}}this.Fw=y.i(this.handle.segmentIndex),this.Yq=y.points.copy(),this.isActive=!0}}},jo.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},jo.prototype.stopTransaction=function(){var a=this.diagram,y=ur.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},jo.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},jo.prototype.getResegmentingPoint=function(){return this.handle.ga(Ui)},jo.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},jo.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(nA(this,tt,E,b,z,!0)||nA(this,tt,E,b,z,!1))){var rt=y.points.copy();nA(this,tt,E,b,z,!0)?(rt.cd(x-2,new Ht(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Ht(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Ht((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Ht((z.x+tt.x)/2,z.y))),rt.mb(x),rt.mb(x-1),y.points=rt,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(nA(this,E,b,z,tt,!0)||nA(this,E,b,z,tt,!1))&&(rt=y.points.copy(),nA(this,E,b,z,tt,!0)?(rt.cd(x-1,new Ht(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Ht(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Ht((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Ht((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Ht.alloc(),se.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Ht.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function nA(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}jo.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===wu?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===yu&&(y.L(x,a.x,y.i(x-1).y),y.L(x+1,a.x,y.i(x+2).y));else if(x===y.lastPickIndex-1)x=y.lastPickIndex-1,E===wu?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===yu&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);se.B(z.x,b.x)&&se.B(b.y,tt.y)?(se.B(z.x,y.i(E-2).x)&&!se.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),se.B(tt.y,y.i(E+2).y)&&!se.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):se.B(z.y,b.y)&&se.B(b.x,tt.x)?(se.B(z.y,y.i(E-2).y)&&!se.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),se.B(tt.x,y.i(E+2).x)&&!se.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):se.B(z.x,b.x)&&se.B(b.x,tt.x)?(se.B(z.x,y.i(E-2).x)&&!se.B(z.y,y.i(E-2).y)?(y.m(E,a.x,z.y),x++,E++):y.L(E-1,a.x,z.y),se.B(tt.x,y.i(E+2).x)&&!se.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):se.B(z.y,b.y)&&se.B(b.y,tt.y)&&(se.B(z.y,y.i(E-2).y)&&!se.B(z.x,y.i(E-2).x)?(y.m(E,z.x,a.y),x++,E++):y.L(E-1,z.x,a.y),se.B(tt.y,y.i(E+2).y)&&!se.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(Ui,Ht.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Ht.alloc()),y.L(0,E.x,E.y),Ht.free(z),Ht.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(Ui,Ht.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Ht.alloc()),y.L(y.pointsCount-1,a.x,a.y),Ht.free(x),Ht.free(a));y.zf()},jo.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case xf:return a;case wu:return new Ht(y.i(x).x,a.y);case yu:return new Ht(a.x,y.i(x).y);default:case Ad:return y.i(x)}},Ze.Object.defineProperties(jo.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},midHandleArchetype:{get:function(){return this.u},set:function(a){this.u=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof vr))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedLink:{get:function(){return this.Ts}},resegmentingDistance:{get:function(){return this.F},set:function(a){this.F=a}},originalPoint:{get:function(){return this.Fw}},originalPoints:{get:function(){return this.Yq}}}),jo.prototype.setReshapingBehavior=jo.prototype.om,jo.prototype.getReshapingBehavior=jo.prototype.Ru;var Ad=new Be(jo,"None",0),yu=new Be(jo,"Horizontal",1),wu=new Be(jo,"Vertical",2),xf=new Be(jo,"All",3);jo.className="LinkReshapingTool",jo.None=Ad,jo.Horizontal=yu,jo.Vertical=wu,jo.All=xf,hn("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function zs(){ur.call(this),this.name="Resizing",this.o=new Je(1,1).freeze(),this.j=new Je(9999,9999).freeze(),this.yg=new Je(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Oi;a.alignmentFocus=Ui,a.figure="Rectangle",a.desiredSize=Or,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Ht,this.Dw=new Je,this.Tn=new Ht,this.rt=new Je(0,0),this.qt=new Je(1/0,1/0),this.pt=new Je(1,1)}Te(zs,ur),zs.prototype.updateAdornments=function(a){if(!(a===null||a instanceof en)){if(a.isSelected&&!this.diagram.isReadOnly){var y=a.resizeObject,x=a.Pj(this.name);if(y!==null&&a.canResize()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed()&&((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null)){y=y.li(),Jc(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},zs.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new vr,y.type=Ve.Spot,y.locationSpot=Ui;var x=new Ma;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,dr)),y.add(this.makeHandle(a,Dr)),y.add(this.makeHandle(a,Go)),y.add(this.makeHandle(a,ea)),y.add(this.makeHandle(a,vs)),y.add(this.makeHandle(a,rs)),y.add(this.makeHandle(a,Ys)),y.add(this.makeHandle(a,Io))}else if(Yl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},zs.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},zs.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=Ui),0>=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 Ve)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},zs.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},zs.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))},zs.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},zs.prototype.stopTransaction=function(){var a=this.diagram,y=ur.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},zs.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},zs.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,Ht.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Ht.free(b)}},zs.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,Ht.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Ht.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},zs.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 Ti){var E=new _t;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new st;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()}},zs.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Ui);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,at=tt.x+tt.width,At=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var pt=tt.height;0>=ft&&(ft=1),0>=pt&&(pt=1),ft=pt/ft}return pt=Ht.alloc(),se.No(a.x,a.y,rt,ot,b.width,b.height,pt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=Math.max(at-a.x,x.width),a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=Math.max(At-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=at-a.width,a.y=At-a.height)):1<=y.y?(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=Math.max(at-a.x,x.width),a.height=Math.max(Math.min(pt.y-ot,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=at-a.width)):(a.x=Math.max(pt.x,at-E.width),a.x=Math.min(a.x,at-x.width),a.width=at-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(At-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(pt.x-rt,E.width),x.width),a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=Math.max(At-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=At-a.height)):1<=y.y?(a.width=Math.max(Math.min(pt.x-rt,E.width),x.width),a.height=Math.max(Math.min(pt.y-ot,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(pt.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=ot+.5*(At-ot-a.height))):0>=y.y?(a.y=Math.max(pt.y,At-E.height),a.y=Math.min(a.y,At-x.height),a.height=At-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*(at-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(pt.y-ot,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*(at-rt-a.width))),Ht.free(pt),a},zs.prototype.computeReshape=function(){var a=ze;return this.adornedObject instanceof Oi&&(a=Hm(this.adornedObject)),!(a===Hn||this.diagram.lastInput.shift)},zs.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},zs.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.width<a.width&&(a.width=y.width),!isNaN(y.height)&&y.height<a.height&&(a.height=y.height),a},zs.prototype.computeCellSize=function(){var a=new Je(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},Ze.Object.defineProperties(zs.prototype,{handleArchetype:{get:function(){return this.F},set:function(a){this.F=a}},handle:{get:function(){return this.u},set:function(a){if(a!==null&&!(a.part instanceof vr))throw Error("new handle is not in an Adornment: "+a);this.u=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof vr)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},minSize:{get:function(){return this.o},set:function(a){if(!this.o.D(a)){var y=a.width;isNaN(y)&&(y=0),a=a.height,isNaN(a)&&(a=0),this.o.h(y,a)}}},maxSize:{get:function(){return this.j},set:function(a){if(!this.j.D(a)){var y=a.width;isNaN(y)&&(y=1/0),a=a.height,isNaN(a)&&(a=1/0),this.j.h(y,a)}}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||this.yg.assign(a)}},isGridSnapEnabled:{get:function(){return this.V},set:function(a){this.V=a}},dragsMembers:{get:function(){return this.ia},set:function(a){this.ia=a}},oppositePoint:{get:function(){return this.Xq},set:function(a){this.Xq.D(a)||this.Xq.assign(a)}},originalDesiredSize:{get:function(){return this.Dw}},originalLocation:{get:function(){return this.Tn}}}),zs.className="ResizingTool",hn("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function aa(){ur.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Ht,this.ue=null;var a=new Oi;a.figure="Ellipse",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Ht(NaN,NaN),this.u=0,this.F=50}Te(aa,ur),aa.prototype.updateAdornments=function(a){if(a!==null){if(a.ph()){var y=a.rotateObject;if(y===a||y===a.path||y.isPanelMain)return}if(a.isSelected&&!this.diagram.isReadOnly&&(y=a.rotateObject,y!==null&&a.canRotate()&&a.actualBounds.w()&&a.isVisible()&&y.actualBounds.w()&&y.Ed())){var x=a.Pj(this.name);if((x===null||x.adornedObject!==y)&&(x=this.makeAdornment(y)),x!==null){x.angle=y.li(),x.placeholder===null&&(x.location=this.computeAdornmentLocation(y)),a.bh(this.name,x);return}}a.Jf(this.name)}},aa.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new vr,y.type=Ve.Position,y.locationSpot=Ui;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Yl(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},aa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowRotate&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},aa.prototype.doActivate=function(){var a=this.diagram;if(this.adornedObject===null){if(this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle===null)return;this.adornedObject=this.handle.part.adornedObject}this.adornedObject!==null&&(a.isMouseCaptured=!0,a.delaysLayout=!0,this.Ea(this.name),this.Cw=this.adornedObject.angle,this.kr=this.computeRotationPoint(this.adornedObject),this.Tn=this.adornedObject.part.location.copy(),this.isActive=!0)},aa.prototype.computeRotationPoint=function(a){var y=a.part,x=y.locationObject;return y.rotationSpot.sb()?a.ga(y.rotationSpot):a===y||a===x?x.ga(y.locationSpot):a.ga(Ui)},aa.prototype.computeAdornmentLocation=function(a){var y=this.rotationPoint;y.w()||(y=this.computeRotationPoint(a)),y=a.qs(y);var x=this.handleAngle;0>x?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)},aa.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Ht(NaN,NaN),this.isActive=a.isMouseCaptured=!1},aa.prototype.stopTransaction=function(){var a=this.diagram,y=ur.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},aa.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},aa.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},aa.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()},aa.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()}},aa.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&&0<y&&0<x&&(a%y<x?a=Math.floor(a/y)*y:a%y>y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},Ze.Object.defineProperties(aa.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 vr))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 vr)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}}}),aa.className="RotatingTool",hn("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function oh(){ur.call(this),this.name="ClickSelecting"}Te(oh,ur),oh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},oh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},oh.className="ClickSelectingTool";function Bl(){ur.call(this),this.name="Action",this.pk=null}Te(Bl,ur),Bl.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},Bl.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()},Bl.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))}},Bl.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()},Bl.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())},Bl.prototype.doStop=function(){this.pk=null},Bl.className="ActionTool";function Su(){ur.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Ht(0,0)}Te(Su,ur),Su.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)},Su.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Su.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 ei)x.Zc()&&(Yl(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Ne(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Ht.allocAt(a.x,a.y);this.isGridSnapEnabled&&jc(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Ht.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Ze.Object.defineProperties(Su.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}}}),Su.className="ClickCreatingTool";function hl(){ur.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new ei;a.layerName="Tool",a.selectable=!1;var y=new Oi;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Te(hl,ur),hl.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.timestamp<this.delay||a.Ol(y.documentPoint,!0)!==null))},hl.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},hl.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},hl.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive&&this.box!==null){var y=this.computeBoxBounds(),x=this.box.fb("SHAPE");x===null&&(x=this.box.Pb());var E=Je.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Je.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},hl.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;a.remove(this.box);try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),this.selectInRect(this.computeBoxBounds()),a.R("ChangedSelection",a.selection)}finally{a.currentCursor=""}}this.stopTool()},hl.prototype.computeBoxBounds=function(){var a=this.diagram;return new be(a.firstInput.documentPoint,a.lastInput.documentPoint)},hl.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Ur?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new _t,y=y.selection.iterator;y.next();){var E=y.value;a.contains(E)||x.add(E)}for(y=x.iterator;y.next();)y.value.isSelected=!1;for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0)}},Ze.Object.defineProperties(hl.prototype,{delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}},isPartialInclusion:{get:function(){return this.o},set:function(a){this.o=a}},box:{get:function(){return this.j},set:function(a){this.j=a}}}),hl.className="DragSelectingTool";function Ns(){ur.call(this),this.name="Panning",this.Xt=new Ht,this.xy=new Ht,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(He.document,"scroll",a.Kw,!1),a.stopTool()}}Te(Ns,ur),Ns.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!(!a.allowHorizontalScroll&&!a.allowVerticalScroll||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize())},Ns.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(He.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ns.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ns.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ns.prototype.doMouseMove=function(){this.move()},Ns.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ns.prototype.move=function(){var a=this.diagram;if(this.isActive&&a)if(this.xg)a.lastInput.bubbles=!0;else{var y=a.position,x=a.firstInput.documentPoint,E=a.lastInput.documentPoint,b=y.x+x.x-E.x;x=y.y+x.y-E.y,a.allowHorizontalScroll||(b=y.x),a.allowVerticalScroll||(x=y.y),a.position=this.xy.h(b,x)}},Ze.Object.defineProperties(Ns.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ns.className="PanningTool",hn("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),hn("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),hn("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),hn("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),hn("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function iA(){this.F=this.u=this.j=this.o=null}Ze.Object.defineProperties(iA.prototype,{mainElement:{get:function(){return this.u},set:function(a){this.u=a}},show:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},hide:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},valueFunction:{get:function(){return this.F},set:function(a){this.F=a}}}),iA.className="HTMLInfo";function cl(a,y,x){this.text=a,this.hx=y,this.visible=x}cl.className="ContextMenuButtonInfo";function la(){ur.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Ht,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Te(la,ur);function Ul(a){var y=new iA;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},Bu=y,a.tu=function(){a.stopTool()},y=sn("div");var x=sn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=sn("style");He.document.getElementsByTagName("head")[0].appendChild(E),E.sheet.insertRule(".goCXul { list-style: none; }",0),E.sheet.insertRule(".goCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }",0),E.sheet.insertRule(".goCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",0),E=a.diagram,E!==null&&(E.addEventListener(y,"contextmenu",Ko,!1),E.addEventListener(y,"selectstart",Ko,!1),E.addEventListener(x,"contextmenu",Ko,!1)),y.className="goCXforeground",x.className="goCXbackground",He.document.body&&(He.document.body.appendChild(y),He.document.body.appendChild(x)),kc=y,kh=x,Mc=!0}function Ko(a){return a.preventDefault(),!1}la.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return this.isBeyondDragSize()||!a.lastInput.right||1<a.lastInput.clickCount?!1:!!(a.lastInput.isTouchEvent&&this.defaultTouchContextMenu!==null||this.findObjectWithContextMenu()!==null)},la.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},la.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},la.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof ge||(a instanceof oe?E=a:E=y.ic(x.documentPoint,null,function(b){return!b.layer.isTemporary})),E!==null){for(a=E;a!==null;){if(a.contextMenu!==null)return a;a=a.panel}if(y.lastInput.isTouchEvent&&this.defaultTouchContextMenu)return E.part}else if(y.contextMenu!==null)return y;return null},la.prototype.doActivate=function(){},la.prototype.doMouseDown=function(){if(ur.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof vr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Za(this)},la.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof vr){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Za(this)};function Za(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof iA||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(YA(a,!0),a.isActive||a.stopTool())}la.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function YA(a,y,x){if(x===void 0&&(x=null),!a.Et&&(a.Et=!0,y&&a.standardMouseSelect(),y=a.standardMouseClick(),a.Et=!1,!y)){if(a.isActive=!0,y=Bu,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof oe?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof vr&&!a.currentContextMenu.visible&&a.stopTool()}}la.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},la.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof vr){a.layerName="Tool",a.selectable=!1,a.scale=1/x.scale,a.category=this.name,a.placeholder!==null&&(a.placeholder.scale=x.scale);var E=a.diagram;E!==null&&E!==x&&E.remove(a),x.add(a),y!==null?a.adornedObject=y:a.data=x.model,a.Va(),this.positionContextMenu(a,y)}else a instanceof iA&&a.show(y,x,this);this.currentContextMenu=a},la.prototype.positionContextMenu=function(a){if(a.placeholder===null){var y=this.diagram,x=y.lastInput.documentPoint.copy(),E=a.measuredBounds,b=y.viewportBounds;y.lastInput.isTouchEvent&&(x.x-=E.width),x.x+E.width>b.right&&(x.x-=E.width+5/y.scale),x.x<b.x&&(x.x=b.x),x.y+E.height>b.bottom&&(x.y-=E.height+5/y.scale),x.y<b.y&&(x.y=b.y),a.position=x}},la.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof vr?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof iA&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function xu(a){var y=new _t;return y.add(new cl("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new cl("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new cl("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new cl("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new cl("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new cl("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new cl("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new cl("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new cl("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new cl("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new cl("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new cl("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new cl("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}la.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=xu(this)),kc.innerHTML="",kh.addEventListener("pointerdown",this.tu,!1);var y=this,x=sn("ul");x.className="goCXul",kc.appendChild(x),x.innerHTML="";for(var E=this.jt.iterator;E.next();){var b=E.value,z=b.visible;if(typeof b.hx=="function"&&(typeof z!="function"||z(a))){z=sn("li"),z.className="goCXli";var tt=sn("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(rt){return this.ky(a),y.stopTool(),rt.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}kc.style.display="block",kh.style.display="block"},la.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===Bu){kc.style.display="none",kh.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(kh,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Ze.Object.defineProperties(la.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof vr?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Mc===!1&&Bu===null&&Po&&Ul(this),Bu},set:function(a){a===null&&(Mc=!0),Bu=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var Bu=null,Mc=!1,kh=null,kc=null;la.className="ContextMenuTool",hn("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function to(){ur.call(this),this.name="TextEditing",this.Zh=new Jr,this.ia=null,this.V=bh,this.vj=null,this.qa=Th,this.u=1,this.F=!0,this.o=null,this.j=new iA,this.kt=null,bc(this,this.j)}Te(to,ur);function bc(a,y){if(Po){var x=sn("textarea");a.kt=x,x.addEventListener("input",function(){if(a.textBlock!==null){var E=a.Lx(this.value);this.style.width=20+E.measuredBounds.width*this.wA+"px",this.rows=E.lineCount}},!1),x.addEventListener("keydown",function(E){if(!E.isComposing&&a.textBlock!==null){var b=E.key;b==="Enter"?(a.textBlock.isMultiline===!1&&E.preventDefault(),a.acceptText(Tc)):b==="Tab"?(a.acceptText(Zs),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Th){var E=a.kt;a.qa===Ih&&(a.qa=Ic),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Th){var E=a.kt;typeof E.focus=="function"&&E.focus(),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),y.valueFunction=function(){return x.value},y.mainElement=x,y.show=function(E,b,z){if(E instanceof Jr&&z instanceof to)if(z.state===Nc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(Ui),rt=b.position,ot=b.scale,at=E.Df()*ot;at<z.minimumEditorScale&&(at=z.minimumEditorScale);var At=E.naturalBounds.width*at+6,ft=E.naturalBounds.height*at+2,pt=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*at,ft=rt.y*ft-rt.y*ot+rt.offsetY-(.5*ft-.5*ot)-ot/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*at+"%",x.style.lineHeight="normal",x.style.width=At+"px",x.style.left=(pt-At/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=at,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}to.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Cu&&Cu!==this&&(Cu.acceptText(rA),Cu&&Cu!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Jr&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===bh&&!y.isSelected||this.starting===Cf&&2>a.lastInput.clickCount)):!1},to.prototype.doStart=function(){Cu=this,this.textBlock!==null&&this.doActivate()},to.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 Jr&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Ih;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new be(this.textBlock.ga(dr),this.textBlock.ga(Go));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},to.prototype.doCancel=function(){this.stopTool()},to.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},to.prototype.doMouseDown=function(){this.isActive&&this.acceptText(rA)},to.prototype.acceptText=function(a){switch(a){case rA:this.qa===Nh?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Ih||this.qa===Nc||this.qa===Ic)&&(this.qa=hd,ud(this));break;case Bf:case Tc:case Zs:(Tc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Ih||this.qa===Nc||this.qa===Ic)&&(this.qa=hd,ud(this))}};function ud(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=Nh,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=Nc,a.doError(b,z))}}to.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)},to.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},to.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Th,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},to.prototype.doStop=function(){Cu=null},to.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)))},to.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Ze.Object.defineProperties(to.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)}}}),to.prototype.measureTemporaryTextBlock=to.prototype.Lx;var Bf=new Be(to,"LostFocus",0),rA=new Be(to,"MouseDown",1),Zs=new Be(to,"Tab",2),Tc=new Be(to,"Enter",3),tp=new Be(to,"SingleClick",0),bh=new Be(to,"SingleClickSelected",1),Cf=new Be(to,"DoubleClick",2),Th=new Be(to,"StateNone",0),Ih=new Be(to,"StateActive",1),Ic=new Be(to,"StateEditing",2),hd=new Be(to,"StateValidating",3),Nc=new Be(to,"StateInvalid",4),Nh=new Be(to,"StateValidated",5),Cu=null;to.className="TextEditingTool",to.LostFocus=Bf,to.MouseDown=rA,to.Tab=Zs,to.Enter=Tc,to.SingleClick=tp,to.SingleClickSelected=bh,to.DoubleClick=Cf,to.StateNone=Th,to.StateActive=Ih,to.StateEditing=Ic,to.StateValidating=hd,to.StateInvalid=Nc,to.StateValidated=Nh,hn("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ha(a){lh||(cd(),lh=!0),this.H=AA,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=lA,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new le,this.ce=new Qs,this.ce.Yd=this,this.Ei=new le,this.pu=new le,this.Sr=new le,this.pr=new le,a&&Object.assign(this,a)}Ha.prototype.Xe=function(a){this.H=a},Ha.prototype.canStart=function(){return!0};function oA(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Us(a.H),a.zb=!0)}function hr(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===lA?(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===Ff&&y.vc.clear(),a.Qw=!!(a.Pk===Qc&&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(),Ah(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Ks&&E!==null&&(delete E.start.scale,delete E.end.scale),He.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Aa(x),bf(x),a.zb=!1,y.start(),y.bc&&(Pu(a),x.Ya(),fd(y,0),ga(x,!0),Fu(a),x.R("AnimationStarting",a)))}))}}function XA(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Pf(a,y,x,E){a.isTicking||XA(a)||y instanceof en&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Pt=Ha.prototype,Pt.fv=function(a){return this.ce.fv(a)},Pt.Xu=function(a){return this.ce.Xu(a)};function Qh(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof oe&&ot.diagram!==null||ot instanceof ge){rt=!0;break t}}rt=!1}rt?Uc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(Pu(b),ga(b.H),Fu(b)),He.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),He.requestAnimationFrame(function(){x()}))}function sA(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Pu(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Fu(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Pt.Cc=function(a){var y=this.ce;if(this.zb===!0&&(this.Ok=this.zb=!1,this.Zd.clear(),0<y.vc.count&&this.H.$b()),this.bc){if(y.Ml(!0),y.vc.clear(),Ah(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Ah(y,this.H)},Pt.Ml=function(a){a===this.defaultAnimation&&this.defaultAnimation.vc.clear(),this.Ei.remove(a),this.Ei.count===0&&(this.bc=!1,this.H.$b()),a===this.defaultAnimation&&(this.defaultAnimation.vc.clear(),this.H.R("AnimationFinished",this))},Pt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Fa(this,a))},Pt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),Lu(this.ce,y,"position",y.position,y.position),Fa(this,a))};function Uh(a,y,x){!a.zb||y.D(x)||XA(a)||(a.H.pi||(y=x.copy()),Lu(a.ce,a.H,"position",y,x))}function sh(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Fa(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function ah(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],rt=a[2];a=a[3];var ot=y[0],at=y[1],At=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=at):(At===0||At===100)&&(ot=z,at=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,at-tt,E),rt=b(x,rt,At-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function cd(){function a(x,E,b,z,tt,rt){x.position=new Ht(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new vn;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Ht(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("location",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!0):x.location=new Ht(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:placeholder",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Ht(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,rt){var ot=x.actualBounds,at=b.actualBounds;b=at.x+at.width/2-ot.width/2,ot=at.y+at.height/2-ot.height/2,tt<rt?x.mm(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt),!1):x.position=new Ht(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt))}),y.add("desiredSize",function(x,E,b,z,tt,rt){x.desiredSize=new be(z(tt,E.width,b.width-E.width,rt),z(tt,E.height,b.height-E.height,rt))}),y.add("width",function(x,E,b,z,tt,rt){x.width=z(tt,E,b-E,rt)}),y.add("height",function(x,E,b,z,tt,rt){x.height=z(tt,E,b-E,rt)}),y.add("fill",function(x,E,b,z,tt,rt){x.fill=ah(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=ah(E,b,tt,rt,z)}),y.add("strokeWidth",function(x,E,b,z,tt,rt){x.strokeWidth=z(tt,E,b-E,rt)}),y.add("strokeDashOffset",function(x,E,b,z,tt,rt){x.strokeDashOffset=z(tt,E,b-E,rt)}),y.add("background",function(x,E,b,z,tt,rt){x.background=ah(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=ah(E,b,tt,rt,z)}),y.add("opacity",function(x,E,b,z,tt,rt){x.opacity=z(tt,E,b-E,rt)}),y.add("scale",function(x,E,b,z,tt,rt){x.scale=z(tt,E,b-E,rt)}),y.add("angle",function(x,E,b,z,tt,rt){x.angle=z(tt,E,b-E,rt)}),aA=y}Ze.Object.defineProperties(Ha.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&wn(a,">= 1",Ha,"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}}}),Ha.prototype.stopAnimation=Ha.prototype.Cc;var aA=null,lh=!1,lA=new Be(Ha,"Default",1),Qc=new Be(Ha,"AnimateLocations",2),Ff=new Be(Ha,"None",3);Ha.className="AnimationManager",Ha.defineAnimationEffect=function(a,y){lh||(cd(),lh=!0),aA.add(a,y)},Ha.Default=lA,Ha.AnimateLocations=Qc,Ha.None=Ff;function Qs(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=Dh,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=Ii,this.vc=new vn,this.Tt=new vn,this.yl=new le,this.Ut=new le,this.dw=qA,a&&Object.assign(this,a)}Qs.prototype.suspend=function(){this.Xk=!0},Qs.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Uc(this,!0),Pu(this.Yd),ga(this.H),Fu(this.Yd),this.H.redraw()};function Ah(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0<a.yl.count&&a.yl.clear(),0<a.Ut.count&&a.Ut.clear(),y!==null)for(a=y.links;a.next();)a.value.Tg=null}Pt=Qs.prototype,Pt.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof ge?a=x:x instanceof oe&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===lA&&this===y.defaultAnimation&&(this.Lp=lg,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=qh),Pu(y),this.yl.each(function(E){E.data=null,a.add(E)}),Fu(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Qh(y,this),this)},Pt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Pt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof ge?this.H=a:a instanceof oe&&a.diagram!==null&&(this.H=a.diagram)),a instanceof ei){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return Lu(this,a,y,x,E,b),this};function Lu(a,y,x,E,b,z){var tt=a.vc;if(y instanceof ge&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(nu(E),np(),E=[Xe.j,Xe.u,Xe.o,Xe.F],nu(b),np(),b=[Xe.j,Xe.u,Xe.o,Xe.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,at=rt.end;ot[x]===void 0&&(ot[x]=uh(E)),at[x]=uh(b)}else ot={},at={},ot[x]=uh(E),at[x]=uh(b),rt=ot.position,y instanceof oe&&rt instanceof Ht&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(at.position),rt=new hh(ot,at,z),tt.add(y,rt);tt=ot[x],tt instanceof Ht&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof ei?rt.Ku.location=uh(y.location):z&&(rt.Ku[x]=uh(E))}function uh(a){return a instanceof Ht||a instanceof Je?a.copy():a}Pt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Pt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Uc(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),Pu(x),fd(a,b),ga(a.H,!0),Fu(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function fd(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof oe&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=aA,at;for(at in tt)at==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(at)===null||ot.get(at)(z,rt[at],tt[at],a.Lp,y,x,a)}}}Pt.stop=function(){return this.bc?(this.Ml(!0),this):this},Pt.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,Pu(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=aA;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,at=b?rt.start:rt.end,At=rt.Ku,ft;for(ft in at)if(z.get(ft)!==null){var pt=ft;!rt.Hu||pt!=="position:nodeCollapse"&&pt!=="position:placeholder"||(pt="position"),z.get(pt)(tt,ot[ft],At[ft]!==void 0?At[ft]:rt.Hu?ot[ft]:at[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&At.location!==void 0&&tt instanceof ei&&(tt.location=At.location),rt.nv&&tt instanceof ei&&tt.Zb(!1)}if(y.As.clear(),Hh(y,!1),y.Ya(),y.N(),ga(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()}ga(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Fu(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Ah(this,null),x.Ml(this),y.$b())}},Pt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof Ti&&(E=y.placeholder),E!==null?(x=E.ga(dr),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Ht(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Ti)for(a=a.memberParts;a.next();)E=a.value,E instanceof fn&&this.Cj(E,y)},Pt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Ti&&(x=y.placeholder),x!==null){var E=x.ga(dr);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 Ti)for(a=a.memberParts;a.next();)E=a.value,E instanceof fn&&this.Aj(E,y)}},Pt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Ze.Object.defineProperties(Qs.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&wn(a,">= 1",Qs,"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){0<a?this.cu=a:Yt("Animation.runCount value must be a positive integer.")}},finished:{get:function(){return this.dn},set:function(a){this.dn!==a&&(this.dn=a)}},easing:{get:function(){return this.ot},set:function(a){this.ot=a}},isViewportUnconstrained:{get:function(){return this.j},set:function(a){this.j=a}},isAnimating:{get:function(){return this.bc}}}),Qs.prototype.getTemporaryState=Qs.prototype.Ez,Qs.prototype.stop=Qs.prototype.stop,Qs.prototype.add=Qs.prototype.add,Qs.prototype.addTemporaryPart=Qs.prototype.Iy;function Dh(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function lg(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Qs.className="Animation",Qs.EaseLinear=function(a,y,x,E){return x*a/E+y},Qs.EaseInOutQuad=Dh,Qs.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Qs.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Qs.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Qs.EaseOutExpo=lg;function hh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}hh.className="AnimationState";function Dl(a,y,x){this.xd=null,this.rf=a,this.so=x||gd,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=ch))}Dl.prototype.copy=function(){var a=new Dl(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 dd(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))}Ze.Object.defineProperties(Dl.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 gd=new Be(Dl,"Default",1),ch=new Be(Dl,"Immediate",2),Oh=new Be(Dl,"Bundled",3);Dl.className="AnimationTrigger",Dl.Default=gd,Dl.Immediate=ch,Dl.Bundled=Oh;function ms(a){rn(this),this.H=null,this.Pa=new _t,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)}Pt=ms.prototype,Pt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Di(x)}a.clear(),this.Zq.length=0},Pt.Xe=function(a){this.H=a},Pt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof Ti?b++:ot instanceof fn?E++:ot instanceof en?z++:ot instanceof vr?tt++:x++}if(rt="",0<x&&(rt+=x+" Parts "),0<E&&(rt+=E+" Nodes "),0<b&&(rt+=b+" Groups "),0<z&&(rt+=z+" Links "),0<tt&&(rt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,rt+=`
|
|
`+x.toString(),E=x.data,E!==null&&Un(E)&&(rt+=" #"+Un(E)),x instanceof fn?rt+=" "+Yi(E):x instanceof en&&(rt+=" "+Yi(x.fromNode)+" "+Yi(x.toNode));return y+" "+this.Pa.count+": "+rt},Pt.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=Ht.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||Jc(rt)!==!1)&&rt.isVisible()&&(b.assign(a),Tn(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Ht.free(b),rt}return Ht.free(b),null},Pt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof _t||E instanceof le||(E=new le),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Ht.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||Jc(ot)!==!1)&&ot.isVisible()){z.assign(a),Tn(z,ot.oe);var at=ot;ot.ji(z,y,x,E)&&(y!==null&&(at=y(at)),at===null||x!==null&&!x(at)||E.add(at))}}return Ht.free(z),E},Pt.Cf=function(a,y,x,E,b){if(y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof _t||b instanceof le||(b=new le),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||Jc(ot)!==!1)&&ot.isVisible()){var at=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(at=y(at)),at===null||x!==null&&!x(at)||b.add(at))}}return b},Pt.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var at=rt[ot];if((tt!==!0||Jc(at)!==!1)&&z(at)&&at.isVisible()){var At=at;at.Cf(a,y,x,E,b)&&(y!==null&&(At=y(At)),At===null||x!==null&&!x(At)||b.add(At))}}return b},Pt.og=function(a,y,x,E,b,z){if(x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof _t||b instanceof le)&&(z=b),b=!0),z instanceof _t||z instanceof le||(z=new le),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Ht.alloc(),ot=Ht.alloc(),at=this.Pa.s,At=at.length;At--;){var ft=at[At];if((tt!==!0||Jc(ft)!==!1)&&ft.isVisible()){rt.assign(a),Tn(rt,ft.oe),ot.h(a.x+y,a.y),Tn(ot,ft.oe);var pt=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(pt=x(pt)),pt===null||E!==null&&!E(pt)||z.add(pt))}}return Ht.free(rt),Ht.free(ot),z},Pt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=bn();for(var b=bn(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof en){if(tt.fd===!1)continue}else if(tt instanceof vr&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&Da(rt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],Zm(x),x=x.adornments;x.next();)E=x.value,E.measure(1/0,1/0),E.arrange(),E.Fd(!0);for(y=0;y<b.length;y++)Zm(b[y]);Ln(a),Ln(b)}}};function ZA(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Pt.gc=function(a,y,x){if(this.visible&&this.pb!==0&&(x===void 0&&(x=!0),x||!this.isTemporary)){x=this.Pa.s;var E=x.length;if(E!==0){if(a.isTemporary)for(var b=0;b<E;b++)x[b].Gj();b=ZA(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=be.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(be.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Dc(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=ZA(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,at=be.alloc(),At=0;At<z;At++){var ft=b[At];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,at,!1)}be.free(at),y.globalAlpha=tt}}}Pt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!Jc(y))a.Hs(y);else{if(E!==null&&y instanceof en&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof Ea?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.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&&(wo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(wo(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),wo(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))}},Pt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(fo,a,this,y,x,E,b)},Pt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&Di(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)),Lf(this,a,y),a},Pt.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,Di(y),a};function Lf(a,y,x){if(y=Ef(a,y,x),x instanceof Ti&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];if(rt===x&&(y=tt,0<=E)||0>E&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&Lf(a,-1,y)}x.svg!==null&&x.svg.remove()}function Ef(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=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,ot=NaN;rt<b&&(ot=a.M(rt).zOrder,!!isNaN(ot));)rt++;if(!isNaN(tt)&&tt>E)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(ot)&&ot<E)for(;;){if(rt===b||ot>=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(ot=NaN;++rt<b&&(ot=a.M(rt).zOrder,isNaN(ot)););}return y}Ze.Object.defineProperties(ms.prototype,{parts:{get:function(){return this.Pa.iterator}},partsBackwards:{get:function(){return this.Pa.iteratorBackwards}},diagram:{get:function(){return this.H}},name:{get:function(){return this.xa},set:function(a){var y=this.xa;if(y!==a){var x=this.diagram;if(x!==null)for(y===""&&Yt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Yt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&wn(a,"0 <= value <= 1",ms,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,a!==null&&a.N())}},isTemporary:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&((this.o=a)&&(this.isInDocumentBounds=!1),this.g("isTemporary",y,a))}},visible:{get:function(){return this.u},set:function(a){var y=this.u;if(y!==a){for(this.u=a,this.g("visible",y,a),y=this.Pa.iterator;y.next();)y.value.Zb(a);a=this.diagram,a!==null&&a.N()}}},pickable:{get:function(){return this.Uh},set:function(a){var y=this.Uh;y!==a&&(this.Uh=a,this.g("pickable",y,a))}},isInDocumentBounds:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,this.diagram!==null&&this.diagram.Ya())}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}}}),ms.prototype.findObjectsNear=ms.prototype.og,ms.prototype.findObjectsIn=ms.prototype.Cf,ms.prototype.findObjectsAt=ms.prototype.ji,ms.prototype.findObjectAt=ms.prototype.ic,ms.className="Layer";function ge(a,y){if(tu||(hs(),tu=!0),rn(this),AA=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Po){var x=this,E=function(){x.removeEventListener(He.document,"DOMContentLoaded",E,!1),x.setRTL()};He.document.body!==null?this.setRTL():x.addEventListener(He.document,"DOMContentLoaded",E,!1)}this.ol=null,Of.add("Model",Nr);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===fo&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ag(this),this.model=Pv(),this.Wg=!0,Tf(this),this.layout=new mo,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new $h,a!==void 0&&(typeof a=="string"||He.Element&&a instanceof Element?Oc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Eu,AA;function Ag(a){a.Yd=new Ha,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new _t,a.pj=new vn,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Ht(NaN,NaN).freeze(),a.du=new Ht(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Ht(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Fi,a.zu=new Ht(NaN,NaN).freeze(),a.ut=new be(NaN,NaN,NaN,NaN).freeze(),a.rj=new Xi(0,0,0,0).freeze(),a.sj=qA,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Ks,a.zk=is,a.Fg=Ks,a.pq=is,a.yt=dr,a.Bt=dr,a.Fc=!0,a.pn=!1,a.De=new le,a.Eh=new vn,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Xi(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Is,a.bq.diagram=a,a.Qg=new Is,a.Qg.diagram=a,a.cj=new Is,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,gg(a),a.ai=new le,a.Ht=!0,a.uu=Iu,a.pw=!1,a.wu=Xc,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new vn,a.Xn=new _t,a.Gg=!1,a.Jd=!0,a.Us=!0,a.Fi=!0,a.Gi=!0,a.Vs=!1,a.Ws=!0,a.Pi=!0,a.Hi=!0,a.Qi=!0,a.Ys=!0,a.Ii=!0,a.Ki=!0,a.Ji=!0,a.Li=!0,a.Mi=!0,a.Ni=!0,a.Oi=!0,a.Zs=!0,a.at=!0,a.qw=!1,a.Vk=!1,a.mn=!0,a.nn=!0,a.Xs=!0,a.$s=!0,a.iu=16,a.mu=16,a.qr=!1,a.gu=!1,a.lu=0,a.ju=0,a.yb=new Xi(5).freeze(),a.Hw=new le().freeze(),a.Nt=999999999,a.nw=new le().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new le,a.ow=new le,a.Xh=null,a.aw=new Je(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Ht,bounds:new be,Py:new Je,bA:new Je,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new be(NaN,NaN,NaN,NaN).freeze(),a.wo=new Je(NaN,NaN).freeze(),a.Sp=new be(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new vn;var y=new fn,x=new Jr;x.bind(new Zo("text","",Yi)),y.add(x),a.ny=y,a.Lg.add("",y),y=new fn,x=new Jr,x.stroke="brown",x.bind(new Zo("text","",Yi)),y.add(x),a.Lg.add("Comment",y),y=new fn,y.selectable=!1,y.avoidable=!1,x=new Oi,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Je(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new vn,y=new Ti,y.selectionObjectName="GROUPPANEL",y.type=Ve.Vertical,x=new Jr,x.font="bold 12pt sans-serif",x.bind(new Zo("text","",Yi)),y.add(x),x=new Ve(Ve.Auto),x.name="GROUPPANEL";var E=new Oi;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Ma,E.padding=new Xi(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new vn,y=new en,x=new Oi,x.isPanelMain=!0,y.add(x),x=new Oi,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new en,x=new Oi,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new vr,y.type=Ve.Auto,x=new Oi,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ma,x.margin=new Xi(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new vr,y.type=Ve.Link,x=new Oi,x.isPanelMain=!0,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),a.Kt=y,a.fe=null,a.mq=!1,a.Ck=null,a.partManager=new Nr,a.toolManager=new Ao,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new st,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=kf(),a.eq=null,a.fq=Ei,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new Ht,a.zy=500,a.wp=new Ht,a.wq=!1}ge.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),ph=null,bu="",Mf(this,!1),this.Xn.clear(),xg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Mf(a,y){a.animationManager.Cc(!0),a.Hw=new le().freeze(),a.nw=new le().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var rt=a.Wa.s[y].parts;rt.next();){var ot=rt.value;ot!==b&&ot.data===null&&z.push(ot)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),xg(),a.Og.clear(),vo=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function kf(){return null}ge.prototype.reset=function(){this.clear(),this.vb=!0,Ag(this),Ol(this),this.Wg=!0,Tf(this),this.layout=new mo,this.Wg=!1,this.model=Pv(),this.model.undoManager=new Bo,this.vb=this.rn=!1,this.N()},ge.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=He.document.body);var y=sn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},ge.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=He.document.body);var y=0;if(Po){var x=Md;y=Eu,x===null&&(x=Md=sn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Eu=sn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Ur||(y=11)}this.Db=y,this.Gw=!0},ge.prototype.qb=function(a){a.classType===ge&&(this.autoScale=a)},ge.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1);return y};function Oc(a,y){if(Po){if(y!=null||Yt("Diagram setup requires an argument DIV."),a.Ka!==null&&Yt("Diagram has already completed setup."),typeof y=="string"?a.Ka=He.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Yt("No DIV or DIV id supplied: "+y),a.Ka===null&&Yt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Yt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&He.ResizeObserver){var x=kn(function(){a.$b()},250);a.ol=new He.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}He.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=He.go;var b=new El(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",He.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),Sd(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new El(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Po){b=sn("div");var z=sn("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=cg,b.addEventListener("pointerdown",fg),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=kn(function(){a.Yh=null,a.N()},300),a.Ov=kn(function(){bf(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=fl(a,tt,!0);rt.bubbles=!0;var ot=0,at=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(at=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-at):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(at=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-at):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Pl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,fl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.Yt;rt[tt.pointerId]===void 0&&(rt[tt.pointerId]=tt),rt=a.oj;var ot=!1;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,ot=!0;else if(rt[0]===null)rt[0]=tt;else if(rt[1]===null)rt[1]=tt,ot=!0;else{tt.preventDefault();return}else rt[0]=tt;(rt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var at=ot;ot=vd(a,tt,!0,!1,!0,at),Gh(a,tt,ot),ot.targetDiagram=md(tt,tt.target),ot.targetObject=null,at||ot.clone(a.bq),at=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(at.x-tt.screenX)>rt||Math.abs(at.y-tt.screenY)>rt)?a.yq++:a.yq=1,ot.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Pl(ot,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=vd(a,tt,!1,!1,!1,rt[1]!==null);var ot=He.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var at=a,At=tt;ot&&ot.H&&(At=tt,at=ot.H),rt.targetDiagram=at,Gh(a,At,rt),rt.targetObject=null,a.doMouseMove(),Pl(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",ot=a.Yt;if(rt&&a.qu)delete ot[tt.pointerId],tt.preventDefault();else if(ot=a.oj,ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null);else{ot[0]=null,ot=vd(a,tt,!1,!0,!0,!1);var at=He.document.elementFromPoint(tt.clientX,tt.clientY)||null;at!==null&&at.shadowRoot!==void 0&&at.shadowRoot!==null&&(at=at.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),at!==null&&at.H instanceof ge&&at.H!==a&&Gh(at.H,tt,ot),at===null&&(at=tt.target),Gh(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=md(tt,at),ot.targetObject=null,a.doMouseUp(),Pl(ot,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"+tc[1]+tc[2]+"wI"+Wl.slice(1,5)]["b"+T1.slice(1,y)](E.Z,MA,y,y),E.Vc(!0),ug(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 ug(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(He,"resize",a.Ov,!1)}function Aa(a){30<a.Sq&&(a.Yh=1)}function Hh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),br&&br.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}ge.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:He.devicePixelRatio||1},ge.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},ge.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},ge.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},ge.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},ge.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},ge.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},ge.prototype.doFocus=function(){this.focus()},ge.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=He.scrollX||He.pageXOffset,y=He.scrollY||He.pageYOffset;this.ta.focus(),He.scrollTo(a,y)}},ge.prototype.Oy=function(){this.H.R("GainedFocus")},ge.prototype.Ny=function(){this.H.R("LostFocus")};function bf(a){if(a.ta!==null){var y=a.Ka;if(y!==null&&y.clientWidth!==0&&y.clientHeight!==0){a.Gw||a.setScrollWidth();var x=a.gf?a.Db:0,E=a.Be?a.Db:0,b=a.Mb;a.Mb=a.computePixelRatio(),a.Mb!==b&&(a.pn=!0,a.$b()),(y.clientWidth!==a.Aa+x||y.clientHeight!==a.ya+E)&&(a.Ee=!0,a.Fc=!0,y=a.layout,y!==null&&y.isViewportSized&&a.autoScale===Ks&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Tf(a){var y=new ms;y.name="Background",a.Al(y),y=new ms,y.name="",a.Al(y),y=new ms,y.name="Foreground",a.Al(y),y=new ms,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ms,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ms,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function hg(a){var y=new Ve(Ve.Grid);y.name="GRID";var x=new Oi;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Oi,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Oi,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Oi,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Oi,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Oi,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new ei,x.add(y),x.layerName="Grid",x.zOrder=0,x.isInDocumentBounds=!1,x.isAnimated=!1,x.pickable=!1,x.locationObjectName="GRID",a.add(x),a.partManager.parts.remove(x),y.visible=!1,y}function cg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):_h(this.H)}function fg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):_h(this.H)}ge.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,rt=E.y-z.top,ot=E.width+z.left+z.right,at=E.height+z.top+z.bottom,At=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var pt=b.width,xt=b.height,Ct=b.right,Mt=b.bottom;b=this.scale;var Gt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Gt=Gt+a.scrollWidth-a.clientWidth;break;case"reverse":Gt=a.scrollWidth-Gt-a.clientWidth}var Ot=Gt;pt<ot||xt<at?(Gt=Ht.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Ot&&(Gt.x=Ot/b+tt,this.ju=Ot),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Gt.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=Gt,Ht.free(Gt),this.Ee=this.qr=!1):(Gt=Ht.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=Gt.h(Ot+tt,this.position.y)),At>Ct&&(this.position=Gt.h(-(y.scrollWidth-this.Aa)+Ot-this.Aa/b+At,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=Gt.h(this.position.x,a.scrollTop+rt)),z>Mt&&(this.position=Gt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Ht.free(Gt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,At=E.right,Ct=b.right,z=E.bottom,Mt=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,pt>=ot&&tt>=ft&&At<=Ct&&(x.style.width="1px"),xt>=at&&rt>=E&&z<=Mt&&(x.style.height="1px"))}},ge.prototype.computeBounds=function(a){return a===void 0&&(a=new be),Us(this),Cl(this,a)};function Cl(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;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var rt=tt.length,ot=0;ot<rt;ot++){var at=tt[ot];at.isInDocumentBounds&&at.isVisible()&&(at=at.actualBounds,at.w()&&(x?(x=!1,y.assign(at)):y.ed(at)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}ge.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(mn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof en||(b.Va(),x===null?x=b.actualBounds.copy():x.ed(b.actualBounds))}else for(a=a.iterator;a.next();)E=a.value,!y&&E instanceof en||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new be(NaN,NaN,0,0):x};function Ja(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=Ht.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=be.allocAt(0,0,E.width,E.height);var b=Ht.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,be.free(E),Ht.free(b),Ht.free(x)}x=a.yh,y&&a.Fg!==Ks&&(x=a.Fg);var z=x!==Ks?Rh(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,rt=a.zk,ot=a.pq;y&&!rt.sb()&&(ot.sb()||ot.Xb())&&(rt=ot.Xb()?Ui:ot),pd(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,se.B(z.x,x)&&se.B(z.y,E)&&se.B(z.width,b)&&se.B(z.height,tt)||a.onViewportBoundsChanged(new be(x,E,b,tt),z,y,!1)}}function Rh(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),rt=z/b,ot=tt/E;return y===Ra?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Tu?(y=ot>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}ge.prototype.zoomToFit=function(){var a=this.sj;this.sj=qA,this.scale=Rh(this,Ra),a!==qA&&(Ja(this,!1),pd(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Pt=ge.prototype,Pt.BA=function(a,y){y===void 0&&(y=Ra);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Ra||y===Tu)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===Tu?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 Ht(a.x,a.y)}},Pt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Ht(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))},Pt.zz=function(a){if(a instanceof oe){this.eq=a;var y=Ht.alloc();this.fq=this.op(a.ga(dr,y)),Ht.free(y)}else this.eq=null,this.fq=Ei};function pd(a,y,x,E,b,z){var tt=Ht.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var at=Ht.alloc();at=a.eq.ga(dr,at),rt=at.x-a.fq.x/a.scale,ot=at.y-a.fq.y/a.scale,b=$i,Ht.free(at)}(z||a.scrollMode===qA)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ot=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(rt=Math.min(rt+x/2,y.right+Math.max(z,b.right)-x/2),rt=Math.max(rt,y.left-Math.max(z,b.left)+x/2),rt-=x/2):rt>y.left?rt=y.left:rt<y.right-x&&(rt=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(ot=Math.min(ot+E/2,y.bottom+Math.max(x,b.bottom)-E/2),ot=Math.max(ot,y.top-Math.max(x,b.top)+E/2),ot-=E/2):ot>y.top?ot=y.top:ot<y.bottom-E&&(ot=y.bottom-E)),tt.x=isFinite(rt)?rt:-a.yb.left,tt.y=isFinite(ot)?ot:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),Uh(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),Ol(a),Ht.free(tt)}Pt.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=LA(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof ei)return a}else if(a=LA(this,a,function(x){return x.part}),a instanceof ei)return a;return null},Pt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Us(this);for(var E=this.Wa.iteratorBackwards;E.next();){var b=E.value;if(b.visible&&(b=b.ic(a,y,x),b!==null))return b}return null};function LA(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),Us(a),a=a.Wa.iteratorBackwards;a.next();){var b=a.value;if(b.visible&&!b.isTemporary&&(b=b.ic(y,x,E),b!==null))return b}return null}Pt.lz=function(a,y,x){return y===void 0&&(y=!0),Hc(this,a,function(E){return E.part},y?function(E){return E instanceof ei&&E.canSelect()}:null,x)};function Hc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof _t||b instanceof le||(b=new le),Us(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Pt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof _t||E instanceof le||(E=new le),Us(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Pt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),If(this,a,function(b){return b instanceof ei&&(!x||b.canSelect())},y,E)},Pt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof _t||b instanceof le||(b=new le),Us(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},Pt.Nu=function(a,y,x,E,b,z){var tt=new le;Us(this);for(var rt=this.Wa.iteratorBackwards;rt.next();){var ot=rt.value;ot.visible&&ot.Nu(a,y,x,E,tt,b,z)}return tt};function If(a,y,x,E,b){var z=null;for(z===void 0&&(z=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof _t||b instanceof le||(b=new le),Us(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}Pt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Rc(this,a,y,function(z){return z instanceof ei&&(!E||z.canSelect())},x,b)},Pt.og=function(a,y,x,E,b,z){x===void 0&&(x=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof _t||b instanceof le)&&(z=b),b=!0),z instanceof _t||z instanceof le||(z=new le),Us(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var rt=tt.value;rt.visible&&rt.og(a,y,x,E,b,z)}return z};function Rc(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof _t||b instanceof le)&&(z=b),b=!0),z instanceof _t||z instanceof le||(z=new le),Us(a),a=a.Wa.iteratorBackwards;a.next();){var rt=a.value;rt.visible&&!rt.isTemporary&&rt.og(y,x,tt,E,b,z)}return z}ge.prototype.acceptEvent=function(a){return fl(this,a,a instanceof MouseEvent)};function fl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Gh(a,y,E):(E.viewPoint=a.Qg.viewPoint,E.documentPoint=a.Qg.documentPoint),a=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),E.modifiers=a,E.button=y.button,y.buttons!==void 0&&(E.buttons=y.buttons),Ur&&y.button===0&&y.ctrlKey&&(E.button=2),E.down=!1,E.up=!1,E.clickCount=1,E.delta=0,E.handled=!1,E.bubbles=!1,E.timestamp=y.timeStamp,E.isMultiTouch=!1,E.targetDiagram=md(y,y.target),E.targetObject=null,E}function md(a,y){return y===null?null:(y=y.H)?y:((y=a.path)||typeof a.composedPath!="function"||(y=a.composedPath()),y&&y[0]&&y[0].H?y[0].H:null)}function vd(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,Ur&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function Pl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}ge.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=fl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.down=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del";break;case 48:x.key="0";break;case 187:case 61:case 107:x.key="Add";break;case 189:case 173:case 109:x.key="Subtract";break;case 27:x.key="Esc"}return y.doKeyDown(),Pl(x,a)},ge.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=fl(y,a,!1);switch(x.key=String.fromCharCode(a.which),x.up=!0,a.which){case 8:x.key="Backspace";break;case 33:x.key="PageUp";break;case 34:x.key="PageDown";break;case 35:x.key="End";break;case 36:x.key="Home";break;case 37:x.key="Left";break;case 38:x.key="Up";break;case 39:x.key="Right";break;case 40:x.key="Down";break;case 45:x.key="Insert";break;case 46:x.key="Del"}return y.doKeyUp(),Pl(x,a)},ge.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=fl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Pl(x,a)},ge.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=fl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Pl(x,a)},ge.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Ht(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?Tn(new Ht(y,a),this.Ab):new Ht(y,a)};function Gh(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,rt=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,rt=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,rt),a.Ab!==null?(y=Ht.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Ht.free(y)):x.documentPoint.h(tt,rt)}function Gc(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}ge.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function yd(a){a.ld||Us(a),a.Va()}ge.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Pt=ge.prototype,Pt.Pz=function(){return this.kg},Pt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,ga(this),this.hf=!1,this.du=new Ht(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Bi(function(){E.ld=!1,oA(y,"Model"),a(E)},1)},Pt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;He.requestAnimationFrame(function(){y.kg&&y.bd()})}},Pt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),ga(this))};function js(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||_h(a)||(y&&Us(a),x&&Ja(a,!1))}function ga(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];Xo(rt,!1),rt.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(ot){ot.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||bf(a),js(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(uA(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Us(a),z=!1,(!a.hf||a.xh)&&(a.hf?Fd(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Fd(a,!1)),z=!0),a.Jk=!1,Us(a),a.ou||yd(a),js(a,!0,!1),tt=!1,z?(x=be.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,wd(a)),a.R("LayoutCompleted"),js(a,!0,!1),be.free(x)):x.Ok&&x.Qw&&(a.Fg!==Ks?a.scale=Rh(a,a.Fg):a.yh!==Ks?a.scale=Rh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Ja(a,!0)),z&&tt&&a.eb("Initial Layout"),Us(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function wd(a){if(a.Fg!==Ks)a.scale=Rh(a,a.Fg);else if(a.yh!==Ks)a.scale=Rh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Ja(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),uA(a)}function Us(a){if(a.De.count!==0&&(a.ld||!a.animationManager.isTicking)){for(var y=0;23>y;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new le,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof Ti&&E.U&65536&&(E.U=E.U^65536)})}}Pt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Ti||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Ti&&x.isVisible()&&zh(this,x);for(a.reset();a.next();)x=a.value,x instanceof en&&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 vr&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function zh(a,y){for(var x=bn(),E=bn(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof Ti?(tl(z)||ia(z)||Zc(z))&&zh(a,z):z instanceof en?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;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(Ln(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();Ln(E)}Pt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Pt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Yt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Vh(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,rt=this.Ab;for(rt.reset(),b!==1&&rt.scale(b),y.x===0&&y.y===0||rt.translate(-z,-tt),a.ti=null,Id(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),Mu(this,a),y=this.Mb,this.ta.context.setTransform(y,0,0,y,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya),y=0;y<E;y++)x[y].gc(a,this);a=!1,this.Yf?Fl(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Fi.prototype.Cd=Fi.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Vh(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,rt=this.pa;var ot=this.Ca,at=Math.round(rt.x*ot)/ot,At=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-at,-At),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Mu(this,a),rt=0;rt<b;rt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[rt].gc(a,this);if(y=!1,this.Yf?Fl(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Fi.prototype.Cd=Fi.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=br&&br.nx,x=this.zw,E||this.Yh===null){for(x[this.Tq]=y,this.Tq=(this.Tq+1)%x.length,b=y=0;b<x.length;b++)y+=x[b];this.Sq=y/x.length}if(this.pb!==1&&(a.globalAlpha=1),E)for(a.setTransform(1,0,0,1,0,0),E=0;E<x.length;E++)a.fillText(x[E].toString(),20,150+ +(20*E))}}};function jh(a,y,x,E,b,z,tt,rt,ot,at){if(a.Ka!==null){a.ta===null&&Yt("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),at===void 0&&(at=!1),Vh(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var At=a.Ca;a.Ca=b;var ft=a.Wa.s,pt=ft.length;try{var xt=new be(z.x,z.y,E.width/b,E.height/b),Ct=xt.copy();Ct.Co(x),uA(a,Ct),Us(a),a.Fd(ft,pt,a,xt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),rt!==null&&rt!==""&&(y.fillStyle=rt,y.ox(0,0,E.width,E.height));var Mt=a.Mb;y.scale(Mt,Mt);var Gt=Fi.alloc();Gt.reset(),Gt.translate(x.left,x.top),Gt.scale(b),z.x===0&&z.y===0||Gt.translate(-z.x,-z.y),y.setTransform(Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),y.yc(),y instanceof Ea&&Id(y,Gt.m11,Gt.m12,Gt.m21,Gt.m22,Gt.dx,Gt.dy),Fi.free(Gt),Mu(a,y),y.globalAlpha=a.pb;var Ot=a.Qj("Grid");if(tt){var Wt=new le,Zt=tt.iterator;for(Zt.reset();Zt.next();){var te=Zt.value;te instanceof ei&&(at||te.layer!==Ot)&&(te.Gj(),Wt.add(te))}for(at=0;at<pt;at++)Dc(ft[at],y,a,Wt,ot);Wt.each(function(me){return me.Gj()})}else for(Wt=0;Wt<pt;Wt++){var re=ft[Wt];re===Ot?at&&re.gc(y,a,!0):re.gc(y,a,ot)}a.$i=!1,a.Yf&&Fl(a.Yf,a)&&a.Vp()}finally{a.Ca=At,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,pt,a,a.viewportBounds),uA(a),a.ib instanceof Ea&&(a.ib.Nj.PA(),a.redraw())}}}Pt.Gf=function(a){return this.Rg[a]},Pt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Pt.Tx=function(){this.Rg=new li,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Ur||Fr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Mu(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Pt.Ql=function(a){return this.on[a]},Pt.sA=function(a,y){this.on[a]=y},Pt.Sx=function(){this.on=new li,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Pt.set=function(a){return Object.assign(this,a),this},Pt.Du=function(a){return this.nm(a)},Pt.nm=function(a){return Kh(this,a),this};function Kh(a,y){var x=a instanceof Ve,E=a instanceof ge,b;for(b in y){b===""&&Yt("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var rt=b.indexOf(".");if(0<rt){var ot=b.substring(0,rt);x?z=a.fb(ot):(z=a[ot],z==null&&(z=a.toolManager[ot])),Ne(z)?tt=b.substr(rt+1):Yt("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!ki(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&ki(a.toolManager,tt))z=a.toolManager;else if(E&&Ld(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Kn&&tt==="Changed"){a.Pe(y[tt]);continue}else Yt('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof oe&&z.Vw(tt)}}Pt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new vn,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Pt.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},ge.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==qh&&this.rj.hi(0,0,0,0)&&y.width===a.width&&y.height===a.height){var E=this.scale,b=Math.max(a.y,y.y),z=Math.min(a.y+a.height,y.y+y.height);if(0<Math.max(0,Math.min(a.x+a.width,y.x+y.width)-Math.max(a.x,y.x))*E&&0<Math.max(0,z-b)*E){if(!(this.ld||(this.kg=!1,this.Ka===null||(this.ld=!0,this.documentBounds.w()||(E=be.alloc(),Qf(this,this.computeBounds(E)),be.free(E)),E=this.ta,E===null||E instanceof qs)))){var tt=this.Mb;b=this.Aa*tt;var rt=this.ya*tt,ot=this.scale*tt;z=Math.round(Math.round(y.x*ot)-Math.round(a.x*ot)),y=Math.round(Math.round(y.y*ot)-Math.round(a.y*ot)),ot=this.jw,a=this.oy,ot.width!==b&&(ot.width=b),ot.height!==rt&&(ot.height=rt),a.clearRect(0,0,b,rt),ot=190*tt;var at=70*tt,At=Math.max(z,0),ft=Math.max(y,0),pt=Math.floor(b-At),xt=Math.floor(rt-ft);a.drawImage(E.Oa,At,ft,pt,xt,0,0,pt,xt),Fl(this.Yf,this)&&a.clearRect(0,0,ot,at),E=bn(),a=bn(),xt=Math.abs(z),pt=Math.abs(y);var Ct=At===0?0:b-xt;At=Ht.allocAt(Ct,0),xt=Ht.allocAt(xt+Ct,rt),a.push(new be(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y)));var Mt=this.Ab;if(Mt.reset(),Mt.scale(tt,tt),this.Ca!==1&&Mt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Mt.translate(-tt.x,-tt.y),Tn(At,Mt),Tn(xt,Mt),E.push(new be(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),Ct=ft===0?0:rt-pt,At.h(0,Ct),xt.h(b,pt+Ct),a.push(new be(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),Tn(At,Mt),Tn(xt,Mt),E.push(new be(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),Fl(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,At.h(b,rt),xt.h(ot+b,at+rt),a.push(new be(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y))),Tn(At,Mt),Tn(xt,Mt),E.push(new be(Math.min(At.x,xt.x),Math.min(At.y,xt.y),Math.abs(At.x-xt.x),Math.abs(At.y-xt.y)))),Ht.free(At),Ht.free(xt),js(this,!1,!0),this.Ka===null&&Yt("No div specified"),this.ta===null&&Yt("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(Vh(this),rt=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*rt,this.ya*rt),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,ot=Math.round(z.x*tt)/tt,at=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-ot,-at),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)ot=a[tt],ot.width!==0&&ot.height!==0&&b.rect(Math.floor(ot.x),Math.floor(ot.y),Math.ceil(ot.width),Math.ceil(ot.height));for(b.clip(),b.setTransform(rt,0,0,rt,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),Mu(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){at=ZA(tt,b),ft=tt.Zq,ft.length=0,At=this.scale,pt=be.alloc(),xt=tt.Pa.s,Mt=xt.length,Ct=ot.length;for(var Gt=0;Gt<Mt;Gt++){var Ot=xt[Gt],Wt=Yf(Ot,Ot.actualBounds);t:{for(var Zt=2/At,te=4/At,re=0;re<Ct;re++){var me=ot[re];if(me.width!==0&&me.height!==0&&Wt.Vu(me.x-Zt,me.y-Zt,me.width+te,me.height+te)){Wt=!0;break t}}Wt=!1}Wt&&tt.Oj(b,Ot,this,ft,At,pt,!0)}be.free(pt),b.globalAlpha=at}b.restore(),b.Vc(!0),this.Yf&&Fl(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Ln(E),Ln(a),this.ld=!1}}else this.bd();x&&(Aa(this),this.bd(),Hh(this,!0))}else x?(Aa(this),this.bd(),Hh(this,!0)):this.bd()}};function Vh(a){a.pn!==!1&&(a.pn=!1,Sd(a,a.Aa,a.ya))}function Sd(a,y,x){Ol(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function _h(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,rt=a.Be?a.Db:0,ot=b.clientWidth||x+tt,at=b.clientHeight||E+rt,At=a.viewportBounds;b=At.x;var ft=At.y,pt=At.width,xt=At.height;if((ot!==x+tt||at!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=at,z=a.pn=!0,Ol(a)),!a.hf||!a.viewportBounds.w())return!0;var Ct=a.ku,Mt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Gt=a.documentBounds,Ot=0,Wt=0,Zt=0,te=0,re=At.width,me=At.height,ln=a.rj;a.contentAlignment.sb()?(Gt.width>re&&(Ot=ln.left,Wt=ln.right),Gt.height>me&&(Zt=ln.top,te=ln.bottom)):(Ot=ln.left,Wt=ln.right,Zt=ln.top,te=ln.bottom);var Nn=Gt.width+Ot+Wt,Fn=Gt.height+Zt+te;ln=a.scale;var tn=Nn>ot/ln,Ge=Fn>at/ln;if(!(z||a.gf||a.Be||tn||Ge))return!0;Ot=Gt.x-Ot,ot=At.x,Wt=Gt.right+Wt,at=At.right+tt,Zt=Gt.y-Zt;var bi=At.y;Gt=Gt.bottom+te,At=At.bottom+rt;var Si="1px";if(te="1px",a.scrollMode===qA&&(tn||Ge)&&(tn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(tn=1,Ot+1<ot&&(tn=Math.max((ot-Ot)*ln+a.Aa,tn)),Wt>at+1&&(tn=Math.max((Wt-at)*ln+a.Aa,tn)),re+tt+1<Nn&&(tn=Math.max((Nn-re)*ln+a.Aa,tn)),Si=tn.toString()+"px"),Ge&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(tn=1,Zt+1<bi&&(tn=Math.max((bi-Zt)*ln+a.ya,tn)),Gt>At+1&&(tn=Math.max((Gt-At)*ln+a.ya,tn)),me+rt+1<Fn&&(tn=Math.max((Fn-me)*ln+a.ya,tn)),te=tn.toString()+"px")),tn=Si!=="1px",Ge=te!=="1px",tn&&Ge||!tn&&!Ge||(Ge&&(at-=a.Db),tn&&(At-=a.Db),Nn<re+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Ot+1<ot&&(tt=Math.max((ot-Ot)*ln+a.Aa,tt)),Wt>at+1&&(tt=Math.max((Wt-at)*ln+a.Aa,tt)),re+1<Nn&&(tt=Math.max((Nn-re)*ln+a.Aa,tt)),Si=tt.toString()+"px"),tn=Si!=="1px",tt=a.ya,tn!==a.Be&&(tt=tn?a.ya-a.Db:a.ya+a.Db),Fn<me+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,Zt+1<bi&&(rt=Math.max((bi-Zt)*ln+tt,rt)),Gt>At+1&&(rt=Math.max((Gt-At)*ln+tt,rt)),me+1<Fn&&(rt=Math.max((Fn-me)*ln+tt,rt)),te=rt.toString()+"px"),Ge=te!=="1px"),a.qr&&tn===a.Be&&Ge===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(tn!==a.Be&&(Si==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=tn,Mt.style.width=Si,Ge!==a.gf&&(te==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Ht.alloc(),Ge?(y.style.left=a.Db+"px",a.position=rt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=rt.h(a.pa.x-a.Db/a.scale,a.pa.y)),Ht.free(rt))),z&&Ol(a),a.gf=Ge,Mt.style.height=te,a.gu=!0,z&&(a.pn=!0),y=Ct.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(re+1<Nn?y=(a.position.x-Ot)*ln:Ot+1<ot?y=Ct.scrollWidth-Ct.clientWidth:Wt>at+1&&(y=a.position.x*ln)),a.tn)switch(a.bu){case"negative":y=-(Ct.scrollWidth-y-Ct.clientWidth);break;case"reverse":y=Ct.scrollWidth-y-Ct.clientWidth}return Ct.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(me+1<Fn?Ct.scrollTop=(a.position.y-Zt)*ln:Zt+1<bi?Ct.scrollTop=Ct.scrollHeight-Ct.clientHeight:Gt>At+1&&(Ct.scrollTop=a.position.y*ln)),ot=a.Aa,at=a.ya,Ct.style.width=ot+(a.gf?a.Db:0)+"px",Ct.style.height=at+(a.Be?a.Db:0)+"px",x!==ot||E!==at||a.animationManager.zb?(x=be.allocAt(b,ft,pt,xt),a.onViewportBoundsChanged(x,a.viewportBounds,ln,z),be.free(x),!1):!0}Pt=ge.prototype,Pt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Yt("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&&Yt('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(Qo,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Pt.oi=function(a){this.partManager.oi(a);var y=this;fA(a,function(x){JA(y,x)}),(a instanceof vr||a instanceof Ti&&a.placeholder!==null)&&a.v(),a.data!==null&&fA(a,function(x){xv(y.partManager,x)}),ia(a)!==!0&&Zc(a)!==!0||this.De.add(a),Oy(a,!0,this),Ry(a)?(a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.$b()},Pt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&fA(a,function(x){Bv(y.partManager,x,y)}),this.De.remove(a),Ry(a)?(a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Yf(a,a.actualBounds)),this.$b()},Pt.remove=function(a){xd(this,a,!0)};function xd(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(ts,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Pt.Is=function(a,y){if(y===void 0&&(y=!1),mn(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new le,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Pt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},ge.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=zc(this)),this.toolManager!==null){var b=new vn;if(a!==null)if(mn(a))for(var z=0;z<a.length;z++)EA(this,b,a[z],x,E);else for(a=a.iterator;a.next();)EA(this,b,a.value,x,E);else{for(a=this.parts;a.next();)EA(this,b,a.value,x,E);for(a=this.nodes;a.next();)EA(this,b,a.value,x,E);for(a=this.links;a.next();)EA(this,b,a.value,x,E)}fh(this,b,y,E,x)}};function EA(a,y,x,E,b,z){if(!y.contains(x)&&(z===void 0&&(z=!1),!E||z||x.canMove()||x.canCopy()))if(b===void 0&&(b=zc(a)),x instanceof fn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof Ti&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)EA(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var rt=tt.fromNode,ot=tt.toNode;rt!==null&&y.contains(rt)&&ot!==null&&y.contains(ot)&&EA(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)EA(a,y,x.value,E,b)}else if(x instanceof en)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)EA(a,y,x.value,E,b);else x instanceof vr||y.add(x,a.Pd(b,x,x.location))}function fh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Ht.alloc(),tt=Ht.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||Kc(a,y);for(var rt=bn(),ot=bn(),at=y.iterator,At=Ht.alloc();at.next();){var ft=at.key,pt=at.value;if(ft.Zc()){var xt=Vc(a,ft,y);xt!==null?rt.push(new it(ft,pt,xt)):(!b||ft.canMove())&&(xt=pt.point,z.assign(xt),a.computeMove(ft,z.add(tt),E,At),ft.location=At,pt.shifted===void 0&&(pt.shifted=new Ht),pt.shifted.assign(At.re(xt)))}else at.key instanceof en&&ot.push(at.sa)}for(Ht.free(At),b=rt.length,at=0;at<b;at++)ft=rt[at],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Ht),ft.node.location=z.add(ft.Su.shifted);for(b=Ht.alloc(),at=Ht.alloc(),ft=ot.length,pt=0;pt<ft;pt++){var Ct=ot[pt];if(xt=Ct.key,xt instanceof en)if(xt.suspendsRouting){xt.Tg=null,At=xt.fromNode;var Mt=xt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Mt=Ct.value.point,xt.dragComputation===null)y.add(xt,a.Pd(E,xt,tt)),cc(xt,tt.x-Mt.x,tt.y-Mt.y);else{Ct=Ht.allocAt(0,0),(At=xt.i(0))&&At.w()&&Ct.assign(At);var Gt=At=Ht.alloc().assign(Ct).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Gt=Ht.alloc(),jc(a,xt,At,Gt,E)),At.assign(xt.dragComputation(xt,At,Gt)).re(Ct),y.add(xt,a.Pd(E,xt,At)),cc(xt,At.x-Mt.x,At.y-Mt.y),Ht.free(Ct),Ht.free(At),Gt!==At&&Ht.free(Gt)}else At!==null&&(b.assign(At.location),Gt=y.I(At),Gt!==null&&b.re(Gt.point)),Mt!==null&&(at.assign(Mt.location),Gt=y.I(Mt),Gt!==null&&at.re(Gt.point)),At!==null&&Mt!==null?b.Xa(at)?(At=Ct.value.point,Mt=z,Mt.assign(b),Mt.re(At),y.add(xt,a.Pd(E,xt,b)),cc(xt,Mt.x,Mt.y)):(xt.suspendsRouting=!1,xt.bb()):(Ct=Ct.value.point,At=At!==null?b:Mt!==null?at:tt,y.add(xt,a.Pd(E,xt,At)),cc(xt,At.x-Ct.x,At.y-Ct.y))}else(xt.fromNode===null||xt.toNode===null)&&(At=Ct.value.point,y.add(xt,a.Pd(E,xt,tt)),cc(xt,tt.x-At.x,tt.y-At.y))}Ht.free(z),Ht.free(tt),Ht.free(b),Ht.free(at),Ln(rt),Ln(ot),x||(Us(a),ku(a,y))}}ge.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Ht),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Ht.alloc(),jc(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,rt=tt.x;isNaN(rt)&&(rt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var ot=a.maxLocation,at=ot.x;return isNaN(at)&&(at=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ot=ot.y,isNaN(ot)&&(ot=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(rt,Math.min(x.x,at)),Math.max(tt,Math.min(x.y,ot))),b!==y&&Ht.free(b),E};function zc(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function jc(a,y,x,E,b){if(b===void 0&&(b=zc(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,rt=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var ot=z.gridCellSize;isNaN(a)&&(a=ot.width),isNaN(y)&&(y=ot.height),z=z.gridOrigin,isNaN(rt)&&(rt=z.x),isNaN(tt)&&(tt=z.y)}z=Ht.allocAt(0,0),z.yi(0,0,a,y,b),se.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Ht.free(z)}}function Kc(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof en&&(y.suspendsRouting=!0)}function ku(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof en&&(x.suspendsRouting=!1,lv(x)&&x.bb())}a.Mr=!1}}function Vc(a,y,x){return y=y.containingGroup,y!==null&&(a=Vc(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Pt=ge.prototype,Pt.Pd=function(a,y,x){if(x===void 0)return new kA(Ii);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new kA(new Ht(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new kA(x.copy())};function Bd(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Yt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Yt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Yt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Yt("Cannot move a Layer before or after itself: "+y)),y.diagram!==a){y=y.name,a=a.Wa,x=a.count;for(var E=0;E<x;E++)a.M(E).name===y&&Yt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Pt.Al=function(a){Bd(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(Qo,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Pt.Ww=function(a,y){Bd(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ts,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z,a);break}return this.cc!==null&&this.cb(Qo,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Pt.Cy=function(a,y){Bd(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ts,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;z<b;z++)if(x.M(z)===y){x.Gb(z+1,a);break}return this.cc!==null&&this.cb(Qo,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Pt.kA=function(a){if(a.diagram!==this&&Yt("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(ts,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Pt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Pt.Yw=function(a){return this.pf===null&&(this.pf=new _t),this.pf.add(a),this.model.Pe(a),this},Pt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Pt.Pe=function(a){return this.zg===null&&(this.zg=new _t),this.zg.add(a),this},Pt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Pt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==da&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Pt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new yo;rt.diagram=this,rt.change=a,rt.propertyName=y,rt.object=x,rt.oldValue=E,rt.oldParam=z,rt.newValue=b,rt.newParam=tt,this.ds(rt)},Pt.g=function(a,y,x,E,b){this.cb(fo,a,this,y,x,E,b)},ge.prototype.changeState=function(a,y){if(a!==null&&a.diagram===this){var x=this.skipsModelSourceBindings;try{this.skipsModelSourceBindings=!0;var E=a.change;if(E===fo){var b=a.object;if(uo(b,a.propertyName,a.I(y)),b instanceof oe){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===Qo){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof Ve)if(typeof rt=="number"&&ot instanceof oe){y?tt.pc(rt):tt.Gb(rt,ot);var at=tt.part;at!==null&&at.Wb()}else typeof rt=="number"&&ot instanceof ss&&(ot.isRow?hy(tt,rt,y?void 0:ot):cy(tt,rt,y?void 0:ot));else if(tt instanceof ms){var At=a.oldParam===!0;typeof rt=="number"&&ot instanceof ei&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(At?rt:-1,ot,At)):tt.oi(rt,ot,At))}else tt instanceof ge?typeof rt=="number"&&ot instanceof ms&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):Yt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===ts){var ft=a.object,pt=a.oldParam,xt=a.oldValue;if(ft instanceof Ve)typeof pt=="number"&&xt instanceof oe?y?ft.Gb(pt,xt):ft.pc(pt):typeof pt=="number"&&xt instanceof ss&&(xt.isRow?hy(ft,pt,y?xt:void 0):cy(ft,pt,y?xt:void 0));else if(ft instanceof ms){var Ct=a.newParam===!0;typeof pt=="number"&&xt instanceof ei&&(y?0>ft.Pa.indexOf(xt)&&ft.oi(pt,xt,Ct):(xt.isSelected=!1,xt.isHighlighted=!1,xt.Wb(),ft.pc(Ct?pt:-1,xt,Ct)))}else ft instanceof ge?typeof pt=="number"&&xt instanceof ms&&(y?(xt.Xe(this),this.Wa.Gb(pt,xt)):this.Wa.mb(pt)):Yt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==da&&Yt("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 Cd(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Ol(a),a.N(),a.Ee=!0,E.zb&&(XA(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Ol(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,at=a.contentAlignment;isNaN(rt)&&(at.$c()?at.Hf(bs)?rt=0:at.Hf(ca)&&(rt=z-1):rt=at.sb()?at.x*(z-1):z/2),isNaN(ot)&&(at.$c()?at.Hf(_s)?ot=0:at.Hf(Ws)&&(ot=tt-1):ot=at.sb()?at.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=Ht.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Ht.free(z),a.Ca=x,Ol(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Ja(a,!1),E.zb&&(XA(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!==Ks||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Ao&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),ig(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=Je.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var at=tt[ot],At=Math.abs(at.interval);2>At||(yh(at.figure)?z=z*At/se.vx(z,At):b=b*At/se.vx(b,At))}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=be.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){be.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,be.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Ht.alloc(),se.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Je.free(E),x.part.location=y,Ht.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;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},ge.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},ge.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),mn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof ei||Yt("Diagram.selectCollection given something that is not a Part: "+E),E.isSelected=!0}else for(a=a.iterator;a.next();)y=a.value,y instanceof ei||Yt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},ge.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Pt=ge.prototype,Pt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Pt.Jz=function(a){a=new le().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof ei||Yt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Pt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Ht.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),Ht.free(z);return}Yt("scrolling unit must be 'pixel', 'line', 'page', or 'document', not: "+a)}b/=this.scale,x=this.position,y==="up"?this.position=z.h(x.x,x.y-b):y==="down"?this.position=z.h(x.x,x.y+b):y==="left"?this.position=z.h(x.x-b,x.y):y==="right"?this.position=z.h(x.x+b,x.y):Yt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Ht.free(z)},Pt.tv=function(a){var y=this.viewportBounds;y.Re(a)||(a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a)},Pt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Pt.op=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),a.copy().transform(this.Ab)},Pt.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,at=y.m22,At=y.dx,ft=y.dy,pt=x*tt+E*ot+At;y=x*rt+E*at+ft;var xt=b*tt+E*ot+At;return a=b*rt+E*at+ft,E=x*tt+z*ot+At,x=x*rt+z*at+ft,tt=b*tt+z*ot+At,b=b*rt+z*at+ft,z=Math.min(pt,xt),pt=Math.max(pt,xt),xt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),pt=Math.max(pt,E),xt=Math.min(xt,x),y=Math.max(y,x),z=Math.min(z,tt),pt=Math.max(pt,tt),xt=Math.min(xt,b),y=Math.max(y,b),new be(z,xt,pt-z,y-xt)},Pt.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Tn(a.copy(),this.Ab)};function dg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function Wh(a){return a=Of.get(a),a!==null?new a:new Nr}ge.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===da&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(ot){return ot.diagram=b}),a.mouseMoveTools.each(function(ot){return ot.diagram=b}),a.mouseUpTools.each(function(ot){return ot.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===da){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Us(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||hr(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(dg(this),this.As.clear(),sA(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;Bi(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function JA(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)dh(a,y[E])}function dh(a,y){if(y instanceof Ka){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof le&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function Nf(a,y){if(y instanceof Ka){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof le&&x.Bg.remove(a),xg(E));break}}}}}ge.prototype.Wd=function(){this.partManager.Wd()},ge.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},ge.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},ge.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},ge.prototype.Vb=function(a){return this.partManager.Vb(a)},ge.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Pt=ge.prototype,Pt.Lc=function(a){return this.partManager.Lc(a)},Pt.ii=function(a){return this.partManager.ii(a)},Pt.Kc=function(a){return this.partManager.Kc(a)},Pt.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:ri(zr(y)))},Pt.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:ri(zr(y)))};function Ol(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function Qf(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Ja(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Pt.Va=function(){if(this.Zi){var a=be.alloc();Qf(this,this.computeBounds(a)),be.free(a)}},Pt.rz=function(){for(var a=new le,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Pt.qz=function(){return this.ai.iterator},Pt.Uz=function(a){Us(this),a&&_c(this,!0),this.ld?Fd(this,!1):(this.Jk=!0,ga(this))};function _c(a,y){for(var x=a.ai.iterator;x.next();)Pd(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Pd(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)Pd(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Fd(a,y){if(a.xh&&!a.lt){var x=a.aa;a.aa=!0;var E=a.undoManager.transactionLevel,b=a.layout,z=a.animationManager;try{E===0&&(a.undoManager.isInternalTransaction=!0,a.Ea("Layout")),1>=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||oA(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)Yh(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Us(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||hr(z),a.aa=x}}}function Yh(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Yh(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),zh(a,y),b.isValidLayout=!0):a.xh=!0)}}Pt.yz=function(){for(var a=new _t,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function gg(a){function y(b){var z=b.toLowerCase(),tt=new _t;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new vn,E=new vn;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 Ld(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Uf(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Yt("Unknown DiagramEvent name: "+y)}Pt.Bj=function(a,y){return a=Uf(this,a),a!==null&&a.add(y),this},Pt.am=function(a,y){a=Uf(this,a),a!==null&&a.remove(y)},Pt.R=function(a,y,x){var E=Uf(this,a),b=new fu;if(b.diagram=this,a=Ld(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<y;x++)(0,E[x])(b)};function Df(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Pt.Yj=function(a,y){return Wc(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},ge.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Cl(this,a):a.assign(this.documentBounds)};function Wc(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Sp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=gh(a,x)),x===null){y=be.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,rt=tt.layer;rt!==null&&rt.visible&&!rt.isTemporary&&Xh(a,tt,E,y)}be.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=be.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof fn&&Xh(a,tt,E,y);be.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&ow(b);return b}function gh(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?gh(a,y.containingGroup):null}function Xh(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(Eg(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(dc,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=dc}else if(y instanceof Ti)for(y=y.memberParts;y.next();)b=y.value,b instanceof fn&&Xh(a,b,x,E)}}function hA(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}ge.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Ed(this)};function Ed(a){a.vk===-1&&(a.vk=Bi(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=be.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Qf(a,y),be.free(y),a.Fc=!0,a.bd(),Ed(a))}},a.vp))}ge.prototype.ug=function(){this.vk!==-1&&(He.clearTimeout(this.vk),this.vk=-1)},ge.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=be.allocAt(0,0,E.width*b,E.height*b);var z=Ht.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.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.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.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(Ii)||(y=new Ht(y.x+z.x/b,y.y+z.y/b)),be.free(E),Ht.free(z),y},Pt=ge.prototype,Pt.Cs=function(){return null},Pt.av=function(){return null},Pt.bs=function(a,y){this.pj.add(a,y)},Pt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Ti&&(y.$p=null)})};function Yc(a,y,x){function E(){var At=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||At-at>ot?y(x,b,rt):He.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,ot=x.callbackTimeout||300,at=+new Date;return He.requestAnimationFrame(function(){E()}),null}Pt.Wz=function(a){return Po?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Pt.Jx=function(a){return a===void 0&&(a={}),Yc(this,this.Xz,a)},Pt.Xz=function(a,y,x){var E=pg(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 Wl+"data":b=E.getImageData(0,0,x.width,x.height);break;case Wl:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&Yt('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 pg(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Yt("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 Je(1/0,1/0):new Je(2e3,2e3));var rt=y.position||null,ot=y.parts||null,at=y.padding===void 0?1:y.padding,At=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var pt=y.document||document,xt=y.elementFinished||null,Ct=y.showTemporary;Ct===void 0&&(Ct=!ft),y=y.showGrid,y===void 0&&(y=Ct),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof at=="number"?at=new Xi(at):at instanceof Xi||Yt("MakeImage padding must be a Margin or a number."),at.left=Math.max(at.left,0),at.right=Math.max(at.right,0),at.top=Math.max(at.top,0),at.bottom=Math.max(at.bottom,0),a.ib.Vc(!0),ft=new El(null,pt,void 0,!0);var Mt=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(at.left+at.right),ft.height=a.ya+Math.ceil(at.top+at.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=pt,E.hs=xt,jh(a,E.context,at,new Je(ft.width,ft.height),a.Ca,a.pa,ot,At,Ct,y),E.context):(a.Xm=!1,jh(a,Mt,at,new Je(ft.width,ft.height),a.Ca,a.pa,ot,At,Ct,y),a.Xm=!0,ft.context);var Gt=a.Pp,Ot=a.documentBounds.copy();if(Ot.Fv(a.yb),Ct)for(var Wt=a.Wa.s,Zt=Wt.length,te=0;te<Zt;te++){var re=Wt[te];if(re.visible&&re.isTemporary){re=re.Pa.s;for(var me=re.length,ln=0;ln<me;ln++){var Nn=re[ln];Nn.isInDocumentBounds&&Nn.isVisible()&&(Nn=Nn.actualBounds,Nn.w()&&Ot.ed(Nn))}}}if(Wt=new Ht(Ot.x,Ot.y),ot!==null){for(Zt=new be(0,0,0,0),te=!0,re=ot.iterator,re.reset();re.next();)me=re.value,me instanceof ei&&(ln=me.layer,ln!==null&&!ln.visible||ln!==null&&!Ct&&ln.isTemporary||!me.isVisible()||(me=me.actualBounds,me.w()&&(te?(te=!1,Zt.assign(me)):Zt.ed(me))));Ot.width=Zt.width,Ot.height=Zt.height,Wt.x=Zt.x,Wt.y=Zt.y}return rt!==null&&rt.w()&&(Wt=rt,z||(z=Gt)),Zt=rt=0,at!==null&&(rt=at.left+at.right,Zt=at.top+at.bottom),te=re=0,b!==null&&(re=b.width,te=b.height,isFinite(re)&&(re=Math.max(0,re-rt)),isFinite(te)&&(te=Math.max(0,te-Zt))),b!==null&&z!==null?(z==="NaN"&&(z=Gt),b.w()?(b=re,Ot=te):isNaN(te)?(b=re,Ot=Ot.height*z):(b=Ot.width*z,Ot=te)):b!==null?b.w()?(z=Math.min(re/Ot.width,te/Ot.height),b=re,Ot=te):isNaN(te)?(z=re/Ot.width,b=re,Ot=Ot.height*z):(z=te/Ot.height,b=Ot.width*z,Ot=te):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/Ot.width,(tt.height-Zt)/Ot.height),z>Gt?(z=Gt,b=Ot.width,Ot=Ot.height):(b=tt.width,Ot=tt.height)):(b=Ot.width*z,Ot=Ot.height*z):(z=Gt,b=Ot.width,Ot=Ot.height),at!==null?(b+=rt,Ot+=Zt):at=new Xi(0),tt!==null&&(Gt=tt.width,tt=tt.height,isNaN(Gt)&&(Gt=2e3),isNaN(tt)&&(tt=2e3),isFinite(Gt)&&(b=Math.min(b,Gt)),isFinite(tt)&&(Ot=Math.min(Ot,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(Ot),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=pt,E.hs=xt,jh(a,E.context,at,new Je(Math.ceil(b),Math.ceil(Ot)),z,Wt,ot,At,Ct,y),E.context):(a.Xm=!1,jh(a,Mt,at,new Je(Math.ceil(b),Math.ceil(Ot)),z,Wt,ot,At,Ct,y),a.Xm=!0,ft.context)}Ze.Object.defineProperties(ge.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof dt||(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 qs(this,He.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 qs(this,He.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(He,"resize",this.Ov,!1),this.removeEventListener(He,"wheel",this.$j,!0),AA===this&&(AA=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Oc(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||1<a)&&wn(a,"0 <= value <= 1",ge,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),Ja(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),Ja(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),Ja(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),Ja(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&wn(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&&wn(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<a)){this.R("ChangingSelection",this.selection),y=this.selection.Fa();for(var x=0;x<a;x++)y[x].isSelected=!1;this.R("ChangedSelection",this.selection)}}else wn(a,">= 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||dg(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&&Yt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Mf(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,oA(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=Wh(this.cc.type);for(var b=0;b<x.length;b++)this.add(x[b]);a.Pe(this.Hb),this.partManager.addAllModeledParts(),a.ik(this.Hb),a.Pe(this.Oc),this.pf!==null&&this.pf.each(function(z){return a.Pe(z)}),this.vb=E,this.Ya(),this.vb||this.N(),y&&a.undoManager.copyProperties(y.undoManager)}}},aa:{get:function(){return this.rw},set:function(a){this.rw=a}},As:{get:function(){return this.sy}},skipsModelSourceBindings:{get:function(){return this.Iw},set:function(a){this.Iw=a}},Ns:{get:function(){return this.ou},set:function(a){this.ou=a}},nodeTemplate:{get:function(){return this.Lg.I("")},set:function(a){var y=this.Lg.I("");y!==a&&(this.Lg.add("",a),this.g("nodeTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},nodeTemplateMap:{get:function(){return this.Lg},set:function(a){var y=this.Lg;y!==a&&(this.Lg=a,this.g("nodeTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplate:{get:function(){return this.Yi.I("")},set:function(a){var y=this.Yi.I("");y!==a&&(this.Yi.add("",a),this.g("groupTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},groupTemplateMap:{get:function(){return this.Yi},set:function(a){var y=this.Yi;y!==a&&(this.Yi=a,this.g("groupTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplate:{get:function(){return this.Kh.I("")},set:function(a){var y=this.Kh.I("");y!==a&&(this.Kh.add("",a),this.g("linkTemplate",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},linkTemplateMap:{get:function(){return this.Kh},set:function(a){var y=this.Kh;y!==a&&(this.Kh=a,this.g("linkTemplateMap",y,a),this.undoManager.isUndoingRedoing||this.Wd())}},isMouseCaptured:{get:function(){return this.qw},set:function(a){var y=this.ta;y!==null&&(y=y.Oa,y instanceof SVGElement||(a?(this.lastInput.bubbles=!1,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.addEventListener(He,"pointermove",this.dk,!0),this.addEventListener(He,"pointerdown",this.ui,!0),this.addEventListener(He,"pointerup",this.fk,!0),this.addEventListener(He,"pointerout",this.ek,!0),this.addEventListener(He,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(He,"wheel",this.$j,!0),this.addEventListener(He,"selectstart",this.preventDefault,!1)):(this.removeEventListener(He,"pointermove",this.dk,!0),this.removeEventListener(He,"pointerdown",this.ui,!0),this.removeEventListener(He,"pointerup",this.fk,!0),this.removeEventListener(He,"pointerout",this.ek,!0),this.removeEventListener(He,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(He,"wheel",this.$j,!0),this.removeEventListener(He,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=Ht.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Uh(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Ol(this):(this.vb=!0,a=this.scale,pd(this,this.Sp,this.Aa/a,this.ya/a,this.zk,!1),this.vb=!1),this.vb||this.onViewportBoundsChanged(x,this.viewportBounds,this.Ca,!1)}Ht.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=hg(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=hg(this)),a.type!==Ve.Grid&&Yt("Diagram.grid must be a Panel of type Panel.Grid");var x=y.panel;x!==null&&x.remove(y),this.fe=a,a.name="GRID",x!==null&&x.add(a),uA(this),this.N(),this.g("grid",y,a)}}},viewportBounds:{get:function(){return this.Rw}},viewSize:{get:function(){return this.wo},set:function(a){var y=this.viewSize;y.D(a)||(this.wo=a=a.J(),this.ya=this.Aa=0,a.w()?(this.Aa=a.width,this.ya=a.height):this.Ka!==null&&(this.Aa=this.Ka.clientWidth||1,this.ya=this.Ka.clientHeight||1),Ol(this),this.Ya(),this.g("viewSize",y,a),this.redraw())}},fixedBounds:{get:function(){return this.ut},set:function(a){var y=this.ut;y.D(a)||(a.width!==-1/0&&a.height!==1/0&&a.height!==-1/0||Yt("fixedBounds width/height must not be Infinity"),this.ut=a=a.J(),this.Ya(),this.g("fixedBounds",y,a))}},scrollMargin:{get:function(){return this.rj},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===qA&&Ja(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,Ja(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,Cd(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&Cd(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==Ks&&Ja(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||Yt("initialViewportSpot must be a specific Spot: "+a),this.Bt=a,this.g("initialViewportSpot",y,a))}},initialDocumentSpot:{get:function(){return this.yt},set:function(a){var y=this.yt;y!==a&&(a.sb()||Yt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):wn(a,"> 0",ge,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):wn(a,"> 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),Ja(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 Xi(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&&Yt("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();)hp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Iu&&a!==Yo&&a!==$A&&Yt("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 Je(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 Xi(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Ze.Object.defineProperties(ge,{licenseKey:{get:function(){return Gf.jc()},set:function(a){Gf.add(a.replace(/\s/g,""))}},version:{get:function(){return Ps}}}),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 Of=new vn,Md=null,Po=He.document!==void 0,ph=null,bu="",Ks=new Be(ge,"None",0),Ra=new Be(ge,"Uniform",1),Tu=new Be(ge,"UniformToFill",2),Xc=new Be(ge,"CycleAll",10),Zh=new Be(ge,"CycleNotDirected",11),Jh=new Be(ge,"CycleNotDirectedFast",12),Hf=new Be(ge,"CycleNotUndirected",13),Rf=new Be(ge,"CycleDestinationTree",14),kd=new Be(ge,"CycleSourceTree",15),qA=new Be(ge,"DocumentScroll",1),qh=new Be(ge,"InfiniteScroll",2),Iu=new Be(ge,"TreeParentCollapsed",21),Yo=new Be(ge,"AllParentsCollapsed",22),$A=new Be(ge,"AnyParentsCollapsed",23),Gf=new _t,Ps="2.3.10",Wl="image",MA=null,tu=!1;function hs(){if(Po){var a=He.document.createElement("canvas"),y=a.getContext("2d"),x=Vn("7ca11abfd022028846");y[x]=Vn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Le.Dx+"4ae6247590da4bb21c324ba3a84e385776",Fi.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",se.za],b=1;5>b;b++)y[Vn("7ca11abfd7330390")](Vn(E[b-1]),10,15*b);for(y[x]=Vn("39f046ebb36e4b"),x=1;5>x;x++)y[Vn("7ca11abfd7330390")](Vn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Fi.prototype.Cd=Fi.prototype.Eu),MA=a}}ge.className="Diagram",ge.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=He.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){Po=a?He.document!==void 0:!1},ge.isUsingDOM=function(){return Po},ge.None=Ks,ge.Uniform=Ra,ge.UniformToFill=Tu,ge.CycleAll=Xc,ge.CycleNotDirected=Zh,ge.CycleNotDirectedFast=Jh,ge.CycleNotUndirected=Hf,ge.CycleDestinationTree=Rf,ge.CycleSourceTree=kd,ge.DocumentScroll=qA,ge.InfiniteScroll=qh,ge.TreeParentCollapsed=Iu,ge.AllParentsCollapsed=Yo,ge.AnyParentsCollapsed=$A;function $h(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Fl(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=He[Vn("76a715b2f73f148a")][Vn("72ba13b5")]||"";if(a.Rc=!0,Po){var E=ge[Vn("76a115b6ed251eaf4692")];if(E)for(var b=Gf.iterator;b.next()&&(E=b.value,E=Vn(E).split(Vn("39e9")),!(6>E.length));){var z=Vn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=Vn(Le[Vn("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=He[Vn("74a900bae4370f8b51")][Vn("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[Vn("73a612b6fb191d")](Vn("3aad1ab6e022098b4dc4")),z=Vn(E[2]),-1<tt&&(rt=rt[Vn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[Vn("76ad18b4f73e")],rt=x[Vn("73a612b6fb191d")](Vn("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[Vn("73a612b6fb191d")](z),0>tt&&z!==Vn("7da71ca0ad381e90")&&(tt=y[Vn("73a612b6fb191d")](Vn("76a715b2ef3e149757"))),0>tt&&(tt=y[Vn("73a612b6fb191d")](Vn("76a715b2ef3e149757"))),0>tt&&(tt=y[Vn("73a612b6fb191d")](Vn("2bfa41fdb3784bca12"))),0>tt&&(tt=x[Vn("73a612b6fb191d")](Vn("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[Vn("73a612b6fb191d")](Vn("35"))||y[Vn("73a612b6fb191d")](Vn("35"))===-1),!a.Rc||x[Vn("73a612b6fb191d")](Vn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Vn("73a612b6fb191d")](z)),!a.Rc)||(tt=He[Vn("76a715b2f73f148a")][Vn("69ad17a1e03e")],rt=tt[Vn("73a612b6fb191d")](Vn("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[Vn("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=He.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[Vn("79a417a0f0181a8946")]=E,He.document[Vn("78a712aa")]){He.document[Vn("78a712aa")][Vn("7bb806b6ed32388c4a875b")](tt),ot=He.getComputedStyle(tt).getPropertyValue(Vn("78a704b7e62456904c9b12701b6532a8"));var at=He.getComputedStyle(tt).getPropertyValue(Vn("75b817b0ea2202"));if(He.document[Vn("78a712aa")][Vn("68ad1bbcf533388c4a875b")](tt),ot){if(tt=He[Vn("77a902b0eb1b1e804a8a")],at==="0."+parseInt(rt,10)%100||ot.indexOf(parseInt(z[1]+z[2],16))!==-1&&ot.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(Vn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var At in tt)if(E===tt[At].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(At=x[Vn("76ad18b4f73e")],b=x[Vn("73a612b6fb191d")](Vn("35e7"))+2;b<At;b++)y+=x[b];x=y[Vn("73a612b6fb191d")](Vn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Vn("73a612b6fb191d")](Vn("35")))}}}return 0<a.Rc&&a!==a.wy}$h.className="DiagramHelper";function kA(a){this.j=a===void 0?new Ht:a,this.o=new Ht}Ze.Object.defineProperties(kA.prototype,{point:{get:function(){return this.j},set:function(a){this.j=a}},shifted:{get:function(){return this.o},set:function(a){this.o=a}}});var tc="DraggingInfo";kA.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function st(){this.reset()}st.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Je(NaN,NaN).freeze(),this.gridSnapCellSpot=dr,this.gridSnapOrigin=new Ht(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function ht(a,y){if(typeof a=="string"||He.Element&&a instanceof Element)var x=ge.call(this,a)||this;else x=ge.call(this)||this,y=a;return ut(x),y&&x.nm(y),x}Te(ht,ge);function ut(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Cr,a.layout=new Ds}ht.prototype.reset=function(){ge.prototype.reset.call(this),ut(this)},ht.className="Palette";function dt(a,y){if(typeof a=="string"||He.Element&&a instanceof Element)var x=ge.call(this,a)||this;else x=ge.call(this)||this,y=a;var E=x;x.animationManager.isEnabled=!1,x.vb=!0,x.V=null,x.mn=!1,x.nn=!1,x.F=!0,x.u=!0,x.ia=0,x.o=!1,x.ql=null,x.Xx("drawShadows",!1),a=new ei;var b=new Oi;return b.stroke="magenta",b.strokeWidth=2,b.fill="transparent",b.name="BOXSHAPE",a.selectable=!0,a.selectionAdorned=!1,a.selectionObjectName="BOXSHAPE",a.locationObjectName="BOXSHAPE",a.resizeObjectName="BOXSHAPE",a.cursor="move",a.add(b),x.j=a,x.allowCopy=!1,x.allowDelete=!1,x.allowSelect=!0,x.autoScrollRegion=new Xi(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new zt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Ht(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),It(E)},x.Xd=function(){E.observed!==null&&(E.Ya(),E.N())},x.Ha=function(){1>E.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&It(E)},x.autoScale=Ra,x.vb=!1,y&&Object.assign(x,y),x}Te(dt,ge),dt.prototype.computePixelRatio=function(){return 1},dt.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(Vh(this),this.ql===null){var x=new El(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),Ft(this)}finally{this.ta=a,this.ib=y}}}ge.prototype.redraw.call(this)},dt.prototype.gc=function(){if(this.Ka===null&&Yt("No div specified"),this.ta===null&&Yt("No canvas specified"),!(this.ta instanceof qs)&&(Zm(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Vh(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?Ft(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;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Ft(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=be.alloc().assign(a.viewportBounds).ed(y.viewportBounds),uA(y,b),be.free(b),Us(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var rt=y[tt],ot=a;if(rt.visible&&rt.opacity!==0){var at=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&at.layer===rt&&(rt=ZA(rt,b),at.gc(b,ot),b.globalAlpha=rt);else{for(var At=ZA(rt,b),ft=ot.scale,pt=be.alloc(),xt=rt.Pa.s,Ct=xt.length,Mt=0;Mt<Ct;Mt++){var Gt=xt[Mt];(E||Gt!==at)&&rt.Oj(b,Gt,ot,null,ft,pt,!1)}be.free(pt),b.globalAlpha=At}}}}}function It(a){var y=a.box;if(y!==null){var x=a.observed;if(x!==null){a.Fc=!0,x=x.viewportBounds;var E=y.selectionObject,b=Je.alloc();b.h(x.width,x.height),E.desiredSize=b,Je.free(b),a=2/a.scale,E instanceof Oi&&(E.strokeWidth=a),y.location=new Ht(x.x-a/2,x.y-a/2),y.isSelected=!0}}}dt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Vl;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},dt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},dt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),It(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.Oz=E,this.R("ViewportBoundsChanged",this.fc,a))},Ze.Object.defineProperties(dt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof dt&&Yt("Overview.observed Diagram may not be an Overview itself: "+a),y!==a){if(y!==null&&(this.remove(this.box),y.am("ViewportBoundsChanged",this.Pf),y.am("DocumentBoundsChanged",this.Xd),y.am("InvalidateDraw",this.Ha),y.am("AnimationFinished",this.Of)),this.V=a,a!==null&&(a.Bj("ViewportBoundsChanged",this.Pf),a.Bj("DocumentBoundsChanged",this.Xd),a.Bj("InvalidateDraw",this.Ha),a.Bj("AnimationFinished",this.Of),this.add(this.box)),this.Ya(),a===null){this.ql=null;var x=this.ta,E=this.ib;x&&E&&(E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,x.width,x.height))}else this.Ha(null),It(this),this.N();this.g("observed",y,a)}}},box:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.remove(y),this.add(this.j),It(this),this.g("box",y,a))}},drawsTemporaryLayers:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a,this.redraw())}},drawsGrid:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a,this.redraw())}},updateDelay:{get:function(){return this.ia},set:function(a){0>a&&(a=0),this.ia!==a&&(this.ia=a)}}}),dt.className="Overview";function zt(){Co.call(this),this.j=null}Te(zt,Co),zt.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.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new Ht(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Ht(a.x-this.j.x,a.y-this.j.y)),!0)},zt.prototype.doActivate=function(){this.j=null,Co.prototype.doActivate.call(this)},zt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},zt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new Ht(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Ht(a.x-this.j.x,a.y-this.j.y)}}},zt.className="OverviewDraggingTool";function Rt(){rn(this),this.H=AA,this.Ha=this.u=this.o=!0,this.F=this.V=this.nb=this.ia=!1,this.ij=this.j=null,this.Hb=1.05,this.Jt=NaN,this.sw=null,this.Au=NaN,this.yu=Vl,this.hb=!0,this.cg=null,this.ob=200}Rt.prototype.toString=function(){return"CommandHandler"},Rt.prototype.Xe=function(a){this.H=a},Rt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Ur?y.meta:y.control,E=y.shift,b=y.alt,z=y.key;!x||z!=="C"&&z!=="Insert"?x&&z==="X"||E&&z==="Del"?this.canCutSelection()&&this.cutSelection():x&&z==="V"||E&&z==="Insert"?this.canPasteSelection()&&this.pasteSelection():x&&z==="Y"||b&&E&&z==="Backspace"?this.canRedo()&&this.redo():x&&z==="Z"||b&&z==="Backspace"?this.canUndo()&&this.undo():z==="Del"||z==="Backspace"?this.canDeleteSelection()&&this.deleteSelection():x&&z==="A"?this.canSelectAll()&&this.selectAll():z==="Esc"?this.canStopCommand()&&this.stopCommand():z==="Up"?a.allowVerticalScroll&&(x?a.scroll("pixel","up"):a.scroll("line","up")):z==="Down"?a.allowVerticalScroll&&(x?a.scroll("pixel","down"):a.scroll("line","down")):z==="Left"?a.allowHorizontalScroll&&(x?a.scroll("pixel","left"):a.scroll("line","left")):z==="Right"?a.allowHorizontalScroll&&(x?a.scroll("pixel","right"):a.scroll("line","right")):z==="PageUp"?E&&a.allowHorizontalScroll?a.scroll("page","left"):a.allowVerticalScroll&&a.scroll("page","up"):z==="PageDown"?E&&a.allowHorizontalScroll?a.scroll("page","right"):a.allowVerticalScroll&&a.scroll("page","down"):z==="Home"?x&&a.allowVerticalScroll?a.scroll("document","up"):!x&&a.allowHorizontalScroll&&a.scroll("document","left"):z==="End"?x&&a.allowVerticalScroll?a.scroll("document","down"):!x&&a.allowHorizontalScroll&&a.scroll("document","right"):z===" "?this.canScrollToPart()&&this.scrollToPart():z==="Subtract"?this.canDecreaseZoom()&&this.decreaseZoom():z==="Add"?this.canIncreaseZoom()&&this.increaseZoom():x&&z==="0"?this.canResetZoom()&&this.resetZoom():E&&z==="Z"?this.canZoomToFit()&&this.zoomToFit():x&&!E&&z==="G"?this.canGroupSelection()&&this.groupSelection():x&&E&&z==="G"?this.canUngroupSelection()&&this.ungroupSelection():z==="F2"||y.event&&y.event.key==="F2"?this.canEditTextBlock()&&this.editTextBlock():z==="ContextMenu"||y.event&&y.event.key==="ContextMenu"?this.canShowContextMenu()&&this.showContextMenu():y.bubbles=!0:this.canCopySelection()&&this.copySelection()},Rt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Rt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Ao&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Rt.prototype.canStopCommand=function(){return!0},Rt.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},Rt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Rt.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new le,x=a.selection.iterator;x.next();)qc(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},Rt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Rt.prototype.copySelection=function(){var a=this.diagram,y=new le;for(a=a.selection.iterator;a.next();)qc(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Rt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Rt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Rt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Rt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)ph=null,bu="";else{x=y.model;var E=!1,b=!1,z=null;try{x.Tl()&&(E=x.Jj,x.Jj=this.copiesParentKey),x.Wj()&&(b=x.Ij,x.Ij=this.copiesGroupKey),z=y.Kj(a,null,!0)}finally{x.Tl()&&(x.Jj=E),x.Wj()&&(x.Ij=b),x=new _t,x.addAll(z),ph=x,bu=y.model.dataFormat}}y.R("ClipboardChanged",x)},Rt.prototype.pasteFromClipboard=function(){var a=new le,y=ph;if(y===null)return a;var x=this.diagram;if(bu!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},Rt.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var E=x.iterator;E.next();)E.value.isSelected=!0;if(a!==null){var b=y.computePartsBounds(y.selection);if(b.w()){var z=this.computeEffectiveCollection(y.selection,y.Wm);fh(y,z,new Ht(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Rt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||ph===null||ph.count===0||bu!==a.model.dataFormat)},Rt.prototype.undo=function(){this.diagram.undoManager.undo()},Rt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Rt.prototype.redo=function(){this.diagram.undoManager.redo()},Rt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Rt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Ks&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Rt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Ks?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Rt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Ks&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Rt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Ks?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Rt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Rt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Rt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;oA(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=Vl):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),hr(y)},Rt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Rt.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(ot){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;oA(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=ee(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var ot=b.pop();0<b.length&&ot instanceof fn&&ot.isTreeExpanded&&(!(ot instanceof Ti)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof ei&&y.tv(ot.actualBounds),ot instanceof fn&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof Ti&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof ei&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){Bi(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var rt=y.position.copy();y.es(a.actualBounds),rt.Xa(y.position)&&x.Cc()}}};function ee(a,y,x){if(y.isVisible())return x;if(y instanceof vr)ee(a,y.adornedPart,x);else if(y instanceof en){var E=y.fromNode;E!==null&&ee(a,E,x),y=y.toNode,y!==null&&ee(a,y,x)}else y instanceof fn&&(E=y.labeledLink,E!==null&&ee(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),ee(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),ee(a,y,x));return x}Rt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof ei)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Rt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),oA(y.animationManager,"Collapse Tree");var x=new _t;if(a!==null&&a.isTreeExpanded)a.collapseTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof fn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Rt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof fn&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof fn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Rt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),oA(y.animationManager,"Expand Tree");var x=new _t;if(a!==null&&!a.isTreeExpanded)a.expandTree(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof fn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Rt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof fn)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof fn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Rt.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new _t,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new _t,ot=b.iterator;ot.next();){var at=ot.value;z=!1;for(var At=b.iterator;At.next();)if(at.Td(At.value)){z=!0;break}z||rt.add(at)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var pt=rt.iterator;pt.next();)if(!pt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof Ti)Yl(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var xt=y.copyNodeData(x);Ne(xt)&&(y.xf(xt),E=a.ii(xt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Ct=rt.iterator;Ct.next();){var Mt=Ct.value;this.isValidMember(E,Mt)&&(Mt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Rt.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function Ie(a){var y=bn();for(a=a.iterator;a.next();){var x=a.value;x instanceof en||y.push(x)}a=new le,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return Ln(y),a}Rt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof en)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},Rt.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new _t;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof Ti&&z.canUngroup()&&E.add(z)}var tt=new _t;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var at=ot.containingGroup,At=at!==null&&at.data!==null?x.wa(at.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var pt=ft.value;if(pt.isSelected=!0,!(pt instanceof en)){var xt=pt.data;xt!==null?x.mp(xt,At):pt.containingGroup=at}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Rt.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof Ti))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ti&&y.canUngroup())return!0;return!1},Rt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Ie(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Rt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),oA(y.animationManager,"Collapse SubGraph");var x=new _t;if(a!==null&&a.isSubGraphExpanded)a.collapseSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Ti&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Rt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof Ti&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ti&&y.isSubGraphExpanded)return!0;return!1},Rt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),oA(y.animationManager,"Expand SubGraph");var x=new _t;if(a!==null&&!a.isSubGraphExpanded)a.expandSubGraph(),x.add(a);else if(a===null)for(var E=y.selection.iterator;E.next();){var b=E.value;b instanceof Ti&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Rt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof Ti&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Ti&&!y.isSubGraphExpanded)return!0;return!1},Rt.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var E=y.selection.iterator;E.next();){var b=E.value;if(b.canEdit()){a=b;break}}if(a===null)return;a=a.Nl(function(z){return z instanceof Jr&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Rt.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Jr))return!1;if(a=a.part,a!==null&&a.canEdit())return!0}else for(y=y.selection.iterator;y.next();)if(a=y.value,a.canEdit()&&(a=a.Nl(function(x){return x instanceof Jr&&x.editable}),a!==null))return!0;return!1},Rt.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof oe?b=a.ga(Ui):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Ht(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,YA(x,!1,a)}},Rt.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},Rt.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new vn,a===null)return E;for(var z=a.iterator;z.next();)EA(x,E,z.value,b,y);if(x.draggedLink!==null&&y.dragsLink)return E;for(z=a.iterator;z.next();)a=z.value,a instanceof en&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Ze.Object.defineProperties(Rt.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||Yt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),Rt.className="CommandHandler",kf=function(){return new Rt};function oe(){rn(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Ht(NaN,NaN).freeze(),this.jd=Ho,this.Ab=new Fi,this.wh=new Fi,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Wa,this.uc=new be(NaN,NaN,NaN,NaN).freeze(),this.Ib=new be(NaN,NaN,NaN,NaN).freeze(),this.dc=new be(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=is,this.Ag=this.io=0,this.V=this.tb=this.Dh=this.A=this.Ua=null,this.Uc=!1,this.jo=this.Ng=null}var Ye,ze,Hn,Xn,di,Li,Ji,Ri,or,Ir;oe.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=xi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},oe.prototype.Vw=function(a){var y=this.Dh;if(mn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},oe.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},oe.prototype.clone=function(){var a=new this.constructor;if(this.cloneProtected(a),this.Dh!==null)for(var y=0;y<this.Dh.length;y++){var x=this.Dh[y];a[x]=this[x]}return a},oe.prototype.copy=function(){return this.clone()},Pt=oe.prototype,Pt.qb=function(a){a.classType===en?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Yt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===oe&&(this.stretch=a)},Pt.toString=function(){return On(this.constructor)+"#"+Un(this)},Pt.th=function(){this.A!==null&&(this.A.nc=!0)};function Hi(a){a.A===null?a.A=new ec:a.A.nc&&(a.A=a.A.copy())}Pt.Xc=function(){if(this.ba===null){var a=new Td;a.Xi=$i,a.yj=$i,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Pt.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===fo&&Ms(this)&&eo(this,rt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new vn),tt=z.undoManager.transactionLevel===0,a.startCondition===ch?tt=!0:a.startCondition===Oh&&(tt=!1),tt?(z=new Qs,dd(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(oA(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Ve&&x===rt&&(rt.l&16777216)!==0&&rt.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)rt=x[b],rt instanceof Ve&&fA(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function eo(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=Lw(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,rt.model.modelData,x,E)}else{if(rt=E.data,rt===null)continue;var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,rt,x,E)}tt===a&&(rt=E.ks(z.Ai),rt!==null&&z.Mv(rt,tt,x))}}Pt.ks=function(a){return this.bindingId===a?this:null},Pt.g=function(a,y,x){this.cb(fo,a,this,y,x)},Pt.Ge=function(a,y,x,E){var b=this.uc;if(b.h(a,y,x,E),this.Ca!==1||this.Kb!==0){this.Lb===null&&(this.Lb=new Fi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function cs(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Pt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?ti(a.x,a.y,0,0,0,E.height)<=y||ti(a.x,a.y,0,E.height,E.width,E.height)<=y||ti(a.x,a.y,E.width,E.height,E.width,0)<=y||ti(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Pt.se=function(){return!0},Pt.ca=function(a){var y=Ht.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Ht.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,rt=this.naturalBounds;E=this.Df()*E.scale;var ot=1/E;if(rt.width*E<b&&rt.height*E<b)return a=Ro(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Ht.free(y),a}return b=!1,(this instanceof vr||this instanceof Oi?Ro(x.x-5,x.y-5,x.width+10,x.height+10,y.x,y.y):x.ca(y))&&(this.tb&&!this.tb.ca(y)?b=!1:this.areaBackground!==null&&x.ca(y)||this.Ma!==null&&this.dc.ca(a)?b=!0:b=this.gh(a)),Ht.free(y),b},Pt.gh=function(a){var y=this.naturalBounds;return Ro(0,0,y.width,y.height,a.x,a.y)},Pt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=be.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Ht.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),Ht.free(b),be.free(y),E},Pt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Ht.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),Ht.free(b),E},Pt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Ht.allocAt(0,0),b=Ht.allocAt(0,x.height),z=Ht.allocAt(x.width,x.height),tt=Ht.allocAt(x.width,0),rt=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))rt=!0;else{x=be.allocAt(0,0,x.width,x.height);var ot=Ht.allocAt(a.x,a.y);x.ca(y.Cd(ot))?rt=!0:(ot.h(a.x,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.y),x.ca(y.Cd(ot))&&(rt=!0)))),Ht.free(ot),be.free(x),!rt&&(se.us(a,E,b)||se.us(a,b,z)||se.us(a,z,tt)||se.us(a,tt,E))&&(rt=!0)}return Ht.free(E),Ht.free(b),Ht.free(z),Ht.free(tt),rt},Pt.ga=function(a,y){if(y===void 0&&(y=new Ht),a instanceof ni){var x=this.naturalBounds;y.h(a.x*x.width+a.offsetX,a.y*x.height+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Pt.mi=function(a){a===void 0&&(a=new be);var y=this.naturalBounds,x=this.oe,E=Ht.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Gr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Gr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Gr(a,E.x,E.y,0,0),Ht.free(E),a},Pt.li=function(){var a=this.oe;return a.m11===1&&a.m12===0?a=0:(a=180*Math.atan2(a.m12,a.m11)/Math.PI,0>a&&(a+=360)),a},Pt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Pt.qs=function(a,y){return y===void 0&&(y=new Ht),y.assign(a),this.oe.Cd(y),y},Pt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Pt.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,ot=-z.m12*tt,at=-z.m21*tt,At=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),pt=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*at+ft,a=a*ot+y*At+pt,y=x*rt+E*at+ft,x=x*ot+E*At+pt,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)},oe.prototype.measure=function(a,y,x,E){if(tl(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 Ve;switch(ma(this,!0)){case ze:tt=b=0,rt&&(y=a=1/0);break;case Ye:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case Xn:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case di:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var ot=this.minSize;b>rt.width&&ot.width<rt.width&&(b=rt.width),tt>rt.height&&ot.height<rt.height&&(tt=rt.height),x=Math.max(b,ot.width),E=Math.max(tt,ot.height),rt.width<x&&(x=Math.min(ot.width,x)),rt.height<E&&(E=Math.min(ot.height,E)),a=Math.min(rt.width,a),y=Math.min(rt.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||Yt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Xo(this,!1)}},oe.prototype.Wl=function(){},oe.prototype.Dd=function(){return!1},oe.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=be.alloc();z.assign(this.Ib),this.Ib.ka(),ia(this)===!1?this.Ib.h(a,y,x,E):this.eh(a,y,x,E),this.Ib.freeze(),b===void 0?this.tb=null:this.tb=b,x=!1,b!==void 0?x=!0:(b=this.panel,b!==null&&lc(b)&&(b=b.panel),b!==null&&(b=b.dc,E=this.measuredBounds,this.areaBackground!==null&&(E=this.Ib),x=y+E.height,E=a+E.width,x=!(0<=a+.05&&E<=b.width+.05&&0<=y+.05&&x<=b.height+.05),this instanceof Jr&&(a=this.naturalBounds,this.Lq>a.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||Yt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),bA(this,!1),be.free(z)},Pt=oe.prototype,Pt.eh=function(){};function na(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=ma(a,!0),x===E&&z===b&&(y=ze),y){case ze:(x>E||z>b)&&(Xo(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Ye:Xo(a,!0),a.measure(E,b,0,0);break;case Xn:Xo(a,!0),a.measure(E,z,0,0);break;case di:Xo(a,!0),a.measure(x,b,0,0)}}}Pt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||$m(x,!0),this.N(),lo(a,y)||(x.oh(),this.Pn(x)))},Pt.Pn=function(a){this.portId!==null&&($m(a,!0),a instanceof fn&&Ky(a,this))},Pt.gc=function(a,y){if(!Ga(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 Ve&&lc(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,at=this.areaBackground,At=this.Ma;at===null&&At===null||a.yc(),at!==null&&(wo(this,a,at,!0,!0,ot,rt),at instanceof Lr&&at.type===zi?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(at)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),At!==null&&(wo(this,a,At,!0,!1,ot,rt),At instanceof Lr&&At.type===zi?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(At)):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&&fs(this),at=this.part,ot=!1;var ft=0;at&&y.Gf("drawShadows")&&(ot=at.isShadowed)&&(At=at.shadowOffset,ft=Math.max(At.y,At.x)*y.scale*y.Mb),At=this.Dd();var pt;if(!(pt=y.$i||!At)){var xt=this.naturalBounds;pt=this.wh;var Ct=pt.m11,Mt=pt.m21,Gt=pt.dx,Ot=pt.m12,Wt=pt.m22,Zt=pt.dy,te,re=te=0;pt=te*Ct+re*Mt+Gt;var me=te*Ot+re*Wt+Zt;te=xt.width+ft,re=0;var ln=te*Ct+re*Mt+Gt;te=te*Ot+re*Wt+Zt,re=Math.min(pt,ln);var Nn=Math.min(me,te),Fn=Math.max(pt+0,ln)-re,tn=Math.max(me+0,te)-Nn;pt=re,me=Nn,te=xt.width+ft,re=xt.height+ft,ln=te*Ct+re*Mt+Gt,te=te*Ot+re*Wt+Zt,re=Math.min(pt,ln),Nn=Math.min(me,te),Fn=Math.max(pt+Fn,ln)-re,tn=Math.max(me+tn,te)-Nn,pt=re,me=Nn,te=0,re=xt.height+ft,ln=te*Ct+re*Mt+Gt,te=te*Ot+re*Wt+Zt,re=Math.min(pt,ln),Nn=Math.min(me,te),Fn=Math.max(pt+Fn,ln)-re,tn=Math.max(me+tn,te)-Nn,pt=re,me=Nn,ft=y.viewportBounds,xt=ft.x,Ct=ft.y,pt=!(pt>ft.width+xt||xt>Fn+pt||me>ft.height+Ct||Ct>tn+me)}if(pt){if(pt=(this.l&256)!==0,a.clipInsteadOfFill&&(pt=!1),this instanceof Jr&&(a.font=this.font),pt){if(me=rt.se()?rt.naturalBounds:rt.actualBounds,Fn=Math.max(tt.x,me.x),tn=Math.max(tt.y,me.y),ft=Math.min(tt.right,me.right)-Fn,xt=Math.min(tt.bottom,me.bottom)-tn,Ct=this.tb,Ct!==null&&(Fn=Ct.x,tn=Ct.y,ft=Ct.width,xt=Ct.height),Fn>tt.width+tt.x||tt.x>me.width+me.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Fn,tn,ft,xt),a.clip()}if(At){if(!at.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(me=at.shadowOffset,a.Ev(me.x*y.scale*this.scale*y.Mb,me.y*y.scale*this.scale*y.Mb,at.shadowBlur),eu(a),a.shadowColor=at.shadowColor)}ot&&this.shadowVisible===!0?eu(a):ot&&this.shadowVisible===!1&&cA(a),at=this.naturalBounds,this.areaBackground!==null&&(a.yc(),qa(this,a,at,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&ws(this,rt)&&this.shadowVisible===null&&cA(a),this.Ma!==null&&(a.yc(),ua(this,a,at,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||ws(this,rt))?($a(this,!0),this.shadowVisible===null&&cA(a)):$a(this,!1),this.hh(a,y),ot&&this.l&512&&eu(a),At&&ot&&cA(a),pt&&(a.restore(),a.Vc(this instanceof Ve)),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 ws(a,y){return y===null?!1:(lc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Ve.Auto||y.type===Ve.Spot)&&y.Pb()!==a)}Pt.Dv=function(){};function qa(a,y,x,E){wo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Lr&&a.areaBackground.type===zi?(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 ua(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;wo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Lr&&a.Ma.type===zi?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,ot),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,ot)}function Js(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===Ve.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function Ga(a,y,x){if(!(y instanceof Ea))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&Js(a,E,a.svg),!0);if(a.Dd()&&a.isShadowed){var z=a.shadowOffset;y.Ev(z.x*x.scale*a.scale*x.Mb,z.y*x.scale*a.scale*x.Mb,a.shadowBlur),eu(y),y.shadowColor=a.shadowColor}a instanceof Jr&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof Ve;var rt=a instanceof Ve?lc(a):!1;a.l&4096&&fs(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Qd(y,1,0,0,1,0,0),a.svg=y.ad):z?(Qd(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Qd(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var at=tt.copy().Vj();y.rb.ha=[at.m11,at.m12,at.m21,at.m22,at.dx,at.dy],qa(a,y,b,ot),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(rt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),ua(a,y,b,ot),rt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],ua(a,y,b,ot)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,rt=!1,b&&x.Gf("drawShadows")&&(rt=b.isShadowed),y.clipInsteadOfFill&&(rt=!1),a.Dd()&&rt&&eu(y),rt&&a.shadowVisible===!0?eu(y):rt&&a.shadowVisible===!1&&cA(y),b=a.panel,rt&&ws(a,b)&&a.shadowVisible===null&&cA(y),y.Il&&(at=x.computePixelRatio(),at="drop-shadow("+y.shadowOffsetX/at+"px "+y.shadowOffsetY/at+"px "+y.shadowBlur/at/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",at),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",at)),rt&&(a.Ma!==null||a.areaBackground!==null||ws(a,b))?($a(a,!0),a.shadowVisible===null&&cA(y)):$a(a,!1),b=rt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,rt=z?a.svg:y.yd,at=a.svg,!z&&at!==null&&rt!==at&&at.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),pa(y,at),!0):(a.svg=rt,tt!==null&&rt===null&&(vg(y),y.nh.pop()),rt===null||(a.$o(y,E,ot,rt),y.Il&&(x=x.computePixelRatio(),a.Dv(rt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&eu(y),a.Dd()&&cA(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&rt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&rt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(rt):y.Nj.prepend(rt),y.ti=rt):E!==null&&Js(a,E,rt),tt!==null&&tt(a,rt)),!0)}Pt.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+mi++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof Ve&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),rt.appendChild(y),a.svg.appendChild(rt),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=rt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),pa(a,E)};function pa(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Di(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=zr(y);for(var E=y.next();!E.done;E=y.next())E=x.getElementById(E.value.split("#")[1].slice(0,-1)),E!==null&&E.remove()}a.svg.remove()}}Pt.hh=function(){},Pt.lv=function(){this.Uc=!0},Pt.kk=function(a,y,x){if(this.Uc)return this.lv(),this.Uc=!1;if(y=this.svg,y===null)return!1;if(!this.visible)return y.remove(),!1;if(y.nodeName!=="g"&&x||y.nodeName==="g"&&!x)return!1;var E=this.transform,b=this instanceof Ve?lc(this):!1;if(!(this instanceof Ve&&b))if(this instanceof Ka){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&qp(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",$p(a)):y.setAttributeNS(null,"transform",$p(a))}else if(!x||this instanceof Ve)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Oi){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],qa(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&Ud(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Ud(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Ve))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),ua(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Ud(a,y.Ma),x=y.Ma.getAttribute("filter"),x!==null&&a.ad.setAttribute("filter",x),y.Ma.replaceWith(a.ad)):y.prepend(a.ad),y.Ma=a.ad),z&&Ud(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Pt.nk=function(a){if(this.background!==null||this.areaBackground!==null)return!0;var y=(this.l&256)!==0;return a.clipInsteadOfFill&&(y=!1),!!y};function wo(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===rr)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var at=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=at,ot+=at),(z=y instanceof sc)&&x.xe&&(x.type===po||x.yk===rt&&x.ft===ot))var At=x.xe;else{var ft=0,pt=0,xt=0,Ct=0,Mt=0,Gt=0;if(Gt=Mt=0,b?(Mt=tt.x,Gt=tt.y):E||(Mt-=at/2,Gt-=at/2),ft=x.start.x*rt+x.start.offsetX,pt=x.start.y*ot+x.start.offsetY,xt=x.end.x*rt+x.end.offsetX,Ct=x.end.y*ot+x.end.offsetY,ft+=Mt,xt+=Mt,pt+=Gt,Ct+=Gt,x.type===Ni)At=y.createLinearGradient(ft,pt,xt,Ct);else if(x.type===zi)Gt=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Mt=0,Gt=Math.max(rt,ot)/2):Mt=x.startRadius,At=y.createRadialGradient(ft,pt,Mt,xt,Ct,Gt);else if(x.type===po)try{At=y.createPattern(x.pattern,"repeat")}catch(Wt){At=null}if(x.type!==po&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)At.addColorStop(b.key,b.value);if(z&&(x.xe=At,At!==null&&(x.yk=rt,x.ft=ot),At===null&&x.type===po&&x.yk!==-1)){x.yk=-1;var Ot=a.diagram;Ot!==null&&x.yk===-1&&Bi(function(){Ot.redraw()},600)}}E?y.fillStyle=At:y.strokeStyle=At}}}Pt.rg=function(a){if(a instanceof Ve)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},Pt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Pt.If=function(){for(var a=this instanceof Ve?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function fs(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Ll(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}Ll(a,!1),La(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,La(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,La(a,!1)))}Pt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Ht.alloc();z.yi(y,x,E,b,Ui),a.rotate(this.Kb,z.x,z.y),Ht.free(z)}},Pt.v=function(a){if(!tl(this)){a===void 0&&(a=!1),Xo(this,!0),bA(this,!0);var y=this.panel;y===null||a||y.v()}},Pt.Uj=function(){tl(this)||(Xo(this,!0),bA(this,!0))};function es(a){if(!ia(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof fn&&a.Bd(),y.$b())),bA(a,!0)}}Pt.Uk=function(){!(this.l&2048)&&(Ll(this,!0),La(this,!0))},Pt.Wu=function(){La(this,!0)},Pt.N=function(){var a=this.part;a!==null&&a.N()};function ma(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Ve.Table?Fo(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Ve.Auto&&E.Pb()===a?Zr(a,Ye,y):x===Li?E!==null?E.type===Ve.Spot&&E.Pb()===a?Zr(a,Ye,y):(x=E.defaultStretch,x===Li?Zr(a,ze,y):Zr(a,x,y)):Zr(a,ze,y):Zr(a,x,y)}function Fo(a,y,x,E){var b=a.stretch;if(b!==Li)return Zr(a,b,E);var z=b=null;switch(y.stretch){case di:z=!0;break;case Ye:z=!0}switch(x.stretch){case Xn:b=!0;break;case Ye:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Xn||y===Ye),z===null&&(z=y===di||y===Ye),b===!0&&z===!0?Zr(a,Ye,E):b===!0?Zr(a,Xn,E):z===!0?Zr(a,di,E):Zr(a,ze,E)}function Zr(a,y,x){if(x)return y;if(y===ze||(x=a.desiredSize,x.w()))return ze;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Xn)return ze;if(y===Ye)return di}else{if(y===di)return ze;if(y===Ye)return Xn}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===di)return ze;if(y===Ye)return Xn}else{if(y===Xn)return ze;if(y===Ye)return di}return y}function $a(a,y){a.l=y?a.l|512:a.l&-513}function Ms(a){return(a.l&1024)!==0}function Nu(a,y){a.l=y?a.l|1024:a.l&-1025}function Ll(a,y){a.l=y?a.l|2048:a.l&-2049}function La(a,y){a.l=y?a.l|4096:a.l&-4097}function tl(a){return(a.l&8192)!==0}function Xo(a,y){a.l=y?a.l|8192:a.l&-8193}function ia(a){return(a.l&16384)!==0}function bA(a,y){a.l=y?a.l|16384:a.l&-16385}Pt.Gj=function(){this.svg=null},Pt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Pt.Av=function(){},Pt.zv=function(a){return this.pa=a,es(this),!0},Pt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Pt.kq=function(){return 0};function mh(a){var y=a.part;if(y instanceof fn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Ky(y,a)}}function Jp(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Ve?a instanceof fn?a.Bd():a.qm(a,function(x){mh(x)}):mh(a))}Pt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Zo(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&fy(a)&&Yt("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new _t),this.localBindings.add(b),this},Pt.set=function(a){return Object.assign(this,a),this},Pt.Du=function(a){return mg(this,a),this},Pt.apply=function(a){return a(this),this},Pt.nm=function(a){return Kh(this,a),this},Pt.pz=function(){return this.ih()},Pt.ih=function(){for(var a=this instanceof Ve?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Pt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new vn),this.animationTriggers.add(a.propertyName,a),this};function el(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=zf.I(a);typeof z=="function"?(x=xi(arguments),E=z(x),Ne(E)||Yt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=He.go[a]}if(E===null&&(b!=null&&b.constructor||Yt("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),E=new b),b=1,E instanceof ge&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Oc(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?Yt("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):mg(E,z);return E}function mg(a,y){if(typeof y=="string")if(a instanceof Jr)a.text=y;else if(a instanceof Oi)a.figure=y;else if(a instanceof Ka)a.source=y;else if(a instanceof Ve)y=dA.I(y),y!==null&&(a.type=y);else if(a instanceof Lr){var x=wi(Lr,y);x!==null?a.type=x:Yt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof qe?(y=wi(qe,y),y!==null&&(a.type=y)):a instanceof gr&&(y=wi(gr,y),y!==null&&(a.type=y));else if(y instanceof oe)a instanceof Ve||Yt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ss){var E;y.isRow&&typeof a.getRowDefinition=="function"?E=a.getRowDefinition(y.index):y.isRow||typeof a.getColumnDefinition!="function"||(E=a.getColumnDefinition(y.index)),E instanceof ss?o0(E,y):Yt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Be)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Er)a.type=y;else if(y instanceof Zo)a instanceof oe||a instanceof ss?a.bind(y):Yt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Dl)a instanceof oe?a.Jv(y):Yt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof As)a instanceof qe&&a.type===qe.o?a.figures.add(y):Yt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof gr)a instanceof As?a.segments.add(y):Yt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof mo)a instanceof ge||a instanceof Ti?a.layout=y:Yt("A Layout can only be assigned to a Diagram or a Group, not to: "+a);else if(Array.isArray(y))for(x=0;x<y.length;x++)mg(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Lr){x=new li;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);Kh(a,x)}else if(a instanceof ss){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&Yt("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)&&Yt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new li;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);Kh(a,b)}else Kh(a,y);else Yt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function TA(a,y){zf.add(a,y)}function bd(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}Ze.Object.defineProperties(oe.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new ec),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 ec),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 ec),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Hi(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&&(Hi(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ka},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new vh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ka&&(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 vh),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:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new vh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:Ii},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new vh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:Li},set:function(a){var y=this.stretch;y!==a&&(Hi(this),this.A.hg=a,this.v(),this.g("stretch",y,a))}},name:{get:function(){return this.A!==null?this.A.xa:""},set:function(a){var y=this.name;y!==a&&(Hi(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&wn(a,"0 <= value <= 1",oe,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Yf(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Yf(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Jp(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&St(a,"GraphObject.areaBackground"),a instanceof Lr&&a.freeze(),Hi(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&St(a,"GraphObject.background"),a instanceof Lr&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof ei)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new Ht(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Yt("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,Jp(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 Oi&&this.qc(),this.g("desiredSize",E,a),Ms(this)&&(a=this.part,a!==null&&(eo(this,a,"width"),eo(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 Je(a,this.jd.height).freeze(),this.v(),this instanceof Oi&&this.qc(),this.g("desiredSize",y,a),Ms(this)&&(a=this.part,a!==null&&eo(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 Je(this.jd.width,a).freeze(),this.v(),this instanceof Oi&&this.qc(),this.g("desiredSize",y,a),Ms(this)&&(a=this.part,a!==null&&eo(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:er},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(),Hi(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Kr},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(),Hi(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 Xi(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&&fs(this),this.Ab}},oe:{get:function(){return this.l&4096&&fs(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Hi(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:ze},set:function(a){this.reshapingBehavior!==a&&(Hi(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()&&Yt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),es(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&&wn(a,">= 0",oe,"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&&wn(a,">= 1",oe,"columnSpan"),Hi(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&&wn(a,">= 0",oe,"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&&wn(a,">= 1",oe,"rowSpan"),Hi(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&&(Hi(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 fn||Yt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&iv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Wy(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:$i},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),mh(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&wn(a,">= 0",oe,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),mh(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),mh(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&&wn(a,">= 0",oe,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:$i},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),mh(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&wn(a,">= 0",oe,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),mh(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),mh(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&&wn(a,">= 0",oe,"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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(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&&(Hi(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),oe.prototype.trigger=oe.prototype.Jv,oe.prototype.findBindingPanel=oe.prototype.ih,oe.prototype.findTemplateBinder=oe.prototype.pz,oe.prototype.setProperties=oe.prototype.nm,oe.prototype.apply=oe.prototype.apply,oe.prototype.attach=oe.prototype.Du,oe.prototype.set=oe.prototype.set,oe.prototype.isEnabledObject=oe.prototype.If,oe.prototype.isVisibleObject=oe.prototype.Ed,oe.prototype.isContainedBy=oe.prototype.rg,oe.prototype.getNearestIntersectionPoint=oe.prototype.rs,oe.prototype.getLocalPoint=oe.prototype.qs,oe.prototype.getDocumentScale=oe.prototype.Df,oe.prototype.getDocumentAngle=oe.prototype.li,oe.prototype.getDocumentBounds=oe.prototype.mi,oe.prototype.getDocumentPoint=oe.prototype.ga,oe.prototype.intersectsRect=oe.prototype.Yc,oe.prototype.containedInRect=oe.prototype.fh,oe.prototype.containsRect=oe.prototype.Re,oe.prototype.containsPoint=oe.prototype.ca,oe.prototype.raiseChanged=oe.prototype.g,oe.prototype.raiseChangedEvent=oe.prototype.cb,oe.prototype.addCopyProperty=oe.prototype.Vw;var zf=null;oe.className="GraphObject",zf=new vn,TA("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=el(Ve,Ve.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Ve){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"},el(Oi,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new ni(0,0,2.76142374915397,2.761423749153969),spot2:new ni(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 Ve&&(x=E.fb("ButtonBorder"),x instanceof Oi)){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 Ve&&(x=E.fb("ButtonBorder"),x instanceof Oi&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Ve&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Oi){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 Ve&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Oi){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 Ve&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Oi){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 Ve&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Oi))){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}),TA("TreeExpanderButton",function(){var a=el("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},el(Oi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:nr},new Zo("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Zo("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof vr&&(x=x.adornedPart),x instanceof fn){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}),TA("SubGraphExpanderButton",function(){var a=el("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},el(Oi,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:nr},new Zo("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 vr&&(x=x.adornedPart),x instanceof Ti){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}),TA("ToolTip",function(){return el(vr,Ve.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ht(0,3),shadowBlur:5},el(Oi,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new ni(0,0,4,6),spot2:new ni(1,1,-4,-4)}))}),TA("ContextMenu",function(){return el(vr,Ve.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ht(0,3),shadowBlur:5},new Zo("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),TA("ContextMenuButton",function(){var a=el("Button");a.stretch=Xn;var y=a.fb("ButtonBorder");return y instanceof Oi&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new ni(0,0,2,3),y.spot2=new ni(1,1,-2,-2)),a}),TA("PanelExpanderButton",function(a){var y=bd(a,"COLLAPSIBLE"),x=el("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},el(Oi,{name:"ButtonIcon",strokeWidth:2},new Zo("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Oi&&(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}),TA("CheckBoxButton",function(a){var y=bd(a);return a=el("Button",{desiredSize:new Je(14,14)},el(Oi,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Ye,geometryStretch:Hn,visible:!1},y!==""?new Zo("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Ve){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}),TA("CheckBox",function(a){a=bd(a),a=el("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Xi(0,1,0,0)});var y=el(Ve,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Xi(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}),oe.None=ze=new Be(oe,"None",0),oe.Default=Li=new Be(oe,"Default",0),oe.Vertical=di=new Be(oe,"Vertical",4),oe.Horizontal=Xn=new Be(oe,"Horizontal",5),oe.Fill=Ye=new Be(oe,"Fill",3),oe.Uniform=Hn=new Be(oe,"Uniform",1),oe.UniformToFill=Ji=new Be(oe,"UniformToFill",2),oe.FlipVertical=Ri=new Be(oe,"FlipVertical",1),oe.FlipHorizontal=or=new Be(oe,"FlipHorizontal",2),oe.FlipBoth=Ir=new Be(oe,"FlipBoth",3),oe.make=el,oe.getBuilders=function(){var a=new vn,y;for(y in zf)if(y!==y.toLowerCase()){var x=zf.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},oe.defineBuilder=TA,oe.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=zf.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof oe))return y&&E.set(y),E;Yt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},oe.takeBuilderArgument=bd;function ec(){this.nc=!1,this.xa="",this.zp=-1,this.nb=this.wm=this.te=null,this.j="",this.hb=this.Di=this.Hb=this.Ch=this.$h=this.F=this.Ha=this.ia=this.V=this.Lh=this.Xd=this.Of=this.Nh=this.Oh=this.Qh=this.Ph=this.Mh=this.Bh=this.Fh=this.zh=null,this.u=er,this.o=Kr,this.hg=Li,this.ob=this.Bi=1,this.Pf=ze,this.Pc=this.Ci=this.gd=null,this.Oc="category"}ec.prototype.copy=function(){var a=new ec;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function vh(){this.u=-1/0,this.o=0,this.F=Ii,this.rr=ka,this.j=this.V="None"}vh.prototype.copy=function(){var a=new vh;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},vh.className="LinkElementSettings";function Td(){this.yj=this.Xi=is,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}Td.prototype.copy=function(){var a=new Td;return a.Xi=this.Xi.J(),a.yj=this.yj.J(),a.Vi=this.Vi,a.wj=this.wj,a.Wi=this.Wi,a.xj=this.xj,a.hq=this.hq,a.Tr=this.Tr,a.iq=this.iq,a.Ur=this.Ur,a},Td.className="LinkSettings";function nc(){this.ha=[1,0,0,1,0,0]}nc.prototype.copy=function(){var a=new nc;return a.ha[0]=this.ha[0],a.ha[1]=this.ha[1],a.ha[2]=this.ha[2],a.ha[3]=this.ha[3],a.ha[4]=this.ha[4],a.ha[5]=this.ha[5],a},nc.prototype.translate=function(a,y){this.ha[4]+=this.ha[0]*a+this.ha[2]*y,this.ha[5]+=this.ha[1]*a+this.ha[3]*y},nc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},nc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(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)}},nc.className="STransform";function Qu(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Qu.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Qu.className="SGradient";function qs(a,y,x){this.ownerDocument=a=y===void 0?He.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 Ea(this,x)}qs.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},qs.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Ne(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},qs.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},qs.prototype.focus=function(){this.Oa.focus()},qs.prototype.mx=function(){this.ownerDocument=null},Ze.Object.defineProperties(qs.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}}}),qs.className="SVGSurface";function Ea(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 nc,this.j=vg(this),this.Nj=vg(this,"gojs-diagram"),this.Hl=this.ti=null;var x=mi++,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 Id(a,y,x,E,b,z,tt){a.Nj===void 0?Qd(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}Pt=Ea.prototype,Pt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,at=ot-1e-6,At=x*Math.cos(E),ft=x*Math.sin(E),pt=a+At,xt=y+ft,Ct=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-pt)||1e-6<Math.abs(rt-xt))&&this.path.push(["L",pt,+xt]),0>E&&(E=E%ot+ot),E>at?(this.path.push(["A",x,x,0,1,Ct,a-At,y-ft]),this.path.push(["A",x,x,0,1,Ct,pt,xt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Ct,a+x*Math.cos(b),y+x*Math.sin(b)])},Pt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Pt.Se=function(a){this.addPath(this.path,this.rb,a||0)},Pt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Pt.clearRect=function(){},Pt.clip=function(){this.Yl.clipPath=!0},Pt.closePath=function(){this.path.push(["z"])},Pt.createLinearGradient=function(a,y,x,E){var b=new Qu("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Pt.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"+mi++,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(Wl,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Pt.createRadialGradient=function(a,y,x,E,b,z){var tt=new Qu("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function qp(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/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)}Pt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){var at="";a instanceof HTMLCanvasElement&&(at=a.toDataURL()),a instanceof HTMLImageElement&&(at=a.getAttribute("src"));var At=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=At,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,qp(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:At||E,height:a||b,href:at},se.$(E,rt)&&se.$(b,ot)?at.toLowerCase().indexOf(".svg")===-1&&at.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==At||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),ic(this,Wl,z,this.rb),this.addElement(Wl,z)},Pt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),rc(this,this.Yl)},Pt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Pt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},ic(this,"fill",a,this.rb),this.addElement("rect",a)},Pt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},ic(this,"fill",a,this.rb),rc(this,a),this.svg.prepend(this.Ud("rect",a))},Pt.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},ic(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Pt.lineTo=function(a,y){this.path.push(["L",a,y])},Pt.moveTo=function(a,y){this.path.push(["M",a,y])},Pt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Pt.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"])},Pt.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},Pt.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;y<this.path.length;y++)a.push(this.path[y]);this.stack.push(a),this.stack.push(this.rb.copy())},Pt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Qd(this,a,y,x,E,b,z)};function $p(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Pt.scale=function(a,y){this.rb.scale(a,y)},Pt.translate=function(a,y){this.rb.translate(a,y)},Pt.transform=function(){},Pt.yc=function(){},Pt.stroke=function(){t0(this,this.Yl)},Pt.jk=function(){this.clipInsteadOfFill||this.stroke()},Pt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Pt.addElement=function(a,y,x){return a=this.Ud(a,y,x),this.yd!==null?this.yd.appendChild(a):this.yd=a,this.ad=a};function ic(a,y,x,E){y==="fill"?rc(a,x):y==="stroke"&&t0(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function rc(a,y){a.fillStyle instanceof Qu?y.fill=oc(a,a.fillStyle,!0):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.fill="rgb("+a[1]+","+a[2]+","+a[3]+")",y["fill-opacity"]=a[4]):y.fill=a.fillStyle}function Nd(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Qu?y.setAttributeNS(null,"fill",oc(a,a.fillStyle,!0)):/^rgba\(/.test(a.fillStyle)?(a=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle),y.setAttributeNS(null,x,"rgb("+a[1]+","+a[2]+","+a[3]+")"),y.setAttributeNS(null,x+"-opacity",a[4])):y.setAttributeNS(null,x,a.fillStyle)}function t0(a,y){if(a.strokeStyle instanceof Qu)y.stroke=oc(a,a.strokeStyle,!1);else if(/^rgba\(/.test(a.strokeStyle)){var x=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle);y.stroke="rgb("+x[1]+","+x[2]+","+x[3]+")",y["stroke-opacity"]=x[4]}else y.stroke=a.strokeStyle;y["stroke-width"]=a.lineWidth,y["stroke-linecap"]=a.lineCap,y["stroke-linejoin"]=a.lineJoin,y["stroke-miterlimit"]=a.miterLimit,a.Ct&&(y["stroke-dasharray"]=a.Yg.toString(),y["stroke-dashoffset"]=a.uj)}function oc(a,y,x){var E="";if(E=a.Hl!==null?a.Hl.getAttribute(x?"fill":"stroke"):null,E!==null&&E.indexOf("GRAD")!==-1?(E=E.split("#")[1].slice(0,-1),x=a.svg.getElementById(E),x!==null&&x.remove()):E="GRAD"+mi++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(at,At){return at.offset>At.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Pt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=xi(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,ic(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function Qd(a,y,x,E,b,z,tt){var rt=new nc;rt.ha=[y,x,E,b,z,tt],y={},ic(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function vg(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Pt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function cA(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function eu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Pt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Pt.fs=function(){this.Ct=!1},Pt.Vc=function(){},Pt.Wx=function(){},Ea.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ea.prototype.getImageData=function(){return null},Ea.prototype.measureText=function(){return null};function Ud(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Ea.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ea.className="SVGContext",ge.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new qs(this,He.document));var y=new qs(this,He.document,!0);a===void 0&&(a=new li);var x=this;return Yc(this,function(E,b){return E=pg(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},ge.prototype.makeSvg=ge.prototype.Cs,ge.prototype.av=function(a){return this.Cs(a)},ge.prototype.makeSVG=ge.prototype.av;function El(a,y,x,E){this.ownerDocument=y=y===void 0?He.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new sc(y,x,E),y.H=a}El.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",!0):!1},El.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},El.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},El.prototype.focus=function(){this.Oa.focus()},El.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Ze.Object.defineProperties(El.prototype,{width:{get:function(){return this.Oa.width},set:function(a){this.Oa.width=a}},height:{get:function(){return this.Oa.height},set:function(a){this.Oa.height=a}},style:{get:function(){return this.Oa.style}}}),El.className="CanvasSurface";function sc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Yt("Browser does not support HTML Canvas Element"),this.ct=this.et=this.dt="",this.Hm=!1,this.Vg=this.Br=this.Ar=0,this.Il=!1,this.El=new Fi,this.isTemporary=!!x}Pt=sc.prototype,Pt.Wx=function(a){this.Z.imageSmoothingEnabled=a},Pt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Pt.beginPath=function(){this.Z.beginPath()},Pt.Se=function(){},Pt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Pt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Pt.clip=function(){this.Z.clip()},Pt.closePath=function(){this.Z.closePath()},Pt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Pt.createPattern=function(a,y){return this.Z.createPattern(a,y)},Pt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Pt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},Pt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Pt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Pt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Pt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Pt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Pt.lineTo=function(a,y){this.Z.lineTo(a,y)},Pt.measureText=function(a){return this.Z.measureText(a)},Pt.moveTo=function(a,y){this.Z.moveTo(a,y)},Pt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Pt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Pt.restore=function(){this.Z.restore()},Pt.save=function(){this.yc(),this.Z.save()},sc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Pt=sc.prototype,Pt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Pt.scale=function(a,y){this.El.scale(a,y)},Pt.translate=function(a,y){this.El.translate(a,y)},Pt.stroke=function(){this.Z.stroke()},Pt.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},Pt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Pt.ng=function(a,y){if(a instanceof Lr&&a.type===zi){var x=a.yk;a=a.ft,a>x?(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)},Pt.jk=function(){this.Hm||this.stroke()},Pt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Pt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Pt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(km),a.lineDashOffset=0)},Pt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Pt.Hs=function(){},Ze.Object.defineProperties(sc.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 km=Object.freeze([]);sc.className="CanvasSurfaceContext";function Dd(){this.F=this.o=this.u=this.j=0}Dd.className="ColorNumbers";function Lr(a,y){$n||(wt(),$n=!0),rn(this),this._isFrozen=!1,a===void 0?(this.na=rr,this.xk="black"):typeof a=="string"?(this.na=rr,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Ni?(this.Qd=Cr,this.Lk=Bs):this.Lk=a===zi?this.Qd=Ui:this.Qd=$i,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Lr.prototype.copy=function(){var a=new Lr;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},Pt=Lr.prototype,Pt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Pt.ka=function(){return Object.isFrozen(this)&&Yt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Pt.qb=function(a){a.classType===Lr&&(this.type=a)},Pt.toString=function(){var a="Brush(";if(this.type===rr)a+=this.color;else if(a=this.type===Ni?a+"Linear ":this.type===zi?a+"Radial ":this.type===po?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+")"},Pt.addColorStop=function(a,y){return this._isFrozen&&he(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&wn(a,"0 <= loc <= 1",Lr,"addColorStop:loc"),this.we===null&&(this.we=new vn),this.we.add(a,y),this.na===rr&&(this.type=Ni),this.xe=null,this},Pt.Vz=function(a,y){if(this._isFrozen&&he(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Br:y,this.type===rr)nu(this.color),this.color=Kf(a,y);else if((this.type===Ni||this.type===zi)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)nu(x.value),this.addColorStop(x.key,Kf(a,y));return this};function e0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Br:x,nu(a),Kf(y,x)}Pt.Wy=function(a,y){if(this._isFrozen&&he(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?Br:y,this.type===rr)nu(this.color),this.color=Kf(-a,y);else if((this.type===Ni||this.type===zi)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)nu(x.value),this.addColorStop(x.key,Kf(-a,y));return this};function n0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?Br:x,nu(a),Kf(-y,x)}function ep(a,y,x){nu(a),a=fe.j;var E=fe.u,b=fe.o,z=fe.F;return nu(y),x===void 0&&(x=.5),"rgba("+Math.round((fe.j-a)*x+a)+", "+Math.round((fe.u-E)*x+E)+", "+Math.round((fe.o-b)*x+b)+", "+Math.round((fe.F-z)*x+z)+")"}Pt.Gx=function(){if(this.type===rr)return jf(this.color);if((this.type===Ni||this.type===zi)&&this.colorStops!==null){var a=this.colorStops;if(this.type===zi)return jf(a.first().value);if(a.get(.5)!==null)return jf(a.get(.5));if(a.count===2)return a=a.Fa(),jf(ep(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?(x=tt,b=rt):z>=b&&rt<z&&(E=tt,z=rt)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,jf(ep(a.get(x),a.get(E),1-z/b))}return!1};function jf(a){return a?a instanceof Lr?a.Gx():(nu(a),128>(299*fe.j+587*fe.u+114*fe.o)/1e3):!1}function Kf(a,y){switch(y){case Br:y=100*ip(fe.j);var x=100*ip(fe.u),E=100*ip(fe.o);return $e.j=.4124564*y+.3575761*x+.1804375*E,$e.u=.2126729*y+.7151522*x+.072175*E,$e.o=.0193339*y+.119192*x+.9503041*E,$e.F=fe.F,y=vt($e.j/ae[0]),x=vt($e.u/ae[1]),E=vt($e.o/ae[2]),gn.j=116*x-16,gn.u=500*(y-x),gn.o=200*(x-E),gn.F=$e.F,gn.j=Math.min(100,Math.max(0,gn.j+100*a)),a=(gn.j+16)/116,y=a-gn.o/200,$e.j=ae[0]*mt(gn.u/500+a),$e.u=ae[1]*(gn.j>Xt*Qt?Math.pow(a,3):gn.j/Xt),$e.o=ae[2]*mt(y),$e.F=gn.F,a=-.969266*$e.j+1.8760108*$e.u+.041556*$e.o,y=.0556434*$e.j+-.2040259*$e.u+1.0572252*$e.o,fe.j=255*rp((3.2404542*$e.j+-1.5371385*$e.u+-.4985314*$e.o)/100),fe.u=255*rp(a/100),fe.o=255*rp(y/100),fe.F=$e.F,fe.j=Math.round(fe.j),255<fe.j?fe.j=255:0>fe.j&&(fe.j=0),fe.u=Math.round(fe.u),255<fe.u?fe.u=255:0>fe.u&&(fe.u=0),fe.o=Math.round(fe.o),255<fe.o?fe.o=255:0>fe.o&&(fe.o=0),"rgba("+fe.j+", "+fe.u+", "+fe.o+", "+fe.F+")";case Pr:return np(),Xe.o=Math.min(100,Math.max(0,Xe.o+100*a)),"hsla("+Xe.j+", "+Xe.u+"%, "+Xe.o+"%, "+Xe.F+")";default:Yt("Unknown color space: "+y)}}function nu(a){$n||(wt(),$n=!0);var y=Ee;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,fe.j=a[0],fe.u=a[1],fe.o=a[2],fe.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,fe.j=0,fe.u=0,fe.o=0,fe.F=1)}}function np(){var a=fe.j/255,y=fe.u/255,x=fe.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))}Xe.j=Math.round(tt),Xe.u=Math.round(100*a),Xe.o=Math.round(100*b),Xe.F=fe.F}function ip(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function rp(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function vt(a){return a>Qt?Math.pow(a,1/3):(Xt*a+16)/116}function mt(a){var y=a*a*a;return y>Qt?y:(116*a-16)/Xt}function St(a,y){typeof a!="string"&&(a instanceof Lr||Yt("Value for "+y+" must be a color string or a Brush, not "+a))}function wt(){Ee=Po?new El(null,void 0,{willReadFrequently:!0}).context:null}Ze.Object.defineProperties(Lr.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&he(this,a),this.na=a,this.start.Mc()&&(a===Ni?this.start=Cr:a===zi&&(this.start=Ui)),this.end.Mc()&&(a===Ni?this.end=Bs:a===zi&&(this.end=Ui)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&he(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&he(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&he(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&he(this,a),0>a&&wn(a,">= zero",Lr,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&he(this,a),0>a&&wn(a,">= zero",Lr,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&he(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&he(this,a),this.cr=a,this.xe=null}}}),Lr.prototype.isDark=Lr.prototype.Gx,Lr.prototype.darkenBy=Lr.prototype.Wy,Lr.prototype.lightenBy=Lr.prototype.Vz,Lr.prototype.addColorStop=Lr.prototype.addColorStop;var Qt=216/24389,Xt=24389/27,ae=[95.047,100,108.883],Ee=null,fe=new Dd,Xe=new Dd,$e=new Dd,gn=new Dd,$n=!1;Lr.className="Brush";var rr;Lr.Solid=rr=new Be(Lr,"Solid",0);var Ni;Lr.Linear=Ni=new Be(Lr,"Linear",1);var zi;Lr.Radial=zi=new Be(Lr,"Radial",2);var po;Lr.Pattern=po=new Be(Lr,"Pattern",4);var Br;Lr.Lab=Br=new Be(Lr,"Lab",5);var Pr;Lr.HSL=Pr=new Be(Lr,"HSL",6),Lr.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},Lr.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;$n||(wt(),$n=!0);var y=Ee;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)},Lr.lighten=function(a){return e0(a)},Lr.lightenBy=e0,Lr.darken=function(a){return n0(a)},Lr.darkenBy=n0,Lr.mix=ep,Lr.isDark=jf;function Er(){this.xa="Base"}Er.prototype.measure=function(){},Er.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Er.prototype.arrange=function(){},Er.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Er.prototype.iA=function(a){a.Uj()},Er.prototype.gc=function(){},Ze.Object.defineProperties(Er.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Ve}}}),Er.prototype.remeasureObject=Er.prototype.iA,Er.prototype.arrangeElement=Er.prototype.Ly,Er.prototype.measureElement=Er.prototype.Yz,Er.className="PanelLayout";function Lo(){this.xa="Base"}Te(Lo,Er),Lo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=za(a);for(var ot=0;ot<rt;ot++){var at=E[ot];if(at.visible||at===a){var At=at.margin,ft=At.right+At.left;At=At.top+At.bottom,at.measure(y,x,z,tt);var pt=at.measuredBounds;ft=Math.max(pt.width+ft,0),At=Math.max(pt.height+At,0),pt=at.position.x;var xt=at.position.y;isFinite(pt)||(pt=0),isFinite(xt)||(xt=0),at instanceof Oi&&at.isGeometryPositioned&&(at=at.strokeWidth/2,pt-=at,xt-=at),Gr(b,pt,xt,ft,At)}}},Lo.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,rt=z.margin,ot=z.position.x,at=z.position.y;if(ot=isNaN(ot)?-a:ot-a,at=isNaN(at)?-x:at-x,z instanceof Oi&&z.isGeometryPositioned){var At=z.strokeWidth/2;ot-=At,at-=At}z.visible&&z.arrange(ot+rt.left,at+rt.top,tt.width,tt.height)}};function io(){this.xa="Base"}Te(io,Er),io.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=bn(),z=za(a);for(var ot=0;ot<rt;ot++){var at=E[ot];if(at.visible||at===z){var At=ma(at,!1);if(At!==ze&&At!==Xn)y.push(at);else{at.measure(1/0,x,0,tt),At=at.margin,at=at.measuredBounds;var ft=Math.max(at.height+At.top+At.bottom,0);b.width+=Math.max(at.width+At.right+At.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)ot=y[a],(ot.visible||ot===z)&&(At=ot.margin,rt=At.right+At.left,At=At.top+At.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,At=Math.max(ot.height+At,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,At));Ln(y)},io.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var at=z,At=y[ot];if(At.visible){var ft=At.measuredBounds,pt=At.margin,xt=pt.top+pt.bottom,Ct=z+b.bottom,Mt=ft.height,Gt=ma(At,!1);(isNaN(At.desiredSize.height)&&Gt===Ye||Gt===di)&&(Mt=Math.max(x.height-xt-Ct,0)),xt=Mt+xt+Ct,Ct=At.alignment,Ct.Xb()&&(Ct=a.defaultAlignment),Ct.sb()||(Ct=Ui),tt&&(rt-=ft.width+pt.left+pt.right),At.arrange(rt+Ct.offsetX+pt.left,at+Ct.offsetY+pt.top+(x.height*Ct.y-xt*Ct.y),ft.width,Mt),tt||(rt+=ft.width+pt.left+pt.right)}}};function cr(){this.xa="Base"}Te(cr,Er),cr.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=bn();for(var rt=za(a),ot=0;ot<tt;ot++){var at=E[ot];if(at.visible||at===rt){var At=ma(at,!1);if(At!==ze&&At!==di)x.push(at);else{var ft=at.margin;At=ft.right+ft.left,ft=ft.top+ft.bottom,at.measure(y,1/0,z,0),at=at.measuredBounds,co(b,Math.max(b.width,Math.max(at.width+At,0)),b.height+Math.max(at.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)ot=x[a],(ot.visible||ot===rt)&&(at=ot.margin,tt=at.right+at.left,at=at.top+at.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,at=Math.max(ot.height+at,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=at);Ln(x)}},cr.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,rt=tt?x.height:b.top,ot=0;ot<E;ot++){var at=z,At=y[ot];if(At.visible){var ft=At.measuredBounds,pt=At.margin,xt=pt.left+pt.right,Ct=z+b.right,Mt=ft.width,Gt=ma(At,!1);(isNaN(At.desiredSize.width)&&Gt===Ye||Gt===Xn)&&(Mt=Math.max(x.width-xt-Ct,0)),xt=Mt+xt+Ct,Ct=At.alignment,Ct.Xb()&&(Ct=a.defaultAlignment),Ct.sb()||(Ct=Ui),tt&&(rt-=ft.height+pt.bottom+pt.top),At.arrange(at+Ct.offsetX+pt.left+(x.width*Ct.x-xt*Ct.x),rt+Ct.offsetY+pt.top,Mt,ft.height),tt||(rt+=ft.height+pt.bottom+pt.top)}}};function Uo(){this.xa="Base"}Te(Uo,Er),Uo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),at=ot.margin,At=at.right+at.left,ft=at.top+at.bottom;ot.measure(y,x,z,tt);var pt=ot.measuredBounds;z=pt.width,tt=pt.height;var xt=Math.max(z+At,0),Ct=Math.max(tt+ft,0),Mt=a.isClipping,Gt=be.allocAt(-at.left,-at.top,xt,Ct),Ot=be.allocAt(0,0,z,tt);Vo(ot,Ot,!0),z=Ot.width,tt=Ot.height;for(var Wt=!0,Zt=za(a),te=0;te<rt;te++){var re=E[te];pt=y;var me=x;if(re!==ot&&(re.visible||re===Zt)){at=re.margin;var ln=at.left,Nn=at.top;switch(xt=at.right+at.left,Ct=at.top+at.bottom,at=ma(re,!1),at){case Ye:pt=z,me=tt,Nn=ln=Ct=xt=0;break;case Xn:pt=z,ln=xt=0;break;case di:me=tt,Nn=Ct=0}re.measure(pt,me,0,0),pt=re.measuredBounds,xt=Math.max(pt.width+xt,0),Ct=Math.max(pt.height+Ct,0),at=re.alignment,at.Xb()&&(at=a.defaultAlignment),at.sb()||(at=Ui);var Fn=re.alignmentFocus;if(Fn.Xb()&&(Fn=Ui),me=null,re instanceof Ve&&re.$e!==""&&(me=re.fb(re.$e),me===re&&(me=null)),ln=Ot.x-ln,Nn=Ot.y-Nn,me!==null){for(re.arrange(0,0,pt.width,pt.height),pt=me.actualBounds,pt=Ht.allocAt(pt.x+(Fn.x*pt.width-Fn.offsetX),pt.y+(Fn.y*pt.height-Fn.offsetY)),me=me.panel;me!==re;)me.transform.Ga(pt),me=me.panel;ln+=at.x*z+at.offsetX-pt.x,Nn+=at.y*tt+at.offsetY-pt.y,Ht.free(pt)}else ln+=at.x*z+at.offsetX-(Fn.x*pt.width+Fn.offsetX),Nn+=at.y*tt+at.offsetY-(Fn.y*pt.height+Fn.offsetY);Wt?(Wt=!1,b.h(ln,Nn,xt,Ct)):Gr(b,ln,Nn,xt,Ct)}}switch(Wt?b.assign(Gt):Mt?b.Uu(Ot.x,Ot.y,Ot.width,Ot.height):Gr(b,Gt.x,Gt.y,Gt.width,Gt.height),be.free(Gt),be.free(Ot),at=ot.stretch,at===Li&&(at=ma(ot,!1)),at){case ze:return;case Ye:if(!isFinite(y)&&!isFinite(x))return;break;case Xn:if(!isFinite(y))return;break;case di:if(!isFinite(x))return}for(pt=ot.measuredBounds,z=pt.width,tt=pt.height,xt=Math.max(z+At,0),Ct=Math.max(tt+ft,0),at=ot.margin,Ot=be.allocAt(-at.left,-at.top,xt,Ct),Vo(ot,Ot,!0),z=Ot.width,tt=Ot.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==Zt||(at=x.margin,xt=at.right+at.left,Ct=at.top+at.bottom,pt=x.measuredBounds,xt=Math.max(pt.width+xt,0),Ct=Math.max(pt.height+Ct,0),At=x.alignment,At.Xb()&&(At=a.defaultAlignment),At.sb()||(At=Ui),x=x.alignmentFocus,x.Xb()&&(x=Ui),Wt?(Wt=!1,b.h(At.x*z+At.offsetX-(x.x*pt.width+x.offsetX)-at.left,At.y*tt+At.offsetY-(x.y*pt.height+x.offsetY)-at.top,xt,Ct)):Gr(b,At.x*z+At.offsetX-(x.x*pt.width+x.offsetX)-at.left,At.y*tt+At.offsetY-(x.y*pt.height+x.offsetY)-at.top,xt,Ct));Wt?b.assign(Gt):Mt?b.Uu(Ot.x,Ot.y,Ot.width,Ot.height):Gr(b,Gt.x,Gt.y,Gt.width,Gt.height),be.free(Ot)},Uo.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,rt=z.height,ot=a.padding;z=ot.left,ot=ot.top;var at=z-x.x,At=ot-x.y;for(b.arrange(at,At,tt,rt),tt=be.allocAt(0,0,tt,rt),Vo(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){at=ft.measuredBounds;var pt=at.width,xt=at.height;At=ft.alignment,At.Xb()&&(At=a.defaultAlignment),At.sb()||(At=Ui);var Ct=ft.alignmentFocus;if(Ct.Xb()&&(Ct=Ui),at=null,ft instanceof Ve&&ft.$e!==""&&(at=ft.fb(ft.$e),at===ft&&(at=null)),at!==null){var Mt=at.actualBounds;for(Ct=Ht.allocAt(Mt.x+(Ct.x*Mt.width-Ct.offsetX),Mt.y+(Ct.y*Mt.height-Ct.offsetY)),at=at.panel;at!==ft;)at.transform.Ga(Ct),at=at.panel;at=At.x*tt.width+At.offsetX-Ct.x,At=At.y*tt.height+At.offsetY-Ct.y,Ht.free(Ct)}else at=At.x*tt.width+At.offsetX-(Ct.x*pt+Ct.offsetX),At=At.y*tt.height+At.offsetY-(Ct.y*xt+Ct.offsetY);at+=tt.x-x.x,At+=tt.y-x.y,ft.visible&&ft.arrange(z+at,ot+At,pt,xt)}}be.free(tt)};function Vo(a,y,x){var E=null;if(a instanceof Ve&&a.$e!==""&&(E=a.fb(a.$e),E===a&&(E=null)),E!==null)for(x&&a.arrange(0,0,y.width,y.height),y.assign(E.actualBounds),E=E.panel;E!==a;)E.transform.pp(y),E=E.panel}function ro(){this.xa="Base"}Te(ro,Er),ro.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),at=ot.margin,At=y,ft=x,pt=at.right+at.left,xt=at.top+at.bottom;ot.measure(y,x,z,tt),at=ot.measuredBounds;var Ct=0,Mt=null;ot instanceof Oi&&(Mt=ot,Ct=Mt.strokeWidth*Mt.scale);var Gt=Math.max(at.width+pt,0);at=Math.max(at.height+xt,0);var Ot=Tm(ot),Wt=Ot.x*Gt+Ot.offsetX;Ot=Ot.y*at+Ot.offsetY;var Zt=Im(ot),te=Zt.x*Gt+Zt.offsetX;for(Zt=Zt.y*at+Zt.offsetY,isFinite(y)&&(At=Math.max(Math.abs(Wt-te)-Ct,0)),isFinite(x)&&(ft=Math.max(Math.abs(Ot-Zt)-Ct,0)),Ct=Je.alloc(),Ct.h(0,0),a=za(a),Zt=0;Zt<rt;Zt++)Ot=E[Zt],Ot===ot||!Ot.visible&&Ot!==a||(at=Ot.margin,Gt=at.right+at.left,Wt=at.top+at.bottom,Ot.measure(At,ft,0,0),at=Ot.measuredBounds,Gt=Math.max(at.width+Gt,0),at=Math.max(at.height+Wt,0),Ct.h(Math.max(Gt,Ct.width),Math.max(at,Ct.height)));if(rt===1)b.width=Gt,b.height=at,Je.free(Ct);else{switch(Ot=Tm(ot),Zt=Im(ot),rt=E=0,Zt.x!==Ot.x&&Zt.y!==Ot.y&&(E=Ct.width/Math.abs(Zt.x-Ot.x),rt=Ct.height/Math.abs(Zt.y-Ot.y)),Je.free(Ct),Ct=0,Mt!==null&&(Ct=Mt.strokeWidth*Mt.scale,Hm(Mt)===Hn&&(E=rt=Math.max(E,rt))),E+=Math.abs(Ot.offsetX)+Math.abs(Zt.offsetX)+Ct,rt+=Math.abs(Ot.offsetY)+Math.abs(Zt.offsetY)+Ct,Mt=ot.stretch,Mt===Li&&(Mt=ma(ot,!1)),Mt){case ze:tt=z=0;break;case Ye:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case Xn:isFinite(y)&&(E=y),tt=0;break;case di:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+pt,b.height=ot.measuredBounds.height+xt}},ro.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=be.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,at=ot.left;ot=ot.top,E.arrange(at+rt,ot+tt,b.width,b.height);var At=Tm(E),ft=Im(E),pt=At.y*b.height+At.offsetY,xt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=At.x*b.width+At.offsetX,z.y=pt,Gr(z,xt,ft,0,0),z.x+=rt+at,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(at=rt.measuredBounds,tt=rt.margin,ot=Math.max(at.width+tt.right+tt.left,0),At=Math.max(at.height+tt.top+tt.bottom,0),pt=rt.alignment,pt.Xb()&&(pt=a.defaultAlignment),pt.sb()||(pt=Ui),ot=z.width*pt.x+pt.offsetX-ot*pt.x+tt.left+z.x,tt=z.height*pt.y+pt.offsetY-At*pt.y+tt.top+z.y,rt.visible&&(Ro(z.x,z.y,z.width,z.height,ot,tt,at.width,at.height)?rt.arrange(ot,tt,at.width,at.height):rt.arrange(ot,tt,at.width,at.height,new be(z.x,z.y,z.width,z.height))));be.free(z)};function ra(){this.xa="Base",this.name="Table"}Te(ra,Er),ra.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=bn(),rt=bn(),ot=0;ot<z;ot++){var at=E[ot],At=at instanceof Ve?at:null;if(At!==null&&lc(At)&&at.visible){rt.push(At);for(var ft=At.O.s,pt=ft.length,xt=0;xt<pt;xt++){var Ct=ft[xt];At.type===Ve.TableRow?Ct.row=at.row:At.type===Ve.TableColumn&&(Ct.column=at.column),tt.push(Ct)}}else tt.push(at)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Mt=[],Gt=0;Gt<z;Gt++){var Ot=tt[Gt];Ot.visible&&(Xo(Ot,!0),bA(Ot,!0),Mt[Ot.row]||(Mt[Ot.row]=[]),Mt[Ot.row][Ot.column]||(Mt[Ot.row][Ot.column]=[]),Mt[Ot.row][Ot.column].push(Ot))}Ln(tt);var Wt=bn(),Zt=bn(),te=bn(),re={count:0},me={count:0},ln=y,Nn=x,Fn=a.rowDefs,tn=a.colDefs,Ge=null;z=Fn.length;for(var bi=0;bi<z;bi++)Ge=Fn[bi],Ge!==void 0&&(Ge.actual=0);z=tn.length;for(var Si=0;Si<z;Si++)Ge=tn[Si],Ge!==void 0&&(Ge.actual=0);for(var wr=Mt.length,_r=0,Ss=0;Ss<wr;Ss++)Mt[Ss]&&(_r=Math.max(_r,Mt[Ss].length));var Ls=Math.min(a.topIndex,wr-1),ya=Math.min(a.leftIndex,_r-1),xs=0;wr=Mt.length;for(var vc=za(a),Jo=0;Jo<wr;Jo++)if(Mt[Jo]){_r=Mt[Jo].length;var DA=a.Fb(Jo);DA.actual=0;for(var wa=DA.oc=0;wa<_r;wa++)if(Mt[Jo][wa]){var yc=a.Eb(wa);Wt[wa]===void 0&&(yc.actual=0,yc.oc=0,Wt[wa]=!0);for(var Tl=Mt[Jo][wa],Jl=Tl.length,vl=0;vl<Jl;vl++){var il=Tl[vl];if(il.visible||il===vc){var uf=1<il.rowSpan||1<il.columnSpan;uf&&(Jo<Ls||wa<ya||Zt.push(il));var OA=il.margin,Gg=OA.right+OA.left,yl=OA.top+OA.bottom,Sa=Fo(il,DA,yc,!1),jp=il.desiredSize,Xd=!isNaN(jp.height),au=!isNaN(jp.width)&&Xd;if(uf||Sa===ze||au||Jo<Ls||wa<ya||(re[wa]!==void 0||Sa!==Ye&&Sa!==Xn||(re[wa]=-1,re.count++),me[Jo]!==void 0||Sa!==Ye&&Sa!==di||(me[Jo]=-1,me.count++),te.push(il)),il.measure(1/0,1/0,0,0),!(Jo<Ls||wa<ya)){var rl=il.measuredBounds,$f=Math.max(rl.width+Gg,0),wl=Math.max(rl.height+yl,0);if(il.rowSpan===1&&(Sa===ze||Sa===Xn)){Ge=a.Fb(Jo);var hf=Ge.Wc();xs=Math.max(wl-Ge.actual,0),xs+hf>Nn&&(xs=Math.max(Nn-hf,0));var ym=Ge.oa===0;Ge.oc=Ge.oc+xs,Ge.actual=Ge.oa+xs,Nn=Math.max(Nn-(xs+(ym?hf:0)),0)}if(il.columnSpan===1&&(Sa===ze||Sa===di)){Ge=a.Eb(wa);var Kp=Ge.Wc();xs=Math.max($f-Ge.actual,0),xs+Kp>ln&&(xs=Math.max(ln-Kp,0));var ey=Ge.oa===0;Ge.oc=Ge.oc+xs,Ge.actual=Ge.oa+xs,ln=Math.max(ln-(xs+(ey?Kp:0)),0)}uf&&il.Uj()}}}}}Ln(Wt);var Wu=0,xh=0;z=a.columnCount;for(var Zd=0;Zd<z;Zd++){var cf=tn[Zd];cf!==void 0&&(Wu+=isNaN(cf.Hc)?cf.oc:cf.Hc,cf.oc!==0&&(Wu+=cf.Wc()))}z=a.rowCount;for(var zg=0;zg<z;zg++){var ff=Fn[zg];ff!==void 0&&(xh+=isNaN(ff.Hc)?ff.oc:ff.Hc,ff.oc!==0&&(xh+=ff.Wc()))}ln=Math.max(y-Wu,0);var Yu=Nn=Math.max(x-xh,0),wc=ln;z=te.length;for(var ol=0;ol<z;ol++){var lu=te[ol],wm=a.Fb(lu.row),Bh=a.Eb(lu.column),jg=lu.measuredBounds,HA=lu.margin,td=HA.right+HA.left,Au=HA.top+HA.bottom;re[lu.column]=Bh.oc===0&&re[lu.column]!==void 0?Math.max(jg.width+td,re[lu.column]):null,me[lu.row]=wm.oc===0&&me[lu.row]!==void 0?Math.max(jg.height+Au,me[lu.row]):null}var Jd=0,Kg=0,wA;for(wA in me)wA!=="count"&&(Jd+=me[wA]);for(wA in re)wA!=="count"&&(Kg+=re[wA]);for(var Os=Je.alloc(),Vp=0;Vp<z;Vp++){var Qa=te[Vp];if(Qa.visible||Qa===vc){var qo=a.Fb(Qa.row),Ua=a.Eb(Qa.column),Ch=0;isFinite(Ua.width)?Ch=Ua.width:(isFinite(ln)&&re[Qa.column]!==null?Kg===0?Ch=Ua.actual+ln:Ch=re[Qa.column]/Kg*wc:re[Qa.column]!==null?Ch=ln:Ch=Ua.actual||ln,Ch=Math.max(0,Ch-Ua.Wc()));var Sc=0;switch(isFinite(qo.height)?Sc=qo.height:(isFinite(Nn)&&me[Qa.row]!==null?Jd===0?Sc=qo.actual+Nn:Sc=me[Qa.row]/Jd*Yu:me[Qa.row]!==null?Sc=Nn:Sc=qo.actual||Nn,Sc=Math.max(0,Sc-qo.Wc())),Os.h(Math.max(Ua.minimum,Math.min(Ch,Ua.maximum)),Math.max(qo.minimum,Math.min(Sc,qo.maximum))),Sa=Fo(Qa,qo,Ua,!1),Sa){case Xn:Os.height=Math.max(Os.height,qo.actual+Nn);break;case di:Os.width=Math.max(Os.width,Ua.actual+ln)}var ed=Qa.margin,ny=ed.right+ed.left,Sm=ed.top+ed.bottom;Qa.Uj(),Qa.measure(Os.width,Os.height,Ua.minimum,qo.minimum);var Vg=Qa.measuredBounds,nd=Math.max(Vg.width+ny,0),qd=Math.max(Vg.height+Sm,0);isFinite(ln)&&(nd=Math.min(nd,Os.width)),isFinite(Nn)&&(qd=Math.min(qd,Os.height));var sl=0;sl=qo.actual,qo.actual=Math.max(qo.actual,qd),qo.oc=Math.max(qo.oc,qd),xs=qo.actual-sl,Nn=Math.max(Nn-xs,0),me[Qa.row]===null&&(Yu=Math.max(Yu-xs,0)),sl=Ua.actual,Ua.actual=Math.max(Ua.actual,nd),Ua.oc=Math.max(Ua.oc,nd),xs=Ua.actual-sl,ln=Math.max(ln-xs,0),re[Qa.column]===null&&(wc=Math.max(wc-xs,0))}}Ln(te);var Ph=Je.alloc(),RA=bn(),Kl=bn();if(z=Zt.length,z!==0){for(var df=0;df<wr;df++)if(Mt[df]){_r=Mt[df].length;var _g=a.Fb(df);RA[df]=_g.actual;for(var gf=0;gf<_r;gf++)if(Mt[df][gf]){var xm=a.Eb(gf);Kl[gf]=xm.actual}}}for(var Wg=0;Wg<z;Wg++){var Do=Zt[Wg];if(Do.visible||Do===vc){var SA=a.Fb(Do.row),ql=a.Eb(Do.column);switch(Os.h(Math.max(ql.minimum,Math.min(y,ql.maximum)),Math.max(SA.minimum,Math.min(x,SA.maximum))),Sa=Fo(Do,SA,ql,!1),Sa){case Ye:Kl[ql.index]!==0&&(Os.width=Math.min(Os.width,Kl[ql.index])),RA[SA.index]!==0&&(Os.height=Math.min(Os.height,RA[SA.index]));break;case Xn:Kl[ql.index]!==0&&(Os.width=Math.min(Os.width,Kl[ql.index]));break;case di:RA[SA.index]!==0&&(Os.height=Math.min(Os.height,RA[SA.index]))}isFinite(ql.width)&&(Os.width=ql.width),isFinite(SA.height)&&(Os.height=SA.height),Ph.h(0,0);for(var Bm=ql.minimum,Sl=SA.minimum,xc=1;xc<Do.rowSpan&&!(Do.row+xc>=a.rowCount);xc++)Ge=a.Fb(Do.row+xc),xs=0,xs=Sa===Ye||Sa===di?Math.max(Ge.minimum,RA[Do.row+xc]===0?Ge.maximum:Math.min(RA[Do.row+xc],Ge.maximum)):Math.max(Ge.minimum,isNaN(Ge.Hc)?Ge.maximum:Math.min(Ge.Hc,Ge.maximum)),Ph.height+=xs,Sl+=Ge.minimum;for(var $l=1;$l<Do.columnSpan&&!(Do.column+$l>=a.columnCount);$l++)Ge=a.Eb(Do.column+$l),xs=0,xs=Sa===Ye||Sa===Xn?Math.max(Ge.minimum,Kl[Do.column+$l]===0?Ge.maximum:Math.min(Kl[Do.column+$l],Ge.maximum)):Math.max(Ge.minimum,isNaN(Ge.Hc)?Ge.maximum:Math.min(Ge.Hc,Ge.maximum)),Ph.width+=xs,Bm+=Ge.minimum;Os.width+=Ph.width,Os.height+=Ph.height;var Yg=Do.margin,pf=Yg.right+Yg.left,_p=Yg.top+Yg.bottom;Do.measure(Os.width,Os.height,Bm,Sl);for(var Xg=Do.measuredBounds,uu=Math.max(Xg.width+pf,0),id=Math.max(Xg.height+_p,0),mf=0,Zg=0;Zg<Do.rowSpan&&!(Do.row+Zg>=a.rowCount);Zg++)Ge=a.Fb(Do.row+Zg),mf+=Ge.total||0;if(mf<id){var Bc=id-mf,Xu=id-mf;if(Do.spanAllocation!==null)for(var Cc=Do.spanAllocation,Fh=0;Fh<Do.rowSpan&&!(0>=Bc)&&!(Do.row+Fh>=a.rowCount);Fh++){Ge=a.Fb(Do.row+Fh);var Pc=Ge.oa||0,rd=Cc(Do,Ge,Xu);Ge.actual=Math.min(Ge.maximum,Pc+rd),Ge.oa!==Pc&&(Bc-=Ge.oa-Pc)}for(;0<Bc;){var GA=Ge.oa||0;if(isNaN(Ge.height)&&Ge.maximum>GA&&(Ge.actual=Math.min(Ge.maximum,GA+Bc),Ge.oa!==GA&&(Bc-=Ge.oa-GA)),Ge.index===0)break;Ge=a.Fb(Ge.index-1)}}for(var $d=0,Fc=0;Fc<Do.columnSpan&&!(Do.column+Fc>=a.columnCount);Fc++)Ge=a.Eb(Do.column+Fc),$d+=Ge.total||0;if($d<uu){var tg=uu-$d,iy=uu-$d;if(Do.spanAllocation!==null)for(var Lh=Do.spanAllocation,od=0;od<Do.columnSpan&&!(0>=tg)&&!(Do.column+od>=a.columnCount);od++){Ge=a.Eb(Do.column+od);var Wp=Ge.oa||0,ry=Lh(Do,Ge,iy);Ge.actual=Math.min(Ge.maximum,Wp+ry),Ge.oa!==Wp&&(tg-=Ge.oa-Wp)}for(;0<tg;){var Cm=Ge.oa||0;if(isNaN(Ge.width)&&Ge.maximum>Cm&&(Ge.actual=Math.min(Ge.maximum,Cm+tg),Ge.oa!==Cm&&(tg-=Ge.oa-Cm)),Ge.index===0)break;Ge=a.Eb(Ge.index-1)}}}}Ln(Zt),Je.free(Ph),Je.free(Os),RA!==void 0&&Ln(RA),Kl!==void 0&&Ln(Kl);var eg=0,ng=0,Pm=a.desiredSize,g1=a.maxSize;Sa=ma(a,!0);var Yp=xh=Wu=0,Xp=0;z=a.columnCount;for(var Fm=0;Fm<z;Fm++)tn[Fm]!==void 0&&(Ge=a.Eb(Fm),isFinite(Ge.width)?(Yp+=Ge.width,Yp+=Ge.Wc()):s0(Ge)===sp?(Yp+=Ge.oa,Yp+=Ge.Wc()):Ge.oa!==0&&(Wu+=Ge.oa,Wu+=Ge.Wc()));isFinite(Pm.width)?eg=Math.min(Pm.width,g1.width):eg=Sa!==ze&&isFinite(y)?y:Wu,eg=Math.max(eg,a.minSize.width),eg=Math.max(eg-Yp,0);for(var J1=Wu===0?1:Math.max(eg/Wu,1),Lm=0;Lm<z;Lm++)tn[Lm]!==void 0&&(Ge=a.Eb(Lm),isFinite(Ge.width)||s0(Ge)===sp||(Ge.actual=Ge.oa*J1),Ge.position=b.width,Ge.oa!==0&&(b.width+=Ge.oa,b.width+=Ge.Wc()));z=a.rowCount;for(var Em=0;Em<z;Em++)Fn[Em]!==void 0&&(Ge=a.Fb(Em),isFinite(Ge.height)?(Xp+=Ge.height,Xp+=Ge.Wc()):s0(Ge)===sp?(Xp+=Ge.oa,Xp+=Ge.Wc()):Ge.oa!==0&&(xh+=Ge.oa,xh+=Ge.Wc()));isFinite(Pm.height)?ng=Math.min(Pm.height,g1.height):ng=Sa!==ze&&isFinite(x)?x:xh,ng=Math.max(ng,a.minSize.height),ng=Math.max(ng-Xp,0);for(var q1=xh===0?1:Math.max(ng/xh,1),Mm=0;Mm<z;Mm++)Fn[Mm]!==void 0&&(Ge=a.Fb(Mm),isFinite(Ge.height)||s0(Ge)===sp||(Ge.actual=Ge.oa*q1),Ge.position=b.height,Ge.oa!==0&&(b.height+=Ge.oa,b.height+=Ge.Wc()));z=rt.length;for(var oy=0;oy<z;oy++){var Zp=rt[oy],sy=0,ay=0;Zp.type===Ve.TableRow?(sy=b.width,Ge=a.Fb(Zp.row),ay=Ge.actual):(Ge=a.Eb(Zp.column),sy=Ge.actual,ay=b.height),Zp.measuredBounds.h(0,0,sy,ay),Xo(Zp,!1)}Ln(rt),a.inRowsCols=Mt},ra.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var rt,ot,at=tt.length,At=0,ft=0;ft<at;ft++)tt[ft]&&(At=Math.max(At,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var pt=ft=0,xt=Math.min(a.topIndex,at-1);if(0<ot.length){for(;xt!==at&&(ot[xt]===void 0||ot[xt].oa===0);)xt++;xt=Math.max(Math.min(xt,at-1),0),ft=-ot[xt].position}var Ct=Math.min(a.leftIndex,At-1);if(0<rt.length){for(;Ct!==At&&(rt[Ct]===void 0||rt[Ct].oa===0);)Ct++;Ct=Math.max(Math.min(Ct,At-1),0),pt=-rt[Ct].position}for(var Mt=0,Gt=0;Mt!==at&&ot[Mt]===void 0;)Mt++;for(;Gt!==at&&rt[Gt]===void 0;)Gt++;At=a.part,a.Fb(Mt),a.Eb(Gt);for(var Ot=0;Ot<y.length;Ot++){var Wt=y[Ot];if(Wt instanceof Ve&&Wt.visible&&lc(Wt)){if(Wt.type===Ve.TableRow){rt=a.Fb(Wt.row);var Zt=a.Eb(Gt)}else rt=a.Fb(Mt),Zt=a.Eb(Wt.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Mt,xt))),rt=Zt.position+pt+z,Zt.oa!==0&&(rt+=Zt.Io(Math.max(Gt,Ct))),Zt=Wt.measuredBounds,Wt.Uk(),Wt.actualBounds.ka();var te=Wt.actualBounds,re=be.allocAt(te.x,te.y,te.width,te.height);te.x=Wt.type===Ve.TableRow?z:rt,te.y=Wt.type===Ve.TableColumn?b:ot,te.width=Zt.width,te.height=Zt.height,Wt.actualBounds.freeze(),bA(Wt,!1),lo(re,te)||At===null||(At.oh(),Wt.Pn(At)),be.free(re)}}for(Ot=Je.alloc(),Wt=0;Wt<at;Wt++)if(tt[Wt]){for(At=tt[Wt].length,Zt=a.Fb(Wt),ot=Zt.position+ft+b,Zt.oa!==0&&(ot+=Zt.Io(Math.max(Mt,xt))),te=0;te<At;te++)if(tt[Wt][te]){re=a.Eb(te),rt=re.position+pt+z,re.oa!==0&&(rt+=re.Io(Math.max(Gt,Ct)));for(var me=tt[Wt][te],ln=me.length,Nn=0;Nn<ln;Nn++){var Fn=me[Nn],tn=Fn.measuredBounds;Ot.h(0,0);for(var Ge=1;Ge<Fn.rowSpan&&!(Wt+Ge>=a.rowCount);Ge++){var bi=a.Fb(Wt+Ge);bi.oa!==0&&(Ot.height+=bi.total)}for(Ge=1;Ge<Fn.columnSpan&&!(te+Ge>=a.columnCount);Ge++)bi=a.Eb(te+Ge),bi.oa!==0&&(Ot.width+=bi.total);var Si=re.oa+Ot.width,wr=Zt.oa+Ot.height;Ge=rt,bi=ot;var _r=Si,Ss=wr,Ls=rt,ya=ot,xs=Si,vc=wr;rt+Si>x.width&&(xs=Math.max(x.width-rt,0)),ot+wr>x.height&&(vc=Math.max(x.height-ot,0));var Jo=Fn.alignment;if(Jo.Xb()){Jo=a.defaultAlignment,Jo.sb()||(Jo=Ui);var DA=Jo.x,wa=Jo.y,yc=Jo.offsetX;Jo=Jo.offsetY;var Tl=re.alignment,Jl=Zt.alignment;Tl.sb()&&(DA=Tl.x,yc=Tl.offsetX),Jl.sb()&&(wa=Jl.y,Jo=Jl.offsetY)}else DA=Jo.x,wa=Jo.y,yc=Jo.offsetX,Jo=Jo.offsetY;(isNaN(DA)||isNaN(wa))&&(wa=DA=.5,Jo=yc=0),Tl=tn.width,Jl=tn.height;var vl=Fn.margin,il=vl.left+vl.right,uf=vl.top+vl.bottom,OA=Fo(Fn,Zt,re,!1);!isNaN(Fn.desiredSize.width)||OA!==Ye&&OA!==Xn||(Tl=Math.max(Si-il,0)),!isNaN(Fn.desiredSize.height)||OA!==Ye&&OA!==di||(Jl=Math.max(wr-uf,0)),Si=Fn.maxSize,wr=Fn.minSize,Tl=Math.min(Si.width,Tl),Jl=Math.min(Si.height,Jl),Tl=Math.max(wr.width,Tl),Jl=Math.max(wr.height,Jl),Si=Jl+uf,Ge+=_r*DA-(Tl+il)*DA+yc+vl.left,bi+=Ss*wa-Si*wa+Jo+vl.top,Fn.visible&&(Ro(Ls,ya,xs,vc,Ge,bi,tn.width,tn.height)?Fn.arrange(Ge,bi,Tl,Jl):Fn.arrange(Ge,bi,Tl,Jl,new be(Ls,ya,xs,vc)))}}}for(Je.free(Ot),a=0;a<E;a++)x=y[a],z=x instanceof Ve?x:null,z!==null&&lc(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function dl(){this.xa="Base"}Te(dl,Er),dl.prototype.measure=function(){},dl.prototype.arrange=function(){};function Ml(){this.xa="Base"}Te(Ml,Er),Ml.prototype.measure=function(){},Ml.prototype.arrange=function(){};function ds(){this.xa="Base"}Te(ds,Er),ds.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&Yt("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var rt=E.measuredBounds,ot=E.margin,at=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var At=E.scale,ft=rt.width;rt=rt.height;var pt=Math.max(y-at,0),xt=Math.max(x-ot,0),Ct=1;a.viewboxStretch===Hn?ft!==0&&rt!==0&&(Ct=Math.min(pt/ft,xt/rt)):ft!==0&&rt!==0&&(Ct=Math.max(pt/ft,xt/rt)),Ct===0&&(Ct=1e-4),E.Ca*=Ct,At!==E.scale&&(Xo(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+at,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},ds.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=Ui),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function va(){this.xa="Base"}Te(va,Er),va.prototype.measure=function(){},va.prototype.arrange=function(){},va.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,ot=z.height,at=Math.ceil(rt/b),At=Math.ceil(ot/E),ft=a.gridOrigin,pt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var xt=[],Ct=a.O.s,Mt=Ct.length,Gt=0;Gt<Mt;Gt++){var Ot=Ct[Gt],Wt=[];if(xt.push(Wt),Ot.visible){var Zt=Ot.interval;if(!(0>Zt)){Ot=yh(Ot.figure);for(var te=0;te<Mt;te++)if(te!==Gt){var re=Ct[te];re.visible&&yh(re.figure)===Ot&&(re=re.interval,re>Zt&&Wt.push(re))}}}}for(Ct=a.O.s,Mt=Ct.length,Gt=0;Gt<Mt;Gt++){var me=Ct[Gt];if(me.visible&&(Wt=me.interval||1,Ot=Math.abs(Wt),!(2>b*Ot*x))){if(Zt=me.segmentIndex,(!isFinite(Zt)||isNaN(Zt))&&(Zt=0),0>Zt&&(Zt=Ot-Math.min(-Zt,Ot)),Zt=Math.round(Zt%Ot),Ot=me.opacity,te=1,Ot!==1){if(Ot===0)continue;te=y.globalAlpha,y.globalAlpha=te*Ot}re=xt[Gt];var ln=!1,Nn=me.strokeDashArray;if(Nn!==null&&(ln=!0,y.js(Nn,me.strokeDashOffset)),me.figure==="LineV"&&me.stroke!==null&&0<me.strokeWidth){for(y.lineWidth=me.strokeWidth,wo(a,y,me.stroke,!1,!1,z,tt),y.beginPath(),Nn=me=Math.floor((pt-b)/b);Nn<=me+at;Nn++){var Fn=Nn*b+pt;0<=Fn&&Fn<=rt&&iu(Nn,Wt,Zt,re)&&(y.moveTo(Fn,0),y.lineTo(Fn,ot))}y.stroke(),y.Se()}else if(me.figure==="LineH"&&me.stroke!==null&&0<me.strokeWidth){for(y.lineWidth=me.strokeWidth,wo(a,y,me.stroke,!1,!1,z,tt),y.beginPath(),Nn=me=Math.floor((ft-E)/E);Nn<=me+At;Nn++)Fn=Nn*E+ft,0<=Fn&&Fn<=ot&&iu(Nn,Wt,Zt,re)&&(y.moveTo(0,Fn),y.lineTo(rt,Fn));y.stroke(),y.Se()}else if(me.figure==="BarV"&&me.fill!==null)for(wo(a,y,me.fill,!0,!1,z,tt),me=me.width,isNaN(me)&&(me=b),Fn=Nn=Math.floor((pt-b)/b);Fn<=Nn+at;Fn++){var tn=Fn*b+pt;0<=tn+me&&tn<=rt&&iu(Fn,Wt,Zt,re)&&y.fillRect(tn,0,me,ot)}else if(me.figure==="BarH"&&me.fill!==null)for(wo(a,y,me.fill,!0,!1,z,tt),me=me.height,isNaN(me)&&(me=E),Fn=Nn=Math.floor((ft-E)/E);Fn<=Nn+At;Fn++)tn=Fn*E+ft,0<=tn+me&&tn<=ot&&iu(Fn,Wt,Zt,re)&&y.fillRect(0,tn,rt,me);ln&&y.fs(),Ot!==1&&(y.globalAlpha=te)}}y.restore(),y.Vc(!1)};function iu(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function gl(){this.xa="Base"}Te(gl,Er),gl.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof vr||a instanceof en){var tt=null,rt=null;if(a instanceof en&&(tt=a),a instanceof vr&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof en){var ot=tt;if(z===0)co(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var at=a instanceof vr?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var At=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var pt=y.height,xt=a.j;if(xt.length=0,at!==null){Hl(a,rt,pt,at);var Ct=at.measuredBounds;x.ed(Ct),xt.push(Ct)}Ct=Fi.alloc();for(var Mt=Ht.alloc(),Gt=Ht.alloc(),Ot=0;Ot<z;Ot++){var Wt=E[Ot];if(Wt!==at)if(Wt.isPanelMain&&Wt instanceof Oi){Hl(a,rt,pt,Wt);var Zt=Wt.measuredBounds;x.ed(Zt),xt.push(Zt)}else if(2>ft)Wt.measure(1/0,1/0,0,0),Zt=Wt.measuredBounds,x.ed(Zt),xt.push(Zt);else{var te=Wt.segmentIndex,re=Wt.segmentFraction,me=Wt.alignmentFocus;me.Mc()&&(me=Ui);var ln=Wt.segmentOrientation,Nn=Wt.segmentOffset;if(isNaN(te)){var Fn=ot.ua;Zt=bn(),Fn.Qu(re,Zt);var tn=Ht.allocAt(Zt[0],Zt[1]);if(tn.add(ot.i(0)),Fn.type===qe.j?tn.offset(-Fn.startX,-Fn.startY):(Fn=Fn.figures.first(),Fn!==null&&tn.offset(-Fn.startX,-Fn.startY)),Fn=Zt[2],ln!==ka){var Ge=ot.computeAngle(Wt,ln,Fn);Wt.Kb=Ge}Ge=tn.x-y.x;var bi=tn.y-y.y;Ht.free(tn),Ln(Zt)}else if(te<-ft||te>=ft)Zt=Ht.alloc(),ot.vg(),ot.computeMidPoint(Zt),Fn=ot.midAngle,ln!==ka&&(Ge=ot.computeAngle(Wt,ln,Fn),Wt.Kb=Ge),Ge=Zt.x-y.x,bi=Zt.y-y.y,Ht.free(Zt);else{if(Ge=0,0<=te?(bi=At.M(te),Zt=te<ft-1?At.M(te+1):bi):(Ge=ft+te,bi=At.M(Ge),Zt=0<Ge?At.M(Ge-1):bi),bi.Xa(Zt)){0<=te?(Fn=0<te?At.M(te-1):bi,Ge=te<ft-2?At.M(te+2):Zt):(Fn=Ge<ft-1?At.M(Ge+1):bi,Ge=1<Ge?At.M(Ge-2):Zt),tn=Fn.Bf(bi);var Si=Zt.Bf(Ge);Fn=tn>Si+10?0<=te?Fn.ab(bi):bi.ab(Fn):Si>tn+10?0<=te?Zt.ab(Ge):Ge.ab(Zt):0<=te?Fn.ab(Ge):Ge.ab(Fn)}else Fn=0<=te?bi.ab(Zt):Zt.ab(bi);ln!==ka&&(Ge=ot.computeAngle(Wt,ln,Fn),Wt.Kb=Ge),Ge=bi.x+(Zt.x-bi.x)*re-y.x,bi=bi.y+(Zt.y-bi.y)*re-y.y}Wt.measure(1/0,1/0,0,0),Zt=Wt.measuredBounds,tn=Wt.naturalBounds;var wr=0;Wt instanceof Oi&&(wr=Wt.strokeWidth),Si=tn.width+wr;var _r=tn.height+wr;Ct.reset(),Ct.translate(-Zt.x,-Zt.y),Ct.scale(Wt.scale,Wt.scale),Ct.rotate(ln===ka?Wt.angle:Fn,Si/2,_r/2),ln!==pp&&ln!==vp||Ct.rotate(90,Si/2,_r/2),ln!==mp&&ln!==yp||Ct.rotate(-90,Si/2,_r/2),ln===b0&&(45<Fn&&135>Fn||225<Fn&&315>Fn)&&Ct.rotate(-Fn,Si/2,_r/2),tn=new be(0,0,Si,_r),Mt.xi(tn,me),Ct.Ga(Mt),me=-Mt.x+wr/2*Wt.scale,Wt=-Mt.y+wr/2*Wt.scale,Gt.assign(Nn),wr=isNaN(Nn.x);var Ss=isNaN(Nn.y);if(wr||Ss){Si=Si/2+3,_r=_r/2+3;var Ls=45<=Fn&&135>=Fn,ya=225<=Fn&&315>=Fn;ln===ka&&(Ls||ya)?(Gt.x=Ss?Si:Nn.y,Gt.y=wr?_r:Nn.x,Ls?0<=te||isNaN(te)&&.5>re||!wr||(Gt.y=-_r):ya&&((0<=te||isNaN(te)&&.5>re)&&wr&&(Gt.y=-_r),Ss&&(Gt.x=-Si))):(wr&&(Gt.x=0<=te||isNaN(te)&&.5>re?Si:-Si),Ss&&(Gt.y=-_r),Gt.rotate(Fn))}else Gt.rotate(Fn);Ge+=Gt.x,bi+=Gt.y,tn.set(Zt),tn.h(Ge+me,bi+Wt,Zt.width,Zt.height),xt.push(tn),x.ed(tn)}}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),co(b,x.width||0,x.height||0),Fi.free(Ct),Ht.free(Mt),Ht.free(Gt)}}}},gl.prototype.arrange=function(a,y){var x=y.length;if(a instanceof vr||a instanceof en){var E=a,b=null;a instanceof vr&&(b=a,E=b.adornedPart);var z=a instanceof vr?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var at=y[ot];if(at!==z&&rt<tt.length){var At=tt[rt];rt++,at.arrange(At.x-a.jg.x,At.y-a.jg.y,At.width,At.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof en)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var pt=tt.alignmentFocus;if(at=tt.segmentOrientation,At=tt.segmentOffset,isNaN(rt)){var xt=ft.ua,Ct=bn();xt.Qu(ot,Ct);var Mt=Ht.allocAt(Ct[0],Ct[1]);Mt.add(ft.i(0)),xt.type===qe.j||(xt=xt.figures.first()),Mt.offset(-xt.startX,-xt.startY),xt=Ct[2],at!==ka&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Mt.x;var Gt=Mt.y;Ht.free(Mt),Ln(Ct)}else if(rt<-x||rt>=x)Ct=Ht.alloc(),xt=ft,Gt=Ct,xt.vg(),xt.computeMidPoint(Gt),xt=ft.midAngle,at!==ka&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Ct.x,Gt=Ct.y,Ht.free(Ct);else{if(Mt=0,0<=rt?(Ct=y.s[rt],Gt=rt<x-1?y.s[rt+1]:Ct):(Mt=x+rt,Ct=y.s[Mt],Gt=0<Mt?y.s[Mt-1]:Ct),Ct.Xa(Gt)){0<=rt?(xt=0<rt?y.s[rt-1]:Ct,Mt=rt<x-2?y.s[rt+2]:Gt):(xt=Mt<x-1?y.s[Mt+1]:Ct,Mt=1<Mt?y.s[Mt-2]:Gt);var Ot=xt.Bf(Ct),Wt=Gt.Bf(Mt);xt=Ot>Wt+10?0<=rt?xt.ab(Ct):Ct.ab(xt):Wt>Ot+10?0<=rt?Gt.ab(Mt):Mt.ab(Gt):0<=rt?xt.ab(Mt):Mt.ab(xt)}else xt=0<=rt?Ct.ab(Gt):Gt.ab(Ct);at!==ka&&(ft=ft.computeAngle(tt,at,xt),tt.angle=ft),ft=Ct.x+(Gt.x-Ct.x)*ot,Gt=Ct.y+(Gt.y-Ct.y)*ot}if(pt.ys())tt.location=new Ht(ft,Gt);else{pt.Mc()&&(pt=Ui),Ct=Fi.alloc(),Ct.reset(),Ct.scale(tt.scale,tt.scale),Ct.rotate(tt.angle,0,0);var Zt=tt.naturalBounds;Mt=be.allocAt(0,0,Zt.width,Zt.height),Ot=Ht.alloc(),Ot.xi(Mt,pt),Ct.Ga(Ot),pt=-Ot.x,Wt=-Ot.y;var te=Zt.width,re=Zt.height;Zt=Ht.alloc(),Zt.assign(At);var me=isNaN(At.x),ln=isNaN(At.y);if(me||ln){te=te/2+3,re=re/2+3;var Nn=45<=xt&&135>=xt,Fn=225<=xt&&315>=xt;at===ka&&(Nn||Fn)?(Zt.x=ln?te:At.y,Zt.y=me?re:At.x,Nn?0<=rt||isNaN(rt)&&.5>ot||!me||(Zt.y=-re):Fn&&((0<=rt||isNaN(rt)&&.5>ot)&&me&&(Zt.y=-re),ln&&(Zt.x=-te))):(me&&(Zt.x=0<=rt||isNaN(rt)&&.5>ot?te:-te),ln&&(Zt.y=-re),Zt.rotate(xt))}else Zt.rotate(xt);ft+=Zt.x,Gt+=Zt.y,Ct.pp(Mt),pt+=Mt.x,Wt+=Mt.y,rt=Ht.allocAt(ft+pt,Gt+Wt),tt.move(rt),Ht.free(rt),Ht.free(Zt),Ht.free(Ot),be.free(Mt),Fi.free(Ct)}}b!==null?b.Ul(!1):E.Ul(!1),E=Iy(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Ht.free(E)}};function Hl(a,y,x,E){if(tl(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof vr&&a.type===Ve.Link&&a.adornedObject instanceof Oi&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof en&&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 vr&&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),Xo(E,!1)}}function ru(){this.xa="Base"}Te(ru,Er),ru.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,at=ot.right+ot.left,At=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,pt=new be(-ot.left,-ot.top,Math.max(ft.width+at,0),Math.max(ft.height+At,0));a.graduatedBounds.push(pt),b.assign(pt);for(var xt=rt.geometry,Ct=rt.strokeWidth,Mt=xt.flattenedSegments,Gt=xt.flattenedLengths,Ot=xt.flattenedTotalLength,Wt=Mt.length,Zt=0,te=0,re=bn(),me=0;me<Wt;me++){var ln=Mt[me],Nn=[];te=Zt=0;for(var Fn=ln.length,tn=0;tn<Fn;tn+=2){var Ge=ln[tn],bi=ln[tn+1];if(tn!==0){var Si=180*Math.atan2(bi-te,Ge-Zt)/Math.PI;0>Si&&(Si+=360),Nn.push(Si)}Zt=Ge,te=bi}re.push(Nn)}if(a.graduatedIntervals===null){for(var wr=[],_r=a.O.s,Ss=_r.length,Ls=0;Ls<Ss;Ls++){var ya=_r[Ls],xs=[];if(wr.push(xs),ya.visible){var vc=ya.interval;if(!(0>vc)){for(var Jo=0;Jo<Ss;Jo++)if(Jo!==Ls){var DA=_r[Jo];if(DA.visible&&ya.constructor===DA.constructor){var wa=DA.interval;wa>vc&&xs.push(wa)}}}}}a.graduatedIntervals=wr}var yc=a.graduatedIntervals,Tl=a.O.s,Jl=Tl.length,vl=0,il=0,uf=Ot;a.graduatedMarks=[];for(var OA,Gg=0;Gg<Jl;Gg++){var yl=Tl[Gg];if(OA=[],yl.visible&&yl!==rt){var Sa=Math.abs(yl.interval),jp=a.graduatedTickUnit;if(!(2>jp*Sa*Ot/a.graduatedRange&&yl.graduatedSkip===null)){var Xd=Gt[0][0],au=0,rl=0;il=Ot*yl.graduatedStart-1e-4,uf=Ot*yl.graduatedEnd+1e-4;var $f=jp*Sa,wl=a.graduatedTickBase;if(wl<a.graduatedMin){var hf=(a.graduatedMin-wl)/$f;hf=hf%1===0?hf:Math.floor(hf+1),wl+=hf*$f}else wl>a.graduatedMin+$f&&(wl-=Math.floor((wl-a.graduatedMin)/$f)*$f);for(var ym=yc[Gg],Kp=wl,ey=1e-6*a.graduatedMax,Wu=1;wl<=a.graduatedMax+ey;Wu++){t:{for(var xh=ym.length,Zd=0;Zd<xh;Zd++){var cf=(wl-a.graduatedTickBase)%(ym[Zd]*a.graduatedTickUnit),zg=1e-6*a.graduatedTickUnit;if(cf<zg&&cf>-zg){var ff=!1;break t}}ff=!0}if(ff&&(wl>a.graduatedMax&&(wl=a.graduatedMax),yl.graduatedSkip===null||yl instanceof Jr&&!yl.graduatedSkip(wl,yl)||yl instanceof Oi&&!yl.graduatedSkip(wl,yl))&&(vl=(wl-a.graduatedMin)*Ot/a.graduatedRange,vl>Ot&&(vl=Ot),il<=vl&&vl<=uf)){for(var Yu=re[au][rl],wc=Gt[au][rl];au<Gt.length;){for(;vl>Xd&&rl<Gt[au].length-1;)rl++,Yu=re[au][rl],wc=Gt[au][rl],Xd+=wc;if(vl<=Xd)break;au++,rl=0,Yu=re[au][rl],wc=Gt[au][rl],Xd+=wc}var ol=Mt[au],lu=ol[2*rl],wm=ol[2*rl+1],Bh=(vl-(Xd-wc))/wc,jg=new Ht(lu+(ol[2*rl+2]-lu)*Bh+Ct/2-xt.bounds.x,wm+(ol[2*rl+3]-wm)*Bh+Ct/2-xt.bounds.y);jg.scale(rt.scale,rt.scale);t:{var HA=Yu,td=re[au];if(!(.5005>Bh&&.4995<Bh)){var Au=HA;if(.5>Bh?0<rl?Au=td[rl-1]:se.$(ol[0],ol[ol.length-2])&&se.$(ol[1],ol[ol.length-1])&&(Au=td[td.length-1]):.5<Bh&&(rl+1<td.length?Au=td[rl+1]:se.$(ol[0],ol[ol.length-2])&&se.$(ol[1],ol[ol.length-1])&&(Au=td[0])),HA!==Au){var Jd=Math.abs(HA-Au);if(180<Jd&&(HA<Au?HA+=360:Au+=360,Jd=Math.abs(HA-Au)),5e-4>Bh||.9995<Bh){Yu=(HA+Au)/2%360;break t}if(10>Jd){var Kg=1-Math.abs(.5-Bh);Yu=(HA*Kg+Au*(1-Kg))%360;break t}}}Yu=HA}if(yl instanceof Jr){var wA="";yl.graduatedFunction!==null?(wA=yl.graduatedFunction(wl,yl),wA=wA!=null?wA.toString():""):wA=(+wl.toFixed(2)).toString(),wA!==""&&OA.push({$l:jg,angle:Yu,text:wA})}else OA.push({$l:jg,angle:Yu})}wl=Kp+Wu*$f}}}a.graduatedMarks.push(OA)}Ln(re);var Os=a.graduatedMarks;if(Os!==null)for(var Vp=E.length,Qa=0;Qa<Vp;Qa++){var qo=E[Qa],Ua=Os[Qa];if(qo.visible&&qo!==rt&&Ua.length!==0){if(qo instanceof Oi){var Ch=a,Sc=b,ed=qo.alignmentFocus;ed.Mc()&&(ed=Cr);var ny=qo.angle;qo.Kb=0,qo.measure(1/0,1/0,0,0),qo.Kb=ny;var Sm=qo.measuredBounds,Vg=Sm.width,nd=Sm.height,qd=be.allocAt(0,0,Vg,nd),sl=Ht.alloc();sl.xi(qd,ed),be.free(qd);for(var Ph=-sl.x,RA=-sl.y,Kl=new be,df=Ua.length,_g=0;_g<df;_g++)for(var gf=Ua[_g],xm=gf.$l.x,Wg=gf.$l.y,Do=gf.angle,SA=0;4>SA;SA++){switch(SA){case 0:sl.h(Ph,RA);break;case 1:sl.h(Ph+Vg,RA);break;case 2:sl.h(Ph,RA+nd);break;case 3:sl.h(Ph+Vg,RA+nd)}sl.rotate(Do+qo.angle),sl.offset(xm,Wg),_g===0&&SA===0?Kl.h(sl.x,sl.y,0,0):Kl.Ye(sl),sl.offset(-xm,-Wg),sl.rotate(-Do-qo.angle)}Ht.free(sl),Ch.graduatedBounds!==null&&Ch.graduatedBounds.push(Kl),Gr(Sc,Kl.x,Kl.y,Kl.width,Kl.height)}else if(qo instanceof Jr){var ql=a,Bm=b;ql.temporaryTextBlock===null&&(ql.temporaryTextBlock=new Jr);var Sl=ql.temporaryTextBlock;yy(Sl,qo);var xc=qo.alignmentFocus;xc.Mc()&&(xc=Cr);for(var $l=qo.segmentOrientation,Yg=qo.segmentOffset,pf=new be,_p=0,Xg=0,uu=0,id=0,mf=0,Zg=Ua.length,Bc=0;Bc<Zg;Bc++){var Xu=Ua[Bc];_p=Xu.$l.x,Xg=Xu.$l.y,uu=Xu.angle,mf=id=qo.angle,$l!==ka&&(mf=$l===gp||$l===k0?uu+qo.angle:uu,id=en.computeAngle($l,mf)),Sl.Kb=id,Sl.text=Xu.text||"",Sl.measure(1/0,1/0,0,0);var Cc=Sl.measuredBounds,Fh=Sl.naturalBounds,Pc=Fh.width,rd=Fh.height,GA=Fi.alloc();GA.reset(),GA.translate(-Cc.x,-Cc.y),GA.scale(Sl.scale,Sl.scale),GA.rotate(mf,Pc/2,rd/2),$l!==pp&&$l!==vp||GA.rotate(90,Pc/2,rd/2),$l!==mp&&$l!==yp||GA.rotate(-90,Pc/2,rd/2),$l===b0&&(45<uu&&135>uu||225<uu&&315>uu)&&GA.rotate(-uu,Pc/2,rd/2);var $d=be.allocAt(0,0,Pc,rd),Fc=Ht.alloc();Fc.xi($d,xc),GA.Ga(Fc);var tg=-Fc.x,iy=-Fc.y,Lh=Ht.alloc();Lh.assign(Yg),isNaN(Lh.x)&&(Lh.x=Pc/2+3),isNaN(Lh.y)&&(Lh.y=-(rd/2+3)),Lh.rotate(uu),_p+=Lh.x+tg,Xg+=Lh.y+iy;var od=new be(_p,Xg,Cc.width,Cc.height),Wp=new be(Cc.x,Cc.y,Cc.width,Cc.height),ry=new be(Fh.x,Fh.y,Fh.width,Fh.height);Xu.Sz=id,Xu.lineCount=Sl.lineCount,Xu.lines=[Sl.Cb,Sl.Ih,Sl.df,Sl.Le,Sl.Qc,Sl.Qb,Sl.ze],Xu.actualBounds=od,Xu.measuredBounds=Wp,Xu.naturalBounds=ry,Bc===0?pf.assign(od):pf.ed(od),Ht.free(Lh),Ht.free(Fc),be.free($d),Fi.free(GA)}ql.graduatedBounds!==null&&ql.graduatedBounds.push(pf),Gr(Bm,pf.x,pf.y,pf.width,pf.height)}Xo(qo,!1)}}},ru.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 ot=y.length,at=0;at<ot;at++){var At=y[at];rt=b[at],At.visible&&At!==E&&rt.length!==0&&(rt=z[tt],tt++,At.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},ru.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof Ea,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var rt=z.actualBounds,ot=a.O.s,at=a.graduatedMarks,At=ot.length,ft=0;ft<At;ft++){var pt=ot[ft],xt=at[ft],Ct=xt.length;if(pt.visible&&pt!==z&&xt.length!==0){if(pt instanceof Oi){if(!(2>a.graduatedTickUnit*pt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&pt.graduatedSkip===null)){var Mt=pt.measuredBounds,Gt=pt.strokeWidth*pt.scale,Ot=pt.alignmentFocus;Ot.Mc()&&(Ot=Cr);for(var Wt=0;Wt<Ct;Wt++){var Zt=xt[Wt].$l,te=xt[Wt].angle,re=Ot,me=pt.Ab;me.reset(),me.translate(Zt.x+rt.x,Zt.y+rt.y),me.rotate(te+pt.angle,0,0),me.translate(-Mt.width*re.x+re.offsetX+Gt/2,-Mt.height*re.y+re.offsetY+Gt/2),me.scale(pt.scale,pt.scale),Ll(pt,!1),pt.wh.set(pt.Ab),pt.Kk=pt.scale,La(pt,!1),pt.gc(y,x),b&&(a.svg.appendChild(pt.svg),pt.svg=null),pt.Ab.reset()}}}else if(pt instanceof Jr)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Jr),Mt=a.temporaryTextBlock,yy(Mt,pt),Gt=0;Gt<Ct;Gt++)Ot=xt[Gt],Ot.actualBounds&&Ot.measuredBounds&&Ot.naturalBounds&&(Mt.ec=Ot.text||"",Mt.Kb=Ot.Sz||0,Mt.Gc=Ot.lineCount||0,Wt=Ot.lines,Wt!==void 0&&(Mt.Cb=Wt[0],Mt.Ih=Wt[1],Mt.df=Wt[2],Mt.Le=Wt[3],Mt.Qc=Wt[4],Mt.Qb=Wt[5],Mt.ze=Wt[6]),Ot.naturalBounds&&(Mt.dc=Ot.naturalBounds),Ot.actualBounds&&(Wt=Ot.actualBounds,Mt.arrange(Wt.x,Wt.y,Wt.width,Wt.height)),Wt=Ot.actualBounds,Mt.arrange(Wt.x,Wt.y,Wt.width,Wt.height),Zt=Ot.measuredBounds,Ot=Ot.naturalBounds,te=Mt.Ab,te.reset(),te.translate(Wt.x+rt.x,Wt.y+rt.y),te.translate(-Zt.x,-Zt.y),Mt.no(te,Ot.x,Ot.y,Ot.width,Ot.height),Ll(Mt,!1),Mt.wh.set(Mt.Ab),Mt.Kk=Mt.scale,La(Mt,!1),Mt.Ng=pt.part,Mt.Me=pt.panel,Mt.gc(y,x),Mt.Me=null,Mt.Ng=null,b&&(a.svg.appendChild(Mt.svg),Mt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Ve(a,y){if(oe.call(this),this.na=null,a===void 0)this.na=Ve.Position;else if(typeof a=="string"){var x=dA.I(a);x!==null&&(this.na=x)}else a instanceof Er?this.na=a:a&&(this.na=Ve.Position,y=a);this.na===null&&Yt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Ve.Grid?1048576:0),this.O=new _t,this.yb=Wa,this.Tm=is,this.Uf=Li,this.$g=null,this.$e="",this.jg=new be(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Hn,this.jn=jr,this.kn=Ii,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Te(Ve,oe),Ve.prototype.cloneProtected=function(a){oe.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},Ve.prototype.Af=function(a){oe.prototype.Af.call(this,a),a.O=this.O;for(var y=a.O.s,x=y.length,E=0;E<x;E++)y[E].Me=a;a.$g=null},Ve.prototype.copy=function(){var a=oe.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof fn&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(Qo,"elements",a,null,b,null,tt)}}return a}return null},Pt=Ve.prototype,Pt.toString=function(){return"Panel("+this.type.name+")#"+Un(this)},Pt.Pn=function(a){oe.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Pt.hh=function(a,y){if(this.na===Ve.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Ve.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Ve.Table)if(a.yc(),a instanceof Ea){var x=a.yd;a.yd=vg(a,"gojs-ts"),Uu(this,a),a.nh.pop(),a.yd=x}else Uu(this,a);(x=this.isClipping&&this.na===Ve.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function Uu(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Du(a,y,!0,x,!0),E!==null&&Du(a,y,!1,E,!0),x!==null&&ac(a,y,!0,x),E!==null&&ac(a,y,!1,E),x!==null&&Du(a,y,!0,x,!1),E!==null&&Du(a,y,!1,E,!1)}function ac(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var at=E[ot];if(at!==void 0&&at.actual!==0)if(rt)rt=!1;else{if(x){if(at.position>tt.height)continue}else if(at.position>tt.width)continue;var At=at.separatorStrokeWidth;isNaN(At)&&(At=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=at.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),At!==0&&ft!==null){wo(a,y,ft,!1,!1,tt,z),ft=!1;var pt=at.separatorDashArray;pt===null&&(pt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),pt!==null&&(ft=!0,y.js(pt,0)),y.beginPath(),pt=at.position+At,x?pt>tt.height&&(At-=pt-tt.height):pt>tt.width&&(At-=pt-tt.width),at=at.position+At/2,y.lineWidth=At,At=a.yb,x?(at+=At.top,pt=tt.width-At.right,y.moveTo(At.left,at),y.lineTo(pt,at)):(at+=At.left,pt=tt.height-At.bottom,y.moveTo(at,At.top),y.lineTo(at,pt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function Du(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=Ou(a,!0),at=Ou(a,!1),At=0;At<z;At++){var ft=E[At];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var pt=x?tt.height:tt.width;if(!(ft.position>pt)){var xt=ft.Wc(),Ct=ft.separatorStrokeWidth;isNaN(Ct)&&(Ct=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Mt=ft.separatorStroke;Mt===null&&(Mt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Mt===null||ft.index===(x?ot:at))&&(Ct=0),xt-=Ct,Ct=ft.position+Ct,xt+=ft.actual,Ct+xt>pt&&(xt=pt-Ct),0>=xt||(pt=a.yb,wo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(pt.left,Ct+pt.top,tt.width-(pt.left+pt.right),xt):y.fillRect(Ct+pt.left,pt.top,xt,tt.height-(pt.top+pt.bottom)))}}}}function Ou(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function yh(a){return a==="LineV"||a==="BarV"}Pt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Pt.kk=function(a,y,x){if(!oe.prototype.kk.call(this,a,y,x))return!1;if(this.type===Ve.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,Uu(this,a),a.yd=null;else if(this.na===Ve.Grid||this.na===Ve.Graduated)return this.svg.innerHTML="",this.svg.remove(),!1;x=this.O.s;for(var E=x.length,b=0;b<E;b++)x[b].gc(a,y);return!0},Pt.nk=function(){return!0},Pt.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else oe.prototype.$o.call(this,a,y,x,E)},Pt.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,at=-tt.m12*rt,At=-tt.m21*rt,ft=tt.m11*rt,pt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),xt=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,se.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*At+pt,rt=a*at+y*ft+xt,a=x*ot+E*At+pt,ot=x*at+E*ft+xt,b.h(0,0),x=this.naturalBounds,z=se.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,At=at=0,ft=1,xt=pt=0),rt=a*ot+y*At+pt,a=a*at+y*ft+xt,ot=x*ot+E*At+pt,x=x*at+E*ft+xt,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),at=!1,ft=this.O.s,xt=ft.length,At=Ht.alloc(),pt=null,y=1/0;var Ct=null,Mt=this.isClipping&&this.na===Ve.Spot;Mt&&(Ct=Ht.alloc(),pt=this.Pb(),(at=pt.Sj(rt,a,ot,x,Ct))&&(y=(rt-Ct.x)*(rt-Ct.x)+(a-Ct.y)*(a-Ct.y)));for(var Gt=0;Gt<xt;Gt++){var Ot=ft[Gt];Ot.visible&&Ot!==pt&&Ot.Sj(rt,a,ot,x,At)&&(at=!0,Ot=(rt-At.x)*(rt-At.x)+(a-At.y)*(a-At.y),Ot<E&&(E=Ot,b.set(At)))}return Mt&&(y>E&&b.set(Ct),Ht.free(Ct)),Ht.free(At),z&&b.transform(tt),at},Pt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();oe.prototype.Gj.call(this)},Pt.v=function(a){if(!tl(this)){oe.prototype.v.call(this,a),a=null,(this.na===Ve.Auto||this.na===Ve.Link)&&(a=this.Pb());for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if((b===a||b.isPanelMain)&&b.v(!0),!b.desiredSize.w()){var z=ma(b,!1);(b instanceof Ma||b instanceof Ve||b instanceof Jr||z!==ze)&&b.v(!0)}}}},Pt.Uj=function(){if(!tl(this)){Xo(this,!0),bA(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Pt.Uk=function(){if(!(this.l&2048)){Ll(this,!0),La(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Pt.Wu=function(){La(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Pt.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var at=this.O.s;at.length!==0&&this.na.measure(this,a,y,at,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),co(b,a,ot),co(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},Pt.Pb=function(){if(this.$g===null){var a=this.O.s,y=a.length;if(y===0)return null;for(var x=0;x<y;x++){var E=a[x];if(E.isPanelMain===!0)return this.$g=E}this.$g=a[0]}return this.$g};function za(a){return a.part!==null?a.part.locationObject:null}Pt.eh=function(a,y,x,E){var b=this.O.s;if(this.actualBounds.h(a,y,x,E),b.length!==0){if(!this.desiredSize.w()){a=ma(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,rt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=ze),a){case ze:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Ye:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case Xn:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case di:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},Pt.gh=function(a){var y=this.naturalBounds,x=za(this);if(Ro(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Ht.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Tn(b.set(a),z.transform),z.ca(b)))return Ht.free(b),!0}return Ht.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Pt.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].ks(a);if(b!==null)return b}return null},Pt.qm=function(a,y){if(y(this,a),a instanceof Ve){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function fA(a,y){Vf(a,a,y)}function Vf(a,y,x){x(y),y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=y[b];z instanceof Ve&&Vf(a,z,x)}}function m1(a,y){ly(a,a,y)}function ly(a,y,x){if(x(y),y instanceof Ve){y=y.O.s;for(var E=y.length,b=0;b<E;b++)ly(a,y[b],x)}}Pt.Nl=function(a){return Ay(this,this,a)};function Ay(a,y,x){if(x(y))return y;if(y instanceof Ve){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=Ay(a,y[b],x);if(z!==null)return z}}return null}Pt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=op(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Ve){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function uy(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof Ve?x=Math.max(x,uy(b)):b instanceof Oi&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Pt.se=function(){return!(this.type===Ve.TableRow||this.type===Ve.TableColumn)};function lc(a){return a.type===Ve.TableRow||a.type===Ve.TableColumn}Pt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),ia(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:Tn(Ht.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,at=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),at=ot/2),Ro(-(at*b),-(at*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var At=b.length;if(rt=Ht.alloc(),at=(ot=this.isClipping&&this.na===Ve.Spot)?this.Pb():null,ot&&(at.se()?Tn(rt.set(a),at.transform):rt.set(a),!at.ca(rt)))return Ht.free(rt),z||Ht.free(tt),null;for(var ft=za(this);At--;){var pt=b[At];if((pt.visible||pt===ft)&&(pt.se()?Tn(rt.set(a),pt.transform):rt.set(a),!ot||pt!==at)){var xt=null;if(pt instanceof Ve?xt=pt.ic(rt,y,x):pt.pickable===!0&&pt.ca(rt)&&(xt=pt),xt!==null&&(y!==null&&(xt=y(xt)),xt!==null&&(x===null||x(xt))))return Ht.free(rt),z||Ht.free(tt),xt}}Ht.free(rt)}return this.background===null&&this.areaBackground===null?(z||Ht.free(tt),null):(a=Ro(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Ht.free(tt),a)}return z||Ht.free(tt),null},Pt.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:Tn(Ht.allocAt(a.x,a.y),this.transform);if(b=Ro(0,0,b.width,b.height,tt.x,tt.y),lc(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,at=Ht.alloc(),At=za(this);ot--;){var ft=rt[ot];if(ft.visible||ft===At){ft.se()?Tn(at.set(a),ft.transform):at.set(a);var pt=ft;ft=ft instanceof Ve?ft:null,(ft!==null?ft.ji(at,y,x,E):pt.ca(at))&&pt.pickable!==!1&&(y!==null&&(pt=y(pt)),pt===null||x!==null&&!x(pt)||E.add(pt))}}Ht.free(at)}return z||Ht.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Ht.free(tt),!1},Pt.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Fi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return bm(this,y,x,b),z===void 0&&Fi.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=za(this),ot=this.O.s,at=ot.length;at--;){var At=ot[at];if(At.visible||At===rt){var ft=At.actualBounds,pt=this.naturalBounds;ft.x>pt.width||ft.y>pt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=At,At=At instanceof Ve?At:null,pt=Fi.alloc(),pt.set(tt),(At!==null?At.Cf(a,y,x,E,b,pt):cs(ft,a,E,pt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),Fi.free(pt))}}return z===void 0&&Fi.free(tt),E}return z===void 0&&Fi.free(tt),!1};function bm(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,ot=a.naturalBounds;rt.x>ot.width||rt.y>ot.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof Ve&&bm(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}Pt.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(),ot=rt?a:Tn(Ht.allocAt(a.x,a.y),this.transform),at=rt?y:Tn(Ht.allocAt(y.x,y.y),this.transform),At=ot.Bf(at),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||ti(ot.x,ot.y,0,0,0,tt.height)<=At||ti(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=At||ti(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=At||ti(ot.x,ot.y,tt.width,0,0,0)<=At;if(tt=ot.zd(0,0)<=At&&ot.zd(0,tt.height)<=At&&ot.zd(tt.width,0)<=At&&ot.zd(tt.width,tt.height)<=At,rt||(Ht.free(ot),Ht.free(at)),ft){if(!this.isAtomic){ot=Ht.alloc(),at=Ht.alloc(),At=za(this);for(var pt=this.O.s,xt=pt.length;xt--;){var Ct=pt[xt];if(Ct.visible||Ct===At){var Mt=Ct.actualBounds,Gt=this.naturalBounds;(!rt||!(Mt.x>Gt.width||Mt.y>Gt.height||0>Mt.x+Mt.width||0>Mt.y+Mt.height))&&(Ct.se()?(Mt=Ct.transform,Tn(ot.set(a),Mt),Tn(at.set(y),Mt)):(ot.set(a),at.set(y)),Mt=Ct,Ct=Ct instanceof Ve?Ct:null,(Ct!==null?Ct.og(ot,at,x,E,b,z):Mt.tx(ot,at,b))&&(x!==null&&(Mt=x(Mt)),Mt===null||E!==null&&!E(Mt)||z.add(Mt)))}}Ht.free(ot),Ht.free(at)}return b?ft:tt}return!1};function Tm(a){var y=null;return a instanceof Oi&&(y=a.spot1,y===is&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=dr),y}function Im(a){var y=null;return a instanceof Oi&&(y=a.spot2,y===is&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Go),y}Pt.add=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];for(x=0;x<y.length;x++)this.Gb(this.O.count,y[x]);return this},Pt.M=function(a){return this.O.M(a)},Pt.Gb=function(a,y){y instanceof ei&&Yt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Yt("Cannot make a Panel contain itself: "+this.toString()),Yt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Yt("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+y.toString()+", already contained by "+x.toString()+", cannot be shared by this Panel: "+this.toString()),this.na!==Ve.Grid||y instanceof Oi||Yt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Ve.Graduated||y instanceof Oi||y instanceof Jr||Yt("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+y),y.wi(this),y.Ng=null,this.itemArray!==null){var E=y.data;E!==null&&typeof E=="object"&&(this.ge===null&&(this.ge=new vn),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,rt=tt.length,ot=0;ot<rt;ot++)if(tt[ot]===y){z=ot;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else Yt("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),tl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Ve&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||r0(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof fn&&(x.Te=!0),x.Te&&x instanceof fn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(ts,"elements",this,y,null,E,null),x.cb(Qo,"elements",this,null,y,null,a)))};function Nm(a,y){a.l=y?a.l|16777216:a.l&-16777217}Pt.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;b<x;b++)if(y[b]===a){E=b;break}E!==-1&&this.pc(E,!0)},Pt.mb=function(a){0<=a&&this.pc(a,!0)},Pt.pc=function(a,y){var x=this.O,E=x.M(a);if(E.Ng=null,E.wi(null),this.ge!==null){var b=E.data;typeof b=="object"&&this.ge.remove(b)}x.mb(a),Xo(this,!1),this.v(),this.$g===E&&(this.$g=null),this.graduatedIntervals=null;var z=this.part;z!==null&&(z.Rh=null,z.ag=NaN,z.Wb(),z instanceof fn&&(E instanceof Ve?E.qm(E,function(tt,rt){iv(z,rt,y)}):iv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(ts,"elements",this,E,null,a,null))},Pt.Fb=function(a){0>a&&wn(a,">= 0",Ve,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ss;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Qo,"rowdefs",this,null,x,null,a)}return y[a]},Pt.oA=function(a){if(0>a&&wn(a,">= 0",Ve,"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(ts,"rowdefs",this,x,null,a,null),this.v()}}};function hy(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof ss?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Pt.Eb=function(a){0>a&&wn(a,">= 0",Ve,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ss;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Qo,"coldefs",this,null,x,null,a)}return y[a]},Pt.jA=function(a){if(0>a&&wn(a,">= 0",Ve,"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(ts,"coldefs",this,x,null,a,null),this.v()}}};function cy(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof ss?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Pt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&o0(y,a),this},Pt.Hy=function(a,y){return(a=this.Fb(a))&&o0(a,new ss(y)),this},Pt.By=function(a,y){return(a=this.Eb(a))&&o0(a,new ss(y)),this},Pt.nz=function(a){if(0>a||this.type!==Ve.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Pt.fz=function(a){if(0>a||this.type!==Ve.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;b<E;b++){var z=x[b];if(z!==void 0&&(y+=z.total,a<y))break}return b},Pt.Fz=function(a,y){if(y===void 0&&(y=new Ht(NaN,NaN)),this.type!==Ve.Graduated)return y.h(NaN,NaN),y;a=Math.min(Math.max(a,this.graduatedMin),this.graduatedMax);var x=this.Pb();return x.geometry.Pu((a-this.graduatedMin)/this.graduatedRange,y),x.transform.Ga(y)},Pt.Gz=function(a){if(this.type!==Ve.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function fy(a){return a=a.allBindings,a!==null&&a._isFrozen}function Yl(a){var y=a.allBindings;if(y===null)a.data!==null&&Yt("Template cannot have .data be non-null: "+a),a.allBindings=y=new _t;else if(y._isFrozen)return;var x=new _t;Nm(a,!1),a.qm(a,function(at,At){At.th();var ft=At.localBindings;if(ft!==null)for(Nu(At,!1),ft=ft.iterator;ft.next();){var pt=ft.value;pt.mode===Lp&&Nu(At,!0);var xt=pt.sourceName;xt!==null&&(xt==="/"&&Nm(at,!0),xt=Lw(pt,at,At),xt!==null&&(x.add(xt),xt.srcBindings===null&&(xt.srcBindings=new _t),xt.srcBindings.add(pt))),y.add(pt)}if(At instanceof Ve&&At.type===Ve.Table){if(0<At.rowCount){for(at=At.rowDefs,ft=at.length,pt=0;pt<ft;pt++)if(xt=at[pt],xt!==void 0&&xt.be!==null)for(var Ct=xt.be.iterator;Ct.next();){var Mt=Ct.value;Mt.xd=xt,Mt.to=2,Mt.wl=xt.index,y.add(Mt)}}if(0<At.columnCount){for(At=At.colDefs,at=At.length,ft=0;ft<at;ft++)if(pt=At[ft],pt!==void 0&&pt.be!==null)for(xt=pt.be.iterator;xt.next();)Ct=xt.value,Ct.xd=pt,Ct.to=1,Ct.wl=pt.index,y.add(Ct)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){Nu(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new _t),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var rt=b.targetProperty,ot=rt.indexOf(".");0<ot&&z instanceof Ve&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):un('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof ss?(tt=Un(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof oe?(tt=Un(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):Yt("Unknown type of binding target: "+z)}y.freeze(),a instanceof ei&&a.Zc()&&a.Va()}Pt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return m1(y,function(x){x instanceof Ve&&(x.allBindings=null,x.ub=null);var E=x.localBindings;E!==null&&(x.localBindings=null,E.each(function(b){x.bind(b.copy())})),E=x.animationTriggers,E!==null&&(x.animationTriggers=null,E.each(function(b){x.Jv(b.value.copy())}))}),a&&Yl(y),y},Pt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof Ve))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Pt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function v1(a,y){a=a.O.s;for(var x=a.length,E=y.length,b=0,z=null;b<x&&(z=a[b],!(z instanceof Ve&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof Ve)||z.data!==y[tt])return!0;b++,tt++}return!1}function op(a){if(a.type===Ve.Spot||a.type===Ve.Auto)return Math.min(a.O.length,1);if(a.type===Ve.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Oi&&E.isPanelMain))break}return x}return a.type===Ve.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Ve&&lc(a))?1:0}Pt.mv=function(){for(var a=op(this);this.O.length>a;)this.pc(this.O.length-1,!1);dy(this,this.itemArray)};function dy(a,y){var x=op(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;E<x;E++)i0(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof Ve){if(tt.data!==z){var rt=Um(a,tt.data),ot=Um(a,z),at=ot!==rt;at||(rt=Dm(a,rt),at=Dm(a,ot)!==rt),at?(a.pc(E,!1),i0(a,z,b,!1)):tt.data=z}}else i0(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Qm(a,x,0),tl(a)||a.v(),a.graduatedIntervals=null,a.If()||r0(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof fn&&(y.Te=!0),y.Te&&y instanceof fn&&(y.wc=null))}}function i0(a,y,x,E){if(!(y==null||0>x)){var b=Um(a,y);if(b=Dm(a,b),b!==null){if(Yl(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Nm(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new vn),a.ge.add(y,b)),z=x+op(a),a.Gb(z,b),E&&(b.ub=y,Qm(a,z,x),b.ub=null),b.data=y}}}function Qm(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof Ve){var b=y,z=x;E.type===Ve.TableRow?E.row=b:E.type===Ve.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Um(a,y){if(y===null)return"";if(a=a.itemCategoryProperty,typeof a=="function")a=a(y);else if(typeof a=="string"&&typeof y=="object"){if(a==="")return"";a=_o(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Yt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Dm(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(gy||(gy=!0,un('No item template Panel found for category "'+y+'" on '+a),un(" Using default item template."),a=new Ve,y=new Jr,y.bind(new Zo("text","",Yi)),a.add(y),py=a),E=py)),E}function r0(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Ve){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Ve&&!z.isEnabled||r0(a,z,x)}}}function ou(a,y){y.name=a,dA.add(a,y)}Ze.Object.defineProperties(Ve.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Ve.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&wn(a,">= 0",Ve,"padding"),a=new Xi(a)):(0>a.left&&wn(a.left,">= 0",Ve,"padding:value.left"),0>a.right&&wn(a.right,">= 0",Ve,"padding:value.right"),0>a.top&&wn(a.top,">= 0",Ve,"padding:value.top"),0>a.bottom&&wn(a.bottom,">= 0",Ve,"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:Wa},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Rl),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 Lr)&&(a instanceof Lr&&a.freeze(),this.T===null&&(this.T=new Rl),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 Rl),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;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Yt("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Rl),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof Lr)&&(a instanceof Lr&&a.freeze(),this.T===null&&(this.T=new Rl),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Rl),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Yt("defaultColumnSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Rl),this.T.o=a,this.N(),this.g("defaultColumnSeparatorDashArray",y,a)}}},inRowsCols:{get:function(){return this.T!==null?this.T.nb:null},set:function(a){this.T===null&&(this.T=new Rl),this.T.nb=a}},viewboxStretch:{get:function(){return this.xo},set:function(a){var y=this.xo;y!==a&&(this.xo=a,this.v(),this.g("viewboxStretch",y,a))}},gridCellSize:{get:function(){return this.jn},set:function(a){var y=this.jn;if(!y.D(a)){a.w()&&a.width!==0&&a.height!==0||Yt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&uA(x),this.N(),this.g("gridCellSize",y,a)}}},gridOrigin:{get:function(){return this.kn},set:function(a){var y=this.kn;if(!y.D(a)){a.w()||Yt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&uA(x),this.N(),this.g("gridOrigin",y,a)}}},graduatedMin:{get:function(){return this.ra!==null?this.ra.lq:0},set:function(a){var y=this.graduatedMin;y!==a&&(this.ra===null&&(this.ra=new wh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Ms(this)&&(a=this.part,a!==null&&eo(this,a,"graduatedRange")))}},graduatedMax:{get:function(){return this.ra!==null?this.ra.F:100},set:function(a){var y=this.graduatedMax;y!==a&&(this.ra===null&&(this.ra=new wh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Ms(this)&&(a=this.part,a!==null&&eo(this,a,"graduatedRange")))}},graduatedRange:{get:function(){return this.graduatedMax-this.graduatedMin}},graduatedTickUnit:{get:function(){return this.ra!==null?this.ra.ia:10},set:function(a){var y=this.graduatedTickUnit;y!==a&&0<a&&(this.ra===null&&(this.ra=new wh),this.ra.ia=a,this.v(),this.g("graduatedTickUnit",y,a))}},graduatedTickBase:{get:function(){return this.ra!==null?this.ra.V:0},set:function(a){var y=this.graduatedTickBase;y!==a&&(this.ra===null&&(this.ra=new wh),this.ra.V=a,this.v(),this.g("graduatedTickBase",y,a))}},graduatedMarks:{get:function(){return this.ra!==null?this.ra.u:null},set:function(a){this.ra!==null?this.ra.u=a:a!==null&&(this.ra=new wh,this.ra.u=a)}},graduatedBounds:{get:function(){return this.ra!==null?this.ra.j:null},set:function(a){this.ra!==null?this.ra.j=a:a!==null&&(this.ra=new wh,this.ra.j=a)}},graduatedIntervals:{get:function(){return this.ra!==null?this.ra.o:null},set:function(a){this.ra!==null?this.ra.o=a:a!==null&&(this.ra=new wh,this.ra.o=a)}},temporaryTextBlock:{get:function(){return this.ra!==null?this.ra.Zh:null},set:function(a){this.ra!==null?this.ra.Zh=a:a!==null&&(this.ra=new wh,this.ra.Zh=a)}},panelLayoutState:{get:function(){return this.F},set:function(a){this.F=a}},Te:{get:function(){return(this.l&8388608)!==0},set:function(a){(this.l&8388608)!==0!==a&&(this.l^=8388608)}},rowDefs:{get:function(){return this.T===null&&(this.T=new Rl),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Rl),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:a0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Rl),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:a0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Rl),this.T.j=a,this.v(),this.g("columnSizing",y,a))}},topIndex:{get:function(){return this.T!==null?this.T.Hb:0},set:function(a){var y=this.topIndex;y!==a&&((!isFinite(a)||0>a)&&Yt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Rl),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)&&Yt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Rl),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 ei&&!(this instanceof vr);Yl(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof en?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof ei&&(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 ec),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&v1(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&Bv(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&xv(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||dy(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 vn}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof ei||a.isPanelMain)&&Yt("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(););Hi(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&&(Hi(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 Ti&&(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&&r0(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))}}}),Ze.Object.defineProperties(Ve,{Position:{get:function(){return dA.I("Position")}},Horizontal:{get:function(){return dA.I("Horizontal")}},Vertical:{get:function(){return dA.I("Vertical")}},Spot:{get:function(){return dA.I("Spot")}},Auto:{get:function(){return dA.I("Auto")}},Table:{get:function(){return dA.I("Table")}},Viewbox:{get:function(){return dA.I("Viewbox")}},TableRow:{get:function(){return dA.I("TableRow")}},TableColumn:{get:function(){return dA.I("TableColumn")}},Link:{get:function(){return dA.I("Link")}},Grid:{get:function(){return dA.I("Grid")}},Graduated:{get:function(){return dA.I("Graduated")}}}),Ve.prototype.rebuildItemElements=Ve.prototype.mv,Ve.prototype.findItemPanelForData=Ve.prototype.sx,Ve.prototype.updateTargetBindings=Ve.prototype.La,Ve.prototype.copyTemplate=Ve.prototype.Uy,Ve.prototype.graduatedValueForPoint=Ve.prototype.Gz,Ve.prototype.graduatedPointForValue=Ve.prototype.Fz,Ve.prototype.findColumnForLocalX=Ve.prototype.fz,Ve.prototype.findRowForLocalY=Ve.prototype.nz,Ve.prototype.addColumnDefinition=Ve.prototype.By,Ve.prototype.addRowDefinition=Ve.prototype.Hy,Ve.prototype.addRowColumnDefinition=Ve.prototype.Gy,Ve.prototype.removeColumnDefinition=Ve.prototype.jA,Ve.prototype.getColumnDefinition=Ve.prototype.Eb,Ve.prototype.removeRowDefinition=Ve.prototype.oA,Ve.prototype.getRowDefinition=Ve.prototype.Fb,Ve.prototype.removeAt=Ve.prototype.mb,Ve.prototype.remove=Ve.prototype.remove,Ve.prototype.insertAt=Ve.prototype.Gb,Ve.prototype.elt=Ve.prototype.M,Ve.prototype.add=Ve.prototype.add,Ve.prototype.findObject=Ve.prototype.fb,Ve.prototype.findInVisualTree=Ve.prototype.Nl,Ve.prototype.walkVisualTreeFrom=Ve.prototype.qm,Ve.prototype.findMainElement=Ve.prototype.Pb;var gy=!1,py=null,dA=new vn;Ve.className="Panel",Ve.definePanelLayout=ou,ou("Position",new Lo),ou("Vertical",new cr),ou("Auto",new ro),ou("Link",new gl);function wh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}wh.prototype.copy=function(){var a=new wh;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},wh.className="GradPanelSettings";function Rl(){this.Pc=[],this.Oc=[],this.j=this.ob=a0,this.hb=this.Hb=0,this.Qp=Wa,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Rl.prototype.copy=function(a){for(var y=new Rl,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},Rl.className="TablePanelSettings";function ss(a){rn(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=is,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Om,this.hg=Li,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}ss.prototype.copy=function(){var a=new ss;return a.uq=this.uq,a.Za=this.Za,a.Hc=this.Hc,a.jj=this.jj,a.hj=this.hj,a.Jb=this.Jb,a.oa=this.oa,a.oc=this.oc,a.pa=this.pa,a.hg=this.hg,a.oo=this.oo,this.dg===null?a.dg=null:a.dg=this.dg.J(),a.lo=this.lo,a.mo=this.mo,a.tj=null,this.tj!==null&&(a.separatorDashArray=xi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function o0(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=xi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Pt=ss.prototype,Pt.qb=function(a){a.classType===ss&&(this.sizing=a)},Pt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Un(this)},Pt.wi=function(a){this.Me=a},Pt.Io=function(a){var y=0,x=this.Me;if(this.index!==a&&(a=this.separatorStroke,a===null&&x!==null&&(a=this.isRow?x.defaultRowSeparatorStroke:x.defaultColumnSeparatorStroke),a!==null&&(y=this.separatorStrokeWidth,isNaN(y)&&(x!==null?y=this.isRow?x.defaultRowSeparatorStrokeWidth:x.defaultColumnSeparatorStrokeWidth:y=0))),a=this.dg,a===null)if(x!==null)a=x.defaultSeparatorPadding;else return y;return y+(this.isRow?a.top:a.left)},Pt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Ve.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},Pt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(fo,a,this,y,x,void 0,void 0),this.be!==null&&(y=E.diagram,y!==null&&!y.skipsModelSourceBindings&&(E=E.ih(),E!==null&&(y=E.data,y!==null)))))for(x=this.be.iterator;x.next();)x.value.sp(this,y,a,E)};function s0(a){if(a.sizing===Om){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Pt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Zo(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&fy(y)&&Yt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new _t),this.be.add(b),this},Ze.Object.defineProperties(ss.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&wn(a,">= 0",ss,"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&&wn(a,">= 0",ss,"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))&&wn(a,">= 0",ss,"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&&wn(a,">= 0",ss,"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 Xi(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&&St(a,"RowColumnDefinition.separatorStroke"),a instanceof Lr&&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;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Yt("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&St(a,"RowColumnDefinition.background"),a instanceof Lr&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),ss.prototype.computeEffectiveSpacing=ss.prototype.Wc,ss.prototype.computeEffectiveSpacingTop=ss.prototype.Io;var Om=new Be(ss,"Default",0),sp=new Be(ss,"None",1),a0=new Be(ss,"ProportionalExtra",2);ss.className="RowColumnDefinition",ss.Default=Om,ss.None=sp,ss.ProportionalExtra=a0;function Oi(a,y){oe.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}Te(Oi,oe),Oi.prototype.cloneProtected=function(a){oe.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=xi(this.Yg)),this.Na!==null&&(a.Na=this.Na.nc?this.Na:this.Na.copy()),a.Un=this.Un,a.Vn=this.Vn,this.fa!==null&&(a.fa=this.fa.copy())};function _f(a){a.Na===null?a.Na=new Gm:a.Na.nc&&(a.Na=a.Na.copy())}Pt=Oi.prototype,Pt.th=function(){oe.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Pt.qb=function(a){a===ze||a===Hn||a===Ji||a===Li?this.geometryStretch=a:oe.prototype.qb.call(this,a)},Pt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Un(this)};function yg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],ot=x[1],at,At,ft,pt,xt,Ct,Mt=0,Gt=bn(),Ot=2;Ot<b;Ot+=2)at=x[Ot],At=x[Ot+1],ft=at-rt,rt=At-ot,ft===0&&(ft=.001),pt=rt/ft,xt=Math.atan2(rt,ft),Ct=Math.sqrt(ft*ft+rt*rt),Gt.push([ft,xt,pt,Ct]),Mt+=Ct,rt=at,ot=At;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof Oi&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,at=tt/2,At=at!==0,Ot=0,Ct=Gt[Ot],ft=Ct[0],xt=Ct[1],pt=Ct[2],Ct=Ct[3];for(var Wt=0;.1<=Mt;){if(Wt===0&&(At?(b=x,b-=at,Mt-=at,At=!1):b=x,b===0&&(b=1)),b>Mt){Ln(Gt);return}b>Ct?(Wt=b-Ct,b=Ct):Wt=0;var Zt=Math.sqrt(b*b/(1+pt*pt));if(0>ft&&(Zt=-Zt),rt+=Zt,ot+=pt*Zt,a.translate(rt,ot),a.rotate(xt),a.translate(-(tt/2),-(z/2)),Wt===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-xt),a.translate(-rt,-ot),Mt-=b,Ct-=b,Wt!==0){if(Ot++,Ot===Gt.length){Ln(Gt);return}Ct=Gt[Ot],ft=Ct[0],xt=Ct[1],pt=Ct[2],Ct=Ct[3],b=Wt}}Ln(Gt)}}Pt.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&&wo(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===Ve.Link&&rt instanceof vr&&rt.category==="Selection"&&rt.adornedObject instanceof Oi&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(wo(this,a,x,!1,!1,tt,z),a.lineWidth=ot,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,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===qe.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===qe.u){var at=b.startX;ot=b.startY;var At=b.endX,ft=b.endY;b=Math.min(at,At);var pt=Math.min(ot,ft);at=Math.abs(At-at),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,pt,at,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&cA(a),a.jk(),rt&&z&&eu(a)),a.Se()}else if(b.type===qe.F)at=b.startX,ot=b.startY,At=b.endX,ft=b.endY,b=Math.abs(At-at)/2,pt=Math.abs(ft-ot)/2,at=Math.min(at,At)+b,ot=Math.min(ot,ft)+pt,a.beginPath(),a.moveTo(at,ot-pt),a.bezierCurveTo(at+se.wg*b,ot-pt,at+b,ot-se.wg*pt,at+b,ot),a.bezierCurveTo(at+b,ot+se.wg*pt,at+se.wg*b,ot+pt,at,ot+pt),a.bezierCurveTo(at-se.wg*b,ot+pt,at-b,ot+se.wg*pt,at-b,ot),a.bezierCurveTo(at-b,ot-se.wg*pt,at-se.wg*b,ot-pt,at,ot-pt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&cA(a),a.jk(),rt&&z&&eu(a)),a.Se();else if(b.type===qe.o)for(b=b.figures,ot=b.length,pt=0;pt<ot;pt++){at=b.s[pt],a.beginPath(),a.moveTo(at.startX,at.startY),At=at.segments.s,ft=At.length;for(var xt=null,Ct=0;Ct<ft;Ct++){var Mt=At[Ct];switch(Mt.type){case os:a.moveTo(Mt.endX,Mt.endY);break;case Vr:a.lineTo(Mt.endX,Mt.endY);break;case Es:a.bezierCurveTo(Mt.point1X,Mt.point1Y,Mt.point2X,Mt.point2Y,Mt.endX,Mt.endY);break;case Oa:a.quadraticCurveTo(Mt.point1X,Mt.point1Y,Mt.endX,Mt.endY);break;case zo:if(Mt.radiusX===Mt.radiusY){var Gt=Math.PI/180;a.arc(Mt.point1X,Mt.point1Y,Mt.radiusX,Mt.startAngle*Gt,(Mt.startAngle+Mt.sweepAngle)*Gt,0>Mt.sweepAngle,xt!==null?xt.endX:at.startX,xt!==null?xt.endY:at.startY)}else if(xt=Pa(Mt,at),Gt=xt.length,Gt===0)a.lineTo(Mt.centerX,Mt.centerY);else for(var Ot=0;Ot<Gt;Ot++){var Wt=xt[Ot];Ot===0&&a.lineTo(Wt[0],Wt[1]),a.bezierCurveTo(Wt[2],Wt[3],Wt[4],Wt[5],Wt[6],Wt[7])}break;case ul:if(Ot=Gt=0,xt!==null&&xt.type===zo){if(xt=Pa(xt,at),Wt=xt.length,Wt===0){a.lineTo(Mt.endX,Mt.endY);break}xt=xt[Wt-1]||null,xt!==null&&(Gt=xt[6],Ot=xt[7])}else Gt=xt!==null?xt.endX:at.startX,Ot=xt!==null?xt.endY:at.startY;if(xt=Al(Mt,at,Gt,Ot),Gt=xt.length,Gt===0){a.lineTo(Mt.endX,Mt.endY);break}for(Ot=0;Ot<Gt;Ot++)Wt=xt[Ot],a.bezierCurveTo(Wt[2],Wt[3],Wt[4],Wt[5],Wt[6],Wt[7]);break;default:Yt("Segment not of valid type: "+Mt.type)}Mt.isClosed&&a.closePath(),xt=Mt}At=at.isFilled,z?at.isShadowed?(At===!0&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&(At&&rt&&cA(a),a.jk(),At&&rt&&eu(a))):(cA(a),At&&E!=="transparent"&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk(),eu(a)):(At&&E!==null&&a.ng(E,at.isEvenOdd),x!==null&&a.jk()),a.Se(pt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=bn(),z.type===qe.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),yg(a,y,E,x);else if(z.type===qe.o)for(z=z.figures.iterator;z.next();){for(rt=z.value,E.length=0,E.push(rt.startX),E.push(rt.startY),tt=rt.startX,b=rt.startY,ot=tt,pt=b,at=rt.segments.s,At=at.length,ft=0;ft<At;ft++){switch(Ct=at[ft],Ct.type){case os:yg(a,y,E,x),E.length=0,E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY,ot=tt,pt=b;break;case Vr:E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY;break;case Es:se.Qe(tt,b,Ct.point1X,Ct.point1Y,Ct.point2X,Ct.point2Y,Ct.endX,Ct.endY,.5,E),tt=Ct.endX,b=Ct.endY;break;case Oa:se.ep(tt,b,Ct.point1X,Ct.point1Y,Ct.endX,Ct.endY,.5,E),tt=Ct.endX,b=Ct.endY;break;case zo:if(Mt=Pa(Ct,rt),xt=Mt.length,xt===0){E.push(Ct.centerX),E.push(Ct.centerY),tt=Ct.centerX,b=Ct.centerY;break}for(Gt=0;Gt<xt;Gt++)Ot=Mt[Gt],se.Qe(tt,b,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,E),tt=Ot[6],b=Ot[7];break;case ul:if(Mt=Al(Ct,rt,tt,b),xt=Mt.length,xt===0){E.push(Ct.endX),E.push(Ct.endY),tt=Ct.endX,b=Ct.endY;break}for(Gt=0;Gt<xt;Gt++)Ot=Mt[Gt],se.Qe(tt,b,Ot[2],Ot[3],Ot[4],Ot[5],Ot[6],Ot[7],.5,E),tt=Ot[6],b=Ot[7];break;default:Yt("Segment not of valid type: "+Ct.type)}Ct.isClosed&&(E.push(ot),E.push(pt),yg(a,y,E,x))}yg(a,y,E,x)}else if(z.type===qe.u)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.startY),E.push(z.endX),E.push(z.endY),E.push(z.startX),E.push(z.endY),E.push(z.startX),E.push(z.startY),yg(a,y,E,x);else if(z.type===qe.F){if(b=new As,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new gr(zo),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=Pa(tt,b),rt=z.length,rt===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,ot=0;ot<rt;ot++)pt=z[ot],se.Qe(tt,b,pt[2],pt[3],pt[4],pt[5],pt[6],pt[7],.5,E),tt=pt[6],b=pt[7];yg(a,y,E,x)}Ln(E),a.restore(),a.Vc(!1)}}}},Pt.kk=function(a,y,x){return!oe.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Pt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:oe.prototype.nk.call(this,a)},Pt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("path");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Pt.ga=function(a,y){if(y===void 0&&(y=new Ht),a instanceof ni){a.Mc()&&Yt("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var x=this.naturalBounds,E=this.strokeWidth;y.h(a.x*(x.width+E)-E/2+x.x+a.offsetX,a.y*(x.height+E)-E/2+x.y+a.offsetY)}else y.set(a);return this.oe.Ga(y),y},Pt.mi=function(a){a===void 0&&(a=new be);var y=this.naturalBounds,x=this.oe;y=be.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Ht.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Gr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Gr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Gr(a,E.x,E.y,0,0),be.free(y),Ht.free(E),a},Pt.gh=function(a,y){var x=this.geometry;if(x===null||this.fill===null&&this.stroke===null)return!1;var E=x.bounds,b=this.strokeWidth/2;x.type!==qe.j||y||(b+=2);var z=be.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return be.free(z),!1;if(E=b+1e-4,x.type===qe.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(be.free(z),se.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===qe.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 be.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),be.free(z),a}if(x.type===qe.F){tt=x.startX,b=x.startY,rt=x.endX;var ot=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,ot),tt=Math.abs(rt-tt)/2,b=Math.abs(ot-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 be.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),be.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===qe.o)return be.free(z),this.fill===null?_l(x,a.x,a.y,b):Cs(x,a,b,1<this.strokeWidth,y);Yt("Unknown Geometry type: "+x.type)},Pt.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=Rm[rt];if(ot===void 0){var at=se.Ze[rt];typeof at=="string"&&(at=se.Ze[at]),typeof at=="function"?(ot=at(null,100,100),Rm[rt]=ot):Yt("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,at=tt.width;var At=tt.height;switch(ma(this,!0)){case ze:E=x=0;break;case Ye:at=Math.max(a-z,0),At=Math.max(y-z,0);break;case Xn:at=Math.max(a-z,0),E=0;break;case di:x=0,At=Math.max(y-z,0)}isFinite(b.width)&&(at=b.width),isFinite(b.height)&&(At=b.height);var ft=this.maxSize,pt=this.minSize;switch(x=Math.max(x-z,pt.width),E=Math.max(E-z,pt.height),at=Math.min(ft.width,at),At=Math.min(ft.height,At),at=isFinite(at)?Math.max(x,at):Math.max(rt,x),At=isFinite(At)?Math.max(E,At):Math.max(ot,E),x=Hm(this),x){case ze:break;case Ye:rt=at,ot=At;break;case Hn:x=Math.min(at/rt,At/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:Yt(x+" is not a valid geometryStretch.")}this.Rd!==null?(rt===0&&(rt=.001),ot===0&&(ot=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=rt/tt.width,tt=ot/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&se.$(this.ua.Sk,a-z)&&se.$(this.ua.Rk,y-z)||(this.ua=Oi.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),at+z,At+z),b.w()?(at=b.width,At=b.height,at=Math.min(ft.width,at),At=Math.min(ft.height,At),at=Math.max(pt.width,at),At=Math.max(pt.height,At),this.dc.h(0,0,at,At)):this.dc.assign(tt)};function Hm(a){var y=a.geometryStretch;return a.Rd!==null?y===Li?Ye:y:y===Li?Rm[a.figure].defaultStretch:y}Pt.eh=function(a,y,x,E){na(this,a,y,x,E)},Pt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Pt.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,ot=-z.m12*tt,at=-z.m21*tt,At=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),pt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*at+ft,tt=a*ot+y*At+pt,rt=x*rt+E*at+ft,ot=x*ot+E*At+pt,ft=this.ig/2,at=this.ua,at===null&&(this.measure(1/0,1/0),at=this.ua);var xt=at.bounds;if(At=!1,at.type===qe.j)if(1.5>=this.strokeWidth)At=se.Ve(at.startX,at.startY,at.endX,at.endY,z,tt,rt,ot,b);else{if(at.startX===at.endX?(E=ft,At=0):(y=(at.endY-at.startY)/(at.endX-at.startX),At=ft/Math.sqrt(1+y*y),E=At*y),y=bn(),a=new Ht,se.Ve(at.startX+E,at.startY+At,at.endX+E,at.endY+At,z,tt,rt,ot,a)&&y.push(a),a=new Ht,se.Ve(at.startX-E,at.startY-At,at.endX-E,at.endY-At,z,tt,rt,ot,a)&&y.push(a),a=new Ht,se.Ve(at.startX+E,at.startY+At,at.startX-E,at.startY-At,z,tt,rt,ot,a)&&y.push(a),a=new Ht,se.Ve(at.endX+E,at.endY+At,at.endX-E,at.endY-At,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return Ln(y),!1;for(At=!0,ot=1/0,E=0;E<rt;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<ot&&(ot=x,b.x=a.x,b.y=a.y);Ln(y)}else if(at.type===qe.u)At=se.Ff(xt.x-ft,xt.y-ft,xt.x+xt.width+ft,xt.y+xt.height+ft,z,tt,rt,ot,b);else if(at.type===qe.F){y=be.allocAt(xt.x,xt.y,xt.width,xt.height).Bc(ft,ft);t:if(y.width===0)At=se.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)At=se.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,at=y.height/2,E=y.x+a,At=y.y+at,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-At-x*(z-E),0>a*a*x*x+at*at-ot*ot){b.x=NaN,b.y=NaN,At=!1;break t}ft=Math.sqrt(a*a*x*x+at*at-ot*ot),rt=(-(a*a*x*ot)+a*at*ft)/(at*at+a*a*x*x)+E,a=(-(a*a*x*ot)-a*at*ft)/(at*at+a*a*x*x)+E,at=x*(rt-E)+ot+At,ot=x*(a-E)+ot+At,Math.abs((z-rt)*(z-rt))+Math.abs((tt-at)*(tt-at))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=at):(b.x=a,b.y=ot)}else{if(rt=at*at,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,At=!1;break t}ot=Math.sqrt(rt),rt=At+ot,ot=At-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}At=!0}be.free(y)}else if(at.type===qe.o){pt=Ht.alloc();var Ct=rt-z,Mt=ot-tt,Gt=Ct*Ct+Mt*Mt,Ot=z,Wt=tt;if(0<Gt&&xt.contains(Ot,Wt)&&(pt.x=Ot,pt.y=Wt,this.ca(pt)))for(Ct!==0&&.5>Math.abs(Ct)?(Mt*=.5/Ct,Ct=.5):Mt!==0&&.5>Math.abs(Mt)&&(Ct*=.5/Mt,Mt=.5),Ot-=Ct,Wt-=Mt;xt.contains(Ot,Wt);)Ot-=Ct,Wt-=Mt;for(b.x=rt,b.y=ot,Mt=0;Mt<at.figures.count;Mt++){var Zt=at.figures.s[Mt],te=Zt.isFilled?Ot:z,re=Zt.isFilled?Wt:tt,me=Zt.segments;xt=Zt.startX,Ct=Zt.startY;for(var ln=xt,Nn=Ct,Fn=0;Fn<me.count;Fn++){var tn=me.s[Fn],Ge=tn.type,bi=tn.endX,Si=tn.endY,wr=!1;switch(Ge){case os:ln=bi,Nn=Si;break;case Vr:wr=A0(xt,Ct,bi,Si,te,re,rt,ot,pt);break;case Es:wr=se.Eo(xt,Ct,tn.point1X,tn.point1Y,tn.point2X,tn.point2Y,bi,Si,te,re,rt,ot,.6,pt);break;case Oa:wr=se.Eo(xt,Ct,xt+2/3*(tn.point1X-xt),Ct+2/3*(tn.point1Y-Ct),bi+2/3*(tn.point1X-bi),Si+2/3*(tn.point1Y-Si),bi,Si,te,re,rt,ot,.6,pt);break;case zo:case ul:Ge=tn.type===zo?Pa(tn,Zt):Al(tn,Zt,xt,Ct);var _r=Ge.length;if(_r===0){wr=A0(xt,Ct,tn.type===zo?tn.centerX:tn.endX,tn.type===zo?tn.centerY:tn.endY,te,re,rt,ot,pt);break}for(Si=null,bi=0;bi<_r;bi++){if(Si=Ge[bi],bi===0&&A0(xt,Ct,Si[0],Si[1],te,re,rt,ot,pt)){var Ss=l0(te,re,pt,Gt,b);Ss<Gt&&(Gt=Ss,At=!0)}se.Eo(Si[0],Si[1],Si[2],Si[3],Si[4],Si[5],Si[6],Si[7],te,re,rt,ot,.6,pt)&&(Ss=l0(te,re,pt,Gt,b),Ss<Gt&&(Gt=Ss,At=!0))}bi=Si[6],Si=Si[7];break;default:Yt("Unknown Segment type: "+Ge)}xt=bi,Ct=Si,wr&&(wr=l0(te,re,pt,Gt,b),wr<Gt&&(Gt=wr,At=!0)),tn.isClosed&&(bi=ln,Si=Nn,A0(xt,Ct,bi,Si,te,re,rt,ot,pt)&&(tn=l0(te,re,pt,Gt,b),tn<Gt&&(Gt=tn,At=!0)))}}z=x-a,tt=E-y,rt=Math.sqrt(z*z+tt*tt),rt!==0&&(z/=rt,tt/=rt),b.x-=z*ft,b.y-=tt*ft,Ht.free(pt)}else Yt("Unknown Geometry type: "+at.type);return At?(this.transform.Ga(b),!0):!1};function l0(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function A0(a,y,x,E,b,z,tt,rt,ot){if(se.$(a,x)&&se.$(y,E)||se.$(b,tt)&&se.$(z,rt))return!1;var at=!1,At=(b-tt)*(y-E)-(z-rt)*(a-x);return At===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/At,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/At,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(ot.y>a||se.$(ot.y,a))&&(ot.y<y||se.$(ot.y,y))&&(at=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||se.$(ot.x,y))&&(ot.x<a||se.$(ot.x,a))&&(at=!0)),at)}Pt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=Ht.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),Ht.free(z),b},Pt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Fi.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Ht.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return Ht.free(tt),!0;var rt=Ht.alloc(),ot=Ht.alloc();return x.set(y),x.bv(this.transform),x.Vj(),rt.x=b,rt.y=z,rt.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,Wf(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),Wf(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),Wf(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),Wf(this,tt,rt,ot)&&(y=!0)))),Ht.free(tt),Fi.free(x),Ht.free(rt),Ht.free(ot),y};function Wf(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Pt.tx=function(a,y,x){function E(Gt,Ot){for(var Wt=Gt.length,Zt=0;Zt<Wt;Zt+=2)if(Ot.zd(Gt[Zt],Gt[Zt+1])>b)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<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,at=tt.x+tt.width;if(tt=tt.y+tt.height,Jn(a.x,a.y,rt,ot)<=b&&Jn(a.x,a.y,at,ot)<=b&&Jn(a.x,a.y,rt,tt)<=b&&Jn(a.x,a.y,at,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,at=y.endX,tt=y.endY,y.type===qe.j){if(x=(rt-at)*(a.x-at)+(ot-tt)*(a.y-tt),ti(a.x,a.y,rt,ot,at,tt)<=(0<=(at-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===qe.u)return y=!1,x&&(y=ti(a.x,a.y,rt,ot,rt,tt)<=b||ti(a.x,a.y,rt,ot,at,ot)<=b||ti(a.x,a.y,at,ot,at,tt)<=b||ti(a.x,a.y,rt,tt,at,tt)<=b),y;if(y.type===qe.F){y=a.x-(rt+at)/2,z=a.y-(ot+tt)/2;var At=Math.abs(at-rt)/2,ft=Math.abs(tt-ot)/2;if(At===0||ft===0)return ti(a.x,a.y,rt,ot,at,tt)<=b;if(x){if(a=se.$y(At,ft,y,z),a*a<=b)return!0}else return!(Jn(y,z,-At,0)>=b||Jn(y,z,0,-ft)>=b||Jn(y,z,0,ft)>=b||Jn(y,z,At,0)>=b)}else if(y.type===qe.o){if(at=y.bounds,z=at.x,rt=at.y,ot=at.x+at.width,at=at.y+at.height,a.x>ot&&a.x<z&&a.y>at&&a.y<rt&&ti(a.x,a.y,z,rt,z,at)>b&&ti(a.x,a.y,z,rt,ot,rt)>b&&ti(a.x,a.y,ot,at,z,at)>b&&ti(a.x,a.y,ot,at,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?_l(y,a.x,a.y,z):Cs(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,At=z.startY,a.zd(tt,At)>b)return!1;for(rt=z.segments.s,ot=rt.length,at=0;at<ot;at++)switch(ft=rt[at],ft.type){case os:case Vr:if(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b)return!1;break;case Es:var pt=bn();if(se.Qe(tt,At,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,pt),tt=E(pt,a),Ln(pt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case Oa:if(pt=bn(),se.ep(tt,At,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,pt),tt=E(pt,a),Ln(pt),tt||(tt=ft.endX,At=ft.endY,a.zd(tt,At)>b))return!1;break;case zo:case ul:pt=ft.type===zo?Pa(ft,z):Al(ft,z,tt,At);var xt=pt.length;if(xt===0){if(tt=ft.type===zo?ft.centerX:ft.endX,At=ft.type===zo?ft.centerY:ft.endY,a.zd(tt,At)>b)return!1;break}ft=null;for(var Ct=bn(),Mt=0;Mt<xt;Mt++)if(ft=pt[Mt],Ct.length=0,se.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Ct),E(Ct,a))return Ln(Ct),!1;Ln(Ct),ft!==null&&(tt=ft[6],At=ft[7]);break;default:Yt("Unknown Segment type: "+ft.type)}}return!0}}}return!1},Pt.qc=function(){this.ua=null},Pt.kq=function(){return this.ig};function my(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=gp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=rs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new ni(1-rs.x,rs.y)))}Oi.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Hu[a.toArrow];else a.fromArrow!=="None"?E=Hu[a.fromArrow]:(E=se.Ze[a.figure],typeof E=="string"&&(E=se.Ze[E]),E===void 0&&Yt("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=se.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function vy(a){var y=Hu[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Hu[x],y===void 0){var E=null,b;for(b in se.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=qe.parse(se.um[E],!1),Hu[E]=a,x!==E&&(Hu[x]=E),E}}return typeof y=="string"?y:y instanceof qe?a:null}Ze.Object.defineProperties(Oi.prototype,{geometry:{get:function(){return this.ua!==null?this.ua:this.Rd},set:function(a){var y=this.ua,x=this.Rd;if(y!==a){a!==null?this.Rd=this.ua=a.freeze():this.Rd=this.ua=null;var E=this.part;E!==null&&(E.ag=NaN),this.v(),this.g("geometry",y||x,a),Ms(this)&&(a=this.part,a!==null&&eo(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=qe.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Ht.allocAt(-y.x,-y.y),Ht.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&St(a,"Shape.fill"),a instanceof Lr&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&St(a,"Shape.stroke"),a instanceof Lr&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else wn(a,"value >= 0",Oi,"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"?wn(a,'"butt", "round", or "square"',Oi,"strokeCap"):(_f(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"?wn(a,'"miter", "bevel", or "round"',Oi,"strokeJoin"):(_f(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){_f(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;b<x;b++){var z=a[b];0<=z&&isFinite(z)||Yt("strokeDashArray:value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.Yg=a,this.N(),this.g("strokeDashArray",y,a)}}},strokeDashOffset:{get:function(){return this.Na!==null?this.Na.uj:0},set:function(a){var y=this.strokeDashOffset;y!==a&&0<=a&&(_f(this),this.Na.uj=a,this.N(),this.g("strokeDashOffset",y,a))}},figure:{get:function(){return this.an},set:function(a){var y=this.an;if(y!==a){var x=se.Ze[a];typeof x=="function"?x=a:(x=se.Ze[a.toLowerCase()])||Yt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=vy(a);x===null?Yt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new vh),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),my(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=vy(a);x===null?Yt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new vh),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),my(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:is},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),_f(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:is},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),_f(this),this.Na.gg=a,this.v(),this.g("spot2",y,a))}},parameter1:{get:function(){return this.Un},set:function(a){var y=this.Un;y!==a&&(this.Un=a,this.qc(),this.v(),this.g("parameter1",y,a))}},parameter2:{get:function(){return this.Vn},set:function(a){var y=this.Vn;y!==a&&(this.Vn=a,this.qc(),this.v(),this.g("parameter2",y,a))}},naturalBounds:{get:function(){return this.dc}},pathPattern:{get:function(){return this.Na!==null?this.Na.br:null},set:function(a){var y=this.pathPattern;y!==a&&(_f(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:Li},set:function(a){var y=this.geometryStretch;y!==a&&(_f(this),this.Na.jq=a,this.v(),this.g("geometryStretch",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 Ru),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&uA(x),this.v(),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:1<a&&(a=1),this.fa===null&&(this.fa=new Ru),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Ru),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Ru),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Oi.prototype.intersectsRect=Oi.prototype.Yc,Oi.prototype.containedInRect=Oi.prototype.fh,Oi.prototype.getNearestIntersectionPoint=Oi.prototype.rs,Oi.prototype.getDocumentBounds=Oi.prototype.mi,Oi.prototype.getDocumentPoint=Oi.prototype.ga;var Hu=new li,Rm=new li;Oi.className="Shape",Oi.getFigureGenerators=function(){var a=new vn,y;for(y in se.Ze)y!==y.toLowerCase()&&a.add(y,se.Ze[y]);return a.freeze(),a},Oi.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=se.Ze;E[a]=y,E[x]=a},Oi.getArrowheadGeometries=function(){var a=new vn;for(E in se.um)if(Hu[E]===void 0){var y=qe.parse(se.um[E],!1);Hu[E]=y,y=E.toLowerCase(),y!==E&&(Hu[y]=E)}for(var x in Hu)if(x!==x.toLowerCase()){var E=Hu[x];E instanceof qe&&a.add(x,E)}return a.freeze(),a},Oi.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=qe.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Yt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Hu;E[a]=x,E[y]=a};function Gm(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=Li,this.gg=this.fg=is}Gm.prototype.copy=function(){var a=new Gm;return a.Hr=this.Hr,a.Ir=this.Ir,a.Jr=this.Jr,a.uj=this.uj,a.br=this.br,a.jq=this.jq,a.fg=this.fg.J(),a.gg=this.gg.J(),a};function Jr(a,y){return oe.call(this),d0||(ja=Po?new El(null).context:null,d0=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}Te(Jr,oe),Jr.prototype.cloneProtected=function(a){oe.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function su(a){a.da===null?a.da=new Ym:a.da.nc&&(a.da=a.da.copy())}Pt=Jr.prototype,Pt.th=function(){oe.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function yy(a,y){a.l=y.l|6144,a.pb=y.opacity,a.Ma=y.background,a.areaBackground=y.areaBackground,a.jd=y.desiredSize.J(),a.minSize=y.minSize.J(),a.maxSize=y.maxSize.J(),y.Lb!==null?a.Lb=y.Lb.copy():a.Lb=null,a.Ca=y.scale,a.Kb=y.angle,a.stretch=y.stretch,a.Kg=y.margin.J(),a.Jb=y.alignment.J(),a.sk=y.alignmentFocus.J(),a.segmentFraction=y.segmentFraction,a.segmentOffset=y.segmentOffset.J(),a.segmentOrientation=y.segmentOrientation,y.tb!==null&&(a.tb=y.tb.copy()),a.shadowVisible=y.shadowVisible,a.ec=y.ec,a.xc=y.xc,a.Ae=y.Ae,a.fa!==null&&(a.fa=y.fa.copy()),y.da!==null&&(a.da=y.da.nc?y.da:y.da.copy()),a.Ih=y.Ih}Pt.qb=function(a){a.classType===Jr?this.wrap=a:oe.prototype.qb.call(this,a)},Pt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Pt.v=function(){oe.prototype.v.call(this)},Pt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=lp(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var at=this.isStrikethrough;wo(this,a,this.xc,!0,!1,x,E),(ot||at)&&wo(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var At=this.oe,ft=At.dx-(tt*At.m21+At.dx);At=At.dy-(tt*At.m22+At.dy);var pt=y.scale;switch(8>(ft*ft+At*At)*pt*pt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ea&&(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 Ri:a.translate(0,z),a.scale(1,-1);break;case Ir:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),At=this.Gc,pt=(y+tt+ft)*At,z>pt&&(E=this.verticalAlignment,E=E.y*z-E.y*pt+E.offsetY),At===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,ot,at);else if(this.Qc!==null&&this.Qb!==null)for(pt=0;pt<At;pt++){var xt=this.Qc[pt];xt>b&&(xt=b),E+=y,this.Oj(this.Qb[pt],a,0,E,b,tt,xt,x,rt,ot,at),E+=tt+ft}switch(this.flip){case or:a.scale(-1,1),a.translate(-b,0);break;case Ri:a.scale(1,-1),a.translate(0,-z);break;case Ir:a.scale(-1,-1),a.translate(-b,-z)}}},Pt.Oj=function(a,y,x,E,b,z,tt,rt,ot,at,At){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=u0!==null?u0(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),at){rt=h0!==null?h0(this,z):.8*z,ot=x+ft,at=E+rt,b=x+ft+tt,rt=E+rt;var pt=a;y.beginPath(),y.lineWidth=pt,y.moveTo(ot,at),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof Ea&&y.ad.classList.add("gojs-td")}At&&(At=E+z-z/2.2|0,a%2!==0&&(At+=.5),E=x+ft,z=At,x=x+ft+tt,tt=At,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Ea&&y.ad.classList.add("gojs-td"))}},Pt.kk=function(a,y,x){if(!oe.prototype.kk.call(this,a,y,x))return!1;if(wo(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<y.length;x++)Nd(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Nd(a,y,!0);return!0},Pt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:oe.prototype.nk.call(this,a)},Pt.Dv=function(a,y){if(a.nodeName!=="g")a.setAttributeNS(null,"filter",y);else{a=a.getElementsByTagName("text");for(var x=0;x<a.length;x++)a[x].setAttributeNS(null,"filter",y)}},Pt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;ja!==null&&Fy!==z&&(Fy=ja.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),z.length===0)z=8;else if(this.isMultiline){for(var rt=tt=0,ot=!1;!ot;){var at=z.indexOf(`
|
|
`,rt);at===-1&&(at=z.length,ot=!0),rt=z.substr(rt,at-rt),this.formatting===Ap&&(rt=rt.trim()),tt=Math.max(tt,gA(rt)),rt=at+1}z=tt}else tt=z.indexOf(`
|
|
`,0),0<=tt&&(z=z.substr(0,tt)),z=gA(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=Sy(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,ot=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===c0&&(y=this.Ae,y=this.overflow===c0?wy(y):0,at=this.spacingAbove+this.spacingBelow,at=Math.max(0,lp(this)+at),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/at+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,at=this.Qb[ot],y=Math.max(1,a-y);gA(at)>y&&1<at.length;)at=at.substr(0,at.length-1);at+=up,y=gA(at),this.Qb[ot]=at,this.Qb=this.Qb.slice(0,ot+1),this.Qc[ot]=y,this.Qc=this.Qc.slice(0,ot+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===xy||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),co(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Pt.eh=function(a,y,x,E){na(this,a,y,x,E)};function ap(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function zm(a,y,x,E){var b=a.formatting===Ap;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,lp(a)+rt);var ot=a.overflow===c0?wy(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===jm){a.Le=1;var at=gA(y);if(ot===0||at<=x)a.Cb=Math.max(a.Cb,at),ap(a,y,a.Cb),E!==null&&E.h(at,rt);else{for(z=wg(a,tt),tt=tt.substr(z.length),y=wg(a,tt),at=gA(z+y);0<y.length&&at<=x;)z+=y,tt=tt.substr(y.length),y=wg(a,tt),at=z+y,b&&(at=at.trim()),at=gA(at);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);gA(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=up;var At=gA(z);a.Cb=At,ap(a,z,At),E!==null&&E.h(At,rt)}}else{for(ot=0,tt.length===0&&(ot=1,ap(a,tt,0));0<tt.length;){for(y=wg(a,tt),tt=tt.substr(y.length);gA(y)>x;){var ft=1;for(at=gA(y.substr(0,ft)),At=0;at<=x;)ft++,At=at,at=gA(y.substr(0,ft));if(ft===1){var pt=at;z=Math.max(z,at)}else pt=At,z=Math.max(z,At);if(ft--,1>ft&&(ft=1),ap(a,y.substr(0,ft),pt),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(At=wg(a,tt),at=gA(y+At);0<At.length&&at<=x;)y+=At,tt=tt.substr(At.length),At=wg(a,tt),at=y+At,b&&(at=at.trim()),at=gA(at);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),At.length===0?(ft=at,z=Math.max(z,at)):(ft=At=gA(y),z=Math.max(z,At)),ap(a,y,ft),ot++,a.Gc+ot>a.maxLines))break}a.Le=Math.min(a.maxLines,ot),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function wg(a,y){if(a.wrap===By)return y.substr(0,1);for(var x=y.length,E=0,b=y1;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===Cy&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function gA(a){return ja===null?8*a.length:ja.measureText(a).width}function lp(a){if(a.df!==null)return a.df;var y=a.Ae;if(ja===null){var x=16;return a.df=x}return _m[y]!==void 0&&5e3>Py?x=_m[y]:(x=1.3*ja.measureText("M").width,_m[y]=x,Py++),a.df=x}function wy(a){if(ja===null)return 6;if(f0[a]!==void 0&&5e3>Wm)var y=f0[a];else y=ja.measureText(up).width,f0[a]=y,Wm++;return y}function Sy(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!==jm){a.Le=0;var ot=Je.alloc();zm(a,z,y,ot),b+=ot.height,Je.free(ot),a.Gc+=a.Le}else zm(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}Ze.Object.defineProperties(Jr.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"||(su(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:ze},set:function(a){var y=this.flip;y!==a&&(su(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:fa},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),su(this),this.da.Yr=a,es(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Je.alloc();zm(this,this.ec,999999,a);var y=a.width;Je.free(a),a=Sy(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),co(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:Km},set:function(a){var y=this.wrap;y!==a&&(su(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Vm},set:function(a){var y=this.overflow;y!==a&&(su(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&&St(a,"TextBlock.stroke"),a instanceof Lr&&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&&(su(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&&(su(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 Ru),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:1<a&&(a=1),this.fa===null&&(this.fa=new Ru),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new Ru),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new Ru),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new Ru),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(su(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(su(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(su(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(su(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Ap},set:function(a){var y=this.formatting;y!==a&&(su(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&wn(a,"> 0",Jr,"maxLines"),su(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 u0=null,h0=null,jm=new Be(Jr,"None",0),xy=new Be(Jr,"WrapFit",1),Km=new Be(Jr,"WrapDesiredSize",2),By=new Be(Jr,"WrapBreakAll",3),Vm=new Be(Jr,"OverflowClip",0),c0=new Be(Jr,"OverflowEllipsis",1),Ap=new Be(Jr,"FormatTrim",0),Cy=new Be(Jr,"FormatNone",0),y1=/[ \u200b\u00ad]/,_m=new li,Py=0,f0=new li,Wm=0,up="...",Fy="",ja=null,d0=!1;Jr.className="TextBlock";function Ym(){this.nc=!1,this.Hd=null,this.Xf=ze,this.gq=Ap,this.Jq=1/0,this.$q=Vm,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=fa,this.$r=Km}Ym.prototype.copy=function(){var a=new Ym;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},Jr.getEllipsis=function(){return up},Jr.setEllipsis=function(a){up=a,f0=new li,Wm=0},Jr.getBaseline=function(){return u0},Jr.setBaseline=function(a){u0=a},Jr.getUnderline=function(){return h0},Jr.setUnderline=function(a){h0=a},Jr.isValidFont=function(a){if(d0||(ja=Po?new El(null).context:null,d0=!0),ja===null)return!0;var y=ja.font;if(a===y||a==="10px sans-serif")return!0;ja.font="10px sans-serif",ja.font=a;var x=ja.font;if(x!=="10px sans-serif")return ja.font=y,!0;ja.font="19px serif";var E=ja.font;return ja.font=a,x=ja.font,ja.font=y,x!==E},Jr.FormatNone=Cy,Jr.FormatTrim=Ap,Jr.None=jm,Jr.OverflowClip=Vm,Jr.OverflowEllipsis=c0,Jr.WrapBreakAll=By,Jr.WrapDesiredSize=Km,Jr.WrapFit=xy;function Ru(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Ru.prototype.copy=function(){var a=new Ru;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Ru.className="GradElementSettings";function Ka(a,y){oe.call(this),this.Eg=null,this.qo="",this.Xg=zA,this.Nk=Ye,this.Zg=this.Hd=null,this.Mk=Ui,this.Xf=ze,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 Sg;Te(Ka,oe),Ka.prototype.cloneProtected=function(a){oe.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},Ka.prototype.qb=function(a){a===ze||a===Hn||a===Ji?this.imageStretch=a:oe.prototype.qb.call(this,a)},Ka.prototype.toString=function(){return"Picture("+this.source+")#"+Un(this)};function xg(a){a===void 0&&(a=""),a!==""?Sg[a]&&(delete Sg[a],g0--):(Sg=new li,g0=0)}function Ly(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,ot=0;ot<rt;ot++)z=tt[ot],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(Xo(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=bn();for(var rt=0;rt<b;rt++)z.push(tt[rt]);if(y.hn)for(rt=0;rt<b;rt++)tt=z[rt],tt.Hd!==null&&tt.Hd(tt,x);Ln(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Ka.prototype.hA=function(){if(this.source!==""){xg(this.source);var a=this.source;this.source="",this.source=a}},Ka.prototype.redraw=function(){this.N(),this.Uc=!0},Ka.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof sc)){var b=a instanceof Ea;E=this.naturalBounds;var z=0,tt=0,rt=this.qn,ot=rt?+x.width:x.naturalWidth;if(rt=rt?+x.height:x.naturalHeight,ot===void 0&&x.videoWidth&&(ot=x.videoWidth),rt===void 0&&x.videoHeight&&(rt=x.videoHeight),ot=ot||E.width,rt=rt||E.height,ot!==0&&rt!==0){var at=ot,At=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,pt=rt,xt=this.Nk,Ct=this.Mk;switch(xt){case ze:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Ct.offsetX+(ft*Ct.x-E.width*Ct.x)),pt>=E.height&&(tt=tt+Ct.offsetY+(pt*Ct.y-E.height*Ct.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,pt);break;case Ye:ft=E.width,pt=E.height;break;case Hn:case Ji:xt===Hn?(xt=Math.min(E.height/pt,E.width/ft),ft*=xt,pt*=xt):xt===Ji&&(xt=Math.max(E.height/pt,E.width/ft),ft*=xt,pt*=xt,ft>=E.width&&(z=(z+Ct.offsetX+(ft*Ct.x-E.width*Ct.x)/ft)*ot),pt>=E.height&&(tt=(tt+Ct.offsetY+(pt*Ct.y-E.height*Ct.y)/pt)*rt),ot*=1/(ft/E.width),rt*=1/(pt/E.height),ft=E.width,pt=E.height)}xt=this.Df()*y.scale;var Mt=ft*xt*pt*xt,Gt=ot*rt/Mt,Ot=x.__goCache;xt=null;var Wt=w1;if(!b){if(x.sq&&Ot!==void 0&&4<Mt&&Gt>Wt*Wt)for(Ot.gi===null&&(My(Ot,4,at,At,x),My(Ot,16,at,At,x)),b=Ot.gi,at=b.length,At=0;At<at&&b[At].ratio*b[At].ratio<Gt;At++)xt=b[At];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new El(null).context;try{b.drawImage(this.Eg,0,0)}catch(Zt){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(Zt){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Ct.offsetX+(E.width*Ct.x-ft*Ct.x):0,Ct=pt<E.height?Ct.offsetY+(E.height*Ct.y-pt*Ct.y):0,this.flip){case or:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case Ri:a.translate(0,Math.min(E.height,pt)),a.scale(1,-1);break;case Ir:a.translate(Math.min(E.width,ft),Math.min(E.height,pt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Ot!==void 0&&xt!==null&&xt.ratio!==1){a.save(),y=xt.ratio;try{a.drawImage(xt.source,z/y,tt/y,Math.min(xt.source.width,ot/y),Math.min(xt.source.height,rt/y),b,Ct,Math.min(E.width,ft),Math.min(E.height,pt)),a instanceof Ea&&(this.bt=[z/y,tt/y,Math.min(xt.source.width,ot/y),Math.min(xt.source.height,rt/y),b,Ct,Math.min(E.width,ft),Math.min(E.height,pt)])}catch(Zt){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,Ct,Math.min(E.width,ft),Math.min(E.height,pt)),a instanceof Ea&&(this.bt=[z,tt,ot,rt,b,Ct,Math.min(E.width,ft),Math.min(E.height,pt)])}catch(Zt){this.en=!1}switch(this.flip){case or:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case Ri:a.scale(1,-1),a.translate(0,-Math.min(E.height,pt));break;case Ir:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,pt))}}}}},Ka.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=ma(this,!0),tt=this.Eg,rt=this.qn,ot=0,at=0;(rt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(ot=rt?+tt.width:tt.naturalWidth,at=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===Ye||z===Xn?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=ot)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ot),isFinite(b.height)||z===Ye||z===di?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=at)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:at),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),co(this.dc,a,y),this.Ge(0,0,a,y)},Ka.prototype.eh=function(a,y,x,E){na(this,a,y,x,E)},Ze.Object.defineProperties(Ka.prototype,{element:{get:function(){return this.Eg},set:function(a){var y=this.Eg;if(this.Uc=!0,y!==a){this.qn=a instanceof HTMLCanvasElement;var x=a instanceof HTMLImageElement;a===null||x||a instanceof HTMLVideoElement||this.qn||Yt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Nf(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new le),E!==null&&x&&dh(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(Xo(this,!1),this.v())):x&&Ly(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=Sg;if(Po){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<g0&&(xg(),x=Sg),E=sn("img"),E.hn=!0,Ly(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,g0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new Ey),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),Ka.prototype.redraw=Ka.prototype.redraw,Ka.prototype.reloadSource=Ka.prototype.hA;var g0=0,w1=4;Ka.className="Picture",Sg=new li,Ka.clearCache=xg;function Ey(){this.gi=null}function My(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new El(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new ky(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(rt*x,0,0,rt*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}Ey.className="PictureCacheArray";function ky(a,y){this.source=a,this.ratio=y}ky.className="PictureCacheInstance";function Bg(){this.os=new qe,this.mc=null}Bg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new qe,this.mc=null};function Cg(a,y,x,E,b,z){a.mc=new As,a.mc.startX=y,a.mc.startY=x,a.mc.isFilled=E,a.mc.isEvenOdd=z||!1,a.os.figures.add(a.mc),b!==void 0&&(a.mc.isShadowed=b)}function S1(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Bg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new gr(os);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Bg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new gr(Vr);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Ac(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new gr(Es);ot.point1X=y,ot.point1Y=x,ot.point2X=E,ot.point2Y=b,ot.endX=z,ot.endY=tt,rt&&ot.close(),a.mc.segments.add(ot)}function p0(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new gr(Oa);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}Bg.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new gr(zo);rt.startAngle=a,rt.sweepAngle=y,rt.centerX=x,rt.centerY=E,rt.radiusX=b,rt.radiusY=z!==0?z:b,tt&&rt.close(),this.mc.segments.add(rt)};function x1(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new gr(ul,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function by(a){var y=m0;return y!==null?(m0=null,y.reset(a),y):(y=new Bg,y.reset(a),y)}var m0=null;Bg.className="StreamGeometryContext";function ha(a,y){var x=a.toLowerCase(),E=se.Ze;E[a]=y,E[x]=a}ha("Rectangle",function(a,y,x){a="r"+y+","+x;var E=se.Mf[a];return E!==void 0||(E=new qe(qe.u),E.endX=y,E.endY=x,se.Nf<se.vm&&(se.Mf[a]=E,se.Nf++)),E}),ha("Square",function(a,y,x){a="s"+y+","+x;var E=se.Mf[a];return E!==void 0||(E=new qe(qe.u),E.endX=y,E.endY=x,E.defaultStretch=Hn,se.Nf<se.vm&&(se.Mf[a]=E,se.Nf++)),E}),ha("RoundedRectangle",function(a,y,x){a=a?a.parameter1:NaN,(isNaN(a)||0>a)&&(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 qe().add(new As(a,0,!0).add(new gr(Vr,y-a,0)).add(new gr(Es,y,a,y-z,0,y,z)).add(new gr(Vr,y,x-a)).add(new gr(Es,y-a,x,y,x-z,y-z,x)).add(new gr(Vr,a,x)).add(new gr(Es,0,x-a,z,x,0,x-z)).add(new gr(Vr,0,a)).add(new gr(Es,a,0,0,z,z,0).close())),1<z&&(b.spot1=new ni(0,0,z,z),b.spot2=new ni(1,1,-z,-z)),se.Nf<se.vm&&(se.Mf[E]=b,se.Nf++),b}),ha("Border","RoundedRectangle"),ha("Ellipse",function(a,y,x){a="e"+y+","+x;var E=se.Mf[a];return E!==void 0||(E=new qe(qe.F),E.endX=y,E.endY=x,E.spot1=th,E.spot2=BA,se.Nf<se.vm&&(se.Mf[a]=E,se.Nf++)),E}),ha("Circle",function(a,y,x){a="c"+y+","+x;var E=se.Mf[a];return E!==void 0||(E=new qe(qe.F),E.endX=y,E.endY=x,E.spot1=th,E.spot2=BA,E.defaultStretch=Hn,se.Nf<se.vm&&(se.Mf[a]=E,se.Nf++)),E}),ha("TriangleRight",function(a,y,x){return new qe().add(new As(0,0).add(new gr(Vr,y,.5*x)).add(new gr(Vr,0,x).close())).pm(0,.25,.5,.75)}),ha("TriangleDown",function(a,y,x){return new qe().add(new As(0,0).add(new gr(Vr,y,0)).add(new gr(Vr,.5*y,x).close())).pm(.25,0,.75,.5)}),ha("TriangleLeft",function(a,y,x){return new qe().add(new As(y,x).add(new gr(Vr,0,.5*x)).add(new gr(Vr,y,0).close())).pm(.5,.25,1,.75)}),ha("TriangleUp",function(a,y,x){return new qe().add(new As(y,x).add(new gr(Vr,0,x)).add(new gr(Vr,.5*y,0).close())).pm(.25,.5,.75,1)}),ha("Triangle","TriangleUp"),ha("Diamond",function(a,y,x){return new qe().add(new As(.5*y,0).add(new gr(Vr,0,.5*x)).add(new gr(Vr,.5*y,x)).add(new gr(Vr,y,.5*x).close())).pm(.25,.25,.75,.75)}),ha("LineH",function(a,y,x){return a=new qe(qe.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),ha("LineV",function(a,y,x){return a=new qe(qe.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),ha("None","Rectangle"),ha("BarH","Rectangle"),ha("BarV","Rectangle"),ha("MinusLine","LineH"),ha("PlusLine",function(a,y,x){return new qe().add(new As(0,x/2,!1).add(new gr(Vr,y,x/2)).add(new gr(os,y/2,0)).add(new gr(Vr,y/2,x)))}),ha("XLine",function(a,y,x){return new qe().add(new As(0,x,!1).add(new gr(Vr,y,0)).add(new gr(os,0,0)).add(new gr(Vr,y,x)))}),ha("LineRight",function(a,y,x){return new qe().add(new As(.25*y,0,!1).add(new gr(Vr,.75*y,.5*x)).add(new gr(Vr,.25*y,x)))}),ha("LineDown",function(a,y,x){return new qe().add(new As(0,.25*x,!1).add(new gr(Vr,.5*y,.75*x)).add(new gr(Vr,y,.25*x)))}),ha("LineLeft",function(a,y,x){return new qe().add(new As(.75*y,0,!1).add(new gr(Vr,.25*y,.5*x)).add(new gr(Vr,.75*y,x)))}),ha("LineUp",function(a,y,x){return new qe().add(new As(0,.75*x,!1).add(new gr(Vr,.5*y,.25*x)).add(new gr(Vr,y,.75*x)))}),se.um={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",BackwardOpenTriangleLine:"m 8,0 l -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};function Xm(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Ho,this.ir=null,this.jr="",this.lr=is,this.Gq="",this.Hq=dr,this.Pq=Mr,this.Kq=Rr,this.Up=null,this.Cq=127,this.zr=yr,this.yr="gray",this.Vg=4}Xm.prototype.copy=function(){var a=new Xm;return a.zq=this.zq,a.Kp=this.Kp,a.tr=this.tr,a.vr=this.vr,a.ur=this.ur,a.oq=this.oq,a.fr=this.fr,a.hr=this.hr,a.gr=this.gr.J(),a.ir=this.ir,a.jr=this.jr,a.lr=this.lr.J(),a.Gq=this.Gq,a.Hq=this.Hq.J(),a.Pq=this.Pq.J(),a.Kq=this.Kq.J(),a.Up=this.Up,a.Cq=this.Cq,a.zr=this.zr.J(),a.yr=this.yr,a.Vg=this.Vg,a};function ei(a,y){a===void 0||a instanceof Er||typeof a=="string"?Ve.call(this,a):(Ve.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new Ht(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new be,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Te(ei,Ve),ei.prototype.cloneProtected=function(a){Ve.prototype.cloneProtected.call(this,a),a.G=this.G&-4097|49152,a.Tf=this.Tf,this.P!==null&&(a.P=this.P.nc?this.P:this.P.copy()),a.Jg=this.Jg,a.Qf=null,a.ec=this.ec,a.ke.assign(this.ke),a.Ao=this.Ao},Pt=ei.prototype,Pt.Af=function(a){Ve.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Pt.toString=function(){var a=On(this.constructor)+"#"+Un(this);return this.data!==null&&(a+="("+Yi(this.data)+")"),a};function Va(a){a.P===null?a.P=new Xm:a.P.nc&&(a.P=a.P.copy())}Pt.th=function(){Ve.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Pt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===Qo&&y==="elements"?b instanceof Ve?fA(b,function(ot){xv(rt.partManager,ot),JA(rt,ot)}):dh(rt,b):a===ts&&y==="elements"&&(b instanceof Ve?fA(b,function(ot){Bv(rt.partManager,ot,rt)}):Nf(rt,b)),rt.cb(a,y,x,E,b,z,tt))},Pt.La=function(a){if(Ve.prototype.La.call(this,a),this.data!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];b instanceof Ve&&fA(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},ei.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},ei.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},ei.prototype.bh=function(a,y){if(y!==null){var x=null,E=this.Qf;if(E!==null&&(x=E.I(a)),x!==y){if(x!==null){var b=x.diagram;b!==null&&b.remove(x)}E===null&&(this.Qf=E=new vn),y.Tf!==a&&(y.category=a),E.add(a,y),a=this.diagram,a!==null&&(a.add(y),a=y.adornedObject,a!==null&&(a=a.ih(),a!==null&&(y.data=a.data)))}}},ei.prototype.Jf=function(a){var y=this.Qf;if(y!==null){var x=y.I(a);if(x!==null){var E=x.diagram;E!==null&&E.remove(x)}y.remove(a),y.count===0&&(this.Qf=null)}},ei.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=bn();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Ln(y)}},ei.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof Ti?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof vr))break t;Yl(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Ve.Link),x.adornedObject=y)}if(x!==null){x.type===Ve.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(B1(this,a),y=this.adornments;y.next();)y.value.La()}},ei.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Zm(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function B1(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function v0(a){if(Zc(a)===!1){qm(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function Ty(a){if(a.G|=2097152,Zc(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Qy(a,y,x),x=a.Ib;var E=be.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),be.free(E),qm(a,!1)}}ei.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Fi);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},ei.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Ui;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Ht.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),Ht.free(tt)}},ei.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},ei.prototype.moveTo=function(a,y,x){a=Ht.allocAt(a,y),this.move(a,x),Ht.free(a)},ei.prototype.isVisible=function(){if(!this.visible)return!1;var a=this.layer;if(a!==null){if(!a.visible)return!1;if(a=a.diagram,a!==null&&a.animationManager.fv(this))return!0}return a=this.containingGroup,!!(a===null||a.isSubGraphExpanded&&a.isVisible())},ei.prototype.Zb=function(a){var y=this.diagram;a?(this.C(4),this.Wb(),y!==null&&y.De.add(this)):(this.C(8),this.Ej()),this.oh(),y!==null&&(y.Ya(),y.N())},ei.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new vn),y.I(a)!==null)return y.I(a);var x=Ve.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function uc(a,y,x,E){E===void 0&&(E=new Ht),x=x.Mc()?Ui:x;var b=y.naturalBounds;if(E.h(b.width*x.x+x.offsetX,b.height*x.y+x.offsetY),y===null||y===a)return E;for(y.transform.Ga(E),y=y.panel;y!==null&&y!==a;)y.transform.Ga(E),y=y.panel;return a.Lb!==null&&a.Lb.Ga(E),E.offset(-a.uc.x,-a.uc.y),E}ei.prototype.mi=function(a){return a===void 0&&(a=new be),a.assign(this.actualBounds)},ei.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Iy(a){var y=Ht.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Oi?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function Yf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=uy(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}ei.prototype.arrange=function(){if(ia(this)===!1)Ty(this);else{bA(this,!1);var a=this.Ib,y=be.alloc();y.assign(a);var x=Jc(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;Qy(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||se.B(y.width,a.width)&&se.B(y.height,a.height)||0<=this.vw&&this.C(16),be.free(y),qm(this,!1)}},Pt=ei.prototype,Pt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=be.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),be.free(b)}!(this.G&65536)&&a.D(y)||Oy(this,E,x),x.N(),!a.w()&&!y.w()||lo(a,y)||(this instanceof fn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Pt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&Ny(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new Ht(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Zc(this)===!1&&ia(this)===!1&&(v0(this),Ty(this)),!0};function Ny(a,y,x,E,b){y===null||a instanceof vr||(y=y.animationManager,y.zb&&Pf(y,a,new Ht(E,b),x))}Pt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;Zc(this)||ia(this)?b.h(NaN,NaN):b.h(b.x+a-E.x,b.y+y-E.y),E.h(a,y)}else{if(b.x===a&&b.y===y)return;E.h(E.x+a-b.x,E.y+y-b.y),b.h(a,y)}v0(this)},Pt.Av=function(){this.G&=-2097153,v0(this)};function Qy(a,y,x){var E=Iy(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?Uy(a,y,x,b,E):Dy(a,y,x,b,E):z?Uy(a,y,x,b,E):tt&&Dy(a,y,x,b,E),a.G|=2097152,Ht.free(E),a.Uk()}function Uy(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof vr||Pf(x,a,new Ht(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Ht(z,tt),y.copy()))}function Dy(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function Oy(a,y,x){$m(a,!1),a instanceof fn&&hA(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?Jc(a)?(Da(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Pt.si=function(){return!0},Pt.Zc=function(){return!0},Pt.ph=function(){return!1},Pt.Dd=function(){return!0};function Jm(a,y,x,E){y.constructor===a.constructor||Gy||(Gy=!0,un('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),un(" Old class: "+On(a.constructor)+", new class: "+On(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,rt=!0,ot=!0,at=!1;a instanceof fn&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,at=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof fn&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=at?a.U|2:a.U&-3),b!==null&&a.La(),b=a.layerName,b!==x&&(a.Jg=x,a.layerName=b),y!==null&&(y.skipsUndoManager=E),a.Zc()&&a.C(64)}ei.prototype.canCopy=function(){if(!this.copyable)return!1;var a=this.layer;return a===null?!0:a.allowCopy?(a=a.diagram,a===null?!0:!!a.allowCopy):!1},ei.prototype.canDelete=function(){if(!this.deletable)return!1;var a=this.layer;return a===null?!0:a.allowDelete?(a=a.diagram,a===null?!0:!!a.allowDelete):!1},ei.prototype.canEdit=function(){if(!this.textEditable)return!1;var a=this.layer;return a===null?!0:a.allowTextEdit?(a=a.diagram,a===null?!0:!!a.allowTextEdit):!1},ei.prototype.canGroup=function(){if(!this.groupable)return!1;var a=this.layer;return a===null?!0:a.allowGroup?(a=a.diagram,a===null?!0:!!a.allowGroup):!1},ei.prototype.canMove=function(){if(!this.movable)return!1;var a=this.layer;return a===null?!0:a.allowMove?(a=a.diagram,a===null?!0:!!a.allowMove):!1},ei.prototype.canReshape=function(){if(!this.reshapable)return!1;var a=this.layer;return a===null?!0:a.allowReshape?(a=a.diagram,a===null?!0:!!a.allowReshape):!1},ei.prototype.canResize=function(){if(!this.resizable)return!1;var a=this.layer;return a===null?!0:a.allowResize?(a=a.diagram,a===null?!0:!!a.allowResize):!1},ei.prototype.canRotate=function(){if(!this.rotatable)return!1;var a=this.layer;return a===null?!0:a.allowRotate?(a=a.diagram,a===null?!0:!!a.allowRotate):!1},ei.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function Zc(a){return(a.G&32768)!==0}function qm(a,y){a.G=y?a.G|32768:a.G&-32769}function $m(a,y){a.G=y?a.G|65536:a.G&-65537}function Jc(a){return(a.G&131072)!==0}Pt=ei.prototype,Pt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function y0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Pt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Pt.N=function(){var a=this.diagram;a!==null&&!ia(this)&&!Zc(this)&&this.isVisible()&&this.Ib.w()&&a.N(Yf(this,this.Ib))},Pt.v=function(){Ve.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof fn&&this.labeledLink!==null&&es(this.labeledLink),a.$b(!0))},Pt.Vo=function(a){a||(a=this.Ah,a!==null&&ov(a,this))},Pt.Wo=function(a){a||(a=this.Ah,a!==null&&sv(a,this))},Pt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Pt.oz=function(){return tv(this,this)};function tv(a,y){var x=y.containingGroup;return x!==null?1+tv(a,x):y instanceof fn&&(y=y.labeledLink,y!==null)?tv(a,y):0}Pt.sz=function(){return Hy(this,this)};function Hy(a,y){var x=y.containingGroup;return x!==null||y instanceof fn&&(x=y.labeledLink,x!==null)?Hy(a,x):y}Pt.Td=function(a){return a instanceof Ti?ev(this,this,a):!1};function ev(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!ev(a,E,x)?y instanceof fn&&(y=y.labeledLink,y!==null)?ev(a,y,x):!1:!0}Pt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof Ti&&y0(y,!0),y instanceof fn){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof fn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof Ti&&y0(y,!1),y instanceof fn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},ei.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof fn&&this.isLinkLabel)},ei.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof fn&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function Ry(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function qc(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof vr)){if(a.add(y),y instanceof fn){if(x&&y instanceof Ti)for(var tt=y.memberParts;tt.next();)qc(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var rt=tt.value;if(!a.contains(rt)){var ot=rt.fromNode,at=rt.toNode;ot=ot===null||a.contains(ot),at=at===null||a.contains(at),(b?ot&&at:ot||at)&&qc(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)qc(a,y.value,x,E-1,b,z)}else if(y instanceof en)for(y=y.labelNodes;y.next();)qc(a,y.value,x,E,b,z)}}Ze.Object.defineProperties(ei.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?xr:this.Qf.iteratorValues}},layer:{get:function(){return this.Ig}},diagram:{get:function(){var a=this.Ig;return a==null?null:a.diagram}},layerName:{get:function(){return this.Jg},set:function(a){var y=this.Jg;if(y!==a){var x=this.diagram;if((x===null||x.Qj(a)!==null&&!x.partManager.addsToTemporaryLayer)&&(this.Jg=a,x!==null&&x.Ya(),this.g("layerName",y,a),y=this.layer,y!==null&&y.name!==a&&(x=y.diagram,x!==null&&(a=x.Qj(a),a!==null&&a!==y)))){var E=y.pc(-1,this,!0);if(0<=E&&x.cb(ts,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Qo,"parts",a,null,this,!0,E),E=this.layerChanged,E!==null){var b=x.aa;x.aa=!0,E(this,y,a),x.aa=b}}}}},layerChanged:{get:function(){return this.P!==null?this.P.zq:null},set:function(a){var y=this.layerChanged;y!==a&&(Va(this),this.P.zq=a,this.g("layerChanged",y,a))}},zOrder:{get:function(){return this.Ao},set:function(a){var y=this.Ao;if(y!==a){this.Ao=a;var x=this.layer;x!==null&&Lf(x,-1,this),this.g("zOrder",y,a),a=this.diagram,a!==null&&a.N()}}},locationObject:{get:function(){if(this.nf===null){var a=this.locationObjectName;a!==""?(a=this.fb(a),a!==null?this.nf=a:this.nf=this):this instanceof vr?this.type!==Ve.Link&&this.placeholder!==null?this.nf=this.placeholder:this.nf=this:this.nf=this}return this.nf.visible?this.nf:this}},minLocation:{get:function(){return this.P!==null?this.P.Pq:Mr},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Va(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Rr},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Va(this),this.P.Kq=a,this.g("maxLocation",y,a))}},locationObjectName:{get:function(){return this.P!==null?this.P.Gq:""},set:function(a){var y=this.locationObjectName;y!==a&&(Va(this),this.P.Gq=a,this.nf=null,this.v(),this.g("locationObjectName",y,a))}},locationSpot:{get:function(){return this.P!==null?this.P.Hq:dr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Va(this),this.P.Hq=a,this.v(),this.g("locationSpot",y,a))}},location:{get:function(){return this.ke},set:function(a){var y=a.x,x=a.y,E=this.ke;if(!(E.x===y||isNaN(E.x)&&isNaN(y))||!(E.y===x||isNaN(E.y)&&isNaN(x))){if(a=a.copy(),y=a,this.ph())y=!1;else{if(this.ke=y,this.G|=2097152,ia(this)===!1&&(v0(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),Ny(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof vr)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof vr?this instanceof vr&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Yl(x),x=x.copy(),x!==null&&Jm(this,x,y,a))):(z!==null&&z.jm(E,a),x=cw(x.partManager,E,a),x!==null&&(Yl(x),x=x.copy(),x===null||x instanceof en||(E=this.location.copy(),Jm(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Jm(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=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&&(Va(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&&(Va(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&&(Va(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 en?(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&&(Va(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&&(Va(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&&(Va(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:Ho},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Va(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&&(Va(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&&(Va(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:is},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Va(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&&Yt("Cannot make a Group a member of itself: "+this.toString()),Yt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?sv(y,this):this instanceof Ti&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ov(a,this):this instanceof Ti&&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 Ti){for(x=new le,qc(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof fn)for(E=E.linksConnected;E.next();)Pg(E.value)}if(this instanceof fn){for(x=this.linksConnected;x.next();)Pg(x.value);x=this.labeledLink,x!==null&&Pg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Lf(y,-1,a))}}else Yt("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&&(Va(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof fn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Va(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&&(Va(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:yr},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Va(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&&(Va(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&&(Va(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),ei.prototype.invalidateLayout=ei.prototype.C,ei.prototype.findCommonContainingGroup=ei.prototype.px,ei.prototype.isMemberOf=ei.prototype.Td,ei.prototype.findTopLevelPart=ei.prototype.sz,ei.prototype.findSubGraphLevel=ei.prototype.oz,ei.prototype.ensureBounds=ei.prototype.Va,ei.prototype.getDocumentBounds=ei.prototype.mi,ei.prototype.findObject=ei.prototype.fb,ei.prototype.moveTo=ei.prototype.moveTo,ei.prototype.invalidateAdornments=ei.prototype.Wb,ei.prototype.clearAdornments=ei.prototype.Ej,ei.prototype.removeAdornment=ei.prototype.Jf,ei.prototype.addAdornment=ei.prototype.bh,ei.prototype.findAdornment=ei.prototype.Pj,ei.prototype.updateTargetBindings=ei.prototype.La;var Gy=!1;ei.className="Part",ei.LayoutNone=0,ei.LayoutAdded=1,ei.LayoutRemoved=2,ei.LayoutShown=4,ei.LayoutHidden=8,ei.LayoutNodeSized=16,ei.LayoutGroupLayout=32,ei.LayoutNodeReplaced=64,ei.LayoutStandard=127,ei.LayoutAll=16777215;function vr(a,y){a===void 0||a instanceof Er||typeof a=="string"?ei.call(this,a):(ei.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)}Te(vr,ei),vr.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},vr.prototype.updateRelationshipsFromData=function(){},vr.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof en&&y instanceof Oi){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;E<y;E++){var b=x[E];b.isPanelMain&&b instanceof Oi&&(b.ua=a)}}},vr.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!ia(a))},vr.prototype.Zc=function(){return!1},vr.prototype.gk=function(a,y,x,E,b,z,tt){if(a===Qo&&y==="elements"){if(b instanceof Ma)this.$a===null&&(this.$a=b);else if(b instanceof Ve){var rt=b.Nl(function(ot){return ot instanceof Ma});rt instanceof Ma&&this.$a===null&&(this.$a=rt)}}else a===ts&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Ve&&this.$a.rg(E)&&(this.$a=null));ei.prototype.gk.call(this,a,y,x,E,b,z,tt)},vr.prototype.updateAdornments=function(){},vr.prototype.Lj=function(){},Ze.Object.defineProperties(vr.prototype,{placeholder:{get:function(){return this.$a}},adornedObject:{get:function(){return this.ue},set:function(a){var y=this.adornedPart,x=null;a!==null&&(x=a.part),y===null||a!==null&&y===x||y.Jf(this.category),this.ue=a,x!==null&&x.bh(this.category,this)}},adornedPart:{get:function(){var a=this.ue;return a!==null?a.part:null}},containingGroup:{get:function(){return null}}}),vr.className="Adornment";function nv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Hs,this.er=x0,this.Kr=this.ij=this.Nq=this.Mq=null}nv.prototype.copy=function(){var a=new nv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function fn(a,y){a===void 0||a instanceof Er||typeof a=="string"?ei.call(this,a):(ei.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new _t,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Te(fn,ei),fn.prototype.cloneProtected=function(a){ei.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Pt=fn.prototype,Pt.Af=function(a){ei.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function hc(a){a.Ba===null?a.Ba=new nv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Pt.th=function(){ei.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function zy(a,y){y!==null&&(a.af===null&&(a.af=new le),a.af.add(y))}function jy(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Pt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=jy(this,a,y,x),a!==null&&a.Sl()},Pt.gk=function(a,y,x,E,b,z,tt){a===Qo&&y==="elements"?this.wc=null:a===ts&&y==="elements"&&(this.wc=null),ei.prototype.gk.call(this,a,y,x,E,b,z,tt)},Pt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(pl(x.fromPort),pl(x.toPort),x.bb())}};function Ky(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(pl(x.fromPort),pl(x.toPort),x.bb())}}function pl(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||pl(y.port)}}Pt.si=function(){return!0},fn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},fn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},fn.prototype.isVisible=function(){if(!ei.prototype.isVisible.call(this))return!1;var a=!0,y=Iu,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Iu){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Yo){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===$A&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},fn.prototype.Zb=function(a){ei.prototype.Zb.call(this,a);for(var y=this.linksConnected;y.next();){var x=y.value;if(a&&this.containingGroup!==null){var E=x.To(this);E===null||E.Td(this.containingGroup)||x.bb()}x.Zb(a)}},fn.prototype.qx=function(){var a=new le,y=new le;return Vy(this,this,a,y),y.iterator};function Vy(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&Vy(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}fn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new qt(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Pt=fn.prototype,Pt.Mo=function(a){a===void 0&&(a=null);var y=new qt(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Pt.Sd=function(a){a===void 0&&(a=null);var y=new qt(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Pt.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new le,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new le,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Ar(x):xr},Pt.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new le,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Ar(x):xr},Pt.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new le,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Ar(x):xr},Pt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new qt(this.jb),b=this;return E.predicate=function(z){return!((z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)&&(z.fromNode!==a||z.toNode!==b||x!==null&&z.fromPortId!==x||y!==null&&z.toPortId!==y))},E},Pt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new qt(this.jb),b=this;return E.predicate=function(z){return!(z.fromNode!==b||z.toNode!==a||y!==null&&z.fromPortId!==y||x!==null&&z.toPortId!==x)},E};function w0(a,y,x){pl(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function S0(a,y,x){pl(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):hp(y)))}function hp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink){if(y){if(E.fromNode===a){a.isTreeLeaf=!1;return}}else if(E.toNode===a){a.isTreeLeaf=!1;return}}}a.isTreeLeaf=!0}}}fn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Pt=fn.prototype,Pt.Vo=function(a){ei.prototype.Vo.call(this,a),a||(hp(this),a=this.Yk,a!==null&&tw(a,this))},Pt.Wo=function(a){ei.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Pt.Lj=function(){if(0<this.jb.count){var a=this.diagram;if(a!==null)for(var y=a.commandHandler!==null?a.commandHandler.deletesConnectedLinks:!0,x=this.jb.copy().iterator;x.next();){var E=x.value;y?a.remove(E):(E.fromNode===this&&(E.fromNode=null),E.toNode===this&&(E.toNode=null))}}this.labeledLink=null,ei.prototype.Lj.call(this)},Pt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;_y(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function _y(a){a.wc===null?a.wc=new vn:a.wc.clear(),a.qm(a,function(y,x){Wy(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Wy(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function iv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=bn()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Ln(x)}}}Pt.Nz=function(a){if(a===null||a===this)return!1;var y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this,y)for(;x!==a;){y=null;for(var E=x.jb.iterator;E.next();){var b=E.value;if(b.isTreeLink&&(y=b.fromNode,y!==x&&y!==this))break}if(y===this||y===null||y===x)return!1;x=y}else for(;x!==a;){for(y=null,E=x.jb.iterator;E.next()&&(b=E.value,!b.isTreeLink||(y=b.toNode,y===x||y===this)););if(y===this||y===null||y===x)return!1;x=y}return!0},Pt.xz=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this,a)for(;;){a=null;for(var x=y.jb.iterator;x.next();){var E=x.value;if(E.isTreeLink&&(a=E.fromNode,a!==y&&a!==this))break}if(a===this)return this;if(a===null||a===y)return y;y=a}else for(;;){for(a=null,x=y.jb.iterator;x.next()&&(E=x.value,!E.isTreeLink||(a=E.toNode,a===y||a===this)););if(a===this)return this;if(a===null||a===y)return y;y=a}},Pt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)y0(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)y0(y,!1),y=y.pg();return x},Pt.kh=function(){var a=!0,y=this.diagram;if(y!==null&&(a=y.isTreePathToChildren),y=this.jb.iterator,a){for(;y.next();)if(a=y.value,a.isTreeLink&&a.fromNode!==this)return a}else for(;y.next();)if(a=y.value,a.isTreeLink&&a.toNode!==this)return a;return null},Pt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof fn)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Pt.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new le;return a(this,y),y},Pt.uz=function(){return Yy(this,this)};function Yy(a,y){return y=y.pg(),y===null?0:1+Yy(a,y)}Pt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new qt(this.jb);var x=this;return y.predicate=a?function(E){return!!(E.isTreeLink&&E.fromNode===x)}:function(E){return!!(E.isTreeLink&&E.toNode===x)},y},Pt.Ou=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren);var x=y=null,E=this.jb.iterator;if(a)for(;E.next();)a=E.value,a.isTreeLink&&a.fromNode===this&&(a=a.toNode,y!==null?y.add(a):x!==null&&x!==a?(y=new _t,y.add(x),y.add(a)):x=a);else for(;E.next();)a=E.value,a.isTreeLink&&a.toNode===this&&(a=a.fromNode,y!==null?y.add(a):x!==null&&x!==a?(y=new _t,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Ar(x):xr},Pt.wz=function(a){a===void 0&&(a=1/0);var y=new le;return qc(y,this,!1,a,!0),y},fn.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new le;x.add(this),Xy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Iu),y.Ue=!1}};function Xy(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),Xy(ot,y,x,E-1,b,z,tt)))}else Zy(a,y,x,b,z,tt)}function Zy(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var at=rt.value;if(at.isTreeLink&&(at=at.To(a),at!==null&&at!==a)){var At=y.contains(at);if(At||y.add(at),tt){var ft=x?at.Oo():at.Po();ot.uv=a,ft.all(function(pt){return function(xt){return xt===pt.uv||!xt.isTreeExpanded}}(ot))&&E.Aj(at,b),at.oh(),at.Zb(!1)}at.isTreeExpanded&&(at.wasTreeExpanded=at.isTreeExpanded,At||Zy(at,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}fn.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new le;x.add(this),Jy(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Iu),y.Ue=!1}};function Jy(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),at={};ot.next();){var At=ot.value;if(At.isTreeLink&&(rt||At.fd||At.bb(),At=At.To(a),At!==null&&At!==a&&!y.contains(At))){if(y.add(At),!rt){At.Zb(!0),At.oh();var ft=x?At.Oo():At.Po();at.vv=a,ft.all(function(pt){return function(xt){return xt===pt.vv||!xt.isTreeExpanded}}(at))&&b.Cj(At,z)}(2<E||At.wasTreeExpanded)&&(At.wasTreeExpanded=!1,Jy(At,y,x,E-1,b,z,tt))}at={vv:at.vv}}a.isTreeExpanded=!0}Ze.Object.defineProperties(fn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:x0},set:function(a){var y=this.portSpreading;y!==a&&(hc(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&hA(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Hs},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),hc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&hA(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(hc(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(hc(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(hc(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(tw(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),es(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&_y(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(hc(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),fn.prototype.expandTree=fn.prototype.expandTree,fn.prototype.collapseTree=fn.prototype.collapseTree,fn.prototype.findTreeParts=fn.prototype.wz,fn.prototype.findTreeChildrenNodes=fn.prototype.Ou,fn.prototype.findTreeChildrenLinks=fn.prototype.Qo,fn.prototype.findTreeLevel=fn.prototype.uz,fn.prototype.findTreeParentChain=fn.prototype.vz,fn.prototype.findTreeParentNode=fn.prototype.pg,fn.prototype.findTreeParentLink=fn.prototype.kh,fn.prototype.findCommonTreeParent=fn.prototype.gz,fn.prototype.findTreeRoot=fn.prototype.xz,fn.prototype.isInTreeOf=fn.prototype.Nz,fn.prototype.findPort=fn.prototype.ns,fn.prototype.findLinksTo=fn.prototype.kz,fn.prototype.findLinksBetween=fn.prototype.jz,fn.prototype.findNodesInto=fn.prototype.Oo,fn.prototype.findNodesOutOf=fn.prototype.Po,fn.prototype.findNodesConnected=fn.prototype.Mu,fn.prototype.findLinksInto=fn.prototype.Sd,fn.prototype.findLinksOutOf=fn.prototype.Mo,fn.prototype.findExternalTreeLinksConnected=fn.prototype.qx,fn.prototype.invalidateConnectedLinks=fn.prototype.Bd,fn.prototype.invalidateLinkBundle=fn.prototype.Lz;var C1=new Be(fn,"SpreadingNone",10),x0=new Be(fn,"SpreadingEvenly",11),rv=new Be(fn,"SpreadingPacked",12);fn.className="Node",fn.SpreadingNone=C1,fn.SpreadingEvenly=x0,fn.SpreadingPacked=rv;function Ti(a,y){a===void 0||a instanceof Er||typeof a=="string"?fn.call(this,a):(fn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new le,this.$a=null,this.Sc=new mo,this.Sc.group=this,this.gl=new le,this.tb=this.$p=null,y&&Object.assign(this,y)}Te(Ti,fn),Ti.prototype.cloneProtected=function(a){fn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ma});y instanceof Ma?a.$a=y:a.$a=null,this.Sc!==null?(a.Sc=this.Sc.copy(),a.Sc.group=a):(a.Sc!==null&&(a.Sc.group=null),a.Sc=null),this.tb!==null&&(a.tb=this.tb.copy())},Pt=Ti.prototype,Pt.Af=function(a){fn.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof fn)x.Bd(y);else if(x instanceof en)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Pt.gk=function(a,y,x,E,b,z,tt){if(a===Qo&&y==="elements"){if(b instanceof Ma)this.$a===null?this.$a=b:this.$a!==b&&Yt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Ve){var rt=b.Nl(function(ot){return ot instanceof Ma});rt instanceof Ma&&(this.$a===null?this.$a=rt:this.$a!==rt&&Yt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ts&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Ve&&this.$a.rg(E)&&(this.$a=null));fn.prototype.gk.call(this,a,y,x,E,b,z,tt)},Pt.Xl=function(a,y){fn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Ve.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Ve&&(a=a.Pb()),this.tb===null&&(this.tb=new be),a.mi(this.tb),a instanceof Oi&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Pt.eh=function(a,y,x,E){this.nf=this.$a,fn.prototype.eh.call(this,a,y,x,E)},Pt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof en||y.Va()}),fn.prototype.Va.call(this)},Pt.si=function(){if(!fn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof fn){if(y.isVisible()&&ia(y))return!1}else if(y instanceof en&&y.isVisible()&&ia(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ov(a,y){if(a.Gn.add(y)){y instanceof Ti&&a.gl.add(y);var x=a.memberAdded;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!1)}y instanceof en&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function sv(a,y){if(a.Gn.remove(y)){y instanceof Ti&&a.gl.remove(y);var x=a.memberRemoved;if(x!==null){var E=!0,b=a.diagram;b!==null&&(E=b.aa,b.aa=!0),x(a,y),b!==null&&(b.aa=E)}a.isVisible()&&a.isSubGraphExpanded||y.Zb(!0)}y instanceof en&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Pt.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}fn.prototype.Lj.call(this)},Ti.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Ie(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},Ti.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Ie(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},Ti.prototype.canUngroup=function(){if(!this.ungroupable)return!1;var a=this.layer;return a===null||!a.allowUngroup?!1:(a=a.diagram,!!(a===null||a.allowUngroup))},Pt=Ti.prototype,Pt.Bd=function(a){var y=(this.U&65536)!==0;if(fn.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var E=x.fromNode;E!==null&&E!==this&&E.Td(this)&&!E.isVisible()?(pl(x.fromPort),pl(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(pl(x.fromPort),pl(x.toPort),x.bb()))}}},Pt.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new le,E=y.iterator;E.next();){var b=E.value;if(b instanceof fn)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Pt.iz=function(){var a=this.Rj();a.add(this);for(var y=new le,x=a.iterator;x.next();){var E=x.value;if(E instanceof fn)for(E=E.linksConnected;E.next();){var b=E.value,z=b.fromNode;z===null||a.contains(z)&&z!==this||y.add(z),b=b.toNode,b===null||a.contains(b)&&b!==this||y.add(b)}}return y.iterator},Pt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new le;return a(this,y),y},Pt.Rj=function(){var a=new le;return qc(a,this,!0,0,!0),a.remove(this),a},Pt.Zb=function(a){fn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},Ti.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();qy(this,y,a,this),a.Ue=!1}};function qy(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof Ti&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,qy(z,y,x,E)),z instanceof fn)z.Bd(y),x.Aj(z,E);else if(z instanceof en)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}Ti.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$y(this,y,a,this),a.Ue=!1}};function $y(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof Ti&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,$y(z,y,x,E)),z instanceof fn)z.Bd(y),x.Cj(z,E);else if(z instanceof en)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}Ti.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=Ht.alloc(),fn.prototype.move.call(this,a,y),a=new le,y=this.Rj().iterator;y.next();)b=y.value,b instanceof en&&(b.suspendsRouting&&a.add(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(b.suspendsRouting=!0);for(y.reset();y.next();)if(b=y.value,!(b.ph()||b instanceof fn&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof en&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),lv(b)&&b.bb());Ht.free(z)}},Ze.Object.defineProperties(Ti.prototype,{placeholder:{get:function(){return this.$a}},computesBoundsAfterDrag:{get:function(){return(this.U&2048)!==0},set:function(a){var y=(this.U&2048)!==0;y!==a&&(this.U^=2048,this.g("computesBoundsAfterDrag",y,a))}},computesBoundsIncludingLinks:{get:function(){return(this.U&4096)!==0},set:function(a){var y=(this.U&4096)!==0;y!==a&&(this.U^=4096,this.g("computesBoundsIncludingLinks",y,a))}},computesBoundsIncludingLocation:{get:function(){return(this.U&8192)!==0},set:function(a){var y=(this.U&8192)!==0;y!==a&&(this.U^=8192,this.g("computesBoundsIncludingLocation",y,a))}},handlesDragDropForMembers:{get:function(){return(this.U&16384)!==0},set:function(a){var y=(this.U&16384)!==0;y!==a&&(this.U^=16384,this.g("handlesDragDropForMembers",y,a))}},memberParts:{get:function(){return this.Gn.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;if(y!==a){a!==null&&a.diagram!==null&&a.diagram.layout===a&&Yt("A layout cannot be both the Diagram.layout and a Group.layout: "+a),y!==null&&(y.diagram=null,y.group=null),this.Sc=a;var x=this.diagram;a!==null&&(a.diagram=x,a.group=this),x!==null&&(x.xh=!0),this.g("layout",y,a),x!==null&&x.$b()}}},memberAdded:{get:function(){return this.Ba!==null?this.Ba.Mq:null},set:function(a){var y=this.memberAdded;y!==a&&(hc(this),this.Ba.Mq=a,this.g("memberAdded",y,a))}},memberRemoved:{get:function(){return this.Ba!==null?this.Ba.Nq:null},set:function(a){var y=this.memberRemoved;y!==a&&(hc(this),this.Ba.Nq=a,this.g("memberRemoved",y,a))}},memberValidation:{get:function(){return this.Ba!==null?this.Ba.ij:null},set:function(a){var y=this.memberValidation;y!==a&&(hc(this),this.Ba.ij=a,this.g("memberValidation",y,a))}},ungroupable:{get:function(){return(this.U&256)!==0},set:function(a){var y=(this.U&256)!==0;y!==a&&(this.U^=256,this.g("ungroupable",y,a))}},isSubGraphExpanded:{get:function(){return(this.U&512)!==0},set:function(a){var y=(this.U&512)!==0;if(y!==a){this.U^=512;var x=this.diagram;if(this.g("isSubGraphExpanded",y,a),y=this.subGraphExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?(this.$a!==null&&this.$a.v(),this.memberParts.each(function(b){b.updateAdornments()})):a?this.expandSubGraph():this.collapseSubGraph()}}},wasSubGraphExpanded:{get:function(){return(this.U&1024)!==0},set:function(a){var y=(this.U&1024)!==0;y!==a&&(this.U^=1024,this.g("wasSubGraphExpanded",y,a))}},subGraphExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Kr:null},set:function(a){var y=this.subGraphExpandedChanged;y!==a&&(hc(this),this.Ba.Kr=a,this.g("subGraphExpandedChanged",y,a))}},rh:{get:function(){return(this.U&32768)!==0},set:function(a){(this.U&32768)!==0!==a&&(this.U^=32768)}}}),Ti.prototype.expandSubGraph=Ti.prototype.expandSubGraph,Ti.prototype.collapseSubGraph=Ti.prototype.collapseSubGraph,Ti.prototype.findSubGraphParts=Ti.prototype.Rj,Ti.prototype.findContainingGroupChain=Ti.prototype.hz,Ti.prototype.findExternalNodesConnected=Ti.prototype.iz,Ti.prototype.findExternalLinksConnected=Ti.prototype.Lu,Ti.prototype.ensureBounds=Ti.prototype.Va,Ti.className="Group";function Ma(a){oe.call(this),this.yb=Wa,this.ko=new be(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Te(Ma,oe),Ma.prototype.cloneProtected=function(a){oe.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ma.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ro(0,0,y.width,y.height,a.x,a.y)},Ma.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof Ti||a instanceof vr)||Yt("Placeholder is not inside a Group or Adornment."),a instanceof Ti){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(co(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=Ht.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Ht.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof Oi&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,at=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==Ve.Link&&(rt=z.ga(a.category==="Selection"?dr:a.locationSpot,Ht.alloc()),a.location=rt,Ht.free(rt)),isNaN(at)||isNaN(tt)?(a=z.ga(dr,Ht.alloc()),at=be.allocAt(a.x,a.y,0,0),at.Ye(z.ga(Go,a)),at.Ye(z.ga(Dr,a)),at.Ye(z.ga(ea,a)),co(y,at.width+E||0,at.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Ht.free(a),be.free(at)):(co(y,at+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ma.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Ma.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof Ti&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=be.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof Ti&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),be.free(x),E&&y instanceof Ti&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ma.prototype.computeMemberBounds=function(a){if(!(this.part instanceof Ti))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var rt=tt.value;if(rt.isVisible()){if(rt instanceof en&&(!y.computesBoundsIncludingLinks||tl(rt)||rt.fromNode===y||rt.toNode===y))continue;rt=rt.actualBounds,rt.left<x&&(x=rt.left),rt.top<E&&(E=rt.top),rt.right>b&&(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},Ze.Object.defineProperties(Ma.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Xi(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ma.className="Placeholder";function en(a){ei.call(this,Ve.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ka,this.Om=0,this.Qm=ka,this.Rm=NaN,this.qj=hv,this.po=.5,this.wd=null,this.Nb=new _t().freeze(),this.Tg=this.Mg=null,this.ml=new be,this.ua=new qe,this.u=this.o=this.Sf=this.Wf=null,this.su=new Ht,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Te(en,ei),en.prototype.cloneProtected=function(a){ei.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())},Pt=en.prototype,Pt.Af=function(a){ei.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&&pl(y),a=a.toPort,a!==null&&pl(a)},Pt.qb=function(a){a.classType===en?(a.value&2)===2?this.routing=a:a===kl||a===fc||a===Lg?this.curve=a:a===dp||a===E0||a===M0?this.adjusting=a:a!==hv&&a!==ka&&Yt("Unknown Link enum value for a Link property: "+a):ei.prototype.qb.call(this,a)},Pt.Xc=function(){this.ba===null&&(this.ba=new Td)},Pt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),ia(a)||Zc(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),ia(a)||Zc(a)))},Pt.zv=function(){return!1},Pt.Av=function(){},Pt.Zc=function(){return!1},en.prototype.computeAngle=function(a,y,x){return en.computeAngle(y,x)},en.computeAngle=function(a,y){switch(a){default:case ka:a=0;break;case gp:a=y;break;case pp:a=y+90;break;case mp:a=y-90;break;case cv:a=y+180;break;case k0:a=se.bp(y),90<a&&270>a&&(a-=180);break;case vp:a=se.bp(y+90),90<a&&270>a&&(a-=180);break;case yp:a=se.bp(y-90),90<a&&270>a&&(a-=180);break;case b0:if(a=se.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return se.bp(a)};function Pg(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&&sv(x,a),a.Ah=y,y!==null&&ov(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}Pt=en.prototype,Pt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&ei.prototype.oh.call(this)},Pt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Pt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function tw(a,y){a.wd===null&&(a.wd=new le),a.wd.add(y),a.v()}Pt.Vo=function(a){if(ei.prototype.Vo.call(this,a),Xf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,w0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||w0(x,this,E)}cp(this)}},Pt.Wo=function(a){if(ei.prototype.Wo.call(this,a),Xf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,S0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||S0(x,this,E)}fp(this)}},Pt.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))},en.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},en.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?ei.prototype.move.call(this,a,!1):(a=Ht.allocAt(x.x+E,x.y+b),ei.prototype.move.call(this,a,!1),Ht.free(a)),cc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},en.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},en.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},en.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ei),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()===kl))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()===kl){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;E<x/2&&z<y&&(b=tt[z],!(E+b>x/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},en.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()===kl))return this.ua.wx(.5);if(this.computeCurve()===kl&&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(0<x&&x+1<a)return this.i(x-1).ab(this.i(x+1))}y=this.flattenedLengths,E=this.flattenedTotalLength;var b=0;x=0;for(var z;b<E/2&&x<a&&(z=y[x],!(b+z>E/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(0<x&&x+2<a)return this.i(x-1).ab(this.i(x+2))}else{if(1>Math.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)},Pt=en.prototype,Pt.i=function(a){return this.Nb.s[a]},Pt.dd=function(a,y){this.Nb.cd(a,y)},Pt.L=function(a,y,x){this.Nb.cd(a,new Ht(y,x))},Pt.Kz=function(a,y){this.Nb.Gb(a,y)},Pt.m=function(a,y,x){this.Nb.Gb(a,new Ht(y,x))},Pt.ne=function(a){this.Nb.add(a)},Pt.yf=function(a,y){this.Nb.add(new Ht(a,y))},Pt.pv=function(a){this.Nb.mb(a)},Pt.Fj=function(){this.Nb.clear()};function cc(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 _t,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Ht(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),es(a)),E?B0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&sh(tt.animationManager,a,b),a.g("points",z,b)}}Pt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Pt.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;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,at=ot.length,At=0;At<at;At++){var ft=ot[At];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),at===z){for(z=0;z<at;z++)if(At=b[z],ft=ot[z],At.x-x!==ft.x-tt||At.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&sh(x.animationManager,this,y),B0(this),this.g("points",a,y)}},Pt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function B0(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),L0(a,!1))}Pt.bb=function(){if(!this.suspendsRouting){var a=this.diagram;if(a){if(a.As.contains(this)||a.undoManager.isUndoingRedoing||(a=a.animationManager,a.isTicking&&!a.isAnimating))return;this.Tg===null||a.isTicking||(this.Tg=null)}a=this.path,a!==null&&(this.fd=!1,this.v(),a.v())}},Pt.vg=function(){if(!this.fd&&!this.computingPoints){var a=!0;try{this.computingPoints=!0,this.uh(),a=this.computePoints()}catch(y){this.computingPoints=!1,this.rv()}finally{this.computingPoints=!1,a?this.zf():this.rv()}}},en.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Rd||(Rd=new fn,Rd.desiredSize=er,Rd.Va()),this.defaultFromPoint&&(Rd.location=this.defaultFromPoint,Rd.Va(),y=a=Rd)):y=this.fromPort,y!==null&&!a.isVisible()){var x=a.findVisibleNode();x!==null&&x!==a?(a=x,y=x.port):a=x}if(this.Lw=a,a===null||!a.location.w())return!1;for(;!(y===null||y.actualBounds.w()&&y.Ed());)y=y.panel;if(y===null)return!1;var E=this.toNode,b=null;if(E===null?(Gd||(Gd=new fn,Gd.desiredSize=er,Gd.Va()),this.defaultToPoint&&(Gd.location=this.defaultToPoint,Gd.Va(),b=E=Gd)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var rt=Fg(tt),ot=Fg(x),at=y===b&&y!==null,At=this.isOrthogonal,ft=this.curve===kl;this.Wf=at&&!At?ft=!0:!1;var pt=this.computeAdjusting()===ka||at;if(!At&&!at&&rt&&ot){if(rt=!1,!pt&&3<=z&&(pt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,pt,z-1,ot))&&(pt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,pt,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),pt=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=pt.x-z.x,ot=pt.y-z.y,at=this.computeCurviness(),ft=At=0;var xt=z.x+rt/3,Ct=z.y+ot/3,Mt=xt,Gt=Ct;se.B(ot,0)?Gt=0<rt?Gt-at:Gt+at:(At=-rt/ot,ft=Math.sqrt(at*at/(At*At+1)),0>at&&(ft=-ft),Mt=(0>ot?-1:1)*ft+xt,Gt=At*(Mt-xt)+Ct),xt=z.x+2*rt/3,Ct=z.y+2*ot/3;var Ot=xt,Wt=Ct;se.B(ot,0)?Wt=0<rt?Wt-at:Wt+at:(Ot=(0>ot?-1:1)*ft+xt,Wt=At*(Ot-xt)+Ct),this.Fj(),this.ne(z),this.yf(Mt,Gt),this.yf(Ot,Wt),this.ne(pt),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,pt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,pt),b=this.getLinkPoint(z,pt,x,!1,!1,a,y),this.hasCurviness()?(pt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+pt/2,y=E.y+x/2,z=a,rt=y,se.B(x,0)?rt=0<pt?rt-tt:rt+tt:(pt=-pt/x,z=Math.sqrt(tt*tt/(pt*pt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=pt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=be.alloc(),y.mi(rt),ot=rt.ca(b),pt.mi(rt),at=rt.ca(E),(ot||at)&&(tt=y.ga(P0(tt),new Ht),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=pt.ga(P0(x),new Ht),this.dd(1,this.getLinkPointFromPoint(z,pt,x,E,!1,x))),be.free(rt))}else{ft=this.isAvoiding,pt&&(At&&ft||at)&&this.Fj();var Zt=at?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,At,E,b),xt=Mt=Ct=0,(At||!rt||at)&&(Gt=this.computeEndSegmentLength(a,y,tt,!0),xt=this.getLinkDirection(a,y,ft,tt,!0,At,E,b),at&&(rt||tt.D(x)||!At&&tt.x+x.x===1&&tt.y+x.y===1)&&(xt-=At?90:30,0>Zt&&(xt-=180)),0>xt?xt+=360:360<=xt&&(xt-=360),at&&(Gt+=Math.abs(Zt)*(At?1:2)),xt===0?Ct=Gt:xt===90?Mt=Gt:xt===180?Ct=-Gt:xt===270?Mt=-Gt:(Ct=Gt*Math.cos(xt*Math.PI/180),Mt=Gt*Math.sin(xt*Math.PI/180)),tt.Mc()&&at&&(Gt=y.ga(Ui,Ht.alloc()),Ot=Ht.allocAt(Gt.x+1e3*Ct,Gt.y+1e3*Mt),this.getLinkPointFromPoint(a,y,Gt,Ot,!0,ft),Ht.free(Gt),Ht.free(Ot))),Gt=this.getLinkPoint(E,b,x,!1,At,a,y);var te=Wt=Ot=0;if(At||!ot||at){var re=this.computeEndSegmentLength(E,b,x,!1);te=this.getLinkDirection(E,b,Gt,x,!1,At,a,y),at&&(ot||tt.D(x)||!At&&tt.x+x.x===1&&tt.y+x.y===1)&&(te+=At?0:30,0>Zt&&(te+=180)),0>te?te+=360:360<=te&&(te-=360),at&&(re+=Math.abs(Zt)*(At?1:2)),te===0?Ot=re:te===90?Wt=re:te===180?Ot=-re:te===270?Wt=-re:(Ot=re*Math.cos(te*Math.PI/180),Wt=re*Math.sin(te*Math.PI/180)),x.Mc()&&at&&(x=b.ga(Ui,Ht.alloc()),tt=Ht.allocAt(x.x+1e3*Ot,x.y+1e3*Wt),this.getLinkPointFromPoint(E,b,x,tt,!1,Gt),Ht.free(x),Ht.free(tt))}x=ft,(At||!rt||at)&&(x=new Ht(ft.x+Ct,ft.y+Mt)),tt=Gt,(At||!ot||at)&&(tt=new Ht(Gt.x+Ot,Gt.y+Wt)),!pt&&!At&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,Gt):!pt&&!At&&ot&&3<z&&this.adjustPoints(1,x,z-1,Gt)?this.dd(0,ft):!pt&&(At?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,Gt)):(this.Fj(),this.ne(ft),(At||!rt||at)&&this.ne(x),At&&this.addOrthoPoints(x,xt,tt,te,a,E),(At||!ot||at)&&this.ne(tt),this.ne(Gt))}return!0};function av(a,y){return Math.abs(y.x-a.x)>Math.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}en.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Ht),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,ot=-a.m21*b,at=a.m11*b,At=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*ot+At,E=E.x*rt+E.y*at+ft,tt=x.x*tt+x.y*ot+At,x=x.x*rt+x.y*at+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function C0(a,y){var x=y.Zn;return x===null&&(x=new zd,x.port=y,x.node=y.part,y.Zn=x),lw(x,a)}en.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Ht),x.sb()&&!Fg(x))return y.ga(x,rt),rt;if(x.$c()){var ot=C0(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===nw){var at=C0(this,tt);if(at!==null&&ot.Gl<at.Gl){ot=Ht.alloc(),at=Ht.alloc();var At=new be(y.ga(dr,ot),y.ga(Go,at)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,at),(x.Hf(bs)||x.Hf(ca))&&a.y>=At.y&&a.y<=At.y+At.height?rt.y=a.y:(x.Hf(_s)||x.Hf(Ws))&&a.x>=At.x&&a.x<=At.x+At.width&&(rt.x=a.x),Ht.free(ot),Ht.free(at)}}return rt}}return x=y.ga(P0(x),Ht.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=av(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=Ht.alloc(),tt=tt.ga(P0(ot),z),b&&(tt=av(x,tt)),Ht.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Ht.free(x),rt},en.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=C0(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(Ui,Ht.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?av(ot,rt.copy()):x):(x=Ht.alloc(),rt=rt.ga(Ui,x),Ht.free(x)),x=Math.abs(rt.x-ot.x)>Math.abs(rt.y-ot.y)?rt.x>=ot.x?0:180:rt.y>=ot.y?90:270,Ht.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),Fg(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},en.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=C0(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)},en.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Ui:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===is?$i:y)):(a=y||this.toPort,a===null?a=Ui:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===is?$i:y)),a};function Fg(a){return a===$i||a.x===.5&&a.y===.5}function P0(a){return a.x===.5&&a.y===.5?a:Ui}en.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ka&&4<this.pointsCount?this.computeMidPoint(new Ht):(a=y.Zn,a=a!==null?lw(a,this):null,a!==null?a.Zo:y.ga(Ui))},en.prototype.computeShortLength=function(a){if(a){if(a=this.fromShortLength,isNaN(a)){var y=this.fromPort;y!==null&&(a=y.fromShortLength)}return isNaN(a)?0:a}return a=this.toShortLength,isNaN(a)&&(y=this.toPort,y!==null&&(a=y.toShortLength)),isNaN(a)?0:a},en.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=Fi.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return bm(this,y,x,b),z===void 0&&Fi.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,at=ot.length;at--;){var At=ot[at];if(At.visible||At===this.locationObject){var ft=At.actualBounds,pt=this.naturalBounds;if(!(ft.x>pt.width||ft.y>pt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=Fi.alloc(),ft.set(tt),At instanceof Ve)rt=At.Cf(a,y,x,E,b,ft);else if(this.path===At){if(At instanceof Oi)if(rt=a,pt=E,At.pickable===!1)rt=!1;else if(ft.multiply(At.transform),pt)t:{var xt=rt,Ct=ft;if(At.fh(xt,Ct))rt=!0;else{if(Ct===void 0&&(Ct=At.transform,xt.Re(At.actualBounds))){rt=!0;break t}rt=xt.left,pt=xt.right;var Mt=xt.top;xt=xt.bottom;var Gt=Ht.alloc(),Ot=Ht.alloc(),Wt=Ht.alloc(),Zt=Fi.alloc();Zt.set(Ct),Zt.bv(At.transform),Zt.Vj(),Ot.x=pt,Ot.y=Mt,Ot.transform(Zt),Gt.x=rt,Gt.y=Mt,Gt.transform(Zt),Ct=!1,Wf(At,Gt,Ot,Wt)?Ct=!0:(Gt.x=pt,Gt.y=xt,Gt.transform(Zt),Wf(At,Gt,Ot,Wt)?Ct=!0:(Ot.x=rt,Ot.y=xt,Ot.transform(Zt),Wf(At,Gt,Ot,Wt)?Ct=!0:(Gt.x=rt,Gt.y=Mt,Gt.transform(Zt),Wf(At,Gt,Ot,Wt)&&(Ct=!0)))),Fi.free(Zt),Ht.free(Gt),Ht.free(Ot),Ht.free(Wt),rt=Ct}}else rt=At.fh(rt,ft)}else rt=cs(At,a,E,ft);rt&&(pt=At,y!==null&&(pt=y(At)),pt&&(x===null||x(pt))&&b.add(pt)),Fi.free(ft)}}}return z===void 0&&Fi.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&Fi.free(tt),!1},en.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?kl:this.curve},en.prototype.computeCorner=function(){if(this.curve===kl)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},en.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E];if(b!==a&&!b.isPanelMain&&(b.segmentIndex===-1/0||isNaN(b.segmentIndex)))return b}for(a=this.labelNodes;a.next();)if(y=a.value,y.segmentIndex===-1/0||isNaN(y.segmentIndex))return y;return null},en.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rw;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===gp||E===k0||E===cv?a=Math.max(a,b):E===mp||E===yp||E===pp||E===vp?a=Math.max(a,tt):(y=y.ga(Ui).ab(x.ga(Ui))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===kl&&(a*=1.333)}}return a},en.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===ka&&x.bb()}},en.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iw;var y=this.Sf;if(y!==null){for(var x=bn(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),Ln(x)}}return a},en.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},en.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},en.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===E0)return!1;b===M0&&(b=dp)}switch(b){case E0:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var rt=tt.x-b,ot=tt.y-z,at=Math.sqrt(rt*rt+ot*ot);if(!se.$(at,0)){if(se.$(rt,0))var At=0>ot?-Math.PI/2:Math.PI/2;else At=Math.atan(ot/Math.abs(rt)),0>rt&&(At=Math.PI-At);tt=y.x;var ft=y.y;rt=E.x-tt;var pt=E.y-ft;for(ot=Math.sqrt(rt*rt+pt*pt),se.$(rt,0)?pt=0>pt?-Math.PI/2:Math.PI/2:(pt=Math.atan(pt/Math.abs(rt)),0>rt&&(pt=Math.PI-pt)),at=ot/at,At=pt-At,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),rt=y.x-b,ot=y.y-z,y=Math.sqrt(rt*rt+ot*ot),se.$(y,0)||(se.$(rt,0)?ot=0>ot?-Math.PI/2:Math.PI/2:(ot=Math.atan(ot/Math.abs(rt)),0>rt&&(ot=Math.PI-ot)),rt=ot+At,y*=at,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case M0: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,at=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,At=y.y,ot=E.x,pt=E.y;var xt=1;if(ot-rt!==0){var Ct=(pt-At)/(ot-rt);xt=Math.sqrt(1+1/(Ct*Ct))}else Ct=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Mt=y.x,Gt=y.y,Ot=.5;at!==0&&(Ot=((b-Mt)*(b-tt)+(z-Gt)*(z-ft))/at);var Wt=b+Ot*(tt-b),Zt=z+Ot*(ft-z);y=Math.sqrt((Mt-Wt)*(Mt-Wt)+(Gt-Zt)*(Gt-Zt)),Gt<Ct*(Mt-Wt)+Zt&&(y=-y),0<Ct&&(y=-y),Mt=rt+Ot*(ot-rt),Ot=At+Ot*(pt-At),Ct!==0?(y=Mt+y/xt,this.L(a,y,Ot-(y-Mt)/Ct)):this.L(a,Mt,Ot+y)}this.dd(x,E)}return!0;case dp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,At=z.y,ft=rt,at=At,se.B(b.y,z.y)?se.B(z.x,tt.x)?At=y.y:se.B(z.y,tt.y)&&(rt=y.x):se.B(b.x,z.x)&&(se.B(z.y,tt.y)?rt=y.x:se.B(z.x,tt.x)&&(At=y.y)),this.L(a+1,rt,At),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,At=z.y,ot=rt,pt=At,se.B(b.y,z.y)?se.B(z.x,tt.x)?At=E.y:se.B(z.y,tt.y)&&(rt=E.x):se.B(b.x,z.x)&&(se.B(z.y,tt.y)?rt=E.x:se.B(z.x,tt.x)&&(At=E.y)),this.L(x-1,rt,At),lv(this))){this.L(a+1,ft,at),this.L(x-1,ot,pt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},en.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?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(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(wp,wp),ot.Bc(wp,wp),rt.Ye(a),ot.Ye(x);var at=Ht.alloc(),At=Ht.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),E===180?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),At.x=at.x,At.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(at.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,At.x=at.x,At.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(at.x=a.x,at.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),At.y=at.y)):(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?at.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(at.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),At.x=x.x,At.y=at.y),at.y>rt.top&&at.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(at.h(Math.max((a.x+x.x)/2,a.x),a.y),At.h(at.x,x.y)):(at.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),At.x=x.x,At.y=at.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),E===0?(at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),At.x=at.x,At.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(at.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,At.x=at.x,At.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(at.x=a.x,at.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),At.y=at.y)):(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?at.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(at.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),At.x=x.x,At.y=at.y),at.y>rt.top&&at.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(at.h(Math.min((a.x+x.x)/2,a.x),a.y),At.h(at.x,x.y)):(at.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),At.x=x.x,At.y=at.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),E===270?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),At.x=x.x,At.y=at.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(at.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,At.x=x.x,At.y=at.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(at.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),at.y=a.y,At.x=at.x)):(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?at.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(at.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),At.x=at.x,At.y=x.y),at.x>rt.left&&at.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(at.h(a.x,Math.max((a.y+x.y)/2,a.y)),At.h(x.x,at.y)):(at.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),At.x=at.x,At.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(at.h(a.x,x.y),At.h((a.x+x.x)/2,x.y),E===90?(at.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),At.x=x.x,At.y=at.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(at.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,At.x=x.x,At.y=at.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(at.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),at.y=a.y,At.x=at.x)):(at.h(x.x,a.y),At.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?at.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?at.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(at.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),At.x=at.x,At.y=x.y),at.x>rt.left&&at.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(at.h(a.x,Math.min((a.y+x.y)/2,a.y)),At.h(x.x,at.y)):(at.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),At.x=at.x,At.y=x.y)));var ft=x;if(this.isAvoiding){var pt=this.diagram;if(pt===null||b===z||this.layer.isTemporary||!Df(pt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var xt=Wc(pt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&xt.Yj(Math.min(a.x,at.x),Math.min(a.y,at.y),Math.abs(a.x-at.x),Math.abs(a.y-at.y))&&xt.Yj(Math.min(at.x,At.x),Math.min(at.y,At.y),Math.abs(at.x-At.x),Math.abs(at.y-At.y))&&xt.Yj(Math.min(At.x,ft.x),Math.min(At.y,ft.y),Math.abs(At.x-ft.x),Math.abs(At.y-ft.y)))y=!1;else{b=a,z=ft;var Ct=x=null;if(pt.isVirtualized){pt=xt.bounds.copy(),pt.Bc(-xt.Ho,-xt.Go);var Mt=Ht.alloc();Eg(xt,a.x,a.y)||(se.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,a.x,a.y,at.x,at.y,Mt)?(x=a=Mt.copy(),y=Mt.ab(at)):se.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,at.x,at.y,At.x,At.y,Mt)?(x=a=Mt.copy(),y=Mt.ab(At)):se.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,At.x,At.y,ft.x,ft.y,Mt)&&(x=a=Mt.copy(),y=Mt.ab(ft))),Eg(xt,ft.x,ft.y)||(se.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,ft.x,ft.y,At.x,At.y,Mt)?(Ct=ft=Mt.copy(),E=At.ab(Mt)):se.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,At.x,At.y,at.x,at.y,Mt)?(Ct=ft=Mt.copy(),E=at.ab(Mt)):se.Ff(pt.x,pt.y,pt.x+pt.width,pt.y+pt.height,at.x,at.y,a.x,a.y,Mt)&&(Ct=ft=Mt.copy(),E=a.ab(Mt))),Ht.free(Mt)}rt=rt.copy().ed(ot),rt.Bc(xt.Ho*xt.Os,xt.Go*xt.Os),sw(xt,a,y,ft,E,rt,!0),ot=Gu(xt,ft.x,ft.y),!xt.abort&&ot>=Mg&&(ow(xt),rt.Bc(xt.Ho*xt.Hx,xt.Go*xt.Ix),sw(xt,a,y,ft,E,rt,!1),ot=Gu(xt,ft.x,ft.y)),!xt.abort&&ot<Mg&&Gu(xt,ft.x,ft.y)!==dc?(Av(this,xt,ft.x,ft.y,E,!0,tt),rt=this.i(2),4>this.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)<=xt.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)<=xt.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)),Ct!==null&&(E===0||E===180?this.yf(z.x,Ct.y):this.yf(Ct.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(at.copy()),this.ne(At.copy())),Ht.free(at),Ht.free(At)}},en.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 lv(a){if(a.diagram===null||!a.isAvoiding||!Df(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=Wc(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function Av(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,at=Gu(y,x,E),At=x,ft=E;for(b===0?At+=rt:b===90?ft+=ot:b===180?At-=rt:ft-=ot,b!==tt&&at>Zf&&Gu(y,At,ft)!==at-1&&(Gu(y,x-rt,E)===at-1?(b=180,At=x-rt,ft=E):Gu(y,x+rt,E)===at-1?(b=0,At=x+rt,ft=E):Gu(y,x,E-ot)===at-1?(b=270,At=x,ft=E-ot):Gu(y,x,E+ot)===at-1&&(b=90,At=x,ft=E+ot));at>Zf&&Gu(y,At,ft)===at-1;)x=At,E=ft,b===0?At+=rt:b===90?ft+=ot:b===180?At-=rt:ft-=ot,--at;z?at>Zf&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),at>Zf&&(z=b,tt=x,At=E,b===0?(z=90,At+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,At-=ot):b===270&&(z=0,tt+=rt),Gu(y,tt,At)===at-1?Av(a,y,tt,At,z,!1,z):(tt=x,At=E,b===0?(z=270,At-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,At+=ot):b===270&&(z=180,tt-=rt),Gu(y,tt,At)===at-1&&Av(a,y,tt,At,z,!1,z))),a.yf(x,E)}en.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=ti(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var rt=ti(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},en.prototype.qc=function(){this.lk=!1,this.v()},en.prototype.Ul=function(a){if(!(!a&&(this.fd===!1||(a=this.Pb(),this.lk&&(a===null||a.geometry!==null))))&&(2>this.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<x;E++){var b=y[E];b!==a&&b.isPanelMain&&b instanceof Oi&&(b.ua=this.ua)}}},en.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&Xf(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===kl&&3<=y&&!se.$(this.smoothness,0))if(y===3){var rt=this.i(1);E=Math.min(b.x,rt.x);var ot=Math.min(b.y,rt.y);rt=this.i(2),E=Math.min(E,rt.x),ot=Math.min(ot,rt.y)}else{if(this.isOrthogonal)for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),ot=this.i(E),z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,ot=z.y}else{for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,ot=z.y}if(E-=this.su.x,ot-=this.su.y,b.x-=E,b.y-=ot,y!==2||Xf(this)){if(a.type=qe.o,rt=by(a),this.computeShortLength(!0)!==0&&(b=Od(this,b,!0,z)),Cg(rt,b.x,b.y,!1),tt===kl&&3<=y&&!se.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-ot,b=this.i(2).copy(),b.x-=E,b.y-=ot,this.computeShortLength(!1)!==0&&(b=Od(this,b,!1,z)),Ac(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Ht.allocAt(E,ot),x=Ht.alloc(),x.assign(this.i(1)),z=Ht.allocAt(E,ot),b=Ht.allocAt(E,ot),tt=this.i(0);for(var at,At=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){at=this.i(ft);var pt=tt,xt=at,Ct=this.i(uv(this,at,ft,!1));if((!se.$(pt.x,xt.x)||!se.$(xt.x,Ct.x))&&(!se.$(pt.y,xt.y)||!se.$(xt.y,Ct.y))){var Mt=At;isNaN(Mt)&&(Mt=this.smoothness/3);var Gt=pt.x;pt=pt.y;var Ot=xt.x;xt=xt.y;var Wt=Ct.x;Ct=Ct.y;var Zt=Mt*F0(Gt,pt,Ot,xt);Mt*=F0(Ot,xt,Wt,Ct),se.$(pt,xt)&&se.$(Ot,Wt)&&(Ot>Gt?Ct>xt?(z.x=Ot-Zt,z.y=xt-Zt,b.x=Ot+Mt,b.y=xt+Mt):(z.x=Ot-Zt,z.y=xt+Zt,b.x=Ot+Mt,b.y=xt-Mt):Ct>xt?(z.x=Ot+Zt,z.y=xt-Zt,b.x=Ot-Mt,b.y=xt+Mt):(z.x=Ot+Zt,z.y=xt+Zt,b.x=Ot-Mt,b.y=xt-Mt)),se.$(Gt,Ot)&&se.$(xt,Ct)&&(xt>pt?(Wt>Ot?(z.x=Ot-Zt,z.y=xt-Zt,b.x=Ot+Mt):(z.x=Ot+Zt,z.y=xt-Zt,b.x=Ot-Mt),b.y=xt+Mt):(Wt>Ot?(z.x=Ot-Zt,z.y=xt+Zt,b.x=Ot+Mt):(z.x=Ot+Zt,z.y=xt+Zt,b.x=Ot-Mt),b.y=xt-Mt)),(se.$(Gt,Ot)&&se.$(Ot,Wt)||se.$(pt,xt)&&se.$(xt,Ct))&&(Gt=.5*(Gt+Wt),pt=.5*(pt+Ct),z.x=Gt,z.y=pt,b.x=Gt,b.y=pt),(ft===1||ft===2&&se.$(tt.x,this.i(0).x)&&se.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+at.x),x.y=.5*(tt.y+at.y)),Ac(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,at.x-E,at.y-ot),y.set(z),x.set(b),tt=at}}at=tt.x,tt=tt.y,At=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(At=Od(this,At.copy(),!1,Ii)),at=.5*(at+At.x),tt=.5*(tt+At.y),Ac(rt,b.x-E,b.y-ot,at-E,tt-ot,At.x-E,At.y-ot),Ht.free(y),Ht.free(x),Ht.free(z),Ht.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=Od(this,tt.copy(),!1,Ii)),Ac(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Ht.alloc(),z.assign(this.i(0)),b=Ht.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,at=0;ft<y;){if(ft=uv(this,z,ft,1<ft),At=this.i(ft),ft>=y-1){if(!z.D(At))this.computeShortLength(!1)!==0&&(At=Od(this,At.copy(),!1,Ii)),Hd(this,rt,-E,-ot,z,At,x);else if(at===0)for(ft=1;ft<y;)b.assign(z),At=this.i(ft++),Hd(this,rt,-E,-ot,z,At,x),z.assign(At);break}if(at=uv(this,At,ft+1,ft<y-3),ft=-E,Gt=-ot,pt=At,Ot=this.i(at),Mt=x,se.B(z.y,pt.y)&&se.B(pt.x,Ot.x))if(Ct=Math.min(tt,Math.abs(pt.x-b.x)/2),Ct=Zt=Math.min(Ct,Math.abs(Ot.y-pt.y)/2),se.B(Ct,0))Hd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt);else{var te=pt.x,re=pt.y;xt=te,Wt=re,pt.x>z.x?te=pt.x-Ct:te=pt.x+Ct,Ot.y>pt.y?Wt=pt.y+Zt:Wt=pt.y-Zt,Ot=Ht.allocAt(te,re),Hd(this,rt,ft,Gt,z,Ot,Mt),Ht.free(Ot),p0(rt,pt.x+ft,pt.y+Gt,xt+ft,Wt+Gt),z.h(xt,Wt)}else se.B(z.x,pt.x)&&se.B(pt.y,Ot.y)?(Ct=Math.min(tt,Math.abs(pt.y-b.y)/2),Ct=Zt=Math.min(Ct,Math.abs(Ot.x-pt.x)/2),se.B(Zt,0)?(Hd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt)):(te=pt.x,re=pt.y,xt=te,Wt=re,pt.y>z.y?re=pt.y-Ct:re=pt.y+Ct,Ot.x>pt.x?xt=pt.x+Zt:xt=pt.x-Zt,Ot=Ht.allocAt(te,re),Hd(this,rt,ft,Gt,z,Ot,Mt),Ht.free(Ot),p0(rt,pt.x+ft,pt.y+Gt,xt+ft,Wt+Gt),z.h(xt,Wt))):(Hd(this,rt,ft,Gt,z,pt,Mt),z.assign(pt));b.assign(At),ft=at}Ht.free(z)}m0=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=Od(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=Od(this,rt,!1,z)),a.type=qe.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function F0(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 Od(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=F0(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=F0(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 uv(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}en.prototype.computeJumpLength=function(){return 10};function Hd(a,y,x,E,b,z,tt){if(!tt&&Xf(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],at=0;if(a.isVisible()&&(at=P1(a,b,z,ot)),0<at){if(se.B(b.y,z.y))if(b.x<z.x)for(var At=0;At<at;){var ft=Math.max(b.x,Math.min(ot[At++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var pt=ft+x,xt=Math.min(ft+tt,z.x);At<at&&(ft=ot[At],ft<xt+tt);)At++,xt=Math.min(ft+rt,z.x);ft=z.y-tt+E,xt+=x;var Ct=z.y+E;a.curve===fc?Cg(y,xt,Ct,!1):Ac(y,pt,ft,xt,ft,xt,Ct)}else for(--at;0<=at;){for(At=Math.min(b.x,Math.max(ot[at--]+rt,z.x+tt)),y.lineTo(At+x,z.y+E),pt=At+x,ft=Math.max(At-tt,z.x);0<=at&&(At=ot[at],At>ft-tt);)at--,ft=Math.max(At-rt,z.x);At=z.y-tt+E,ft+=x,xt=z.y+E,a.curve===fc?Cg(y,ft,xt,!1):Ac(y,pt,At,ft,At,ft,xt)}else if(se.B(b.x,z.x))if(b.y<z.y)for(At=0;At<at;){for(ft=Math.max(b.y,Math.min(ot[At++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),pt=ft+E,ft=Math.min(ft+tt,z.y);At<at&&(xt=ot[At],xt<ft+tt);)At++,ft=Math.min(xt+rt,z.y);xt=z.x-tt+x,Ct=z.x+x,ft+=E,a.curve===fc?Cg(y,Ct,ft,!1):Ac(y,xt,pt,xt,ft,Ct,ft)}else for(--at;0<=at;){for(At=Math.min(b.y,Math.max(ot[at--]+rt,z.y+tt)),y.lineTo(z.x+x,At+E),pt=At+E,At=Math.max(At-tt,z.y);0<=at&&(ft=ot[at],ft>At-tt);)at--,At=Math.max(ft-rt,z.y);ft=z.x-tt+x,xt=z.x+x,At+=E,a.curve===fc?Cg(y,xt,At,!1):Ac(y,ft,pt,ft,At,xt,At)}}}y.lineTo(z.x+x,z.y+E)}function P1(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;rt<tt;rt++){var ot=z[rt];if(ot instanceof en){if(ot===a)return 0<E.length&&E.sort(function(At,ft){return At-ft}),E.length;if(ot.isVisible()&&Xf(ot)){var at=ot.routeBounds;at.w()&&a.routeBounds.Yc(at)&&!a.usesSamePort(ot)&&(at=ot.path,at!==null&&at.Ed()&&F1(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(At,ft){return At-ft}),E.length}function F1(a,y,x,E){for(var b=se.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Ht.alloc(),ot=1;ot<z;ot++){var at=E.i(ot);if(ot<z-1){var At=E.i(ot+1);if(tt.y===at.y&&at.y===At.y){if(at.x>tt.x&&At.x>=at.x||at.x<tt.x&&At.x<=at.x)continue}else if(tt.x===at.x&&at.x===At.x&&(at.y>tt.y&&At.y>=at.y||at.y<tt.y&&At.y<=at.y))continue}t:{At=a.x;var ft=a.y,pt=y.x,xt=y.y,Ct=tt.x;tt=tt.y;var Mt=at.x,Gt=at.y;if(se.B(At,pt)){if(!se.B(ft,xt)&&se.B(tt,Gt)&&Math.min(ft,xt)<tt&&Math.max(ft,xt)>tt&&Math.min(Ct,Mt)<At&&Math.max(Ct,Mt)>At&&!se.B(Ct,Mt)){rt.x=At,rt.y=tt,At=!0;break t}}else if(se.B(ft,xt)&&se.B(Ct,Mt)&&Math.min(At,pt)<Ct&&Math.max(At,pt)>Ct&&Math.min(tt,Gt)<ft&&Math.max(tt,Gt)>ft&&!se.B(tt,Gt)){rt.x=Ct,rt.y=ft,At=!0;break t}rt.x=0,rt.y=0,At=!1}At&&(b?x.push(rt.x):x.push(rt.y)),tt=at}Ht.free(rt)}function Xf(a){return a=a.curve,a===Lg||a===fc}function L0(a,y){(y||Xf(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()))}en.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;rt<tt;rt++){var ot=b[rt];ot instanceof en&&(ot===this?z=!0:z&&ew(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof en&&ew(this,rt,a)}}}}};function ew(a,y,x){if(y!==null&&y.lk&&y.fd&&Xf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}en.prototype.usesSamePort=function(a){var y=this.pointsCount,x=a.pointsCount;if(0<y&&0<x){var E=this.i(0),b=a.i(0);if(E.Xa(b)||(y=this.i(y-1),a=a.i(x-1),y.Xa(a)||E.Xa(a)||y.Xa(b)))return!0}else if(this.fromNode===a.fromNode||this.toNode===a.toNode||this.fromNode===a.toNode||this.toNode===a.fromNode)return!0;return!1},en.prototype.isVisible=function(){if(!ei.prototype.isVisible.call(this))return!1;var a=this.containingGroup,y=!0,x=this.diagram;if(x!==null&&(y=x.isTreePathToChildren),x=this.fromNode,x!==null){if(this.isTreeLink&&y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(var E=x;E!==null;){if(E.labeledLink===this)return!0;E=E.containingGroup}if(x=x.findVisibleNode(),x===null||x===a)return!1}if(x=this.toNode,x!==null){if(this.isTreeLink&&!y&&!x.isTreeExpanded)return!1;if(x===a)return!0;for(y=x;y!==null;){if(y.labeledLink===this)return!0;y=y.containingGroup}if(y=x.findVisibleNode(),y===null||y===a)return!1}return!0},en.prototype.Zb=function(a){if(ei.prototype.Zb.call(this,a),a&&L0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},en.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?dp:this.qk};function cp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var at=tt[ot];(at.ef===y&&at.ff===E&&at.uf===x&&at.vf===b||at.ef===x&&at.ff===b&&at.uf===y&&at.vf===E)&&(z===null?z=at:(a===null&&(a=[],a.push(z)),a.push(at)))}if(a!==null){for(z=jy(y,x,E,b),z===null&&(z=new T0(y,E,x,b),zy(y,z),zy(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function fp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Gi(y.links,a),y.Sl()))}en.prototype.ph=function(){return!0},Ze.Object.defineProperties(en.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&S0(y,this,x),fp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&w0(a,this,b),cp(this),this.C(1)),this.g("fromNode",y,a),Pg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&pl(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&pl(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),cp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&S0(y,this,x),fp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&w0(a,this,b),cp(this),this.C(1)),this.g("toNode",y,a),Pg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&pl(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&pl(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),cp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:is},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),(y.$c()||a.$c())&&this.fromNode!==null&&pl(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&wn(a,">= 0",en,"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:is},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&&pl(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&&wn(a,">= 0",en,"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<this.wd.count}},labelNodes:{get:function(){return this.wd===null?xr:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&hp(this.fromNode),this.toNode!==null&&hp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Oi?a:null}},routeBounds:{get:function(){this.vg();var a=this.ml,y=1/0,x=1/0,E=this.pointsCount;if(E===0)a.h(NaN,NaN,0,0);else{if(E===1)E=this.i(0),y=Math.min(E.x,y),x=Math.min(E.y,x),a.h(E.x,E.y,0,0);else if(E===2){E=this.i(0);var b=this.i(1);y=Math.min(E.x,b.x),x=Math.min(E.y,b.y),a.h(E.x,E.y,0,0),a.Ye(b)}else if(this.computeCurve()===kl&&3<=E&&!this.isOrthogonal)if(b=this.i(0),y=b.x,x=b.y,a.h(y,x,0,0),E===3){E=this.i(1),y=Math.min(E.x,y),x=Math.min(E.y,x);var z=this.i(2);y=Math.min(z.x,y),x=Math.min(z.y,x),se.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var rt=this.i(z-1),ot=this.i(z);se.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,ot.x,ot.y,.5,a),y=Math.min(ot.x,y),x=Math.min(ot.y,x),b=ot}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;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Ht)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||B0(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);se.$(E.x,b.x)?(E=b.y-E.y,0>E&&(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;E<x;E++)a+=y[E];this.vt=a}return a}},points:{get:function(){return this.Nb},set:function(a){var y=this.Nb;if(y!==a){var x=null;if(Array.isArray(a)){var E=a.length%2===0;if(E){for(var b=0;b<a.length;b++)if(typeof a[b]!="number"||isNaN(a[b])){E=!1;break}}if(E)for(x=new _t,E=0;E<a.length/2;E++)b=new Ht(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!Ne(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new _t,E=0;E<a.length;E++)b=a[E],x.add(new Ht(b.x,b.y).freeze())}}else if(a instanceof _t)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Yt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),B0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&sh(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Fg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Fg(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(),L0(this,y===fc||y===Lg||a===fc||a===Lg),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(),L0(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)}}}),en.prototype.invalidateOtherJumpOvers=en.prototype.Xo,en.prototype.findClosestSegment=en.prototype.ez,en.prototype.updateRoute=en.prototype.vg,en.prototype.invalidateRoute=en.prototype.bb,en.prototype.rollbackRoute=en.prototype.rv,en.prototype.commitRoute=en.prototype.zf,en.prototype.startRoute=en.prototype.uh,en.prototype.clearPoints=en.prototype.Fj,en.prototype.removePoint=en.prototype.pv,en.prototype.addPointAt=en.prototype.yf,en.prototype.addPoint=en.prototype.ne,en.prototype.insertPointAt=en.prototype.m,en.prototype.insertPoint=en.prototype.Kz,en.prototype.setPointAt=en.prototype.L,en.prototype.setPoint=en.prototype.dd,en.prototype.getPoint=en.prototype.i,en.prototype.getOtherPort=en.prototype.Cz,en.prototype.getOtherNode=en.prototype.To;var Rd=null,Gd=null,hv=new Be(en,"Normal",1),L1=new Be(en,"Orthogonal",2),E1=new Be(en,"AvoidsNodes",6),nw=new Be(en,"AvoidsNodesStraight",7),ka=new Be(en,"None",0),kl=new Be(en,"Bezier",9),fc=new Be(en,"JumpGap",10),Lg=new Be(en,"JumpOver",11),dp=new Be(en,"End",17),E0=new Be(en,"Scale",18),M0=new Be(en,"Stretch",19),gp=new Be(en,"OrientAlong",21),pp=new Be(en,"OrientPlus90",22),mp=new Be(en,"OrientMinus90",23),cv=new Be(en,"OrientOpposite",24),k0=new Be(en,"OrientUpright",25),vp=new Be(en,"OrientPlus90Upright",26),yp=new Be(en,"OrientMinus90Upright",27),b0=new Be(en,"OrientUpright45",28),iw=16,rw=14,wp=8;en.className="Link",en.Normal=hv,en.Orthogonal=L1,en.AvoidsNodes=E1,en.AvoidsNodesStraight=nw,en.None=ka,en.Bezier=kl,en.JumpGap=fc,en.JumpOver=Lg,en.End=dp,en.Scale=E0,en.Stretch=M0,en.OrientAlong=gp,en.OrientPlus90=pp,en.OrientMinus90=mp,en.OrientOpposite=cv,en.OrientUpright=k0,en.OrientPlus90Upright=vp,en.OrientMinus90Upright=yp,en.OrientUpright45=b0,en.EndSegmentStep=8,en.CurvinessStart=iw,en.SpacingMin=rw,en.OrthoShortCut=wp;function T0(a,y,x,E){rn(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}T0.prototype.Sl=function(){if(!this.qq){var a=this.links;0<a.length&&(a=a[0].diagram,a!==null&&(a.ow.add(this),this.Fe=a.undoManager.isUndoingRedoing))}this.qq=!0},T0.prototype.Nv=function(){if(this.qq){this.qq=!1;var a=this.links;if(0<a.length){var y=a[0],x=y.diagram;x=x===null||x.pi&&!this.Fe,this.Fe=!1,y.arrangeBundledLinks(a,x),a.length===1&&(y.Sf=null,a.length=0)}a.length===0&&(a=this.Ds,this!==null&&a.af!==null&&a.af.remove(this),a=this.cv,this!==null&&a.af!==null&&a.af.remove(this))}},T0.className="LinkBundle";function Sp(a){rn(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}Sp.prototype.initialize=function(a){if(!(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<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=fv,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function Eg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Gu(a,y,x){return Eg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):fv}function ow(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=Zf&&(x[E]=fv)}Sp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(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]===dc)return!1}return!0};function zu(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var at=y|0,At=x|0,ft=a.ac[at][At];if(ft>=Zf&&ft<Mg)for(b?At+=E:at+=E,ft+=1;z<=at&&at<=tt&&rt<=At&&At<=ot&&!(ft>=a.ac[at][At]);)a.ac[at][At]=ft,ft+=1,b?At+=E:at+=E;if(at=b?At:at,b)if(0<E)for(x+=E;x<at;x+=E)zu(a,y,x,1,!b,z,tt,rt,ot),zu(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>at;x+=E)zu(a,y,x,1,!b,z,tt,rt,ot),zu(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<at;y+=E)zu(a,y,x,1,!b,z,tt,rt,ot),zu(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>at;y+=E)zu(a,y,x,1,!b,z,tt,rt,ot),zu(a,y,x,-1,!b,z,tt,rt,ot)}}function I0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var at=dc,At=Zf;for(a.ac[y][x]=At;at===dc&&y>z&&y<tt&&x>rt&&x<ot;)At+=1,a.ac[y][x]=At,b?x+=E:y+=E,at=a.ac[y][x]}function N0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var at=dc,At=Mg;for(a.ac[y][x]=At;at===dc&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=At,b?x+=E:y+=E,at=a.ac[y][x]}function sw(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(Eg(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var at=E.x,At=E.y;if(Eg(a,at,At))if(at-=a.Nd,at/=a.rc,At-=a.Od,At/=a.sc,1>=Math.abs(rt-at)&&1>=Math.abs(ot-At))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var pt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,pt-=a.Od,pt/=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)),pt=Math.min(a.ei,Math.max(0,pt|0)),E=a.ac,rt|=0,ot|=0,at|=0,At|=0;var xt=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===dc?(I0(a,rt,ot,xt,x,z,y,ft,pt),I0(a,rt,ot,1,!x,z,y,ft,pt),I0(a,rt,ot,-1,!x,z,y,ft,pt)):I0(a,rt,ot,xt,x,rt,ot,rt,ot),E[at][At]===dc?(N0(a,at,At,b===0||b===90?1:-1,b===90||b===270,z,y,ft,pt),N0(a,at,At,1,!(b===90||b===270),z,y,ft,pt),N0(a,at,At,-1,!(b===90||b===270),z,y,ft,pt)):N0(a,at,At,xt,x,at,At,at,At),x=bn(),tt&&aw(a,at,At,b,rt,ot,x))for((x[0]!==at||x[1]!==At)&&(x.unshift(At),x.unshift(at)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=Zf,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],at=x[z+1];y>b?b++:y<b?b--:at>tt?tt++:at<tt&&tt--,E[b][tt]=a++,b!==y||tt!==at;);else zu(a,rt,ot,1,!1,z,y,ft,pt),zu(a,rt,ot,-1,!1,z,y,ft,pt),zu(a,rt,ot,1,!0,z,y,ft,pt),zu(a,rt,ot,-1,!0,z,y,ft,pt);Ln(x)}}}}function aw(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,at=x;;){if(ot===b&&at===z)return!0;var At=ot,ft=at;if(E===0)if(At<b)At++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(At>b)At--;else break;else if(ft>z)ft--;else break;var pt=rt[At][ft];if(pt===0||pt===dv)break;ot=At,at=ft}for(;;){if(At=E,ft=ot,pt=at,E===0?pt<z?(At=90,pt++):pt>z&&(At=270,pt--):E===90?ft<b?(At=0,ft++):ft>b&&(At=180,ft--):E===180?pt<z?(At=90,pt++):pt>z&&(At=270,pt--):ft<b?(At=0,ft++):ft>b&&(At=180,ft--),ft=rt[ft][pt],At!==E&&ft!==0&&ft!==dv){if(tt.push(ot),tt.push(at),aw(a,ot,at,At,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][at]=dv,E===0){if(ot===y)return!1;ot--}else if(E===90){if(at===x)return!1;at--}else if(E===180){if(ot===y)return!1;ot++}else{if(at===x)return!1;at++}}}Ze.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new be(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var dc=0,Zf=1,Mg=999999,fv=Mg+1,dv=Mg+2;Sp.className="PositionArray";function zd(){rn(this),this.port=this.node=null,this.pe=[],this.ap=!1}zd.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
|
|
`+E.toString())}return y};function M1(a,y,x,E){switch(y=y.offsetY,y){case 8:return 90;case 2:return 180;case 1:return 270;case 4:return 0}switch(y){case 9:return 180<x?270:90;case 6:return 90<x&&270>=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 90<x&&x<=180+a?180:x>180+a&&x<=360-a?270:0;case 13:return 180<x&&x<=360-a?270:x>a&&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}zd.prototype.Sl=function(){this.pe.length=0};function lw(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 Ti?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(dr,Ht.alloc()),ot=a.port.ga(Go,Ht.alloc());for(b=be.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Ht.free(rt),Ht.free(ot),rt=Ht.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var at=tt.value;if(at.isVisible()&&at.fromPort!==at.toPort){var At=at.fromPort===a.port||at.fromNode!==null&&at.fromNode.Td(E),ft=at.computeSpot(At,a.port);if(ft.$c()&&(At=At?at.toPort:at.fromPort,At!==null)){var pt=At.part;if(pt!==null){var xt=pt.findVisibleNode();xt!==null&&xt!==pt&&(pt=xt,At=pt.port),At=at.computeOtherPoint(pt,At),pt=rt.ab(At),pt-=ot,0>pt?pt+=360:360<=pt&&(pt-=360),ft=M1(b,ft,pt,at.isOrthogonal),ft===0?(ft=4,180<pt&&(pt-=360)):ft===90?(ft=8,270<pt&&(pt-=360)):ft===180?ft=2:(ft=1,90>pt&&(pt+=360)),xt=a.pe[z],xt===void 0?(xt=new gv(at,pt,ft),a.pe[z]=xt):(xt.link=at,xt.angle=pt,xt.Nc=ft),xt.hv.set(At),z++}}}}for(Ht.free(rt),a.pe.sort(zd.prototype.j),ot=a.pe.length,E=-1,z=rt=0;z<ot;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,rt=0),tt.Uo=rt,rt++);for(E=-1,rt=0,z=ot-1;0<=z;z--)ot=a.pe[z],ot!==void 0&&(ot.Nc!==E&&(E=ot.Nc,rt=ot.Uo+1),ot.Gl=rt);if(z=a.pe,ft=a.port,E=a.node.portSpreading,rt=Ht.alloc(),ot=Ht.alloc(),tt=Ht.alloc(),at=Ht.alloc(),ft.ga(dr,rt),ft.ga(Dr,ot),ft.ga(Go,tt),ft.ga(ea,at),xt=pt=At=ft=0,E===rv)for(var Ct=0;Ct<z.length;Ct++){var Mt=z[Ct];if(Mt!==null){var Gt=Mt.link.computeThickness();switch(Mt.Nc){case 8:pt+=Gt;break;case 2:xt+=Gt;break;case 1:ft+=Gt;break;default:case 4:At+=Gt}}}var Ot=Ct=0,Wt=1,Zt=Mt=0;for(Gt=0;Gt<z.length;Gt++){var te=z[Gt];if(te!==null){if(Ct!==te.Nc){switch(Ct=te.Nc,Ct){case 8:var re=tt;Ot=at;break;case 2:re=at,Ot=rt;break;case 1:re=rt,Ot=ot;break;default:case 4:re=ot,Ot=tt}switch(Mt=Ot.x-re.x,Zt=Ot.y-re.y,Ct){case 8:pt>Math.abs(Mt)?(Wt=Math.abs(Mt)/pt,pt=Math.abs(Mt)):Wt=1;break;case 2:xt>Math.abs(Zt)?(Wt=Math.abs(Zt)/xt,xt=Math.abs(Zt)):Wt=1;break;case 1:ft>Math.abs(Mt)?(Wt=Math.abs(Mt)/ft,ft=Math.abs(Mt)):Wt=1;break;default:case 4:At>Math.abs(Zt)?(Wt=Math.abs(Zt)/At,At=Math.abs(Zt)):Wt=1}Ot=0}var me=te.Zo;if(E===rv){switch(te=te.link.computeThickness(),te*=Wt,me.set(re),Ct){case 8:me.x=re.x+Mt/2+pt/2-Ot-te/2;break;case 2:me.y=re.y+Zt/2+xt/2-Ot-te/2;break;case 1:me.x=re.x+Mt/2-ft/2+Ot+te/2;break;default:case 4:me.y=re.y+Zt/2-At/2+Ot+te/2}Ot+=te}else{var ln=.5;E===x0&&(ln=(te.Uo+1)/(te.Gl+1)),me.x=re.x+Mt*ln,me.y=re.y+Zt*ln}}}for(Ht.free(rt),Ht.free(ot),Ht.free(tt),Ht.free(at),re=a.pe,z=0;z<re.length;z++)E=re[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,be.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}zd.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},zd.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,$i,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<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},zd.className="Knot";function gv(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Ht,this.Gl=this.Uo=0,this.Zo=new Ht,this.Ju=0}gv.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},gv.className="LinkInfo";function mo(a){rn(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Ht(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}mo.prototype.cloneProtected=function(a){a.sn=this.sn,a.Gh=this.Gh,a.yn=this.yn,a.Am.assign(this.Am),a.vn=this.vn,a.un=this.un,a.Em=this.Em,a.xn=!0},mo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},mo.prototype.qb=function(){},mo.prototype.toString=function(){var a=On(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},mo.prototype.C=function(){if(this.isValidLayout){var a=this.diagram;if(a!==null&&!a.undoManager.isUndoingRedoing){var y=a.animationManager;!y.isTicking&&(y.defaultAnimation.isAnimating&&y.Cc(),this.isOngoing&&a.pi||this.isInitial&&!a.pi)&&(this.isValidLayout=!1,a.$b())}}},mo.prototype.createNetwork=function(){return new qr(this)},mo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof ge?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof Ti?y.lg(a.memberParts):y.lg(a.iterator),y},mo.prototype.updateParts=function(){this.isValidLayout=!0;var a=this.diagram;if(a===null&&this.network!==null)for(var y=this.network.vertexes.iterator;y.next();){var x=y.value.node;if(x!==null&&(a=x.diagram,a!==null))break}try{a!==null&&a.Ea("Layout"),this.commitLayout()}finally{a!==null&&a.eb("Layout")}},mo.prototype.commitLayout=function(){if(this.network!==null){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();if(this.isRouting)for(a=this.network.edges.iterator;a.next();)a.value.commit()}},mo.prototype.doLayout=function(a){var y=new le;a instanceof ge?($c(this,y,a.nodes,!0,this.rh,!0,!1,!0),$c(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof Ti?$c(this,y,a.memberParts,!1,this.rh,!0,!1,!0):y.addAll(a.iterator),0<y.count&&(a=this.diagram,a!==null&&a.Ea("Layout"),this.doMinimalNoNetworkLayout(y),a!==null&&a.eb("Layout")),this.isValidLayout=!0},mo.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var rt=a.value;xp(rt);var ot=rt.measuredBounds,at=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof Ti&&(rt.rh=!1),E+=Math.max(at,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},mo.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 en)&&(xp(rt),this.rh(rt))){var ot=rt.measuredBounds,at=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof Ti&&(rt.rh=!1),x+=Math.max(at,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},mo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Ti&&a.rh)};function $c(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var ot=x.value;E&&!ot.isTopLevel||b!==null&&!b(ot)||!ot.canLayout()||(z&&ot instanceof fn?ot.isLinkLabel||(ot instanceof Ti&&ot.layout===null?$c(a,y,ot.memberParts,!1,b,z,tt,rt):(xp(ot),y.add(ot))):tt&&ot instanceof en?y.add(ot):!rt||!ot.Zc()||ot instanceof fn||(xp(ot),y.add(ot)))}}function xp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}mo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new be),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},mo.prototype.ex=function(a){var y=new le;return a instanceof ge?($c(this,y,a.nodes,!0,null,!0,!0,!0),$c(this,y,a.links,!0,null,!0,!0,!0),$c(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Ti?$c(this,y,a.memberParts,!1,null,!0,!0,!0):$c(this,y,a.iterator,!1,null,!0,!0,!0),y},mo.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(dr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Ze.Object.defineProperties(mo.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())}}}),mo.prototype.collectParts=mo.prototype.ex,mo.prototype.getLayoutBounds=mo.prototype.ni,mo.prototype.invalidateLayout=mo.prototype.C,mo.className="Layout";function qr(a){rn(this),this.Sc=a,this.wf=new le,this.ye=new le,this.Es=new vn,this.zs=new vn}qr.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 le,this.ye=new le,this.Es=new vn,this.zs=new vn},qr.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,1<a){for(var x=this.wf.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1);for(x=this.ye.iterator;x.next();)y+=`
|
|
`+x.value.toString(a-1)}return y},qr.prototype.createVertex=function(){return new gs(this)},qr.prototype.createEdge=function(){return new ml(this)},qr.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof fn)return!tt.isLinkLabel;if(tt instanceof en){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof fn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof Ti&&E.layout===null)this.lg(E.memberParts,!1);else if(this.ki(E)===null){var b=this.createVertex();b.node=E,this.dh(b)}}}for(a.reset();a.next();)if(E=a.value,E instanceof en&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)&&this.Lo(E)===null){var z=E.fromNode;b=E.toNode,z!==null&&b!==null&&z!==b&&(z=this.findGroupVertex(z),b=this.findGroupVertex(b),z!==null&&b!==null&&this.Zj(z,b,E))}}},qr.prototype.findGroupVertex=function(a){if(a===null)return null;var y=a.findVisibleNode();if(y===null)return null;if(a=this.ki(y),a!==null)return a;for(y=y.containingGroup;y!==null;){if(a=this.ki(y),a!==null)return a;y=y.containingGroup}return null},Pt=qr.prototype,Pt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Pt.Bl=function(a){if(a===null)return null;var y=this.ki(a);return y===null&&(y=this.createVertex(),y.node=a,this.dh(y)),y},Pt.Iu=function(a){if(a!==null&&Aw(this,a)){for(var y=a.tg,x=y.count-1;0<=x;x--){var E=y.M(x);this.Mj(E)}for(y=a.mg,a=y.count-1;0<=a;a--)x=y.M(a),this.Mj(x)}};function Aw(a,y){if(y===null)return!1;var x=a.wf.remove(y);return x&&(y=y.node,y!==null&&a.Es.remove(y)),x}Pt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Pt.ki=function(a){return a===null?null:this.Es.I(a)},Pt.Bo=function(a){if(a!==null){pv(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function pv(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}Pt.Dy=function(a){if(a===null)return null;var y=a.fromNode,x=a.toNode,E=this.Lo(a);return E===null?(E=this.createEdge(),E.link=a,y!==null&&(E.fromVertex=this.Bl(y)),x!==null&&(E.toVertex=this.Bl(x)),this.Bo(E)):(y!==null?E.fromVertex=this.Bl(y):E.fromVertex=null,x!==null?E.toVertex=this.Bl(x):E.toVertex=null),E},Pt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),mv(this,a)}};function mv(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Pt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Pt.Lo=function(a){return a===null?null:this.zs.I(a)},Pt.Zj=function(a,y,x){if(a===null||y===null)return null;if(a.network===this&&y.network===this){var E=this.createEdge();return E.link=x,E.fromVertex=a,E.toVertex=y,this.Bo(E),E}return null},Pt.gm=function(a){if(a!==null){var y=a.fromVertex,x=a.toVertex;y!==null&&x!==null&&(y.Jl(a),x.Kl(a),a.gm(),y.Cl(a),x.zl(a))}},Pt.Ko=function(){for(var a=bn(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);Ln(a)},qr.prototype.deleteArtificialVertexes=function(){for(var a=bn(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=bn(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);Ln(a),Ln(y)};function k1(a){for(var y=bn(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);Ln(y)}qr.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),k1(this),this.Ko()),a=new _t;for(var y=!0;y;){y=!1;for(var x=this.wf.iterator;x.next();){var E=x.value;if(0<E.tg.count||0<E.mg.count){y=this.layout.createNetwork(),a.add(y),vv(this,y,E),y=!0;break}}}return a.sort(function(b,z){return b===null||z===null||b===z?0:z.vertexes.count-b.vertexes.count}),a};function vv(a,y,x){if(x!==null&&x.network!==y){Aw(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(mv(a,b),pv(y,b),vv(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(mv(a,x),pv(y,x),vv(a,y,x.toVertex))}}qr.prototype.dz=function(){for(var a=new le,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},Ze.Object.defineProperties(qr.prototype,{layout:{get:function(){return this.Sc},set:function(a){a!==null&&(this.Sc=a)}},vertexes:{get:function(){return this.wf}},edges:{get:function(){return this.ye}}}),qr.prototype.findAllParts=qr.prototype.dz,qr.prototype.splitIntoSubNetworks=qr.prototype.Zx,qr.prototype.deleteSelfEdges=qr.prototype.Ko,qr.prototype.reverseEdge=qr.prototype.gm,qr.prototype.linkVertexes=qr.prototype.Zj,qr.prototype.findEdge=qr.prototype.Lo,qr.prototype.deleteLink=qr.prototype.Yy,qr.prototype.deleteEdge=qr.prototype.Mj,qr.prototype.addLink=qr.prototype.Dy,qr.prototype.addEdge=qr.prototype.Bo,qr.prototype.findVertex=qr.prototype.ki,qr.prototype.deleteNode=qr.prototype.Zy,qr.prototype.deleteVertex=qr.prototype.Iu,qr.prototype.addNode=qr.prototype.Bl,qr.prototype.addVertex=qr.prototype.dh,qr.prototype.addParts=qr.prototype.lg,qr.className="LayoutNetwork";function gs(a){rn(this),this.ob=a,this.j=new be(0,0,10,10).freeze(),this.o=new Ht(5,5).freeze(),this.Sh=this.ub=null,this.tg=new _t,this.mg=new _t}gs.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new _t,this.mg=new _t},gs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Un(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},gs.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Ne(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof Ti)){x=be.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Ui);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),be.free(x);return}be.free(x)}a.moveTo(y.x,y.y)}},gs.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},gs.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},gs.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},gs.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function yv(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}Ze.Object.defineProperties(gs.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=be.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),be.free(x),!(a instanceof Ti)&&(a=a.locationObject.ga(Ui),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 le,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new le,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new le,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 _t,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}}}),gs.prototype.deleteDestinationEdge=gs.prototype.Jl,gs.prototype.addDestinationEdge=gs.prototype.zl,gs.prototype.deleteSourceEdge=gs.prototype.Kl,gs.prototype.addSourceEdge=gs.prototype.Cl,gs.className="LayoutVertex",gs.standardComparer=yv,gs.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<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function ml(a){rn(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}ml.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},ml.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Un(this);return 0<a&&(y+=this.$k!==null?"("+this.$k.toString()+")":"",1<a&&(y+=" "+(this.kd?this.kd.toString():"null")+" --> "+(this.qd?this.qd.toString():"null"))),y},ml.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},ml.prototype.commit=function(){},ml.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Ze.Object.defineProperties(ml.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)}}}),ml.prototype.getOtherVertex=ml.prototype.Ax,ml.className="LayoutEdge";function Ds(a){mo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Je(NaN,NaN).freeze(),this.tf=new Je(10,10).freeze(),this.Jb=Bp,this.Rb=U0,this.nd=Cp,this.hd=uw,a&&Object.assign(this,a)}Te(Ds,mo),Ds.prototype.cloneProtected=function(a){mo.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},Ds.prototype.qb=function(a){a.classType===Ds?a===Cp||a===O0||a===wv||a===D0?this.sorting=a:a===U0||a===IA?this.arrangement=a:a===Bp||a===Q0?this.alignment=a:Yt("Unknown enum value: "+a):mo.prototype.qb.call(this,a)},Ds.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 Ti)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 D0:b.reverse();break;case Cp:b.sort(this.comparer);break;case O0: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 Q0:var rt=y,ot=x,at=be.alloc(),At=Math.max(this.cellSize.width,1);if(!isFinite(At))for(var ft=At=0;ft<b.length;ft++){var pt=this.ni(b[ft],at);At=Math.max(At,pt.width)}if(At=Math.max(At+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(pt=ft=0;pt<b.length;pt++){var xt=this.ni(b[pt],at);ft=Math.max(ft,xt.height)}ft=Math.max(ft+ot,1),pt=this.arrangement;for(var Ct=xt=this.arrangementOrigin.x,Mt=this.arrangementOrigin.y,Gt=0,Ot=0,Wt=0;Wt<b.length;Wt++){var Zt=b[Wt],te=this.ni(Zt,at),re=Math.ceil((te.width+rt)/At)*At,me=Math.ceil((te.height+ot)/ft)*ft;switch(pt){case IA:var ln=Math.abs(Ct-te.width);break;default:ln=Ct+te.width}switch((0<z&&Gt>z-1||0<tt&&0<Gt&&ln-xt>tt)&&(E.push(new be(0,Mt,tt+rt,Ot)),Gt=0,Ct=xt,Mt+=Ot,Ot=0),Ot=Math.max(Ot,me),pt){case IA:te=-te.width;break;default:te=0}switch(Zt.moveTo(Ct+te,Mt),pt){case IA:Ct-=re;break;default:Ct+=re}Gt++}E.push(new be(0,Mt,tt+rt,Ot)),be.free(at);break;case Bp:for(ot=tt,At=z,ft=y,pt=x,tt=be.alloc(),xt=Math.max(this.cellSize.width,1),z=Mt=at=0,rt=Ht.alloc(),Ct=0;Ct<b.length;Ct++)Ot=b[Ct],Gt=this.ni(Ot,tt),Ot=uc(Ot,Ot.locationObject,Ot.locationSpot,rt),at=Math.max(at,Ot.x),Mt=Math.max(Mt,Gt.width-Ot.x),z=Math.max(z,Ot.y);switch(Ct=this.arrangement,Ct){case IA:at+=ft;break;default:Mt+=ft}xt=isFinite(xt)?Math.max(xt+ft,1):Math.max(at+Mt,1);var Nn=Ot=this.arrangementOrigin.x;for(Wt=this.arrangementOrigin.y,Mt=0,ot>=at&&(ot-=at),at=Zt=0,re=Math.max(this.cellSize.height,1),te=z=0,me=!0,Gt=Ht.alloc(),ln=0;ln<b.length;ln++){var Fn=b[ln],tn=this.ni(Fn,tt),Ge=uc(Fn,Fn.locationObject,Fn.locationSpot,rt);if(0<Mt)switch(Ct){case IA:Nn=(Nn-Ot-(tn.width-Ge.x))/xt,Nn=se.$(Math.round(Nn),Nn)?Math.round(Nn):Math.floor(Nn),Nn=Nn*xt+Ot;break;default:Nn=(Nn-Ot+Ge.x)/xt,Nn=se.$(Math.round(Nn),Nn)?Math.round(Nn):Math.ceil(Nn),Nn=Nn*xt+Ot}else switch(Ct){case IA:Zt=Nn+Ge.x+tn.width;break;default:Zt=Nn-Ge.x}switch(Ct){case IA:var bi=-(Nn+Ge.x)+Zt;break;default:bi=Nn+tn.width-Ge.x-Zt}if(0<At&&Mt>At-1||0<ot&&0<Mt&&bi>ot){for(E.push(new be(0,me?Wt-z:Wt,ot+ft,te+z+pt)),Nn=0;Nn<Mt&&ln!==Mt;Nn++){bi=b[ln-Mt+Nn];var Si=uc(bi,bi.locationObject,bi.locationSpot,Gt);bi.moveTo(bi.position.x,bi.position.y+z-Si.y)}te+=pt,Wt=me?Wt+te:Wt+(te+z),Mt=te=z=0,Nn=Ot,me=!1}switch(Nn===Ot&&(at=Ct===IA?Math.max(at,tn.width-Ge.x):Math.min(at,-Ge.x)),z=Math.max(z,Ge.y),te=Math.max(te,tn.height-Ge.y),isFinite(re)&&(te=Math.max(te,Math.max(tn.height,re)-Ge.y)),me?Fn.moveTo(Nn-Ge.x,Wt-Ge.y):Fn.moveTo(Nn-Ge.x,Wt),Ct){case IA:Nn-=Ge.x+ft;break;default:Nn+=tn.width-Ge.x+ft}Mt++}if(E.push(new be(0,Wt,ot+ft,(me?te:te+z)+pt)),b.length!==Mt)for(ot=0;ot<Mt;ot++)At=b[b.length-Mt+ot],ft=uc(At,At.locationObject,At.locationSpot,rt),At.moveTo(At.position.x,At.position.y+z-ft.y);if(Ht.free(rt),Ht.free(Gt),Ct===IA)for(b=0;b<E.length;b++)z=E[b],z.width+=at,z.x-=at;else for(b=0;b<E.length;b++)z=E[b],z.x>at&&(z.width+=z.x-at,z.x=at);be.free(tt)}for(rt=z=tt=b=0;rt<E.length;rt++)ot=E[rt],b=Math.min(b,ot.x),tt=Math.min(tt,ot.y),z=Math.max(z,ot.x+ot.width);this.arrangement===IA?this.commitLayers(E,new Ht(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Ht(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Ds.prototype.commitLayers=function(){};function uw(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Ze.Object.defineProperties(Ds.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==Bp&&a!==Q0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==U0&&a!==IA||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==wv&&a!==D0&&a!==Cp&&a!==O0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var Q0=new Be(Ds,"Position",0),Bp=new Be(Ds,"Location",1),U0=new Be(Ds,"LeftToRight",2),IA=new Be(Ds,"RightToLeft",3),wv=new Be(Ds,"Forward",4),D0=new Be(Ds,"Reverse",5),Cp=new Be(Ds,"Ascending",6),O0=new Be(Ds,"Descending",7);Ds.className="GridLayout",Ds.standardComparer=uw,Ds.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),y=y.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/);for(var x=0;x<a.length;x++)if(y[x]!==""&&y[x]!==void 0){var E=parseFloat(a[x]),b=parseFloat(y[x]);if(isNaN(E))if(isNaN(b)){if(a[x].localeCompare(y[x])!==0)return a[x].localeCompare(y[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(a[x]!=="")return 1;return y[x]!==""&&y[x]!==void 0?-1:0}return 1}return y!==null?-1:0},Ds.Position=Q0,Ds.Location=Bp,Ds.LeftToRight=U0,Ds.RightToLeft=IA,Ds.Forward=wv,Ds.Reverse=D0,Ds.Ascending=Cp,Ds.Descending=O0;function Nr(){this.On=new le,this.Dn=new le,this.Pa=new le,this.cf=new vn,this.bf=new vn,this.aj=new vn,this.H=null,this.tp=!1}Pt=Nr.prototype,Pt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Pt.Xe=function(a){this.H=a},Pt.oi=function(a){if(a instanceof fn){if(this.On.add(a),a instanceof Ti){var y=a.containingGroup;y===null?this.H.ai.add(a):y.gl.add(a),y=a.layout,y!==null&&(y.diagram=this.H)}}else a instanceof en?this.Dn.add(a):a instanceof vr||this.Pa.add(a);y=a.data,y===null||a instanceof vr||(a instanceof en?this.bf.add(y,a):this.cf.add(y,a))},Pt.pc=function(a){if(a.Ej(),a instanceof fn){if(this.On.remove(a),a instanceof Ti){var y=a.containingGroup;y===null?this.H.ai.remove(a):y.gl.remove(a),y=a.layout,y!==null&&(y.diagram=null)}}else a instanceof en?this.Dn.remove(a):a instanceof vr||this.Pa.remove(a);y=a.data,y===null||a instanceof vr||(a instanceof en?this.bf.remove(y):this.cf.remove(y))},Pt.Wd=function(){var a=this.H;if(a!==null){for(var y=a.nodeTemplateMap.iterator;y.next();){var x=y.value,E=y.key;(!x.Zc()||x instanceof Ti)&&Yt('Invalid node template in Diagram.nodeTemplateMap: template for "'+E+'" must be a Node or a simple Part, not a Group or Link: '+x)}for(y=a.groupTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof Ti||Yt('Invalid group template in Diagram.groupTemplateMap: template for "'+E+'" must be a Group, not a normal Node or Link: '+x);for(y=a.linkTemplateMap.iterator;y.next();)x=y.value,E=y.key,x instanceof en||Yt('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=bn(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=bn(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=bn(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);Ln(y),Ln(x),Ln(a)}},Nr.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},Nr.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hw(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&_c(this.diagram,!1)};function hw(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=cw(a,y,E);if(b!==null&&(Yl(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}Nr.prototype.insertLink=function(){return null},Nr.prototype.resolveReferencesForData=function(){},Nr.prototype.Ro=function(a){return this.H.model.Ro(a)};function cw(a,y,x){a=a.H;var E=a.model;return E.Xj()&&E.Yu(y)?(y=a.groupTemplateMap.I(x),y===null&&(y=a.groupTemplateMap.I(""),y===null&&(gw||(gw=!0,un('No Group template found for category "'+x+'"'),un(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(dw||(dw=!0,un('No Node template found for category "'+x+'"'),un(" Using default node template")),y=a.ny))),y}Nr.prototype.getLinkCategoryForData=function(){return""},Nr.prototype.setLinkCategoryForData=function(){},Nr.prototype.setFromNodeForLink=function(){},Nr.prototype.setToNodeForLink=function(){},Nr.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(pw||(pw=!0,un('No Link template found for category "'+a+'"'),un(" Using default link template")),x=y.my)),x},Nr.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},Nr.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},Nr.prototype.ip=function(a){a=this.Lc(a),a!==null&&(xd(this.diagram,a,!1),this.unresolveReferencesForPart(a))},Nr.prototype.unresolveReferencesForPart=function(){},Nr.prototype.removeDataForLink=function(){},Nr.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},Nr.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof fn?a:null)},Nr.prototype.findLinkForKey=function(){return null},Pt=Nr.prototype,Pt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Pt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof fn?a:null)},Pt.Kc=function(a){return a===null?null:this.bf.I(a)},Pt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new le;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Ne(tt)&&Sv(this,b,tt)){y.add(E);break}}}return y.iterator},Pt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new le;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Ne(tt)&&Sv(this,b,tt)){y.add(E);break}}}return y.iterator};function Sv(a,y,x){for(var E in x){var b=y[E],z=x[E];if(mn(z)){if(!mn(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!fw(a,b[tt],rt))return!1}}else if(!fw(a,b,z))return!1}return!0}function fw(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(Ne(y)&&Ne(x)){if(!Sv(a,y,x))return!1}else if(y!==x)return!1;return!0}Nr.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===fo){if(E==="nodeCategory"){var b=this.Lc(a.object),z=a.newValue;b!==null&&typeof z=="string"&&(b.category=z)}else E==="nodeDataArray"&&(this.Gs(a.oldValue),this.addModeledParts(a.newValue));y.isModified=!0}else if(x===Qo){var tt=a.newValue;E==="nodeDataArray"&&Ne(tt)&&hw(this,tt),y.isModified=!0}else if(x===ts){var rt=a.oldValue;E==="nodeDataArray"&&Ne(rt)&&this.ip(rt),y.isModified=!0}else x===da&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===fo){var ot=a.propertyName,at=a.object;at===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(at,ot),y.isModified=!0}else if(x===Qo||x===ts){var At=a.change===Qo,ft=At?a.newParam:a.oldParam,pt=At?a.newValue:a.oldValue,xt=this.aj.I(a.object);if(Array.isArray(xt))for(a=0;a<xt.length;a++){var Ct=xt[a];if(At)i0(Ct,pt,ft,!0);else if(!(0>ft)){var Mt=ft+op(Ct);Ct.pc(Mt,!0),Qm(Ct,Mt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},Nr.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)},Nr.prototype.rp=function(){for(var a=this.H.model,y=new le,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){Pw(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&Cw(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},Nr.prototype.refreshDataBoundLinks=function(){},Nr.prototype.updateRelationshipsFromData=function(){},Nr.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=bn()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Ln(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function xv(a,y){var x=y.Hh;if(mn(x)){var E=a.aj.I(x);if(E===null)E=[],E.push(y),a.aj.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}function Bv(a,y,x){fA(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)Nf(x,tt[ot])});var E=y.Hh;if(mn(E)){var b=a.aj.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&a.aj.remove(E);break}}}}Nr.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new vn;if(mn(a))for(var b=0;b<a.length;b++)H0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)H0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new le;for(var z=new vn,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof en)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof fn&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var at=rt.pg();at!==null&&(at=E.I(at),at!==null?(x.qe(ot.data,x.wa(at.data)),ot=y.Kc(ot.data),rt=rt.kh(),rt!==null&&ot!==null&&z.add(rt,ot)):x.qe(ot.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var At=new vn;E.each(function(ft){ft.key.data!==null&&At.add(ft.key.data,ft.value.data)}),x(At,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function H0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof ei))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof fn){for(var tt=y.linksConnected;tt.next();){var rt=tt.value;if(rt.fromNode===y){var ot=E.I(rt);ot!==null&&(ot.fromNode=z)}rt.toNode===y&&(rt=E.I(rt),rt!==null&&(rt.toNode=z))}if(y instanceof Ti&&z instanceof Ti)for(y=y.memberParts;y.next();)tt=H0(a,y.value,x,E,b),tt instanceof en||tt===null||(tt.containingGroup=z)}else if(y instanceof en&&z instanceof en)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=H0(a,y.value,x,E,b),tt!==null&&tt instanceof fn&&(tt.labeledLink=z);return z}Nr.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof en||(E=b.copyNodeData(E),Ne(E)&&(b.xf(E),x=y.Lc(E)))}else Yl(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof en||(b=y.copyNodeData(E)),Ne(b)&&(x.data=b)));return x},Ze.Object.defineProperties(Nr.prototype,{nodes:{get:function(){return this.On}},links:{get:function(){return this.Dn}},parts:{get:function(){return this.Pa}},diagram:{get:function(){return this.H}},addsToTemporaryLayer:{get:function(){return this.tp},set:function(a){this.tp=a}}}),Nr.prototype.updateAllRelationshipsFromData=Nr.prototype.rp,Nr.prototype.findLinksByExample=Nr.prototype.ls,Nr.prototype.findNodesByExample=Nr.prototype.ms,Nr.prototype.findLinkForData=Nr.prototype.Kc,Nr.prototype.findNodeForData=Nr.prototype.ii,Nr.prototype.findPartForData=Nr.prototype.Lc,Nr.prototype.findNodeForKey=Nr.prototype.Vb,Nr.prototype.removeModeledPart=Nr.prototype.ip,Nr.prototype.removeModeledParts=Nr.prototype.Gs,Nr.prototype.rebuildParts=Nr.prototype.Wd;var dw=!1,gw=!1,pw=!1;Nr.className="PartManager";function Fs(a){Nr.apply(this,arguments)}Te(Fs,Nr),Fs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mw(this,a.linkDataArray)},Fs.prototype.addModeledParts=function(a){for(Nr.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Pg(a.value);_c(this.diagram,!1)};function mw(a,y){y.forEach(function(x){vw(a,x)}),_c(a.diagram,!1)}function vw(a,y){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.bf.contains(y)){var x=a.getLinkCategoryForData(y),E=a.findLinkTemplateForCategory(x);if(E!==null){Yl(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=j0(x,y,!0);z!==""&&(b.fromPortId=z),z=bl(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof fn&&(b.fromNode=z)),z=j0(x,y,!1),z!==""&&(b.toPortId=z),z=bl(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof fn&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}Fs.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yw(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yw(a,y){y.forEach(function(x){a.ip(x)})}Fs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Fs.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Fs.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Fs.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Fs.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Fs.prototype.findPartForKey=function(a){var y=Nr.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Fs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Fs.prototype.doModelChanged=function(a){var y=this;if(Nr.prototype.doModelChanged.call(this,a),this.diagram){var x=this.diagram;if(a.model===x.model){var E=a.change;if(x.aa){x.aa=!1;try{var b=a.modelChange;if(b!==""){if(E===fo){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var at=this.Kc(a.object);if(at!==null){var At=a.newValue;typeof At=="string"&&(at.fromPortId=At)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var pt=a.newValue;typeof pt=="string"&&(ft.toPortId=pt)}}else if(b==="nodeGroupKey"){var xt=this.Lc(a.object);if(xt!==null){var Ct=a.newValue;if(Ct!==void 0){var Mt=this.Vb(Ct);Mt instanceof Ti?xt.containingGroup=Mt:xt.containingGroup=null}else xt.containingGroup=null}}else if(b==="linkLabelKeys"){var Gt=this.Kc(a.object);if(Gt!==null){var Ot=a.oldValue,Wt=a.newValue;Array.isArray(Ot)&&Ot.forEach(function(Ge){0<=Wt.indexOf(Ge)||(Ge=y.Vb(Ge),Ge!==null&&(Ge.labeledLink=null))}),Array.isArray(Wt)&&Wt.forEach(function(Ge){Ge=y.Vb(Ge),Ge!==null&&(Ge.labeledLink=Gt)})}}else if(b==="linkCategory"){var Zt=this.Kc(a.object),te=a.newValue;Zt!==null&&typeof te=="string"&&(Zt.category=te)}else b==="linkDataArray"&&(yw(this,a.oldValue),mw(this,a.newValue));x.isModified=!0}else if(E===Qo){var re=a.newValue;if(b==="linkDataArray"&&typeof re=="object"&&re!==null)vw(this,re);else if(b==="linkLabelKeys"&&ef(re)){var me=this.Kc(a.object),ln=this.Vb(re);me!==null&&ln!==null&&(ln.labeledLink=me)}x.isModified=!0}else if(E===ts){var Nn=a.oldValue;if(b==="linkDataArray"&&typeof Nn=="object"&&Nn!==null)this.ip(Nn);else if(b==="linkLabelKeys"&&ef(Nn)){var Fn=this.Vb(Nn);Fn!==null&&(Fn.labeledLink=null)}x.isModified=!0}}else if(E===fo){var tn=a.propertyName;a.object!==x.model||tn!=="linkFromKeyProperty"&&tn!=="linkToKeyProperty"&&tn!=="linkFromPortIdProperty"&&tn!=="linkToPortIdProperty"&&tn!=="linkLabelKeysProperty"&&tn!=="nodeIsGroupProperty"&&tn!=="nodeGroupKeyProperty"&&tn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Fs.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new le,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){bw(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&kw(y,z,!1)})},Fs.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;if(a instanceof en){var b=bl(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=bl(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new le().addAll(y);var tt=new le;a.labelNodes.each(function(rt){rt.data!==null&&(rt=E.wa(rt.data),rt!==void 0&&tt.add(rt))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink===a&&(rt.labeledLink=null)}),b.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink!==a&&(rt.labeledLink=a)}))}}else!(a instanceof vr)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof Ti)&&(a.containingGroup=y)}}},Fs.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Pp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof Ti&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof fn&&(bl(y,tt,!0)===x&&(z.link.fromNode=b),bl(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(rt){return function(ot){return ot===x?(b.labeledLink=rt.link,!0):!1}}(z)))),z={link:z.link}}QA(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof Ti&&(b.containingGroup=a))}},Fs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof fn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)NA(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&NA(y,x,E.data)),a instanceof Ti)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&NA(y,x,E)}}},Fs.prototype.copyPartData=function(a,y){var x=Nr.prototype.copyPartData.call(this,a,y);if(a instanceof en)if(a=a.data,a!==null&&y!==null){var E=y.model;a=E.Jo(a),typeof a=="object"&&a!==null&&(E.fi(a),x=y.Kc(a))}else x!==null&&(y=this.diagram,a!==null&&y!==null&&y.commandHandler!==null&&y.commandHandler.copiesClipboardData&&(y=y.model.Jo(a),typeof y=="object"&&y!==null&&(x.data=y)));return x},Fs.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),rt="";if(a!==null&&(y===null&&(y=a),rt=y.portId,rt===null&&(rt="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof en){if(Yl(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=rt,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof fn&&(Yl(a),a=a.copy(),a!==null&&(a.labeledLink=z,b.add(a))),z}else if(E!==null&&(E=z.Jo(E),typeof E=="object"&&E!==null))return a!==null&&bg(z,E,z.wa(a.data),!0),Tg(z,E,rt,!0),x!==null&&bg(z,E,z.wa(x.data),!1),Tg(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof fn||(a=z.copyNodeData(a),typeof a=="object"&&a!==null&&(z.xf(a),a=z.wa(a),a!==void 0&&z.Bu(E,a))),b.Kc(E);return null},Fs.prototype.findLinkForKey=Fs.prototype.findLinkForKey,Fs.prototype.findPartForKey=Fs.prototype.findPartForKey,Fs.prototype.removeAllModeledParts=Fs.prototype.removeAllModeledParts,Fs.prototype.addModeledParts=Fs.prototype.addModeledParts,Fs.prototype.addAllModeledParts=Fs.prototype.addAllModeledParts,Fs.className="GraphLinksPartManager";function Gl(){Nr.apply(this,arguments),this.Sg=null}Te(Gl,Nr);function R0(a,y,x){if(y!==null&&x!==null&&x.kh()===null){var E=a.diagram.toolManager.findTool("Linking"),b=y,z=x;if(a.diagram.isTreePathToChildren||(b=x,z=y),(E===null||!oa(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Yl(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}Gl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Gl.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Gl.prototype.setFromNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren)E.qe(a.data,E.wa(y));else{var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.toNode!==null?a.toNode.data:null)),this.Sg=b}},Gl.prototype.setToNodeForLink=function(a,y,x){var E=this.diagram.model;if(x===void 0&&(x=null),y=y!==null?y.data:null,this.diagram.isTreePathToChildren){var b=this.Sg;this.Sg=a,x!==null&&E.qe(x.data,void 0),E.qe(y,E.wa(a.fromNode!==null?a.fromNode.data:null)),this.Sg=b}else E.qe(a.data,E.wa(y))},Gl.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Gl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Gl.prototype.doModelChanged=function(a){if(Nr.prototype.doModelChanged.call(this,a),this.diagram){var y=this.diagram;if(a.model===y.model){var x=a.change;if(y.aa){y.aa=!1;try{var E=a.modelChange;if(E!==""){if(x===fo){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:R0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),at=a.newValue;if(ot!==null&&typeof at=="string"){var At=ot.kh();At!==null&&(At.category=at)}}y.isModified=!0}}else if(x===fo){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Gl.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof fn&&(y=E.mh(y),y=x.Vb(y),E=a.pg(),y!==E&&(E=a.kh(),y!==null?E!==null?x.isTreePathToChildren?E.fromNode=y:E.toNode=y:R0(this,y,a):E!==null&&xd(x,E,!1)))}}},Gl.prototype.updateDataBindings=function(a,y){Nr.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Gl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Pp(y,x),b=this.Lc(a);if(E!==null&&b!==null){for(E=E.iterator;E.next();){var z=E.value;y.lb(z)&&b instanceof fn&&y.mh(z)===x&&R0(this,b,this.ii(z))}QA(y,x)}a=y.mh(a),a!==void 0&&b instanceof fn&&(a=this.Vb(a),R0(this,a,b))}},Gl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof fn){var x=y.wa(a.data),E=this.Kc(a.data);if(E!==null){E.isSelected=!1,E.isHighlighted=!1;var b=E.layer;if(b!==null){var z=b.pc(-1,E,!1);0<=z&&this.diagram.cb(ts,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&NA(y,x,b)}},Gl.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},Gl.prototype.findLinkForKey=Gl.prototype.findLinkForKey,Gl.className="TreePartManager";function Kn(a,y){this.kl=new le,this.il=new le,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,rn(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new vn,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new vn,this.Lt=new _t,this.Wg=!1,this.o=null,this.undoManager=new Bo,a!==void 0&&(mn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Kn.prototype.cloneProtected=function(a){a.xa=this.xa,a.Sm=this.Sm,a.Gg=this.Gg,a.Th=this.Th,a.bl=this.bl,a.Bk=this.Bk,a.Km=this.Km,a.Jm=this.Jm,a.Mm=this.Mm,a.xm=this.xm,a.lj=this.lj},Kn.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Kn.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Kn.prototype.toString=function(a){if(a===void 0&&(a=0),1<a)return this.np();var y=(this.name!==""?this.name:"")+" Model";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Yi(b)}}return y},Kn.prototype.xA=function(a){a.change!==da&&Yt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof ps?(Sw(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Kn.prototype.Qv=function(a,y){var x=this,E=!1,b=new le,z=new le,tt=new le,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===Qo?b.add(ft.newValue):ft.change===ts&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==fo||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(pt){x.lb(pt)&&z.add(pt)}):ft.object instanceof Kn||x.ri()&&x.Jc(ft.object)||xw(x,ft.object).each(function(pt){z.add(pt)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var at=this.kl;at.clear(),tt.each(function(ft){at.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var At=null;return E&&(At===null&&(At={}),At.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(At===null&&(At={}),y?At.removedNodeKeys=ot.Fa():At.insertedNodeKeys=ot.Fa()),0<a.length&&(At===null&&(At={}),At.modifiedNodeData=a),0<at.count&&(At===null&&(At={}),y?At.insertedNodeKeys=at.Fa():At.removedNodeKeys=at.Fa()),at.clear(),ot.clear(),At},Kn.prototype.cloneDeep=function(a){return kg(this,a,!0)};function kg(a,y,x,E,b,z){function tt(ft,pt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,pt)):(ft=mi++,E.set(ft,pt),b.set(ft,y))}if(!Ne(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new vn),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new vn),ot=b.iterator;ot.next();){var at=ot.key;if(ot.value===y&&(at=E.get(at)))return at}if(Array.isArray(y)){ot=[],tt(y,ot);for(var At=0;At<y.length;At++)ot.push(kg(a,y[At],!1,E,b,z))}else if(y instanceof Ht||y instanceof Je||y instanceof be||y instanceof Xi||y instanceof ni)ot=y.copy(),tt(y,ot);else{if(y instanceof Lr||y instanceof qe||y instanceof Be)return y;if(y instanceof _t)ot=new _t().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof le)ot=new le().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof vn)ot=new vn().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Date)ot=new Date(y.getTime()),tt(y,ot);else if(y instanceof RegExp)ot=new RegExp(y),tt(y,ot),ot.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ot=y.copy(),tt(y,ot);else for(At in ot={},tt(y,ot),y)At!=="__gohashid"&&(ot[At]=kg(a,y[At],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}Pt=Kn.prototype,Pt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Pt.rm=function(){var a="";return this.name!==""&&(a+=`,
|
|
"name": `+this.quote(this.name)),this.dataFormat!==""&&(a+=`,
|
|
"dataFormat": `+this.quote(this.dataFormat)),this.isReadOnly&&(a+=`,
|
|
"isReadOnly": `+this.isReadOnly),this.nodeKeyProperty!=="key"&&typeof this.nodeKeyProperty=="string"&&(a+=`,
|
|
"nodeKeyProperty": `+this.quote(this.nodeKeyProperty)),this.copiesArrays&&(a+=`,
|
|
"copiesArrays": true`),this.copiesArrayObjects&&(a+=`,
|
|
"copiesArrayObjects": true`),this.copiesKey||(a+=`,
|
|
"copiesKey": false`),this.nodeCategoryProperty!=="category"&&typeof this.nodeCategoryProperty=="string"&&(a+=`,
|
|
"nodeCategoryProperty": `+this.quote(this.nodeCategoryProperty)),a},Pt.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function ww(a,y){y=y.modelData,Ne(y)&&(a.dm(y),a.modelData=y)}Pt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!Bw(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
"modelData": `+Cv(this,this.modelData)),a+`,
|
|
"nodeDataArray": `+tf(this,this.nodeDataArray,!0)},Pt.kv=function(a){ww(this,a),a=a.nodeDataArray,mn(a)&&(this.dm(a),this.nodeDataArray=a)};function Sw(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new le,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new vn,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===fo?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Qo||z===ts)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function xw(a,y){for(var x=new le,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];G0(a,y,b,b,x)}return x}function G0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(G0(a,y,tt,E,b))return!0}else if(Ne(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(G0(a,y,tt,E,b))return!0}return!1}Pt.Pv=function(a,y){var x=this,E=!1,b=new le,z=new le,tt=new le,rt=this.vh;a.changes.each(function(At){At.model===x&&(At.modelChange==="nodeDataArray"?At.change===Qo?b.add(At.newValue):At.change===ts&&tt.add(At.oldValue):x.lb(At.object)?z.add(At.object):At.change!==fo||x.modelData!==At.object&&At.propertyName!=="modelData"?At.object!==null&&(rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){x.lb(ft)&&z.add(ft)}):At.object instanceof Kn||x.ri()&&x.Jc(At.object)||xw(x,At.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(At){ot.add(x.wa(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(x.wa(At)),y&&z.add(At)}),a="",E&&(a+=`,
|
|
"modelData": `+Cv(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+tf(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+tf(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Wv:this.Yv)+tf(this,at.Fa(),!0)),at.clear(),ot.clear(),a},Pt.fp=function(a){(a.name!==void 0&&a.name!==this.name||a.dataFormat!==void 0&&a.dataFormat!==this.dataFormat||a.isReadOnly!==void 0&&a.isReadOnly!==this.isReadOnly||a.nodeKeyProperty!==void 0&&a.nodeKeyProperty!==this.nodeKeyProperty||a.copiesArrays!==void 0&&a.copiesArrays!==this.copiesArrays||a.copiesArrayObjects!==void 0&&a.copiesArrayObjects!==this.copiesArrayObjects||a.copiesKey!==void 0&&a.copiesKey!==this.copiesKey||a.nodeCategoryProperty!==void 0&&a.nodeCategoryProperty!==this.nodeCategoryProperty)&&Yt("applyIncrementalJson cannot change Model properties"),ww(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new vn;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var rt=this.hc(tt);rt===null&&(rt=(rt=E.get(tt))?rt:this.copyNodeData({}),this.km(rt,tt),this.xf(rt))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var ot in b)ot==="__gohashid"||ot===this.nodeKeyProperty||this.Wj()&&ot===this.nodeIsGroupProperty||this.setDataProperty(z,ot,b[ot]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ot=0;ot<x;ot++)y=this.hc(a[ot]),y!==null&&this.cm(y)},Pt.$x=function(a,y){a.change!==da&&Yt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof ps?(y===void 0&&(y=Fp(this,this)),Sw(this,x),a=this.Pv(x,a.propertyName==="FinishedUndo"),this.vh=null,y==="2"?'{ "incremental": 2'+a+"}":'{ "class": '+this.quote(y)+', "incremental": 1'+this.rm()+a+"}"):'{ "incremental": 0 }'},Pt.yA=function(a,y){return this.$x(a,y)},Pt.np=function(a){return a===void 0&&(a=Fp(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Pt.toJSON=function(a){return this.np(a)},Pt.Zw=function(a){var y=null;if(typeof a=="string")try{y=He.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Yt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Yt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Pt.Ky=function(a){return this.Zw(a)},Kn.constructGraphLinksModel=function(){return new Kn},Pt=Kn.prototype,Pt.dm=function(a){if(mn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Ne(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Yt("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Ne(a)){for(y in a)if(x=a[y],Ne(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new _t,E=0;E<x.length/2;E++)b.add(new Ht(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return b1(a)}return a},Pt.sm=function(a){return a===void 0?"undefined":a===null?"null":a===!0?"true":a===!1?"false":typeof a=="string"?this.quote(a):typeof a=="number"?a===1/0?"9e9999":a===-1/0?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.sm(a.valueOf()):mn(a)?tf(this,a):Ne(a)?Cv(this,a):typeof a=="function"?"null":a.toString()};function tf(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new ir;b.add("["),x&&1<E&&b.add(`
|
|
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
|
|
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
|
|
`),b.add("]"),b.toString()}function Bw(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function ba(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Cv(a,y){var x=y;if(x instanceof Ht)y={class:"go.Point",x:ba(x.x),y:ba(x.y)};else if(x instanceof Je)y={class:"go.Size",width:ba(x.width),height:ba(x.height)};else if(x instanceof be)y={class:"go.Rect",x:ba(x.x),y:ba(x.y),width:ba(x.width),height:ba(x.height)};else if(x instanceof Xi)y={class:"go.Margin",top:ba(x.top),right:ba(x.right),bottom:ba(x.bottom),left:ba(x.left)};else if(x instanceof ni)x.sb()?y={class:"go.Spot",x:ba(x.x),y:ba(x.y),offsetX:ba(x.offsetX),offsetY:ba(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Lr){if(y={class:"go.Brush",type:x.type.name},x.type===rr?y.color=x.color:(x.type===Ni||x.type===zi)&&(y.start=x.start,y.end=x.end,x.type===zi&&(x.startRadius!==0&&(y.startRadius=ba(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ba(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof qe?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ba(x.startX)),x.startY!==0&&(y.startY=ba(x.startY)),x.endX!==0&&(y.endX=ba(x.endX)),x.endY!==0&&(y.endY=ba(x.endY)),x.spot1.D(dr)||(y.spot1=x.spot1),x.spot2.D(Go)||(y.spot2=x.spot2),x.type===qe.o&&(y.path=qe.ia(x))):x instanceof Be&&(y={class:"go.EnumValue",classType:Fp(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=_o(y,b);if(!Bw(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof _t){var tt="[";for(z=z.iterator;z.next();){var rt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(rt.x),tt+=",",tt+=a.sm(rt.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function Ta(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function b1(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new Ht(Ta(a.x),Ta(a.y));else if(y==="Size")x=new Je(Ta(a.width),Ta(a.height));else if(y==="Rect")x=new be(Ta(a.x),Ta(a.y),Ta(a.width),Ta(a.height));else if(y==="Margin")x=new Xi(Ta(a.top),Ta(a.right),Ta(a.bottom),Ta(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Mo(a.enum):x=new ni(Ta(a.x),Ta(a.y),Ta(a.offsetX),Ta(a.offsetY));else if(y==="Brush"){if(x=new Lr,x.type=wi(Lr,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof ni&&(x.start=a.start),a.end instanceof ni&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Ta(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Ta(a.endRadius)),a=a.colorStops,Ne(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=qe.parse(a.path):x=new qe,x.type=wi(qe,a.type),typeof a.startX=="number"&&(x.startX=Ta(a.startX)),typeof a.startY=="number"&&(x.startY=Ta(a.startY)),typeof a.endX=="number"&&(x.endX=Ta(a.endX)),typeof a.endY=="number"&&(x.endY=Ta(a.endY)),a.spot1 instanceof ni&&(x.spot1=a.spot1),a.spot2 instanceof ni&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Fv(E),typeof E=="function"&&(x=wi(E,a.name)));return x}Pt.Pe=function(a){return this.Lt.add(a),this},Pt.ik=function(a){this.Lt.remove(a)},Pt.ds=function(a){this.skipsUndoManager||this.undoManager.Tu(a);for(var y=this.Lt,x=y.length,E=0;E<x;E++)y.M(E)(a)},Pt.cb=function(a,y,x,E,b,z,tt){as(this,"",a,y,x,E,b,z,tt)},Pt.g=function(a,y,x,E,b){as(this,"",fo,a,this,y,x,E,b)},Pt.Fs=function(a,y,x,E,b,z){as(this,"",fo,y,a,x,E,b,z)};function as(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var at=new yo;at.model=a,at.change=x,at.modelChange=y,at.propertyName=E,at.object=b,at.oldValue=z,at.oldParam=rt,at.newValue=tt,at.newParam=ot,a.ds(at)}Kn.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===fo){var x=a.object,E=a.propertyName,b=a.I(y);E===this.nodeKeyProperty&&this.lb(x)&&(y=a.I(!y),y!==void 0&&this.kb.remove(y),b!==void 0&&this.kb.add(b,x)),uo(x,E,b)}else a.change===Qo?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Ne(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Gi(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Mi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!mn(E)&&a.propertyName&&(E=_o(a.object,a.propertyName)),mn(E)&&typeof x=="number"&&(a=a.newValue,y?Gi(E,x):Mi(E,x,a))):Yt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ts?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Ne(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Mi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Gi(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!mn(E)&&a.propertyName&&(E=_o(a.object,a.propertyName)),mn(E)&&typeof x=="number"&&(a=a.oldValue,y?Mi(E,x,a):Gi(E,x))):Yt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==da&&Yt("unknown ChangedEvent: "+a.toString())},Kn.prototype.Ea=function(a){return this.undoManager.Ea(a)},Kn.prototype.eb=function(a){return this.undoManager.eb(a)},Kn.prototype.Kf=function(){return this.undoManager.Kf()},Kn.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}},Pt=Kn.prototype,Pt.La=function(a,y){y===void 0&&(y=""),as(this,"SourceChanged",da,y,a,null,null)},Pt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=_o(a,y),y!==void 0)){if(ef(y))return y;Yt("Key value for node data "+a+" is not a number or a string: "+y)}}},Pt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=_o(a,x);E!==y&&this.hc(y)===null&&(uo(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),as(this,"nodeKey",fo,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else uo(a,x,y)}};function ef(a){return typeof a=="number"||typeof a=="string"}Pt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Pt.hc=function(a){return a===null&&Yt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ef(a)?this.kb.I(a):null},Pt.$u=function(a){if(a!==null){var y=this.Th;if(y!==""){var x=this.wa(a);if(x===void 0||this.kb.contains(x)){var E=this.bl;if(E!==null&&(x=E(this,a),x!=null&&!this.kb.contains(x))){uo(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;uo(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;uo(a,y,x)}}}}},Pt.xf=function(a){a!==null&&(Wn(a),this.lb(a)||Cw(this,a,!0))};function Cw(a,y,x){var E=a.wa(y);(E===void 0||a.kb.I(E)!==y)&&(a.$u(y),E=a.wa(y),E===void 0&&Yt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Mi(a.Tc,E,y)),as(a,"nodeDataArray",Qo,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Pt.Fy=function(a){if(mn(a))for(var y=a.length,x=0;x<y;x++)this.xf(a[x]);else for(a=a.iterator;a.next();)this.xf(a.value)},Pt.cm=function(a){a!==null&&Pw(this,a,!0)};function Pw(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;Gi(a.Tc,E)}as(a,"nodeDataArray",ts,"nodeDataArray",a,y,null,E,null),a.qp(y)}Pt.nA=function(a){if(mn(a))for(var y=a.length,x=0;x<y;x++)this.cm(a[x]);else for(a=a.iterator;a.next();)this.cm(a.value)},Pt.$z=function(a){if(a!==this.nodeDataArray&&mn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},Pt.jp=function(a,y){y!==void 0&&(a=Pp(this,a),a instanceof le&&this.Vf.add(y,a))},Pt.Lv=function(){},Pt.fm=function(){},Pt.em=function(){},Pt.qp=function(){};function NA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new le,a.Vf.add(y,E)),E.add(x)}}function QA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof le&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Pp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof le?a:null)}Pt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Kn.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):z0(this,a,!0),Ne(a)&&rn(a),a};function z0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=z0(a,y[x],a.copiesArrayObjects);E.push(b)}return rn(E),E}if(x&&Ne(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=_o(y,E),tt=Fp(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof Kn||z instanceof Bo||z instanceof ps||z instanceof yo||(z=z0(a,z,!1)),uo(x,E,z)}return rn(x),x}return y instanceof Ht||y instanceof Je||y instanceof be||y instanceof ni||y instanceof Xi?y.copy():y}Kn.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}}else!Fw&&a instanceof oe&&(Fw=!0,un('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),un(" Is that really your intent?"));var E=_o(a,y);E!==x&&(uo(a,y,x),this.Fs(a,y,E,x))},Pt=Kn.prototype,Pt.set=function(a,y,x){this.setDataProperty(a,y,x)},Pt.Do=function(a,y){if(y){var x=this.lb(a),E;for(E in y)E==="__gohashid"||x&&E===this.nodeKeyProperty||this.setDataProperty(a,E,y[E])}},Pt.Ay=function(a,y){this.ts(a,-1,y)},Pt.ts=function(a,y,x){0>y&&(y=a.length),Mi(a,y,x),as(this,"",Qo,"",a,null,x,null,y)},Pt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Yt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Gi(a,y),as(this,"",ts,"",a,x,null,y,null)},Pt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=_o(a,y),y===void 0))return"";if(typeof y=="string")return y;Yt("getCategoryForNodeData found a non-string category for "+a+": "+y)},Pt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=_o(a,x);E===void 0&&(E=""),E!==y&&(uo(a,x,y),as(this,"nodeCategory",fo,x,a,E,y))}else uo(a,x,y)}},Pt.lm=function(a,y){this.jm(y,this.Ro(a))},Pt.Tl=function(){return!1},Pt.Wj=function(){return!1},Pt.ri=function(){return!1},Pt.xs=function(){return!1},Pt.Xj=function(){return!1};function Pv(){return new Kn}function Fp(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 Fp(a,y.constructor);return typeof y}function Fv(a){return pA[a]?pA[a]:He.go!==void 0&&He.go[a]?He.go[a]:null}function _o(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 uo(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){}}Ze.Object.defineProperties(Kn.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===""&&Yt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Yt("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];Ne(b)||Yt("Model.nodeDataArray must only contain Objects, not: "+b),Wn(b)}for(this.Tc=a,E=new _t,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(as(this,"nodeDataArray",fo,"nodeDataArray",this,y,a),y=0;y<x;y++)E=a[y],this.fm(E),this.em(E);Array.isArray(a)||(this.isReadOnly=!0)}}},copyNodeDataFunction:{get:function(){return this.Bk},set:function(a){var y=this.Bk;y!==a&&(this.Bk=a,this.g("copyNodeDataFunction",y,a))}},copiesArrays:{get:function(){return this.Km},set:function(a){var y=this.Km;y!==a&&(this.Km=a,this.g("copiesArrays",y,a))}},copiesArrayObjects:{get:function(){return this.Jm},set:function(a){var y=this.Jm;y!==a&&(this.Jm=a,this.g("copiesArrayObjects",y,a))}},copiesKey:{get:function(){return this.Mm},set:function(a){var y=this.Mm;y!==a&&(this.Mm=a,this.g("copiesKey",y,a))}},afterCopyFunction:{get:function(){return this.xm},set:function(a){var y=this.xm;y!==a&&(this.xm=a,this.g("afterCopyFunction",y,a))}},nodeCategoryProperty:{get:function(){return this.lj},set:function(a){var y=this.lj;y!==a&&(this.lj=a,this.g("nodeCategoryProperty",y,a))}},type:{get:function(){return"Model"}}}),Kn.prototype.setCategoryForNodeData=Kn.prototype.jm,Kn.prototype.getCategoryForNodeData=Kn.prototype.Ro,Kn.prototype.removeArrayItem=Kn.prototype.ov,Kn.prototype.insertArrayItem=Kn.prototype.ts,Kn.prototype.addArrayItem=Kn.prototype.Ay,Kn.prototype.assignAllDataProperties=Kn.prototype.Do,Kn.prototype.set=Kn.prototype.set,Kn.prototype.clearUnresolvedReferences=Kn.prototype.Qy,Kn.prototype.mergeNodeDataArray=Kn.prototype.$z,Kn.prototype.removeNodeDataCollection=Kn.prototype.nA,Kn.prototype.removeNodeData=Kn.prototype.cm,Kn.prototype.addNodeDataCollection=Kn.prototype.Fy,Kn.prototype.addNodeData=Kn.prototype.xf,Kn.prototype.makeNodeDataKeyUnique=Kn.prototype.$u,Kn.prototype.findNodeDataForKey=Kn.prototype.hc,Kn.prototype.containsNodeData=Kn.prototype.lb,Kn.prototype.setKeyForNodeData=Kn.prototype.km,Kn.prototype.getKeyForNodeData=Kn.prototype.wa,Kn.prototype.updateTargetBindings=Kn.prototype.La,Kn.prototype.commit=Kn.prototype.commit,Kn.prototype.rollbackTransaction=Kn.prototype.Kf,Kn.prototype.commitTransaction=Kn.prototype.eb,Kn.prototype.startTransaction=Kn.prototype.Ea,Kn.prototype.raiseDataChanged=Kn.prototype.Fs,Kn.prototype.raiseChanged=Kn.prototype.g,Kn.prototype.raiseChangedEvent=Kn.prototype.cb,Kn.prototype.removeChangedListener=Kn.prototype.ik,Kn.prototype.addChangedListener=Kn.prototype.Pe,Kn.prototype.writeJsonValue=Kn.prototype.sm,Kn.prototype.replaceJsonObjects=Kn.prototype.dm,Kn.prototype.applyIncrementalJSON=Kn.prototype.Ky,Kn.prototype.applyIncrementalJson=Kn.prototype.Zw,Kn.prototype.toJSON=Kn.prototype.toJSON,Kn.prototype.toJson=Kn.prototype.np,Kn.prototype.toIncrementalJSON=Kn.prototype.yA,Kn.prototype.toIncrementalJson=Kn.prototype.$x,Kn.prototype.toIncrementalData=Kn.prototype.xA,Kn.prototype.clear=Kn.prototype.clear;var Fw=!1,pA={};Kn.className="Model",Kn.fromJSON=Kn.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=He.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Yt("Unable to construct a Model from: "+a);if(y===null){a=null;var E=x.class;if(typeof E=="string")try{var b=null;E.indexOf("go.")===0?(E=E.substr(3),b=Fv(E)):(b=Fv(E),b===null&&(b=He[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Kn?y=a:Yt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Kn.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Kn.safePropertyValue=_o,Kn.safePropertySet=uo,pA.Brush=Lr,pA.ChangedEvent=yo,pA.Geometry=qe,pA.Margin=Xi,pA.Panel=Ve,pA.Point=Ht,pA.Rect=be,pA.Size=Je,pA.Spot=ni,pA.Transaction=ps,pA.UndoManager=Bo;function Zo(a,y,x,E){rn(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=Ew,this.wk=null):(this.el=Lp,this.wk=E),this.st=new le}Zo.prototype.copy=function(){var a=new Zo;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Pt=Zo.prototype,Pt.qb=function(a){a.classType===Zo&&(this.mode=a)},Pt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Pt.freeze=function(){return this._isFrozen=!0,this},Pt.ka=function(){return this._isFrozen=!1,this},Pt.Kx=function(a){return a===void 0&&(a=null),this.mode=Lp,this.backConverter=a,this},Pt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Pt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function Lw(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}Pt.Mv=function(a,y,x){var E=this.sl;if(x===void 0||E===""||E===x){x=this.xl;var b=this.Im;if(b===null&&x==="")un("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=_o(y,E)),z!==void 0)if(b===null)x!==""&&uo(a,x,z);else try{if(x!==""){var tt=b(z,a);uo(a,x,tt)}else b(z,a)}catch(rt){}}}},Pt.sp=function(a,y,x,E){if(this.el===Lp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=_o(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var rt=E!==null?E.diagram:null,ot=rt!==null?rt.model:null;if(z===null){if(x!=="")ot!==null?ot.setDataProperty(y,x,tt):uo(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var at=E.itemIndex,At=E.panel.itemArray;ot.ov(At,at),ot.ts(At,at,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):uo(y,x,ft)}else{var pt=z(tt,y,ot);if(pt!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var xt=E.itemIndex,Ct=E.panel.itemArray;ot.ov(Ct,xt),ot.ts(Ct,xt,pt)}}}catch(Mt){}}finally{this.st.remove(a)}}}},Ze.Object.defineProperties(Zo.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&he(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&he(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&he(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&he(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&he(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&he(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&he(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&he(this),this.el=a}}}),Zo.prototype.updateSource=Zo.prototype.sp,Zo.prototype.updateTarget=Zo.prototype.Mv,Zo.prototype.ofModel=Zo.prototype.dA,Zo.prototype.ofObject=Zo.prototype.cp,Zo.prototype.makeTwoWay=Zo.prototype.Kx;var T1="Binding",Ew=new Be(Zo,"OneWay",1),Lp=new Be(Zo,"TwoWay",2);Zo.className="Binding",Zo.parseEnum=function(a,y){return function(x){return x=wi(a,x),x===null?y:x}},Zo.toString=Yi,Zo.OneWay=Ew,Zo.TwoWay=Lp;function sr(a,y,x){Kn.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new le,this.wb=new vn,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(mn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Te(sr,Kn),sr.constructGraphLinksModel=Kn.constructGraphLinksModel,sr.prototype.cloneProtected=function(a){Kn.prototype.cloneProtected.call(this,a),a.Jh=this.Jh,a.cl=this.cl,a.Ak=this.Ak,a.lf=this.lf,a.mf=this.mf,a.ej=this.ej,a.fj=this.fj,a.dj=this.dj,a.je=this.je,a.jl=this.jl,a.Je=this.Je,a.Lm=this.Lm},Pt=sr.prototype,Pt.clear=function(){Kn.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Pt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" GraphLinksModel";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;var x=a.length,E;for(E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Yi(b)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+bl(this,b,!0)+"-->"+bl(this,b,!1)}return y},Pt.Qv=function(a,y){this.linkKeyProperty===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Kn.prototype.Qv.call(this,a,y),E=this,b=new le,z=new le,tt=new le,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===Qo?b.add(At.newValue):At.change===ts&&tt.add(At.oldValue):E.Jc(At.object)?z.add(At.object):At.object!==null&&(At.object!==null&&rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):At.object instanceof Kn||E.lb(At.object)||Mw(E,At.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(At){ot.add(E.Ac(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(E.Ac(At)),y&&z.add(At)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<at.count&&(x===null&&(x={}),y?x.insertedLinkKeys=at.Fa():x.removedLinkKeys=at.Fa()),at.clear(),ot.clear(),x},Pt.rm=function(){var a=Kn.prototype.rm.call(this),y="";return this.linkCategoryProperty!=="category"&&typeof this.linkCategoryProperty=="string"&&(y+=`,
|
|
"linkCategoryProperty": `+this.quote(this.linkCategoryProperty)),this.linkKeyProperty!==""&&typeof this.linkKeyProperty=="string"&&(y+=`,
|
|
"linkKeyProperty": `+this.quote(this.linkKeyProperty)),this.linkFromKeyProperty!=="from"&&typeof this.linkFromKeyProperty=="string"&&(y+=`,
|
|
"linkFromKeyProperty": `+this.quote(this.linkFromKeyProperty)),this.linkToKeyProperty!=="to"&&typeof this.linkToKeyProperty=="string"&&(y+=`,
|
|
"linkToKeyProperty": `+this.quote(this.linkToKeyProperty)),this.linkFromPortIdProperty!==""&&typeof this.linkFromPortIdProperty=="string"&&(y+=`,
|
|
"linkFromPortIdProperty": `+this.quote(this.linkFromPortIdProperty)),this.linkToPortIdProperty!==""&&typeof this.linkToPortIdProperty=="string"&&(y+=`,
|
|
"linkToPortIdProperty": `+this.quote(this.linkToPortIdProperty)),this.linkLabelKeysProperty!==""&&typeof this.linkLabelKeysProperty=="string"&&(y+=`,
|
|
"linkLabelKeysProperty": `+this.quote(this.linkLabelKeysProperty)),this.nodeIsGroupProperty!=="isGroup"&&typeof this.nodeIsGroupProperty=="string"&&(y+=`,
|
|
"nodeIsGroupProperty": `+this.quote(this.nodeIsGroupProperty)),this.nodeGroupKeyProperty!=="group"&&typeof this.nodeGroupKeyProperty=="string"&&(y+=`,
|
|
"nodeGroupKeyProperty": `+this.quote(this.nodeGroupKeyProperty)),a+y},Pt.gp=function(a){Kn.prototype.gp.call(this,a),a.linkKeyProperty&&(this.linkKeyProperty=a.linkKeyProperty),a.linkFromKeyProperty&&(this.linkFromKeyProperty=a.linkFromKeyProperty),a.linkToKeyProperty&&(this.linkToKeyProperty=a.linkToKeyProperty),a.linkFromPortIdProperty&&(this.linkFromPortIdProperty=a.linkFromPortIdProperty),a.linkToPortIdProperty&&(this.linkToPortIdProperty=a.linkToPortIdProperty),a.linkCategoryProperty&&(this.linkCategoryProperty=a.linkCategoryProperty),a.linkLabelKeysProperty&&(this.linkLabelKeysProperty=a.linkLabelKeysProperty),a.nodeIsGroupProperty&&(this.nodeIsGroupProperty=a.nodeIsGroupProperty),a.nodeGroupKeyProperty&&(this.nodeGroupKeyProperty=a.nodeGroupKeyProperty)},Pt.Rv=function(){var a=Kn.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+tf(this,this.linkDataArray,!0);return a+y},Pt.kv=function(a){Kn.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function Mw(a,y){for(var x=new le,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];G0(a,y,b,b,x)}return x}Pt.Pv=function(a,y){this.linkKeyProperty===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Kn.prototype.Pv.call(this,a,y),E=this,b=new le,z=new le,tt=new le,rt=this.vh;a.changes.each(function(At){At.model===E&&(At.modelChange==="linkDataArray"?At.change===Qo?b.add(At.newValue):At.change===ts&&tt.add(At.oldValue):E.Jc(At.object)?z.add(At.object):At.object!==null&&(At.object!==null&&rt&&rt.contains(At.object)?rt.get(At.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):At.object instanceof Kn||E.lb(At.object)||Mw(E,At.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(At){ot.add(E.Ac(At)),y||z.add(At)});var at=this.kl;return at.clear(),tt.each(function(At){at.add(E.Ac(At)),y&&z.add(At)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+tf(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+tf(this,z.Fa(),!0)),0<at.count&&(a+=(y?this.Vv:this.Xv)+tf(this,at.Fa(),!0)),at.clear(),ot.clear(),a},Pt.fp=function(a){(a.linkCategoryProperty!==void 0&&a.linkCategoryProperty!==this.linkCategoryProperty||a.linkKeyProperty!==void 0&&a.linkKeyProperty!==this.linkKeyProperty||a.linkFromKeyProperty!==void 0&&a.linkFromKeyProperty!==this.linkFromKeyProperty||a.linkToKeyProperty!==void 0&&a.linkToKeyProperty!==this.linkToKeyProperty||a.linkFromPortIdProperty!==void 0&&a.linkFromPortIdProperty!==this.linkFromPortIdProperty||a.linkToPortIdProperty!==void 0&&a.linkToPortIdProperty!==this.linkToPortIdProperty||a.linkLabelKeysProperty!==void 0&&a.linkLabelKeysProperty!==this.linkLabelKeysProperty||a.nodeIsGroupProperty!==void 0&&a.nodeIsGroupProperty!==this.nodeIsGroupProperty||a.nodeGroupKeyProperty!==void 0&&a.nodeGroupKeyProperty!==this.nodeGroupKeyProperty)&&Yt("applyIncrementalJson cannot change Model properties"),Kn.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);Tw(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},sr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===fo){var x=a.object,E=a.propertyName;if(E===this.linkKeyProperty&&this.Jc(x)){var b=a.I(y);y=a.I(!y),y!==void 0&&this.wb.remove(y),b!==void 0&&this.wb.add(b,x),uo(x,E,b);return}}else if(a.change===Qo){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Ne(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===ts){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Ne(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}}Kn.prototype.changeState.call(this,a,y)}},Pt=sr.prototype,Pt.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),uo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Pt.yx=function(a){return bl(this,a,!0)},Pt.wv=function(a,y){bg(this,a,y,!0)},Pt.Bx=function(a){return bl(this,a,!1)},Pt.Bv=function(a,y){bg(this,a,y,!1)};function bl(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=_o(y,a),a!==void 0))){if(ef(a))return a;Yt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function bg(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=_o(y,b);z!==x&&(QA(a,z,y),uo(y,b,x),a.hc(x)===null&&NA(a,x,y),as(a,E?"linkFromKey":"linkToKey",fo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else uo(y,b,x)}}Pt.zx=function(a){return j0(this,a,!0)},Pt.xv=function(a,y){Tg(this,a,y,!0)},Pt.Cx=function(a){return j0(this,a,!1)},Pt.Cv=function(a,y){Tg(this,a,y,!1)};function j0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=_o(y,a),y===void 0?"":y)}function Tg(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=_o(y,b);z===void 0&&(z=""),z!==x&&(uo(y,b,x),as(a,E?"linkFromPortId":"linkToPortId",fo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else uo(y,b,x)}}Pt.Ef=function(a){if(a===null)return K0;var y=this.je;return y===""?K0:(a=_o(a,y),a===void 0?K0:a)},Pt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=_o(a,x);if(E===void 0&&(E=K0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)QA(this,E[z],a);for(uo(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&NA(this,tt,a)}as(this,"linkLabelKeys",fo,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else uo(a,x,y)}},Pt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=_o(a,x);if(E===void 0)x=[],x.push(y),this.Ls(a,x);else if(Array.isArray(E)){var b=E.indexOf(y);0<=b||(b=E.length,E.push(y),this.Jc(a)&&(this.hc(y)===null&&NA(this,y,a),as(this,"linkLabelKeys",Qo,x,a,null,y,null,b)))}else Yt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Pt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=_o(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(QA(this,y,a),as(this,"linkLabelKeys",ts,x,a,y,null,b,null)))}else E!==void 0&&Yt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Pt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=_o(a,y),y!==void 0)){if(ef(y))return y;Yt("Key value for link data "+a+" is not a number or a string: "+y)}}},Pt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=_o(a,x);E!==y&&this.jh(y)===null&&(uo(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),as(this,"linkKey",fo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else uo(a,x,y)}},Pt.jh=function(a){return a===null&&Yt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ef(a)?this.wb.I(a):null},Pt.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))){uo(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;uo(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;uo(a,y,x)}}}}},Pt.Jc=function(a){return a===null?!1:this.$f.contains(a)},Pt.fi=function(a){a!==null&&(Wn(a),this.Jc(a)||kw(this,a,!0))};function kw(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&&Yt("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)),as(a,"linkDataArray",Qo,"linkDataArray",a,null,y,null,E),Lv(a,y)}Pt.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.fi(a[x]);else for(a=a.iterator;a.next();)this.fi(a.value)},Pt.bm=function(a){a!==null&&bw(this,a,!0)};function bw(a,y,x){a.$f.remove(y);var E=a.Ac(y);if(E!==void 0&&a.wb.remove(E),E=null,x){if(E=a.md.indexOf(y),0>E)return;a.md.splice(E,1)}if(as(a,"linkDataArray",ts,"linkDataArray",a,y,null,E,null),x=bl(a,y,!0),QA(a,x,y),x=bl(a,y,!1),QA(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],QA(a,x,y)}Pt.lA=function(a){if(Array.isArray(a))for(var y=a.length,x=0;x<y;x++)this.bm(a[x]);else for(a=a.iterator;a.next();)this.bm(a.value)},Pt.Zz=function(a){if(this.linkKeyProperty===""&&Yt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&mn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var rt=this.jh(tt);rt!==z&&(rt!==null?(this.Do(rt,z),Tw(this,z,rt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function Lv(a,y){var x=bl(a,y,!0);x=a.Vl(x),a.hc(x)===null&&NA(a,x,y),x=bl(a,y,!1),x=a.Vl(x),a.hc(x)===null&&NA(a,x,y);var E=a.Ef(y);if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],a.hc(x)===null&&NA(a,x,y)}Pt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):z0(this,a,!0),Ne(a)&&(rn(a),this.lf!==""&&uo(a,this.lf,void 0),this.mf!==""&&uo(a,this.mf,void 0),this.je!==""&&uo(a,this.je,[])),a},Pt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!_o(a,y)},Pt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=_o(a,y),y!==void 0)){if(ef(y))return y;Yt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Pt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=_o(a,x);E!==y&&(QA(this,E,a),uo(a,x,y),this.hc(y)===null&&NA(this,y,a),as(this,"nodeGroupKey",fo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else uo(a,x,y)}},sr.prototype.copyNodeData=function(a){return a===null?null:(a=Kn.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||_o(a,this.Je)===void 0||uo(a,this.Je,void 0),a)},sr.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){bg(this,a,x,!0);return}if(y===this.linkToKeyProperty){bg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Tg(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Tg(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var E=_o(a,y);E!==x&&(uo(a,y,x),this.Fs(a,y,E,x))},Pt=sr.prototype,Pt.Do=function(a,y){if(y){var x=this.lb(a),E=this.Jc(a),b;for(b in y)b==="__gohashid"||x&&b===this.nodeKeyProperty||x&&b===this.nodeIsGroupProperty&&_o(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Pt.jp=function(a,y){Kn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y);for(x=this.$f.iterator;x.next();){var E=x.value,b=a,z=y;if(bl(this,E,!0)===b){var tt=this.lf;uo(E,tt,z),as(this,"linkFromKey",fo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(bl(this,E,!1)===b&&(tt=this.mf,uo(E,tt,z),as(this,"linkToKey",fo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,at=0;at<rt;at++)tt[at]===b&&(tt[at]=z,as(this,"linkLabelKeys",Qo,ot,E,b,z,at,at))}},Pt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;uo(a,E,x),as(this,"nodeGroupKey",fo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Pt.Lv=function(){Kn.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Lv(this,a[x])},Pt.fm=function(a){Kn.prototype.fm.call(this,a),a=this.wa(a);var y=Pp(this,a);if(y!==null){var x=bn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;as(this,"nodeGroupKey",fo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(bl(this,E,!0)===a&&(b=this.lf,as(this,"linkFromKey",fo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),bl(this,E,!1)===a&&(b=this.mf,as(this,"linkToKey",fo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(as(this,"linkLabelKeys",Qo,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)QA(this,a,x[y]);Ln(x)}},Pt.em=function(a){Kn.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&NA(this,y,a)},Pt.qp=function(a){Kn.prototype.qp.call(this,a);var y=this.lh(a);QA(this,y,a)},Pt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=_o(a,y),y===void 0))return"";if(typeof y=="string")return y;Yt("getCategoryForLinkData found a non-string category for "+a+": "+y)},sr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},sr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=_o(a,x);E===void 0&&(E=""),E!==y&&(uo(a,x,y),as(this,"linkCategory",fo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else uo(a,x,y)}},sr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Pt=sr.prototype,Pt.lm=function(a,y){Kn.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function Tw(a,y,x){a.lp(x,a.ps(y)),a.wv(x,a.yx(y)),a.Bv(x,a.Bx(y)),a.Ls(x,a.Ef(y)),a.xv(x,a.zx(y)),a.Cv(x,a.Cx(y))}Pt.Wj=function(){return!0},Pt.ri=function(){return!0},Pt.xs=function(){return!0},Pt.Xj=function(){return!0},Ze.Object.defineProperties(sr.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];Ne(b)||Yt("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Wn(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new _t,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new le,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,as(this,"linkDataArray",fo,"linkDataArray",this,y,a),y=0;y<x;y++)Lv(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,E=0;E<x;E++){var b=this.linkDataArray[E],z=this.Ac(b);z===void 0&&(this.Bs(b),z=this.Ac(b)),z!==void 0&&this.wb.add(z,b)}this.g("linkKeyProperty",y,a)}}},makeUniqueLinkKeyFunction:{get:function(){return this.cl},set:function(a){var y=this.cl;y!==a&&(this.cl=a,this.g("makeUniqueLinkKeyFunction",y,a))}},copyLinkDataFunction:{get:function(){return this.Ak},set:function(a){var y=this.Ak;y!==a&&(this.Ak=a,this.g("copyLinkDataFunction",y,a))}},nodeIsGroupProperty:{get:function(){return this.jl},set:function(a){var y=this.jl;y!==a&&(this.jl=a,this.g("nodeIsGroupProperty",y,a))}},nodeGroupKeyProperty:{get:function(){return this.Je},set:function(a){var y=this.Je;y!==a&&(this.Je=a,this.g("nodeGroupKeyProperty",y,a))}},Ij:{get:function(){return this.Lm},set:function(a){this.Lm!==a&&(this.Lm=a)}},linkCategoryProperty:{get:function(){return this.dj},set:function(a){var y=this.dj;y!==a&&(this.dj=a,this.g("linkCategoryProperty",y,a))}},type:{get:function(){return"GraphLinksModel"}}}),sr.prototype.setCategoryForLinkData=sr.prototype.lp,sr.prototype.getCategoryForLinkData=sr.prototype.ps,sr.prototype.assignAllDataProperties=sr.prototype.Do,sr.prototype.setGroupKeyForNodeData=sr.prototype.mp,sr.prototype.getGroupKeyForNodeData=sr.prototype.lh,sr.prototype.isGroupForNodeData=sr.prototype.Yu,sr.prototype.copyLinkData=sr.prototype.Jo,sr.prototype.mergeLinkDataArray=sr.prototype.Zz,sr.prototype.removeLinkDataCollection=sr.prototype.lA,sr.prototype.removeLinkData=sr.prototype.bm,sr.prototype.addLinkDataCollection=sr.prototype.Ey,sr.prototype.addLinkData=sr.prototype.fi,sr.prototype.containsLinkData=sr.prototype.Jc,sr.prototype.makeLinkDataKeyUnique=sr.prototype.Bs,sr.prototype.findLinkDataForKey=sr.prototype.jh,sr.prototype.setKeyForLinkData=sr.prototype.Ks,sr.prototype.getKeyForLinkData=sr.prototype.Ac,sr.prototype.removeLabelKeyForLinkData=sr.prototype.Qx,sr.prototype.addLabelKeyForLinkData=sr.prototype.Bu,sr.prototype.setLabelKeysForLinkData=sr.prototype.Ls,sr.prototype.getLabelKeysForLinkData=sr.prototype.Ef,sr.prototype.setToPortIdForLinkData=sr.prototype.Cv,sr.prototype.getToPortIdForLinkData=sr.prototype.Cx,sr.prototype.setFromPortIdForLinkData=sr.prototype.xv,sr.prototype.getFromPortIdForLinkData=sr.prototype.zx,sr.prototype.setToKeyForLinkData=sr.prototype.Bv,sr.prototype.getToKeyForLinkData=sr.prototype.Bx,sr.prototype.setFromKeyForLinkData=sr.prototype.wv,sr.prototype.getFromKeyForLinkData=sr.prototype.yx,sr.prototype.clear=sr.prototype.clear;var K0=Object.freeze([]);sr.className="GraphLinksModel",pA.GraphLinksModel=sr,Kn.constructGraphLinksModel=Kn.constructGraphLinksModel=function(){return new sr},Kn.initDiagramModel=Pv=function(){return new sr};function Ia(a,y){Kn.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(mn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Te(Ia,Kn),Ia.constructGraphLinksModel=Kn.constructGraphLinksModel,Ia.prototype.cloneProtected=function(a){Kn.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Pt=Ia.prototype,Pt.toString=function(a){if(a===void 0&&(a=0),2<=a)return this.np();var y=(this.name!==""?this.name:"")+" TreeModel";if(0<a){y+=`
|
|
node data:`,a=this.nodeDataArray;for(var x=a.length,E=0;E<x;E++){var b=a[E];y+=" "+this.wa(b)+":"+Yi(b)}}return y},Pt.rm=function(){var a=Kn.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Pt.gp=function(a){Kn.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Pt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Yt("applyIncrementalJson cannot change Model properties"),Kn.prototype.fp.call(this,a)},Pt.Vl=function(a){return a},Pt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=_o(a,y),y!==void 0)){if(ef(y))return y;Yt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Pt.qe=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Ke;if(x!=="")if(y=this.Vl(y),this.lb(a)){var E=_o(a,x);E!==y&&(QA(this,E,a),uo(a,x,y),this.hc(y)===null&&NA(this,y,a),as(this,"nodeParentKey",fo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else uo(a,x,y)}},Pt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=_o(a,y),y===void 0)?"":typeof y=="string"?y:(Yt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Ia.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Ia.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=_o(a,x);E===void 0&&(E=""),E!==y&&(uo(a,x,y),as(this,"parentLinkCategory",fo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else uo(a,x,y)}},Ia.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Ia.prototype.copyNodeData=function(a){return a===null?null:(a=Kn.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||_o(a,this.Ke)===void 0||uo(a,this.Ke,void 0),a)},Ia.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeParentKeyProperty){this.qe(a,x);return}}var E=_o(a,y);E!==x&&(uo(a,y,x),this.Fs(a,y,E,x))},Pt=Ia.prototype,Pt.jp=function(a,y){Kn.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Pt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;uo(a,E,x),as(this,"nodeParentKey",fo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Pt.fm=function(a){Kn.prototype.fm.call(this,a),a=this.wa(a);var y=Pp(this,a);if(y!==null){var x=bn();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;as(this,"nodeParentKey",fo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)QA(this,a,x[y]);Ln(x)}},Pt.em=function(a){Kn.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&NA(this,y,a)},Pt.qp=function(a){Kn.prototype.qp.call(this,a);var y=this.mh(a);QA(this,y,a)},Pt.lm=function(a,y){Kn.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Pt.Tl=function(){return!0},Pt.xs=function(){return!0},Ze.Object.defineProperties(Ia.prototype,{nodeParentKeyProperty:{get:function(){return this.Ke},set:function(a){var y=this.Ke;y!==a&&(this.Ke=a,this.g("nodeParentKeyProperty",y,a))}},Jj:{get:function(){return this.Nm},set:function(a){this.Nm!==a&&(this.Nm=a)}},parentLinkCategoryProperty:{get:function(){return this.nj},set:function(a){var y=this.nj;y!==a&&(this.nj=a,this.g("parentLinkCategoryProperty",y,a))}},linkCategoryProperty:{get:function(){return this.parentLinkCategoryProperty},set:function(a){this.parentLinkCategoryProperty=a}},type:{get:function(){return"TreeModel"}}}),Ia.prototype.setParentLinkCategoryForNodeData=Ia.prototype.Ms,Ia.prototype.getParentLinkCategoryForNodeData=Ia.prototype.ss,Ia.prototype.setParentKeyForNodeData=Ia.prototype.qe,Ia.prototype.getParentKeyForNodeData=Ia.prototype.mh,Ia.className="TreeModel",pA.TreeModel=Ia;function Eo(a){mo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=mA,this.Ti=0,this.Zv=new Ht,this.Jp=this.me=0,this.Xr=new bp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=mA,this.K=Na,this.nd=Ng,this.hd=yv,this.tf=6,this.Nn=J0,a&&Object.assign(this,a)}Te(Eo,mo),Eo.prototype.cloneProtected=function(a){mo.prototype.cloneProtected.call(this,a),a.eo=this.eo,a.Cm=this.Cm,a.ro=this.ro,a.ul=this.ul,a.Rb=this.Rb,a.K=this.K,a.nd=this.nd,a.hd=this.hd,a.tf=this.tf,a.Nn=this.Nn},Eo.prototype.qb=function(a){a.classType===Eo?a===X0||a===Z0||a===W0||a===Y0||a===Ng?this.sorting=a:a===Jf||a===Ig||a===Na||a===rf?this.direction=a:a===gc||a===nf||a===mA||a===vA?this.arrangement=a:(a===jd||a===J0)&&(this.nodeDiameterFormula=a):mo.prototype.qb.call(this,a)},Eo.prototype.createNetwork=function(){return new Qg(this)},Eo.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),a=this.network.vertexes,1>=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new _t;y.addAll(a.iterator),a=new _t;var x=new _t,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=this.nodeDiameterFormula,at=this.radius;(!isFinite(at)||0>=at)&&(at=NaN);var At=this.aspectRatio;(!isFinite(At)||0>=At)&&(At=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var pt=this.sweepAngle;if((!isFinite(pt)||360<pt||1>pt)&&(pt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===vA&&ot===jd?rt=mA:rt===vA&&ot!==jd&&(rt=this.arrangement),(this.direction===Jf||this.direction===Ig)&&this.sorting!==Ng){for(ot=0;!(ot>=E.length)&&(a.add(E.M(ot)),!(ot+1>=E.length));ot+=2)x.add(E.M(ot+1));this.direction===Jf?(this.arrangement===vA&&a.reverse(),E=new _t,E.addAll(a),E.addAll(x)):(this.arrangement===vA&&x.reverse(),E=new _t,E.addAll(x),E.addAll(a))}ot=E.length;for(var xt=z=b=0;xt<E.length;xt++){var Ct=ft+pt*z*(this.direction===Na?1:-1)/ot,Mt=E.M(xt).diameter;isNaN(Mt)&&(Mt=of(E.M(xt),Ct)),360>pt&&(xt===0||xt===E.length-1)&&(Mt/=2),b+=Mt,z++}if(isNaN(at)||rt===vA){if(isNaN(y)&&(y=6),rt!==mA&&rt!==vA){for(z=-1/0,tt=0;tt<ot;tt++)xt=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(xt.diameter)&&of(xt,0),isNaN(b.diameter)&&of(b,0),z=Math.max(z,(xt.diameter+b.diameter)/2);tt=z+y,rt===gc?at=(z+y)/(2*Math.PI/ot):at=V0(this,tt*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180)}else at=V0(this,b+(360<=pt?ot:ot-1)*(rt!==vA?y:1.6*y),At,ft*Math.PI/180,pt*Math.PI/180);z=at*At}else if(z=at*At,xt=Ev(this,at,z,ft*Math.PI/180,pt*Math.PI/180),isNaN(y))(rt===mA||rt===vA)&&(y=(xt-b)/(360<=pt?ot:ot-1));else if(rt===mA||rt===vA)xt=(xt-b)/(360<=pt?ot:ot-1),xt<y?(at=V0(this,b+y*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180),z=at*At):y=xt;else{for(tt=-1/0,b=0;b<ot;b++)Ct=E.M(b),Mt=E.M(b===ot-1?0:b+1),isNaN(Ct.diameter)&&of(Ct,0),isNaN(Mt.diameter)&&of(Mt,0),tt=Math.max(tt,(Ct.diameter+Mt.diameter)/2);tt+=y,b=V0(this,tt*(360<=pt?ot:ot-1),At,ft*Math.PI/180,pt*Math.PI/180),b>at?(at=b,z=at*At):tt=xt/(360<=pt?ot:ot-1)}if(this.kw=rt,this.lc=at,this.Zm=At,this.lw=ft,this.Wp=pt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,at=this.lw,At=this.Wp,ft=this.Ti,pt=this.me,ot=this.Jp,this.direction!==Jf&&this.direction!==Ig||E!==vA)if(this.direction===Jf||this.direction===Ig){switch(tt=0,E){case nf:tt=180*_0(this,rt,pt,at,ot)/Math.PI;break;case mA:ot=y=0,tt=a.first(),tt!==null&&(y=of(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=of(tt,Math.PI/2)),tt=180*_0(this,rt,pt,at,ft+(y+ot)/2)/Math.PI;break;case gc:tt=At/y.length}if(this.direction===Jf){switch(E){case nf:kp(this,a,at,rf);break;case mA:Mp(this,a,at,rf);break;case gc:Ep(this,a,At/2,at,rf)}switch(E){case nf:kp(this,x,at+tt,Na);break;case mA:Mp(this,x,at+tt,Na);break;case gc:Ep(this,x,At/2,at+tt,Na)}}else{switch(E){case nf:kp(this,x,at,rf);break;case mA:Mp(this,x,at,rf);break;case gc:Ep(this,x,At/2,at,rf)}switch(E){case nf:kp(this,a,at+tt,Na);break;case mA:Mp(this,a,at+tt,Na);break;case gc:Ep(this,a,At/2,at+tt,Na)}}}else switch(E){case nf:kp(this,y,at,this.direction);break;case mA:Mp(this,y,at,this.direction);break;case gc:Ep(this,y,At,at,this.direction);break;case vA:Iw(this,y,At,at,this.direction)}else Iw(this,y,At,at-At/2,Na)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Ep(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,ot=0;ot<rt;ot++){var at=E+(b===Na?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),At=y.M(ot),ft=tt*Math.tan(at)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),At.centerX=ft*Math.cos(at),At.centerY=ft*Math.sin(at),At.actualAngle=180*at/Math.PI}}function Mp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var at=y.M(ot),At=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);at.centerX=b*Math.cos(x),at.centerY=ft,at.actualAngle=180*x/Math.PI,isNaN(at.diameter)&&of(at,0),isNaN(At.diameter)&&of(At,0),at=_0(a,b,z,E===Na?x:-x,(at.diameter+At.diameter)/2+tt),x+=E===Na?at:-at}}function kp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var at=y.M(ot);at.centerX=b*Math.cos(x),at.centerY=z*Math.sin(x),at.actualAngle=180*x/Math.PI,at=_0(a,b,z,E===Na?x:-x,tt),x+=E===Na?at:-at}}function Iw(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new bp,360>x){for(z=E+(b===Na?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,Qw(a,y,x,E,b)}else Nw(a,y,x,E,b);a.Xr.commit(y)}function Nw(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),at=a.me*Math.sin(E*Math.PI/180),At=y.Fa();if(At.length===3)At[0].centerX=z,At[0].centerY=0,At[1].centerX=At[0].centerX-At[0].width/2-At[1].width/2-tt,At[1].y=At[0].y,At[2].centerX=(At[0].centerX+At[1].centerX)/2,At[2].y=At[0].y-At[2].height-tt;else if(At.length===4)At[0].centerX=z,At[0].centerY=0,At[2].centerX=-At[0].centerX,At[2].centerY=At[0].centerY,At[1].centerX=0,At[1].y=Math.min(At[0].y,At[2].y)-At[1].height-tt,At[3].centerX=0,At[3].y=Math.max(At[0].y+At[0].height+tt,At[2].y+At[2].height+tt);else{z=Ht.alloc();for(var ft=0;ft<At.length&&(At[ft].centerX=ot,At[ft].centerY=at,!(ft>=At.length-1));ft++)Uw(a,ot,at,At,ft,b,z)||Dw(a,ot,at,At,ft,b,z),ot=z.x,at=z.y;if(Ht.free(z),a.mj++,!(23<a.mj)){ot=At[0].centerX,at=At[0].centerY,z=At[At.length-1].centerX,ft=At[At.length-1].centerY;var pt=Math.abs(ot-z)-((At[0].width+At[At.length-1].width)/2+tt),xt=Math.abs(at-ft)-((At[0].height+At[At.length-1].height)/2+tt);tt=0,1>Math.abs(xt)?Math.abs(ot-z)<(At[0].width+At[At.length-1].width)/2&&(tt=0):tt=0<xt?xt:1>Math.abs(pt)?0:pt,ot=Math.abs(z)>Math.abs(ft)?0<z!=at>ft:0<ft!=ot<z,(ot=b===Na?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-At[At.length-1].width),tt=Math.min(tt,-At[At.length-1].height)),a.Xr.compare(tt,At),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>At.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,Nw(a,y,x,E,b))}}}function Qw(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),at=tt*Math.sin(E*Math.PI/180),At=Ht.alloc(),ft=y.Fa(),pt=0;pt<ft.length&&(ft[pt].centerX=ot,ft[pt].centerY=at,!(pt>=ft.length-1));pt++)Uw(a,ot,at,ft,pt,b,At)||Dw(a,ot,at,ft,pt,b,At),ot=At.x,at=At.y;if(Ht.free(At),a.mj++,!(23<a.mj)){if(ot=Math.atan2(at,ot),ot=b===Na?a.gt-ot:ot-a.gt,ot=Math.abs(ot)<Math.abs(ot-2*Math.PI)?ot:ot-2*Math.PI,z=ot*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],ot=0;ot<ft.length;ot++)tt.mk[ot]=ft[ot].bounds.x,tt.tm[ot]=ft[ot].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*rt,Qw(a,y,x,E,b))}}function Uw(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,at=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var At=!1;if(0<=x!=(z===Na)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=at,!1;At=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=at,!1;At=!0}return at=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==At&&(at=-at),Math.abs(x-at)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=at,!1):(tt.x=z,tt.y=at,!0)}function Dw(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,at=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Na)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=at,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=at,tt.y=z;return}E=!0}at=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(at=-at),tt.x=at,tt.y=z}Eo.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Eo.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 Ht(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))},Eo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Ev(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)),ot=0,at=0;at<=z;at++){E!==void 0&&b!==void 0?ot=E+at*b/z:ot=at*Math.PI/(2*z);var At=Math.sin(ot);tt+=Math.sqrt(1-a*a*At*At)*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?Ev(a,1,x,E,b):Ev(a,1,x))}function _0(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 ot=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*ot*ot)*a,tt>=b)return rt*a}}Eo.prototype.sort=function(a){switch(this.sorting){case W0:break;case Y0:a.reverse();break;case X0:a.sort(this.comparer);break;case Z0:a.sort(this.comparer),a.reverse();break;case Ng:return this.ak(I1(a));default:Yt("Invalid sorting type.")}return a};function I1(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new _t;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var rt=a.M(tt).edgesCount;rt>b&&(b=rt,z=tt)}else for(tt=0;tt<a.length;tt++)rt=y[tt],rt>b&&(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}Eo.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[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;x<y.length;x++)z[x]=0;x=[];var tt=[],rt=[];E=[],b=new _t;for(var ot=0,at=0;at<y.length;at++){var At=y[at].length;if(At===1)E.push(at);else if(At===0)b.add(a.M(at));else{if(ot===0)x.push(at);else{for(var ft=At=1/0,pt=-1,xt=[],Ct=0;Ct<x.length;Ct++)0>y[x[Ct]].indexOf(x[Ct===x.length-1?0:Ct+1])&&xt.push(Ct===x.length-1?0:Ct+1);if(xt.length===0)for(Ct=0;Ct<x.length;Ct++)xt.push(Ct);for(Ct=0;Ct<xt.length;Ct++){for(var Mt=xt[Ct],Gt=y[at],Ot=0,Wt=0;Wt<tt.length;Wt++){var Zt=z[tt[Wt]],te=z[rt[Wt]];if(Zt<te){var re=Zt;Zt=te}else re=te;if(re<Mt&&Mt<=Zt)for(te=0;te<Gt.length;te++){var me=Gt[te];0>x.indexOf(me)||re<z[me]&&z[me]<Zt||re===z[me]||Zt===z[me]||Ot++}else for(te=0;te<Gt.length;te++)me=Gt[te],0>x.indexOf(me)||re<z[me]&&z[me]<Zt&&re!==z[me]&&Zt!==z[me]&&Ot++}for(Gt=Ot,Wt=Ot=0;Wt<y[at].length;Wt++)re=x.indexOf(y[at][Wt]),0<=re&&(re=Math.abs(Mt-(re>=Mt?re+1:re)),Ot+=re<x.length+1-re?re:x.length+1-re);for(Wt=0;Wt<tt.length;Wt++)re=z[tt[Wt]],Zt=z[rt[Wt]],re>=Mt&&re++,Zt>=Mt&&Zt++,re>Zt&&(te=Zt,Zt=re,re=te),Zt-re<(x.length+2)/2==(re<Mt&&Mt<=Zt)&&Ot++;(Gt<At||Gt===At&&Ot<ft)&&(At=Gt,ft=Ot,pt=Mt)}for(x.splice(pt,0,at),At=0;At<x.length;At++)z[x[At]]=At;for(At=0;At<y[at].length;At++)ft=y[at][At],0<=x.indexOf(ft)&&(tt.push(at),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],at=y[ot][0],At=x.indexOf(at),0<=At){for(pt=ft=0;pt<y[at].length;pt++)xt=x.indexOf(y[at][pt]),0>xt||xt===At||(Ct=xt>At?xt-At:At-xt,ft+=xt<At!=Ct>tt-Ct?1:-1);x.splice(0>ft?At:At+1,0,ot),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},Ze.Object.defineProperties(Eo.prototype,{radius:{get:function(){return this.eo},set:function(a){this.eo!==a&&(0<a||isNaN(a))&&(this.eo=a,this.C())}},aspectRatio:{get:function(){return this.Cm},set:function(a){this.Cm!==a&&0<a&&(this.Cm=a,this.C())}},startAngle:{get:function(){return this.ro},set:function(a){this.ro!==a&&(this.ro=a,this.C())}},sweepAngle:{get:function(){return this.ul},set:function(a){this.ul!==a&&(0<a&&360>=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==vA&&a!==mA&&a!==nf&&a!==gc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Na&&a!==rf&&a!==Jf&&a!==Ig||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==W0&&a!==Y0&&a!==X0&&!Z0&&a!==Ng||(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!==J0&&a!==jd||(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 mA=new Be(Eo,"ConstantSpacing",0),nf=new Be(Eo,"ConstantDistance",1),gc=new Be(Eo,"ConstantAngle",2),vA=new Be(Eo,"Packed",3),Na=new Be(Eo,"Clockwise",4),rf=new Be(Eo,"Counterclockwise",5),Jf=new Be(Eo,"BidirectionalLeft",6),Ig=new Be(Eo,"BidirectionalRight",7),W0=new Be(Eo,"Forwards",8),Y0=new Be(Eo,"Reverse",9),X0=new Be(Eo,"Ascending",10),Z0=new Be(Eo,"Descending",11),Ng=new Be(Eo,"Optimized",12),J0=new Be(Eo,"Pythagorean",13),jd=new Be(Eo,"Circular",14);Eo.className="CircularLayout",Eo.ConstantSpacing=mA,Eo.ConstantDistance=nf,Eo.ConstantAngle=gc,Eo.Packed=vA,Eo.Clockwise=Na,Eo.Counterclockwise=rf,Eo.BidirectionalLeft=Jf,Eo.BidirectionalRight=Ig,Eo.Forwards=W0,Eo.Reverse=Y0,Eo.Ascending=X0,Eo.Descending=Z0,Eo.Optimized=Ng,Eo.Pythagorean=J0,Eo.Circular=jd;function bp(){this.Pl=-1/0,this.tm=this.mk=null}bp.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},bp.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},bp.className="VertexArrangement";function Qg(a){qr.call(this,a)}Te(Qg,qr),Qg.prototype.createVertex=function(){return new Tp(this)},Qg.prototype.createEdge=function(){return new q0(this)},Qg.className="CircularNetwork";function Tp(a){gs.call(this,a),this.u=this.Si=NaN}Te(Tp,gs);function of(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===vA)if(x.nodeDiameterFormula===jd)a.Si=Math.max(a.width,a.height);else{if(x=Math.abs(Math.sin(y)),y=Math.abs(Math.cos(y)),x===0)return a.width;if(y===0)return a.height;a.Si=Math.min(a.height/x,a.width/y)}else a.Si=x.nodeDiameterFormula===jd?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Ze.Object.defineProperties(Tp.prototype,{diameter:{get:function(){return this.Si},set:function(a){this.Si!==a&&(this.Si=a)}},actualAngle:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}}}),Tp.className="CircularVertex";function q0(a){ml.call(this,a)}Te(q0,ml),q0.className="CircularEdge";function $s(a){mo.call(this),this.ah=null,this.An=0,this.$d=new Je(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Te($s,mo),$s.prototype.cloneProtected=function(a){mo.prototype.cloneProtected.call(this,a),a.$d.assign(this.$d),a.Bm=this.Bm,a.sf=this.sf,a.td=this.td,a.dl=this.dl,a.$m=this.$m,a.Zf=this.Zf,a.In=this.In,a.fo=this.fo,a.Hk=this.Hk,a.Gk=this.Gk,a.Ek=this.Ek,a.Fk=this.Fk,a.Vm=this.Vm,a.Um=this.Um},$s.prototype.createNetwork=function(){return new Kd(this)},$s.prototype.doLayout=function(a){if(this.network===null&&(this.network=this.makeNetwork(a)),a=this.maxIterations,0<this.network.vertexes.count){this.network.Ko();for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;x.charge=this.electricalCharge(x),x.mass=this.gravitationalMass(x)}for(y=this.network.edges.iterator;y.next();)x=y.value,x.stiffness=this.springStiffness(x),x.length=this.springLength(x);if(this.Cu(),this.An=0,this.needsClusterLayout()){y=this.network,x=y.Zx();for(var E=x.iterator;E.next();){this.network=E.value;for(var b=this.network.vertexes.iterator;b.next();){var z=b.value;z.Vd=z.vertexes.count,z.sh=1,z.Hj=null,z.We=null}Ow(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var rt=tt.count,ot=!0;z=b=0;for(var at=bn(),At=0;At<rt+y.vertexes.count+2;At++)at[At]=null;rt=0,tt.reset();for(var ft=be.alloc();tt.next();)if(At=tt.value,this.computeBounds(At,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,at[0]=new Ht(ft.x+ft.width+E.width,ft.y),at[1]=new Ht(ft.x,ft.y+ft.height+E.height),rt=2;else{var pt=Hw(at,rt,b,z,ft.width,ft.height,E),xt=at[pt],Ct=new Ht(xt.x+ft.width+E.width,xt.y),Mt=new Ht(xt.x,xt.y+ft.height+E.height);for(pt+1<rt&&at.splice(pt+1,0,null),at[pt]=Ct,at[pt+1]=Mt,rt++,pt=xt.x-ft.x,xt=xt.y-ft.y,At=At.vertexes.iterator;At.next();)Ct=At.value,Ct.centerX+=pt,Ct.centerY+=xt}for(be.free(ft),At=y.vertexes.iterator;At.next();)tt=At.value,pt=tt.bounds,2>rt?(b=pt.x+pt.width/2,z=pt.y+pt.height/2,at[0]=new Ht(pt.x+pt.width+E.width,pt.y),at[1]=new Ht(pt.x,pt.y+pt.height+E.height),rt=2):(ot=Hw(at,rt,b,z,pt.width,pt.height,E),ft=at[ot],xt=new Ht(ft.x+pt.width+E.width,ft.y),pt=new Ht(ft.x,ft.y+pt.height+E.height),ot+1<rt&&at.splice(ot+1,0,null),at[ot]=xt,at[ot+1]=pt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(Ln(at),E=x.iterator;E.next();){for(x=E.value,b=x.vertexes.iterator;b.next();)y.dh(b.value);for(x=x.edges.iterator;x.next();)y.Bo(x.value)}}Gw(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},$s.prototype.needsClusterLayout=function(){if(3>this.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++,2<a))return!0;if(10<y)break;y++}return!1},$s.prototype.computeBounds=function(a,y){var x=!0;for(a=a.vertexes.iterator;a.next();){var E=a.value;x?(x=!1,y.set(E.bounds)):y.ed(E.bounds)}return y};function Ow(a,y,x){if(N1(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Q1(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,Ow(a,y+1,x),Gw(a,z),U1(a,b),y=b.vertexes.Fa(),y.sort(function(tt,rt){return tt===null||rt===null||tt===rt?0:rt.Vd-tt.Vd}),x=0;x<y.length;x++)D1(a,y[x]);a.Zf=E}}function N1(a,y){if(10<y||3>a.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<a.length-y}function Q1(a,y){for(var x=a.network,E=new Kd(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new zw;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new _t),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var rt=z.value;b=rt.fromVertex,tt=rt.toVertex,b.network===E&&tt.network===E?E.Bo(rt):b.network===E?(rt=b.Hj,rt===null&&(rt=new _t,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new _t,tt.Hj=rt),rt.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,se.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var ot=b.Hj;if(ot!==null&&0<ot.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var at=rt=0,At=ot.count-tt;At<ot.count;At++){var ft=ot.M(At),pt=null;for(z=ft.edges.iterator;z.next();){var xt=z.value;if(xt.Ax(ft)===b){pt=xt;break}}pt!==null&&(at+=pt.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,At=b.width,ft=b.height,pt=b.focus,xt=At*ft,1>xt&&(xt=1),rt=se.sqrt((rt+xt+at*at*4/(tt*tt))/xt),tt=(rt-1)*At/2,rt=(rt-1)*ft/2,b.bounds=new be(z-pt.x-tt,ot-pt.y-rt,At+2*tt,ft+2*rt),b.focus=new Ht(pt.x+tt,pt.y+rt)}}return a.network=E,x}function U1(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 be(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Ht(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function D1(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<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=se.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,at=0,At=y.vertexes.iterator;At.next();){var ft=At.value;1>=ft.Vd?ot++:(rt=!0,at++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<at&&(tt/=at),at=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(at=y/2),1<x.count&&x.sort(function(xt,Ct){return xt===null||Ct===null||xt===Ct?0:Ct.width*Ct.height-xt.width*xt.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(At=null,ft=ot.edges.iterator;ft.next();){At=ft.value;break}ft=ot.width;var pt=ot.height;ft=se.sqrt(ft*ft+pt*pt)/2,At=z+At.length+ft,ft=tt+(y*(rt/2>>1)+at)*(rt%2===0?1:-1),ot.centerX=E+At*Math.cos(ft),ot.centerY=b+At*Math.sin(ft),rt++}}}}function Hw(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,at=0;t:for(;at<y;at++){var At=a[at],ft=At.x-x,pt=At.y-E;if(ft=ft*ft+pt*pt,ft<rt){for(pt=at-1;0<=pt;pt--)if(a[pt].y>At.y&&a[pt].x-At.x<b+tt.width)continue t;for(pt=at+1;pt<y;pt++)if(a[pt].x>At.x&&a[pt].y-At.y<z+tt.height)continue t;ot=at,rt=ft}}return ot}$s.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},$s.prototype.addComments=function(a){var y=a.node;if(y!==null)for(y=y.Mu();y.next();){var x=y.value;if(x.category==="Comment"&&x.isVisible()){var E=this.network.ki(x);E===null&&(E=this.network.Bl(x)),E.charge=this.defaultCommentElectricalCharge,x=null;for(var b=E.destinationEdges;b.next();){var z=b.value;if(z.toVertex===a){x=z;break}}if(x===null){for(b=E.sourceEdges;b.next();)if(z=b.value,z.fromVertex===a){x=z;break}}x===null&&(x=this.network.Zj(a,E,null)),x.length=this.defaultCommentSpringLength}}};function Rw(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var rt=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,se.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,se.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,se.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,se.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Gw(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,O1(a)););a.ah=null}function O1(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=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;tt<y.length;tt++){var rt=y[tt];rt.forceX=0,rt.forceY=0;var ot=rt.centerX;rt=rt.centerY,E=Math.min(E,ot),b=Math.max(b,ot),x=Math.min(x,rt),z=Math.max(z,rt)}(b=b-E>z-x)?y.sort(function(Mt,Gt){return Mt===null||Gt===null||Mt===Gt?0:Mt.centerX-Gt.centerX}):y.sort(function(Mt,Gt){return Mt===null||Gt===null||Mt===Gt?0:Mt.centerY-Gt.centerY}),x=a.Zf;var at=E=rt=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,rt=tt.focus,ot=E.x+rt.x;var At=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,At),at=tt.charge*a.electricalFieldY(ot,At),E+=tt.mass*a.gravitationalFieldX(ot,At),at+=tt.mass*a.gravitationalFieldY(ot,At),tt.forceX+=E,tt.forceY+=at;for(var ft=z+1;ft<y.length;ft++){var pt=y[ft];if(pt!==tt){E=pt.bounds,rt=pt.focus,at=E.x+rt.x;var xt=E.y+rt.y;if(ot-at>x||at-ot>x){if(b)break}else if(At-xt>x||xt-At>x){if(!b)break}else{var Ct=Rw(tt,pt);1>Ct?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new $0),Ct=E.random(),rt=E.random(),ot>at?(E=Math.abs(pt.bounds.right-tt.bounds.x),E=(1+E)*Ct):ot<at?(E=Math.abs(pt.bounds.x-tt.bounds.right),E=-(1+E)*Ct):(E=Math.max(pt.width,tt.width),E=(1+E)*Ct-E/2),At>xt?(at=Math.abs(pt.bounds.bottom-tt.bounds.y),at=(1+at)*rt):ot<at?(at=Math.abs(pt.bounds.y-tt.bounds.bottom),at=-(1+at)*rt):(at=Math.max(pt.height,tt.height),at=(1+at)*rt-at/2)):(rt=-(tt.charge*pt.charge)/(Ct*Ct),E=(at-ot)/Ct*rt,at=(xt-At)/Ct*rt),tt.forceX+=E,tt.forceY+=at,pt.forceX-=E,pt.forceY-=at}}}}for(b=a.network.edges.iterator;b.next();)rt=b.value,x=rt.fromVertex,z=rt.toVertex,tt=x.bounds,ot=x.focus,E=tt.x+ot.x,tt=tt.y+ot.y,At=z.bounds,ft=z.focus,ot=At.x+ft.x,At=At.y+ft.y,ft=Rw(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new $0),rt=ft.random(),ft=ft.random(),E=(E>ot?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,at=(tt>At?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,at=(At-tt)/ft*rt),x.forceX+=E,x.forceY+=at,z.forceX-=E,z.forceY-=at;for(b=E=0;b<y.length;b++)x=y[b],a.isFixed(x)?a.moveFixedVertex(x):E=Math.max(E,a.moveVertex(x)||0);return E>a.epsilonDistance*a.epsilonDistance}$s.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},$s.prototype.moveFixedVertex=function(){},$s.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},$s.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=is,y.toSpot=is)}},$s.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=be.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,be.free(x)}x=be.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()}be.free(x)},$s.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},$s.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},$s.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},$s.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},$s.prototype.electricalFieldX=function(){return 0},$s.prototype.electricalFieldY=function(){return 0},$s.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},$s.prototype.gravitationalFieldX=function(){return 0},$s.prototype.gravitationalFieldY=function(){return 0},$s.prototype.isFixed=function(a){return a.isFixed},Ze.Object.defineProperties($s.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&&0<a&&(this.$m=a,this.C())}},infinityDistance:{get:function(){return this.Zf},set:function(a){this.Zf!==a&&1<a&&(this.Zf=a,this.C())}},moveLimit:{get:function(){return this.In},set:function(a){this.In!==a&&1<a&&(this.In=a,this.C())}},randomNumberGenerator:{get:function(){return this.fo},set:function(a){this.fo!==a&&(a!==null&&typeof a.random!="function"&&Yt('ForceDirectedLayout.randomNumberGenerator must have a "random()" function on it: '+a),this.fo=a)}},defaultSpringStiffness:{get:function(){return this.Hk},set:function(a){this.Hk!==a&&(this.Hk=a,this.C())}},defaultSpringLength:{get:function(){return this.Gk},set:function(a){this.Gk!==a&&(this.Gk=a,this.C())}},defaultElectricalCharge:{get:function(){return this.Ek},set:function(a){this.Ek!==a&&(this.Ek=a,this.C())}},defaultGravitationalMass:{get:function(){return this.Fk},set:function(a){this.Fk!==a&&(this.Fk=a,this.C())}},defaultCommentSpringLength:{get:function(){return this.Vm},set:function(a){this.Vm!==a&&(this.Vm=a,this.C())}},defaultCommentElectricalCharge:{get:function(){return this.Um},set:function(a){this.Um!==a&&(this.Um=a,this.C())}}}),$s.className="ForceDirectedLayout";function zw(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}zw.className="ForceDirectedSubnet";function Kd(a){qr.call(this,a)}Te(Kd,qr),Kd.prototype.createVertex=function(){return new Ip(this)},Kd.prototype.createEdge=function(){return new Np(this)},Kd.className="ForceDirectedNetwork";function Ip(a){gs.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}Te(Ip,gs),Ze.Object.defineProperties(Ip.prototype,{isFixed:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},charge:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},mass:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},forceX:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},forceY:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}}}),Ip.className="ForceDirectedVertex";function Np(a){ml.call(this,a),this.j=this.o=NaN}Te(Np,ml),Ze.Object.defineProperties(Np.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Np.className="ForceDirectedEdge";function $0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}$0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},$0.className="RandomNumberGenerator";function Qr(a){mo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=rm,this.Zk=om,this.Qk=sm,this.bj=4,this.rk=am,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new Ht,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Te(Qr,mo),Qr.prototype.cloneProtected=function(a){mo.prototype.cloneProtected.call(this,a),a.ie=this.ie,a.kc=this.kc,a.K=this.K,a.Dk=this.Dk,a.Zk=this.Zk,a.Qk=this.Qk,a.bj=this.bj,a.rk=this.rk,a.bg=this.bg,a.sf=this.sf,a.Cn=this.Cn,a.ve=this.ve},Qr.prototype.qb=function(a){a.classType===Qr?a.name.indexOf("Aggressive")===0?this.aggressiveOption=a:a.name.indexOf("Cycle")===0?this.cycleRemoveOption=a:a.name.indexOf("Init")===0?this.initializeOption=a:a.name.indexOf("Layer")===0?this.layeringOption=a:Yt("Unknown enum value: "+a):mo.prototype.qb.call(this,a)},Qr.prototype.createNetwork=function(){return new Dg(this)},Qr.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Up&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Up&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,rt=0,ot=0,at=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var At=b.node;if(tt=z.node,At===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var pt=rt.fromPort;pt!==null&&!pt.Ed();)pt=pt.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){at=ft;var xt=pt;ft=ot,pt=rt,ot=at,rt=xt}var Ct=b.focus;at=z.focus;var Mt=E.rev?z.bounds:b.bounds;xt=Ht.alloc(),At!==ft?Mt.w()&&ft.isVisible()?ft.actualBounds.w()?(uc(ft,pt,Ui,xt),xt.x+=ft.actualBounds.x-Mt.x,xt.y+=ft.actualBounds.y-Mt.y):(uc(ft,pt,Ui,xt),xt.w()||xt.assign(Ct)):xt.assign(Ct):Mt.w()?(uc(ft,pt,Ui,xt),xt.w()||xt.assign(Ct)):xt.assign(Ct),ft=E.rev?b.bounds:z.bounds,At=Ht.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(uc(ot,rt,Ui,At),At.x+=ot.actualBounds.x-ft.x,At.y+=ot.actualBounds.y-ft.y):(uc(ot,rt,Ui,At),At.w()||At.assign(at)):At.assign(at):ft.w()?(uc(ot,rt,Ui,At),At.w()||At.assign(at)):At.assign(at),this.K===90||this.K===270?(tt=Math.round((xt.x-Ct.x)/this.kc),ot=xt.x,rt=Math.round((At.x-at.x)/this.kc),at=At.x):(tt=Math.round((xt.y-Ct.y)/this.kc),ot=xt.y,rt=Math.round((At.y-at.y)/this.kc),at=At.y),Ht.free(xt),Ht.free(At),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=at}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(xt=b.layer,At=z.layer,ft=0,Mt=E.link,Mt!==null){var Gt=Mt.fromPort,Ot=Mt.toPort;if(Gt!==null&&Ot!==null){var Wt=Mt.fromNode;if(pt=Mt.toNode,Wt!==null&&pt!==null){var Zt=im(this,!0),te=im(this,!1),re=this.setsPortSpots?Zt:Mt.computeSpot(!0,Gt);Ct=this.setsPortSpots?te:Mt.computeSpot(!1,Ot);var me=Mt.isOrthogonal;re.$c()&&re.Hf(te)&&Ct.$c()&&Ct.Hf(Zt)?ft=0:(Zt=Mt.getLinkPoint(Wt,Gt,re,!0,me,pt,Ot,Ht.alloc()),te=Mt.getLinkDirection(Wt,Gt,Zt,re,!0,me,pt,Ot),Ht.free(Zt),re.ys()||te!==Jw(this,E,!0)?this.setsPortSpots&&Wt!==null&&Wt.ports.count===1&&E.rev&&(ft+=1):ft+=1,re=Mt.getLinkPoint(pt,Ot,Ct,!1,me,Wt,Gt,Ht.alloc()),Mt=Mt.getLinkDirection(pt,Ot,re,Ct,!1,me,Wt,Gt),Ht.free(re),Ct.ys()||Mt!==Jw(this,E,!1)?this.setsPortSpots&&pt!==null&&pt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(pt=ft,ft=pt===1||pt===3,(pt=pt===2||pt===3)&&(Ct=a.createVertex(),Ct.node=null,Ct.Dj=1,Ct.layer=xt,Ct.near=b,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=Ct),Mt=1,ft&&Mt--,xt-At>Mt&&0<xt){for(E.valid=!1,Ct=a.createVertex(),Ct.node=null,Ct.Dj=2,Ct.layer=xt-1,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=pt?0:tt,b.portToColOffset=0,b.portFromPos=pt?0:ot,b.portToPos=0,b=Ct,xt--;xt-At>Mt&&0<xt;)Ct=a.createVertex(),Ct.node=null,Ct.Dj=3,Ct.layer=xt-1,a.dh(Ct),b=a.Zj(b,Ct,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Ct,xt--;b=a.Zj(Ct,z,E.link),b.valid=!ft,ft&&(Ct.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=at}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=sf(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),af(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},Qr.prototype.linkMinLength=function(){return 1};function Mv(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}Qr.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},Qr.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function _a(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function zl(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function jw(a,y,x){var E=sf(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var rt=0,ot=E[tt],at=ot.near;if(at!==null&&at.layer===ot.layer)if(ot=at.index,ot>tt)for(var At=tt+1;At<ot;At++){var ft=E[At];ft.near===at&&ft.Dj===at.Dj||rt++}else for(At=tt-1;At>ot;At--)ft=E[At],ft.near===at&&ft.Dj===at.Dj||rt++;var pt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,at=0;at<ot.length;at++){var xt=ot[at];if(xt.valid&&xt.fromVertex.layer!==y)for(ft=xt.fromVertex.index,At=xt.portToPos,xt=xt.portFromPos,pt=at+1;pt<ot.length;pt++){var Ct=ot[pt];if(Ct.valid&&Ct.fromVertex.layer!==y){var Mt=Ct.fromVertex.index,Gt=Ct.portToPos;Ct=Ct.portFromPos,At<Gt&&(ft>Mt||ft===Mt&&xt>Ct)&&rt++,Gt<At&&(Mt>ft||Mt===ft&&Ct>xt)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,at=0;at<ot.length;at++)if(xt=ot[at],xt.valid&&xt.toVertex.layer!==y)for(ft=xt.toVertex.index,At=xt.portToPos,xt=xt.portFromPos,pt=at+1;pt<ot.length;pt++)Ct=ot[pt],Ct.valid&&Ct.toVertex.layer!==y&&(Mt=Ct.toVertex.index,Gt=Ct.portToPos,Ct=Ct.portFromPos,xt<Ct&&(ft>Mt||ft===Mt&&At>Gt)&&rt++,Ct<xt&&(Mt>ft||Mt===ft&&Gt>At)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var Ot=0,Wt=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var Zt=E[ot].sourceEdgesArrayAccess;for(at=0;at<rt.length;at++)if(xt=rt[at],xt.valid&&xt.fromVertex.layer!==y)for(ft=xt.fromVertex.index,xt=xt.portFromPos,pt=0;pt<Zt.length;pt++)Ct=Zt[pt],Ct.valid&&Ct.fromVertex.layer!==y&&(Mt=Ct.fromVertex.index,Ct=Ct.portFromPos,(ft<Mt||ft===Mt&&xt<Ct)&&Wt++,(Mt<ft||Mt===ft&&Ct<xt)&&Ot++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,Zt=E[ot].destinationEdgesArrayAccess,at=0;at<rt.length;at++)if(xt=rt[at],xt.valid&&xt.toVertex.layer!==y)for(ft=xt.toVertex.index,At=xt.portToPos,pt=0;pt<Zt.length;pt++)Ct=Zt[pt],Ct.valid&&Ct.toVertex.layer!==y&&(Mt=Ct.toVertex.index,Gt=Ct.portToPos,(ft<Mt||ft===Mt&&At<Gt)&&Wt++,(Mt<ft||Mt===ft&&Gt<At)&&Ot++)}z[tt*b+ot]=Ot,z[ot*b+tt]=Wt}}return af(a,y,E),z}Qr.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=jw(this,y,1),E=this.tc[y],b=0;b<E;b++)for(var z=b;z<E;z++)a+=x[b*E+z];return a};function tm(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=sf(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var at=z[ot].destinationEdgesArrayAccess;if(at!==null)for(var At=0;At<at.length;At++){var ft=at[At];if(ft.valid&&ft.toVertex.layer!==b){var pt=ft.fromVertex.column+ft.portFromColOffset,xt=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(pt-xt)+1)*Mv(ft)}}}af(E,b,z),y+=rt}return y}Qr.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function kv(a,y,x){for(var E=sf(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var at=null;0<=x&&(at=rt.destinationEdgesArrayAccess);var At=0,ft=0,pt=rt.near;if(pt!==null&&pt.layer===rt.layer&&(At+=pt.column-1,ft++),ot!==null)for(pt=0;pt<ot.length;pt++){rt=ot[pt];var xt=rt.fromVertex;rt.valid&&!rt.rev&&xt.layer!==y&&(At+=xt.column,ft++)}if(at!==null)for(ot=0;ot<at.length;ot++)rt=at[ot],pt=rt.toVertex,rt.valid&&!rt.rev&&pt.layer!==y&&(At+=pt.column,ft++);z[tt]=ft===0?-1:At/ft}return af(a,y,E),z}function Kw(a,y,x){for(var E=sf(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var at=null;0<=x&&(at=rt.destinationEdgesArrayAccess);var At=0,ft=[],pt=rt.near;if(pt!==null&&pt.layer===rt.layer&&(ft[At]=pt.column-1,At++),rt=void 0,ot!==null)for(pt=0;pt<ot.length;pt++){rt=ot[pt];var xt=rt.fromVertex;rt.valid&&!rt.rev&&xt.layer!==y&&(ft[At]=xt.column+rt.portFromColOffset,At++)}if(at!==null)for(ot=0;ot<at.length;ot++)rt=at[ot],pt=rt.toVertex,rt.valid&&!rt.rev&&pt.layer!==y&&(ft[At]=pt.column+rt.portToColOffset,At++);At===0?z[tt]=-1:(ft.sort(function(Ct,Mt){return Ct-Mt}),at=At>>1,z[tt]=At&1?ft[at]:ft[at-1]+ft[at]>>1)}return af(a,y,E),z}function Qp(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,ot=rt.toVertex,at=y.layer-ot.layer;rt=a.linkMinLength(rt),at===rt&&Qp(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,at=ot.layer-y.layer,rt=a.linkMinLength(rt),at===rt&&Qp(a,ot,x,E,b,z)}}function bv(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)bv(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)bv(a,y.value.fromVertex,x,E,b,z)}}Qr.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Nv: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(;H1(a)!==null;){for(b=Vw(a);b!==null;)E[x]=b,x--,b.valid=!1,b=Vw(a);for(b=_w(a);b!==null;)E[y]=b,y++,b.valid=!1,b=_w(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var ot=0,at=rt.destinationEdges;at.next();)at.value.toVertex.valid&&ot++;at=0;for(var At=rt.sourceEdges;At.next();)At.value.fromVertex.valid&&at++;(b===null||z<ot-at)&&(b=rt,z=ot-at)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case rm: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&&Tv(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&Tv(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.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Up:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){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;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function H1(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function Vw(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function _w(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function Tv(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,Tv(a,b))}y.finish=a.Kn,a.Kn++}Qr.prototype.assignLayers=function(){switch(this.Zk){case Qv:Ww(this);break;case Uv:for(var a,y=this.network.vertexes.iterator;y.next();)a=Xw(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case om:for(Ww(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Zw(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function Ww(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Yw(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Yw(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,Yw(a,z)+b)}y.layer=x}else x=y.layer;return x}function Xw(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,Xw(a,z)+b)}y.layer=x}else x=y.layer;return x}function Zw(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Zw(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],rt=tt.fromVertex,ot=tt.toVertex;tt=a.linkMinLength(tt),rt.layer-ot.layer>tt&&Qp(a,rt,0,-1,!0,!1)}for(Qp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,ot=null,tt=a.network.vertexes.iterator;tt.next();){var at=tt.value;if(at.component===1){var At=0,ft=!1,pt=at.sourceEdgesArrayAccess;b=pt.length;for(var xt=0;xt<b;xt++){var Ct=pt[xt],Mt=Ct.fromVertex;At+=1,Mt.component!==1&&(z+=1,Mt=Mt.layer-at.layer,Ct=a.linkMinLength(Ct),E=Math.min(E,Mt-Ct))}for(pt=at.destinationEdgesArrayAccess,b=pt.length,xt=0;xt<b;xt++)Ct=pt[xt].toVertex,--At,Ct.component!==1?--z:ft=!0;(ot===null||At<rt)&&!ft&&(ot=at,rt=At)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else ot.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Qp(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,rt=null,ot=a.network.vertexes.iterator;ot.next();)if(tt=ot.value,tt.component===1){for(at=0,At=!1,pt=tt.sourceEdgesArrayAccess,ft=pt.length,xt=0;xt<ft;xt++)Ct=pt[xt].fromVertex,at+=1,Ct.component!==1?E+=1:At=!0;for(pt=tt.destinationEdgesArrayAccess,ft=pt.length,xt=0;xt<ft;xt++)Ct=pt[xt],Mt=Ct.toVertex,--at,Mt.component!==1&&(--E,Mt=tt.layer-Mt.layer,Ct=a.linkMinLength(Ct),b=Math.min(b,Mt-Ct));(rt===null||at>z)&&!At&&(rt=tt,z=at)}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 Jw(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}Qr.prototype.initializeIndices=function(){switch(this.Qk){default:case Ov: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 sm: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&&qw(this,x);break;case Dv: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&&$w(this,x)}};function qw(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;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&qw(a,E))}function $w(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&$w(a,E))}Qr.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=_a(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)em(this,E,1),Xl(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=_a(this)),E=this.Ia;0<=E;E--)em(this,E,-1),Xl(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=_a(this))}for(zl(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)em(this,E,0),Xl(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=_a(this)),E=this.Ia;0<=E;E--)em(this,E,0),Xl(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=_a(this))}zl(this,y);var z,tt,rt;switch(this.rk){case Hv:break;case Rv:for(rt=a+1;(E=this.countCrossings())<rt;)for(rt=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,-1)||z;for(b=this.countCrossings(),b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,1)||z;for(b=this.countCrossings(),b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,1)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,-1)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,0)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,0)||z;b>=a?zl(this,y):(a=b,y=_a(this))}break;default:case am:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())<rt;){for(rt=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,-1)||z;for(b=this.countCrossings(),b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,1)||z;for(b=this.countCrossings(),b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,1)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,-1)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=Xl(this,E,0)||z;for(b>=a?zl(this,y):(a=b,y=_a(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=Xl(this,E,0)||z;b>=a?zl(this,y):(a=b,y=_a(this))}}zl(this,y)};function em(a,y,x){var E=sf(a,y),b=a.tc[y],z=Kw(a,y,x),tt=kv(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var rt=!0,ot;rt;)for(rt=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(rt=!0,ot=z[x],z[x]=z[x+1],z[x+1]=ot,ot=tt[x],tt[x]=tt[x+1],tt[x+1]=ot,ot=E[x],E[x]=E[x+1],E[x+1]=ot);for(x=z=0;x<b;x++)ot=E[x],ot.index=x,z+=a.nodeMinColumnSpace(ot,!0),ot.column=z,z+=1,z+=a.nodeMinColumnSpace(ot,!1);af(a,y,E)}function Xl(a,y,x){var E=sf(a,y),b=a.tc[y];x=jw(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var rt=[];for(z=0;z<b;z++)rt[z]=-1;for(var ot=!1,at=!0;at;)for(at=!1,z=0;z<b-1;z++){var At=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],pt=0,xt=0,Ct=E[z].column,Mt=E[z+1].column,Gt=a.nodeMinColumnSpace(E[z],!0),Ot=a.nodeMinColumnSpace(E[z],!1),Wt=a.nodeMinColumnSpace(E[z+1],!0),Zt=a.nodeMinColumnSpace(E[z+1],!1);Gt=Ct-Gt+Wt,Ot=Mt-Ot+Zt;var te=E[z].sourceEdges.iterator;for(te.reset();te.next();)if(Wt=te.value,Zt=Wt.fromVertex,Wt.valid&&Zt.layer===y){for(Wt=0;E[Wt]!==Zt;)Wt++;Wt<z&&(pt+=2*(z-Wt),xt+=2*(z+1-Wt)),Wt===z+1&&(pt+=1),Wt>z+1&&(pt+=4*(Wt-z),xt+=4*(Wt-(z+1)))}for(te=E[z].destinationEdges.iterator,te.reset();te.next();)if(Wt=te.value,Zt=Wt.toVertex,Wt.valid&&Zt.layer===y){for(Wt=0;E[Wt]!==Zt;)Wt++;Wt===z+1&&(xt+=1)}for(te=E[z+1].sourceEdges.iterator,te.reset();te.next();)if(Wt=te.value,Zt=Wt.fromVertex,Wt.valid&&Zt.layer===y){for(Wt=0;E[Wt]!==Zt;)Wt++;Wt<z&&(pt+=2*(z+1-Wt),xt+=2*(z-Wt)),Wt===z&&(xt+=1),Wt>z+1&&(pt+=4*(Wt-(z+1)),xt+=4*(Wt-z))}for(te=E[z+1].destinationEdges.iterator,te.reset();te.next();)if(Wt=te.value,Zt=Wt.toVertex,Wt.valid&&Zt.layer===y){for(Wt=0;E[Wt]!==Zt;)Wt++;Wt===z&&(pt+=1)}Wt=Zt=0,te=tt[E[z].index];var re=rt[E[z].index],me=tt[E[z+1].index],ln=rt[E[z+1].index];te!==-1&&(Zt+=Math.abs(te-Ct),Wt+=Math.abs(te-Ot)),re!==-1&&(Zt+=Math.abs(re-Ct),Wt+=Math.abs(re-Ot)),me!==-1&&(Zt+=Math.abs(me-Mt),Wt+=Math.abs(me-Gt)),ln!==-1&&(Zt+=Math.abs(ln-Mt),Wt+=Math.abs(ln-Gt)),(xt<pt-.5||xt===pt&&ft<At-.5||xt===pt&&ft===At&&Wt<Zt-.5)&&(at=ot=!0,E[z].column=Ot,E[z+1].column=Gt,At=E[z],E[z]=E[z+1],E[z+1]=At)}for(z=0;z<b;z++)E[z].index=z;return af(a,y,E),ot}Qr.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&W1)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>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=Ug(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Ug(this,y,-1)||x;x=Ug(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Iv(this,y,1);for(y=this.Md-1;0<=y;y--)Iv(this,y,-1);Iv(this,this.Md,0)}if(a&&(t1(this,-1),t1(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Ug(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Ug(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Ug(this,y,0)||x}}else j1(this)};function Ug(a,y,x){for(var E=!1;R1(a,y,x);)E=!0;return E}function R1(a,y,x){var E,b=sf(a,y),z=a.tc[y],tt=kv(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=kv(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,at=!0;at;)for(at=!1,E=0;E<z;E++){var At=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),pt=a.nodeMinColumnSpace(b[E],!1),xt=0;0>E-1||At-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?xt=At-1:xt=At,ft=E+1>=z||b[E+1].column-At-1>pt+a.nodeMinColumnSpace(b[E+1],!0)?At+1:At;var Ct=pt=0,Mt=0;if(0>=x)for(var Gt=b[E].sourceEdges.iterator;Gt.next();){var Ot=Gt.value,Wt=Ot.fromVertex;if(Ot.valid&&Wt.layer!==y){var Zt=Mv(Ot),te=Ot.portFromColOffset;Ot=Ot.portToColOffset,Wt=Wt.column,pt+=(Math.abs(At+Ot-(Wt+te))+1)*Zt,Ct+=(Math.abs(xt+Ot-(Wt+te))+1)*Zt,Mt+=(Math.abs(ft+Ot-(Wt+te))+1)*Zt}}if(0<=x)for(Gt=b[E].destinationEdges.iterator;Gt.next();)Ot=Gt.value,Wt=Ot.toVertex,Ot.valid&&Wt.layer!==y&&(Zt=Mv(Ot),te=Ot.portFromColOffset,Ot=Ot.portToColOffset,Wt=Wt.column,pt+=(Math.abs(At+te-(Wt+Ot))+1)*Zt,Ct+=(Math.abs(xt+te-(Wt+Ot))+1)*Zt,Mt+=(Math.abs(ft+te-(Wt+Ot))+1)*Zt);Ot=te=Zt=0,Gt=tt[b[E].index],Wt=rt[b[E].index],Gt!==-1&&(Zt+=Math.abs(Gt-At),te+=Math.abs(Gt-xt),Ot+=Math.abs(Gt-ft)),Wt!==-1&&(Zt+=Math.abs(Wt-At),te+=Math.abs(Wt-xt),Ot+=Math.abs(Wt-ft)),Ct<pt||Ct===pt&&te<Zt?(at=ot=!0,b[E].column=xt):(Mt<pt||Mt===pt&&Ot<Zt)&&(at=ot=!0,b[E].column=ft)}return af(a,y,b),a.normalize(),ot}function Iv(a,y,x){var E=sf(a,y),b=a.tc[y],z=Kw(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var rt=E[x].column,ot=a.nodeMinColumnSpace(E[x],!0),at=a.nodeMinColumnSpace(E[x],!1),At=0;if(tt[x]===-1)if(x===0&&x===b-1)At=rt;else if(x===0){var ft=E[x+1].column;ft-rt===at+a.nodeMinColumnSpace(E[x+1],!0)?At=rt-1:At=rt}else x===b-1?(ft=E[x-1].column,At=rt-ft===ot+a.nodeMinColumnSpace(E[x-1],!1)?rt+1:rt):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,At=(ot+at)/2|0);else x===0&&x===b-1?At=tt[x]:x===0?(ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,At=Math.min(tt[x],at)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,At=Math.max(tt[x],ot)):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,at=ft-a.nodeMinColumnSpace(E[x+1],!0)-at-1,ot<tt[x]&&tt[x]<at?At=tt[x]:ot>=tt[x]?At=ot:at<=tt[x]&&(At=at));At!==rt&&(z=!0,E[x].column=At)}af(a,y,E),a.normalize()}function G1(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 z1(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),ot=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&ot>=y&&(b[E.layer]=!0),rt<=x&&ot>=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 t1(a,y){for(var x=0;x<=a.Ra;x++)for(;G1(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;z1(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=_a(a),z=tm(a);for(E=z+1;z<E;){E=z,e1(a,x,1);var tt=tm(a);tt>z?zl(a,b):tt<z&&(z=tt,b=_a(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=_a(a),z=tm(a),E=z+1;z<E;)E=z,e1(a,x,-1),tt=tm(a),tt>z?zl(a,b):tt<z&&(z=tt,b=_a(a));a.normalize()}function e1(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)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&&(bv(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,rt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),ot=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));rt<=ot;rt++)b[tt*(a.Ra+1)+rt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(ot=tt[tt.length-1],tt.pop(),b[ot])for(b[ot]=!1,z=0;z<a.le;z++)y[ot*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function j1(a){for(var y=bn(),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 le,K1(y,x);var z=null,tt=null,rt=null,ot=null,at=(a.ve&1)!==0,At=(a.ve&2)!==0,ft=(a.ve&4)!==0,pt=(a.ve&8)!==0;for(at&&(a.verticalAlignment(y,x,!0),z=nm(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=nm(a,y,!1,!1)),E=zr(y),b=E.next();!b.done;b=E.next())b.value.reverse();pt&&(a.verticalAlignment(y,x,!1),ot=nm(a,y,!1,!0)),y.reverse(),At&&(a.verticalAlignment(y,x,!0),tt=nm(a,y,!0,!0)),Ln(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(xt){var Ct=bn();at&&Ct.push(z.get(xt)),At&&Ct.push(tt.get(xt)),ft&&Ct.push(rt.get(xt)),pt&&Ct.push(ot.get(xt)),Ct.sort(function(Gt,Ot){return Gt-Ot});var Mt=Ct.length;Mt=(Ct[Math.floor((Mt-1)/2)]+Ct[Math.ceil((Mt-1)/2)])/2,Ln(Ct),xt.zc=Mt})}function K1(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],rt=a[E+1],ot=0;z<rt.length;ot++){var at=rt[ot];t:{if(at.node===null){var At=Gv(at);if(0<At.length){At=At[0].node===null;break t}}At=!1}var ft=At;if(ot===rt.length-1||ft){for(At=tt.length-1,ft&&(At=Gv(at)[0].index);z<=ot;){if(at=rt[z],!at.bo){ft=[];for(var pt=zr(at.sourceEdgesArrayAccess),xt=pt.next();!xt.done;xt=pt.next())xt=xt.value,xt.valid&&ft.push(xt);at.bo=ft}for(at=zr(at.bo),ft=at.next();!ft.done;ft=at.next())ft=ft.value,pt=ft.fromVertex.index,(pt<b||pt>At)&&y.add(ft);z++}b=At}}}Qr.prototype.verticalAlignment=function(a,y,x){V1(a),a=zr(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=zr(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?Gv(z):Y1(z),rt=tt.length;if(0<rt){tt.sort(function(ft,pt){return ft.vi-pt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var at=tt[rt],At=void 0;At=x?lm(at,z):lm(z,at),!y.contains(At)&&b<at.vi&&(at.align=z,z.root=at.root,z.align=at.root,b=at.vi)}}}}};function V1(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function nm(a,y,x,E){for(var b=a.K===90||a.K===270,z=zr(y),tt=z.next();!tt.done;tt=z.next()){var rt=zr(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=zr(y),rt=z.next();!rt.done;rt=z.next()){rt=zr(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var at=0,At=ot;At.align!==ot;){var ft=At.align,pt=tt?At.width:At.height,xt=tt?ft.width:ft.height;if(x){var Ct=lm(At,ft),Mt=Ct.portFromPos,Gt=Ct.portToPos;Ct.link!==null&&(At.node&&At.node!==Ct.link.fromNode&&(Mt=tt?At.focusX:At.focusY),ft.node&&ft.node!==Ct.link.toNode&&(Gt=tt?ft.focusX:ft.focusY))}else Ct=lm(ft,At),Mt=Ct.portToPos,Gt=Ct.portFromPos,Ct.link!==null&&(At.node&&At.node!==Ct.link.toNode&&(Mt=tt?At.focusX:At.focusY),ft.node&&ft.node!==Ct.link.fromNode&&(Gt=tt?ft.focusX:ft.focusY));pt=E?At.qg+(pt-Mt)-(xt-Gt):At.qg+Mt-Gt,ft.qg=pt,at=Math.min(at,pt),At=At.align}At=ot;do At.qg=At.qg-at,At=At.align;while(At!==ot)}}for(x=zr(y),tt=x.next();!tt.done;tt=x.next())for(z=zr(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&n1(a,tt,y);for(x=0;x<y.length;x++)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++,0<z.vi&&(rt=i1(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new vn,y=zr(y),tt=y.next();!tt.done;tt=y.next())for(x=zr(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function n1(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=i1(E,x),z=b.root;n1(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function i1(a,y){var x=a.Tz;return a=a.vi,1>a&&Yt("Could not determine previous vertex in layer"),y[x][a-1]}Qr.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=bn(),b=bn(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=_1(this,y[tt],E,b,tt);rt<z&&(x=tt,z=rt)}for(z={},tt=0;4>tt;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(ot){return function(at){at.value+=ot.delta}}(z)));Ln(E),Ln(b)};function _1(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 ot=rt.key;rt=rt.value,ot=a.K===90||a.K===270?ot.width:ot.height,rt<z&&(z=rt),rt+ot>tt&&(tt=rt+ot)}),x[b]=z,E[b]=tt,tt-z}Qr.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=im(this,!0),y=im(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 im(a,y){return a.K===270?y?vs:Ys:a.K===90?y?Ys:vs:a.K===180?y?Io:rs:y?rs:Io}Qr.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<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,rt=-1/0;a.next();){var ot=a.value,at=ot.layer,At=ot.column|0;E?(tt=y.x+this.kc*At,at=this.Kd[at]):(tt=this.Kd[at],at=y.y+this.kc*At),ot.centerX=tt,ot.centerY=at,x&&isFinite(ot.zc)&&(E?ot.node?ot.x=y.x+ot.zc:ot.centerX=y.x+ot.zc:ot.node?ot.y=y.y+ot.zc:ot.centerY=y.y+ot.zc),z=Math.min(ot.x,z),b=Math.min(ot.y,b),E?(tt=z,rt=Math.max(rt,ot.bounds.right)):(tt=b,rt=Math.max(rt,ot.bounds.bottom))}for(this.xw=rt-tt,z=y.x-z,y=y.y-b,this.Rf=new Ht(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},Qr.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new be(0,0,x,Math.abs(this.Ta[0]))):y.push(new be(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new be(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new be(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new be(0,0,Math.abs(this.Ta[0]),x)):y.push(new be(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new be(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new be(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},Qr.prototype.commitLayers=function(){},Qr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,rt=E.toPort;if(b!==null){var ot=b.findVisibleNode();ot!==null&&ot!==b&&(b=ot,tt=ot.port)}z!==null&&(ot=z.findVisibleNode(),ot!==null&&ot!==z&&(z=ot,rt=ot.port));var at=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var At=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===kl&&y.pointsCount===4&&(At.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,at,!0,!1,z,rt),rt=y.getLinkPoint(z,rt,ot,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),rt.w()||rt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+rt.x)/3,(2*x.y+rt.y)/3),y.yf((x.x+2*rt.x)/3,(x.y+2*rt.y)/3),y.yf(rt.x,rt.y)):(x=E=!1,tt!==null&&at===$i&&(E=!0),rt!==null&&ot===$i&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(Ui),y.i(3),!0),ot.w()||ot.set(b.actualBounds.center),y.L(0,ot.x,ot.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,rt,rt.ga(Ui),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),ot&&(z=y.i(2),y.L(1,(2*ot.x+z.x)/3,(2*ot.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(At.layer===ft.layer)y.zf();else{var pt=!1,xt=!1,Ct=this.ie,Mt=y.firstPickIndex+1;if(y.isOrthogonal){xt=!0;var Gt=y.pointsCount;4<Gt&&y.points.removeRange(2,Gt-3)}else if(y.curve===kl)pt=!0,Gt=y.pointsCount,4<Gt&&y.points.removeRange(2,Gt-3),Gt===4&&(Mt=2);else{Gt=y.pointsCount;var Ot=at===$i,Wt=ot===$i;2<Gt&&Ot&&Wt?y.points.removeRange(1,Gt-2):3<Gt&&Ot&&!Wt?y.points.removeRange(1,Gt-3):3<Gt&&!Ot&&Wt?y.points.removeRange(2,Gt-2):4<Gt&&!Ot&&!Wt&&y.points.removeRange(2,Gt-3)}if(x.rev){for(;ft!==null&&At!==ft;){var Zt=Gt=null;for(Ot=ft.sourceEdges.iterator;Ot.next()&&(Wt=Ot.value,Wt.link!==x.link||(Gt=Wt.fromVertex,Zt=Wt.toVertex,Gt.node!==null)););if(Gt===null)break;if(Gt!==At){Ot=y.i(Mt-1).x,Wt=y.i(Mt-1).y;var te=Gt.centerX,re=Gt.centerY;if(xt)this.K===180||this.K===0?Mt===y.firstPickIndex+1?(y.m(Mt++,Ot,Wt),y.m(Mt++,Ot,re)):(Zt!==null?Zt.centerY:Wt)!==re&&(Zt=this.Ta[Gt.layer-1]+this.Rf.x,y.m(Mt++,Zt,Wt),y.m(Mt++,Zt,re)):Mt===y.firstPickIndex+1?(y.m(Mt++,Ot,Wt),y.m(Mt++,te,Wt)):(Zt!==null?Zt.centerX:Ot)!==te&&(Zt=this.Ta[Gt.layer-1]+this.Rf.y,y.m(Mt++,Ot,Zt),y.m(Mt++,te,Zt));else if(Mt===y.firstPickIndex+1){Zt=Math.max(10,this.he[ft.layer]);var me=Math.max(10,this.Ld[ft.layer]);if(pt)this.K===180?te<=ft.bounds.x?(ft=ft.bounds.x,y.m(Mt++,ft-Zt,re),y.m(Mt++,ft,re),y.m(Mt++,ft+me,re)):(y.m(Mt++,te-Zt,re),y.m(Mt++,te,re),y.m(Mt++,te+me,re)):this.K===90?re>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Mt++,te,ft+me),y.m(Mt++,te,ft),y.m(Mt++,te,ft-Zt)):(y.m(Mt++,te,re+me),y.m(Mt++,te,re),y.m(Mt++,te,re-Zt)):this.K===270?re<=ft.bounds.y?(ft=ft.bounds.y,y.m(Mt++,te,ft-Zt),y.m(Mt++,te,ft),y.m(Mt++,te,ft+me)):(y.m(Mt++,te,re-Zt),y.m(Mt++,te,re),y.m(Mt++,te,re+me)):this.K===0&&(te>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Mt++,ft+me,re),y.m(Mt++,ft,re),y.m(Mt++,ft-Zt,re)):(y.m(Mt++,te+me,re),y.m(Mt++,te,re),y.m(Mt++,te-Zt,re)));else{y.m(Mt++,Ot,Wt);var ln=0;this.K===180||this.K===0?((this.K===180?te>=ft.bounds.right:te<=ft.bounds.x)&&(ln=(this.K===0?-Zt:me)/2),y.m(Mt++,Ot+ln,re)):((this.K===270?re>=ft.bounds.bottom:re<=ft.bounds.y)&&(ln=(this.K===90?-Zt:me)/2),y.m(Mt++,te,Wt+ln)),y.m(Mt++,te,re)}}else Zt=Math.max(10,this.he[Gt.layer]),me=Math.max(10,this.Ld[Gt.layer]),pt?this.K===180?(y.m(Mt++,te-Zt-Ct,re),y.m(Mt++,Math.min(te-Zt+Ct/2,te),re),y.m(Mt++,te,re),y.m(Mt++,te,re),y.m(Mt++,Math.max(te+me-Ct/2,te),re),y.m(Mt++,te+me+Ct,re)):this.K===90?(y.m(Mt++,te,re+me+Ct),y.m(Mt++,te,Math.max(re+me-Ct/2,re)),y.m(Mt++,te,re),y.m(Mt++,te,re),y.m(Mt++,te,Math.min(re-Zt+Ct/2,re)),y.m(Mt++,te,re-Zt-Ct)):this.K===270?(y.m(Mt++,te,re-Zt-Ct),y.m(Mt++,te,Math.min(re-Zt+Ct/2,re)),y.m(Mt++,te,re),y.m(Mt++,te,re),y.m(Mt++,te,Math.max(re+me-Ct/2,re)),y.m(Mt++,te,re+me+Ct)):(y.m(Mt++,te+me+Ct,re),y.m(Mt++,Math.max(te+me-Ct/2,te),re),y.m(Mt++,te,re),y.m(Mt++,te,re),y.m(Mt++,Math.min(te-Zt+Ct/2,te),re),y.m(Mt++,te-Zt-Ct,re)):y.m(Mt++,te,re)}ft=Gt}(rt===null||at!==$i||xt)&&(Ot=y.i(Mt-1).x,Wt=y.i(Mt-1).y,te=y.i(Mt).x,re=y.i(Mt).y,xt?(Ct=this.Ld[At.layer],this.K===180||this.K===0?(xt=Wt,xt>=At.bounds.y&&xt<=At.bounds.bottom&&(this.K===180?te>=At.bounds.x:te<=At.bounds.right)&&(ft=At.centerX+(this.K===180?-Ct:Ct),xt<At.bounds.y+At.bounds.height/2?xt=At.bounds.y-this.kc/2:xt=At.bounds.bottom+this.kc/2,y.m(Mt++,ft,Wt),y.m(Mt++,ft,xt)),y.m(Mt++,te,xt)):(xt=Ot,xt>=At.bounds.x&&xt<=At.bounds.right&&(this.K===270?re>=At.bounds.y:re<=At.bounds.bottom)&&(ft=At.centerY+(this.K===270?-Ct:Ct),xt<At.bounds.x+At.bounds.width/2?xt=At.bounds.x-this.kc/2:xt=At.bounds.right+this.kc/2,y.m(Mt++,Ot,ft),y.m(Mt++,xt,ft)),y.m(Mt++,xt,re)),y.m(Mt++,te,re)):pt?(Zt=Math.max(10,this.he[At.layer]),me=Math.max(10,this.Ld[At.layer]),this.K===180&&te>=At.bounds.x?(ft=At.bounds.x+At.bounds.width,y.L(Mt-2,ft,Wt),y.L(Mt-1,ft+me,Wt)):this.K===90&&re<=At.bounds.bottom?(ft=At.bounds.y,y.L(Mt-2,Ot,ft),y.L(Mt-1,Ot,ft-Zt)):this.K===270&&re>=At.bounds.y?(ft=At.bounds.y+At.bounds.height,y.L(Mt-2,Ot,ft),y.L(Mt-1,Ot,ft+me)):this.K===0&&te<=At.bounds.right&&(ft=At.bounds.x,y.L(Mt-2,ft,Wt),y.L(Mt-1,ft-Zt,Wt))):(Zt=Math.max(10,this.he[At.layer]),me=Math.max(10,this.Ld[At.layer]),xt=0,this.K===180||this.K===0?((this.K===180?te<=At.bounds.x:te>=At.bounds.right)&&(xt=(this.K===0?me:-Zt)/2),y.m(Mt++,te+xt,Wt)):((this.K===270?re<=At.bounds.y:re>=At.bounds.bottom)&&(xt=(this.K===90?me:-Zt)/2),y.m(Mt++,Ot,re+xt)),y.m(Mt++,te,re)))}else{for(;At!==null&&At!==ft;){for(Zt=Gt=null,At=At.destinationEdges.iterator;At.next()&&(Ot=At.value,Ot.link!==x.link||(Gt=Ot.toVertex,Zt=Ot.fromVertex,Zt.node!==null&&(Zt=null),Gt.node!==null)););if(Gt===null)break;Gt!==ft&&(Ot=y.i(Mt-1).x,Wt=y.i(Mt-1).y,te=Gt.centerX,re=Gt.centerY,xt?this.K===180||this.K===0?(Zt!==null?Zt.centerY:Wt)!==re&&(Zt=this.Ta[Gt.layer]+this.Rf.x,Mt===y.firstPickIndex+1&&(Zt=this.K===0?Math.max(Zt,Ot):Math.min(Zt,Ot)),y.m(Mt++,Zt,Wt),y.m(Mt++,Zt,re)):(Zt!==null?Zt.centerX:Ot)!==te&&(Zt=this.Ta[Gt.layer]+this.Rf.y,Mt===y.firstPickIndex+1&&(Zt=this.K===90?Math.max(Zt,Wt):Math.min(Zt,Wt)),y.m(Mt++,Ot,Zt),y.m(Mt++,te,Zt)):(Zt=Math.max(10,this.he[Gt.layer]),me=Math.max(10,this.Ld[Gt.layer]),pt?this.K===180?(y.m(Mt++,te+me+Ct,re),y.m(Mt++,Math.max(te+me-Ct/2,te),re),y.m(Mt++,te,re),y.m(Mt++,te,re),y.m(Mt++,Math.min(te-Zt+Ct/2,te),re),y.m(Mt++,te-Zt-Ct,re)):this.K===90?(y.m(Mt++,te,re-Zt-Ct),y.m(Mt++,te,Math.min(re-Zt+Ct/2,re)),y.m(Mt++,te,re),y.m(Mt++,te,re),y.m(Mt++,te,Math.max(re+me-Ct/2,re)),y.m(Mt++,te,re+me+Ct)):this.K===270?(y.m(Mt++,te,re+me+Ct),y.m(Mt++,te,Math.max(re+me-Ct/2,re)),y.m(Mt++,te,re),y.m(Mt++,te,re),y.m(Mt++,te,Math.min(re-Zt+Ct/2,re)),y.m(Mt++,te,re-Zt-Ct)):(y.m(Mt++,te-Zt-Ct,re),y.m(Mt++,Math.min(te-Zt+Ct/2,te),re),y.m(Mt++,te,re),y.m(Mt++,te,re),y.m(Mt++,Math.max(te+me-Ct/2,te),re),y.m(Mt++,te+me+Ct,re)):this.K===180?(y.m(Mt++,te+me,re),y.m(Mt++,te-Zt,re)):this.K===90?(y.m(Mt++,te,re-Zt),y.m(Mt++,te,re+me)):this.K===270?(y.m(Mt++,te,re+me),y.m(Mt++,te,re-Zt)):(y.m(Mt++,te-Zt,re),y.m(Mt++,te+me,re)))),At=Gt}xt&&(Ot=y.i(Mt-1).x,Wt=y.i(Mt-1).y,te=y.i(Mt).x,re=y.i(Mt).y,this.K===180||this.K===0?Wt!==re&&(Zt=this.K===0?Math.min(Math.max((te+Ot)/2,this.Ta[ft.layer]+this.Rf.x),te):Math.max(Math.min((te+Ot)/2,this.Ta[ft.layer]+this.Rf.x),te),y.m(Mt++,Zt,Wt),y.m(Mt++,Zt,re)):Ot!==te&&(Zt=this.K===90?Math.min(Math.max((re+Wt)/2,this.Ta[ft.layer]+this.Rf.y),re):Math.max(Math.min((re+Wt)/2,this.Ta[ft.layer]+this.Rf.y),re),y.m(Mt++,Ot,Zt),y.m(Mt++,te,Zt)))}E!==null&&pt&&4<=y.pointsCount&&(tt!==null&&(tt=at===$i?y.getLinkPointFromPoint(b,tt,tt.ga(Ui),y.i(3),!0):y.i(0),at===$i&&(at=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+at.x)/2,at.y),y.L(2,E.x,(at.y+E.y)/2)):(y.L(1,at.x,(tt.y+at.y)/2),y.L(2,(at.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===$i?y.getLinkPointFromPoint(z,rt,rt.ga(Ui),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===$i&&(rt=y.i(y.pointsCount-3),ot=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,ot.x,(rt.y+ot.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+ot.x)/2,ot.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},Qr.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new _t,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var rt=new lf;rt.layer=Math.floor(z.y/2);var ot=E.i(0),at=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=at.x*at.x+at.y,rt.rd=Math.min(z.x,tt.x),rt.Ic=Math.max(z.x,tt.x),rt.index=b,rt.link=E,b+2<E.pointsCount){ot=E.i(b-1),at=E.i(b+2);var At=0;ot.y<z.y?At=at.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(At=at.y>z.y?0:tt.x<z.x?2:1),rt.j=At}x.push(rt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),At=1,rt=x[z].jc,ot=z;ot<b;ot++)at=x[ot],at.jc!==rt&&(At++,rt=at.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)at=x[ot],at.first!==rt&&(ft++,rt=at.first);for(ot=!0,at=ft,At<ft?(ot=!1,at=At,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,At=0,ft=z;ft<b;ft++){var pt=x[ft];(ot?pt.first:pt.jc)!==rt&&(At++,rt=ot?pt.first:pt.jc);var xt=pt.link;z=xt.i(pt.index),tt=xt.i(pt.index+1);var Ct=this.linkSpacing*(At-(at-1)/2);y++,xt.uh(),xt.L(pt.index,z.x,z.y+Ct),xt.L(pt.index+1,tt.x,tt.y+Ct),xt.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(rt=new lf,rt.layer=Math.floor(z.x/2),ot=E.i(0),at=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=at.x+at.y*at.y,rt.rd=Math.min(z.y,tt.y),rt.Ic=Math.max(z.y,tt.y),rt.index=b,rt.link=E,b+2<E.pointsCount&&(ot=E.i(b-1),at=E.i(b+2),At=0,ot.x<z.x?At=at.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(At=at.x>z.x?0:tt.y<z.y?2:1),rt.j=At),x.push(rt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),At=1,rt=x[z].jc,ot=z;ot<b;ot++)at=x[ot],at.jc!==rt&&(At++,rt=at.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)at=x[ot],at.first!==rt&&(ft++,rt=at.first);for(ot=!0,at=ft,At<ft?(ot=!1,at=At,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,At=0,ft=z;ft<b;ft++)pt=x[ft],(ot?pt.first:pt.jc)!==rt&&(At++,rt=ot?pt.first:pt.jc),xt=pt.link,z=xt.i(pt.index),tt=xt.i(pt.index+1),Ct=this.linkSpacing*(At-(at-1)/2),y++,xt.uh(),xt.L(pt.index,z.x+Ct,z.y),xt.L(pt.index+1,tt.x+Ct,tt.y),xt.zf()}z=b}a=E}}}},Pt=Qr.prototype,Pt.Vx=function(a,y){return a instanceof lf&&y instanceof lf&&a!==y?a.layer<y.layer?-1:a.layer>y.layer?1:a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Pt.Ux=function(a,y){return a instanceof lf&&y instanceof lf&&a!==y?a.first<y.first?-1:a.first>y.first||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Pt.Js=function(a,y){return a instanceof lf&&y instanceof lf&&a!==y?a.jc<y.jc?-1:a.jc>y.jc||a.j<y.j?1:a.j>y.j||a.rd<y.rd?-1:a.rd>y.rd?1:a.Ic<y.Ic?-1:a.Ic>y.Ic?1:0:0},Pt.B=function(a,y){return a-=y,-1<a&&1>a},Pt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Yt("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0<y(E,b)&&(a[x]=b,a[x+1]=E);else if(x===0)if(E>=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y<E;y++)a[y]=x[y];else if(E>=b)for(E=a.slice(x),E.sort(y),y=x;y<b;y++)a[y]=E[y-x];else for(b=a.slice(x,E),b.sort(y),y=x;y<E;y++)a[y]=b[y-x]};function sf(a,y){var x=a.tc[y];if(x>=a.He.length){for(var E=[],b=0;b<a.He.length;b++)E[b]=a.He[b];a.He=E}for(a.He[x]===void 0||a.He[x]===null?E=[]:(E=a.He[x],a.He[x]=null),a=a.fl[y],y=0;y<a.length;y++)x=a[y],E[x.index]=x;return E}function af(a,y,x){a.He[a.tc[y]]=x}Ze.Object.defineProperties(Qr.prototype,{layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&0<=a&&(this.ie=a,this.C())}},columnSpacing:{get:function(){return this.kc},set:function(a){this.kc!==a&&0<a&&(this.kc=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K!==a&&(a===0||a===90||a===180||a===270?(this.K=a,this.C()):Yt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Nv&&a!==rm&&a!==Up||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==om&&a!==Qv&&a!==Uv||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==sm&&a!==Dv&&a!==Ov||(this.Qk=a,this.C())}},iterations:{get:function(){return this.bj},set:function(a){this.bj!==a&&0<=a&&(this.bj=a,this.C())}},aggressiveOption:{get:function(){return this.rk},set:function(a){this.rk===a||a!==Hv&&a!==am&&a!==Rv||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(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 rm=new Be(Qr,"CycleDepthFirst",0),Nv=new Be(Qr,"CycleGreedy",1),Up=new Be(Qr,"CycleFromLayers",2),om=new Be(Qr,"LayerOptimalLinkLength",0),Qv=new Be(Qr,"LayerLongestPathSink",1),Uv=new Be(Qr,"LayerLongestPathSource",2),sm=new Be(Qr,"InitDepthFirstOut",0),Dv=new Be(Qr,"InitDepthFirstIn",1),Ov=new Be(Qr,"InitNaive",2),Hv=new Be(Qr,"AggressiveNone",0),am=new Be(Qr,"AggressiveLess",1),Rv=new Be(Qr,"AggressiveMore",2),W1=8;Qr.className="LayeredDigraphLayout",Qr.CycleDepthFirst=rm,Qr.CycleGreedy=Nv,Qr.CycleFromLayers=Up,Qr.LayerOptimalLinkLength=om,Qr.LayerLongestPathSink=Qv,Qr.LayerLongestPathSource=Uv,Qr.InitDepthFirstOut=sm,Qr.InitDepthFirstIn=Dv,Qr.InitNaive=Ov,Qr.AggressiveNone=Hv,Qr.AggressiveLess=am,Qr.AggressiveMore=Rv,Qr.PackNone=0,Qr.PackExpand=1,Qr.PackStraighten=2,Qr.PackMedian=4,Qr.PackAll=15,Qr.AlignNone=0,Qr.AlignUpperLeft=1,Qr.AlignUpperRight=2,Qr.AlignLowerLeft=4,Qr.AlignLowerRight=8,Qr.AlignAll=15;function lf(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}lf.className="SegInfo";function Dg(a){qr.call(this,a)}Te(Dg,qr),Dg.prototype.createVertex=function(){return new jl(this)},Dg.prototype.createEdge=function(){return new Dp(this)},Dg.className="LayeredDigraphNetwork";function jl(a){gs.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}Te(jl,gs);function r1(a,y){return a.index-y.index}function lm(a,y){if(!a.$n){for(var x=[],E=zr(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=zr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Yt("Unable to find destination edge to given vertex")}function Gv(a){if(!a.co){for(var y=[],x=zr(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(r1),a.co=y}return a.co}function Y1(a){if(!a.ao){for(var y=[],x=zr(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(r1),a.ao=y}return a.ao}jl.prototype.Cl=function(a){gs.prototype.Cl.call(this,a),this.bo=this.co=null},jl.prototype.Kl=function(a){gs.prototype.Kl.call(this,a),this.bo=this.co=null},jl.prototype.zl=function(a){gs.prototype.zl.call(this,a),this.$n=this.ao=null},jl.prototype.Jl=function(a){gs.prototype.Jl.call(this,a),this.$n=this.ao=null},Ze.Object.defineProperties(jl.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)}}}),jl.prototype.deleteDestinationEdge=jl.prototype.Jl,jl.prototype.addDestinationEdge=jl.prototype.zl,jl.prototype.deleteSourceEdge=jl.prototype.Kl,jl.prototype.addSourceEdge=jl.prototype.Cl,jl.className="LayeredDigraphVertex";function Dp(a){ml.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Te(Dp,ml),Ze.Object.defineProperties(Dp.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)}}}),Dp.className="LayeredDigraphEdge";function qi(a){mo.call(this),this.Ub=new le,this.Wn=cm,this.ud=ju,this.vo=dm,this.Bq=qv,this.$v=[],this.td=!0,this.Rb=gm,this.$d=new Je(10,10).freeze();var y=new Yd(this);this.W=new Zl(y),this.Y=new Zl(y),this.ru=[],a&&Object.assign(this,a)}Te(qi,mo),qi.prototype.cloneProtected=function(a){mo.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)},qi.prototype.qb=function(a){a.classType===qi?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:Yt("Unknown enum value: "+a):mo.prototype.qb.call(this,a)},qi.prototype.createNetwork=function(){return new Yd(this)},qi.prototype.makeNetwork=function(a){function y(E){if(E instanceof fn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof en){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 Ti?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},qi.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==pm&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof ge&&(y=a),this.path===cm&&y!==null?this.ud=y.isTreePathToChildren?ju:_d:this.ud=this.path===cm?ju:this.path,0<this.network.vertexes.count){for(this.network.Ko(),a=this.network.vertexes.iterator;a.next();)y=a.value,y.initialized=!1,y.level=0,y.parent=null,y.children=[];if(0<this.Ub.count){for(a=new le,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof fn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Zl&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,zv(this,y));for(y=this.network.vertexes,a=null;a=X1(y),0<a.count;)y=o1(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,zv(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zl&&a1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zl&&l1(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zl&&A1(this,y);if(this.Cu(),this.layerStyle===mm){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===$v)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Zl&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new le,this.isValidLayout=!0};function X1(a){var y=new le;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}qi.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case ju:x.sourceEdges.count===0&&this.Ub.add(x);break;case _d:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Yt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=o1(this,a),a!==null&&this.Ub.add(a))};function o1(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case ju:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case _d:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:Yt("Unhandled path value "+a.ud.toString())}}return E}function zv(a,y){if(y!==null){switch(a.ud){case ju:if(0<y.destinationEdges.count){for(var x=new _t,E=y.destinationVertexes;E.next();){var b=E.value;s1(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case _d:if(0<y.sourceEdges.count){for(x=new _t,E=y.sourceVertexes;E.next();)b=E.value,s1(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Yt("Unhandled path value"+a.ud.toString())}for(x=y.children,E=x.length,b=0;b<E;b++){var z=x[b];z.initialized=!0,z.level=y.level+1,z.parent=y,a.Ub.remove(z)}for(y=0;y<E;y++)zv(a,x[y])}}function s1(a,y,x){if(x.initialized){if(y===null)var E=!1;else{for(E=y.parent;E!==null&&E!==x;)E=E.parent;E=E===x}if(E||x.level>y.level)return!1;a.removeChild(x.parent,x)}return!0}qi.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;b<x.length;b++)x[b]===y&&E++;if(0<E){E=Array(x.length-E);for(var z=b=0;z<x.length;z++)x[z]!==y&&(E[b++]=x[z]);a.children=E}}};function a1(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===_u&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];a1(a,ot),x+=ot.descendantCount+1,E=Math.max(E,ot.maxChildrenCount),b=Math.max(b,ot.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function Z1(a,y){switch(a.vo){default:case dm:return y.parent!==null?y.parent:a.W;case Zv:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Xv:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Yv:var x=!0;if(y.childrenCount===0)x=!1;else for(var E=y.children,b=E.length,z=0;z<b;z++)if(0<E[z].childrenCount){x=!1;break}return x&&y.parent!==null?a.Y:y.parent!==null?y.parent:a.W}}qi.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Z1(this,a)),a.parent!==null&&a.parent.alignment===_u){for(var y=a.angle,x=a.parent.children,E=0;E<x.length&&a!==x[E];)E++;E%2===0?E!==x.length-1&&(y=y===90?180:y===180?270:y===270?180:270):y=y===90?0:y===180?90:y===270?0:90,a.angle=y}a.initialized=!0};function l1(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)l1(a,y[E])}}qi.prototype.assignTreeVertexValues=function(){};function A1(a,y){if(y!==null){y.alignment!==_u&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)A1(a,y[E])}}qi.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Og:break;case Hp:a.children.reverse();break;case Rp:a.children.sort(a.comparer);break;case Gp:a.children.sort(a.comparer),a.children.reverse();break;default:Yt("Unhandled sorting value "+a.sorting.toString())}},qi.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},qi.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Af(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,rt=0,ot=a.commentSpacing;if(a.node!==null)for(var at=a.node.Mu();at.next();){var At=at.value;At.category==="Comment"&&At.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(At),At.Va(),At=At.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,At.width),tt+=At.height+Math.abs(rt)):(z+=At.width+Math.abs(rt),tt=Math.max(tt,At.height)),rt=ot)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=be.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,be.free(b))};function Af(a){return a===pc||a===_u||a===mc||a===Sh}function Op(a){return a===pc||a===_u}function jv(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Af(x)){if(Op(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===mc)return!0}}return!1}qi.prototype.layoutComments=function(a){if(a.comments!==null){var y=a.node.measuredBounds,x=a.parent,E=a.angle,b=0,z=!1;x!==null&&(b=x.angle,z=x.alignment,z=Af(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=jv(a),ot=0,at=a.comments,At=at.length,ft=Ht.alloc(),pt=0;pt<At;pt++){var xt=at[pt],Ct=xt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-Ct.width,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();){var Mt=xt.value;Mt.fromSpot=Io,Mt.toSpot=rs}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=rs,Mt.toSpot=Io;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=rs,Mt.toSpot=Io;else for(ft.h(a.bounds.x+a.commentMargin-Ct.width,a.bounds.y+ot),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=Io,Mt.toSpot=rs;ot=0<=a.commentSpacing?ot+(Ct.height+a.commentSpacing):ot+(a.commentSpacing-Ct.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-Ct.height),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=vs,Mt.toSpot=Ys;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=Ys,Mt.toSpot=vs;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=Ys,Mt.toSpot=vs;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-Ct.height),xt.move(ft),xt=xt.Sd();xt.next();)Mt=xt.value,Mt.fromSpot=vs,Mt.toSpot=Ys;ot=0<=a.commentSpacing?ot+(Ct.width+a.commentSpacing):ot+(a.commentSpacing-Ct.width)}}if(Ht.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===ju)for(a=a.destinationEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.fromEndSegmentLength=0<y?y:NaN);else for(a=a.sourceEdges;a.next();)b=a.value.link,b===null||b.isAvoiding||(b.toEndSegmentLength=0<y?y:NaN)}},qi.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case fm:u1(this,a);break;case zp:if(a.alignment===_u)u1(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Af(x)),E=jv(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=yA(a);y=b===90||b===270;var z=0,tt=a.children,rt=tt.length;for(x=0;x<rt;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var ot=a.alignment;E=ot===Ku;var at=ot===Vu,At=Af(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var pt=a.nodeSpacing,xt=this.computeNodeIndent(a),Ct=a.rowSpacing,Mt=0;(E||at||a.hm||a.im&&a.maxGenerationCount===1)&&(Mt=Math.max(0,a.rowIndent)),E=a.width;var Gt=a.height,Ot=0,Wt=0,Zt=0,te=null,re=null,me=0,ln=0,Nn=0,Fn=0,tn=0,Ge=0,bi=0,Si=0;if(At&&!Op(ot)&&135<b&&tt.reverse(),Op(ot))if(1<rt)for(var wr=0;wr<rt;wr++)wr%2===0&&wr!==rt-1&&(Si=Math.max(Si,y?tt[wr].Da.width:tt[wr].Da.height));else rt===1&&(Si=y?tt[0].Da.width:tt[0].Da.height);if(At){switch(ot){case pc:Wt=135>b?h1(this,a,tt,Si,Ot,Wt):c1(this,a,tt,Si,Ot,Wt),Si=Wt.x,Ot=Wt.width,Wt=Wt.height;break;case mc:for(te=0;te<rt;te++)re=tt[te],ft=re.Da,Zt=Ge===0?0:Ct,y?(re.S.h(z-ft.width,Fn+Zt),Ot=Math.max(Ot,ft.width),Wt=Math.max(Wt,Fn+Zt+ft.height),Fn+=Zt+ft.height):(re.S.h(Nn+Zt,z-ft.height),Ot=Math.max(Ot,Nn+Zt+ft.width),Wt=Math.max(Wt,ft.height),Nn+=Zt+ft.width),Ge++;break;case Sh:for(te=0;te<rt;te++)re=tt[te],z=re.Da,ft=Ge===0?0:Ct,y?(re.S.h(pt/2+a.focus.x,Fn+ft),Ot=Math.max(Ot,z.width),Wt=Math.max(Wt,Fn+ft+z.height),Fn+=ft+z.height):(re.S.h(Nn+ft,pt/2+a.focus.y),Ot=Math.max(Ot,Nn+ft+z.width),Wt=Math.max(Wt,z.height),Nn+=ft+z.width),Ge++}te=nl(this,2),re=nl(this,2),y?(te[0].h(0,0),te[1].h(0,Wt),re[0].h(Ot,0)):(te[0].h(0,0),te[1].h(Ot,0),re[0].h(0,Wt)),re[1].h(Ot,Wt)}else for(wr=0;wr<rt;wr++){var _r=tt[wr],Ss=_r.Da;if(y){0<ft&&0<Ge&&Nn+pt+Ss.width>ft&&(Nn<z&&qf(a,ot,z-Nn,0,bi,wr-1),tn++,Ge=0,bi=wr,Zt=Wt,Nn=0,Fn=135<b?-Wt-Ct:Wt+Ct),um(this,_r,0,Fn);var Ls=0;if(Ge===0)te=_r.Yo,re=_r.kp,me=Ss.width,ln=Ss.height,(te===null||re===null||b!==yA(_r))&&(te=nl(this,2),re=nl(this,2),te[0].h(0,0),te[1].h(0,ln),re[0].h(me,0),re[1].h(me,ln));else{var ya=bn();ln=f1(this,a,_r,te,re,me,ln,ya),Ls=ln.x,te=ya[0],re=ya[1],me=ln.width,ln=ln.height,Ln(ya),Nn<Ss.width&&0>Ls&&(Vd(a,-Ls,0,bi,wr-1),hm(te,-Ls,0),hm(re,-Ls,0),Ls=0)}_r.S.h(Ls,Fn),Ot=Math.max(Ot,me),Wt=Math.max(Wt,Zt+(tn===0?0:Ct)+Ss.height),Nn=me}else 0<ft&&0<Ge&&Fn+pt+Ss.height>ft&&(Fn<z&&qf(a,ot,0,z-Fn,bi,wr-1),tn++,Ge=0,bi=wr,Zt=Ot,Fn=0,Nn=135<b?-Ot-Ct:Ot+Ct),um(this,_r,Nn,0),Ls=0,Ge===0?(te=_r.Yo,re=_r.kp,me=Ss.width,ln=Ss.height,(te===null||re===null||b!==yA(_r))&&(te=nl(this,2),re=nl(this,2),te[0].h(0,0),te[1].h(me,0),re[0].h(0,ln),re[1].h(me,ln))):(ya=bn(),ln=f1(this,a,_r,te,re,me,ln,ya),Ls=ln.x,te=ya[0],re=ya[1],me=ln.width,ln=ln.height,Ln(ya),Fn<Ss.height&&0>Ls&&(Vd(a,0,-Ls,bi,wr-1),hm(te,0,-Ls),hm(re,0,-Ls),Ls=0)),_r.S.h(Nn,Ls),Wt=Math.max(Wt,ln),Ot=Math.max(Ot,Zt+(tn===0?0:Ct)+Ss.width),Fn=ln;Ge++}switch(0<tn&&(y?(Wt+=Math.max(0,x),Nn<Ot&&qf(a,ot,Ot-Nn,0,bi,rt-1),0<Mt&&(at||Vd(a,Mt,0,0,rt-1),Ot+=Mt)):(Ot+=Math.max(0,x),Fn<Wt&&qf(a,ot,0,Wt-Fn,bi,rt-1),0<Mt&&(at||Vd(a,0,Mt,0,rt-1),Wt+=Mt))),Mt=at=0,ot){case Hg:y?at+=Ot/2-a.focus.x-xt/2:Mt+=Wt/2-a.focus.y-xt/2;break;case Wd:0<tn?y?at+=Ot/2-a.focus.x-xt/2:Mt+=Wt/2-a.focus.y-xt/2:y?(Si=tt[0].S.x+tt[0].la.x,at+=Si+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-Si)/2-a.focus.x-xt/2):(Si=tt[0].S.y+tt[0].la.y,Mt+=Si+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-Si)/2-a.focus.y-xt/2);break;case Ku:y?(at-=xt,Ot+=xt):(Mt-=xt,Wt+=xt);break;case Vu:y?(at+=Ot-a.width+xt,Ot+=xt):(Mt+=Wt-a.height+xt,Wt+=xt);break;case pc:y?1<rt?at+=Si+pt/2-a.focus.x:at+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Mt+=Si+pt/2-a.focus.y:Mt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case mc:y?at+=Ot+pt/2-a.focus.x:Mt+=Wt+pt/2-a.focus.y;break;case Sh:break;default:Wt=this.customAlignment(a,at,Mt,Ot,Wt),at=Wt[0],Mt=Wt[1],Ot=Wt[2],Wt=Wt[3]}for(xt=0;xt<rt;xt++)Si=tt[xt],y?Si.S.h(Si.S.x+Si.la.x-at,Si.S.y+(135<b?(At?-Wt:-Si.Da.height)+Si.la.y-x:Gt+x+Si.la.y)):Si.S.h(Si.S.x+(135<b?(At?-Ot:-Si.Da.width)+Si.la.x-x:E+x+Si.la.x),Si.S.y+Si.la.y-Mt);if(rt=tt=0,At?y?(Ot=Kv(a,Ot,at),0>at&&(at=0),135<b&&(Mt+=Wt+x),Wt+=Gt+x,ot===Sh&&(tt+=pt/2+a.focus.x),rt+=Gt+x):(135<b&&(at+=Ot+x),Ot+=E+x,Wt=Vv(a,Wt,Mt),0>Mt&&(Mt=0),ot===Sh&&(rt+=pt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>Ot&&(Ot=_v(ot,E-Ot,0),tt=Ot.x,rt=Ot.y,Ot=E,at=0):Ot=Kv(a,Ot,at),0>at&&(tt-=at,at=0),135<b&&(Mt+=Wt+x),Wt=Math.max(Math.max(Wt,Gt),Wt+Gt+x),rt+=Gt+x):(135<b&&(at+=Ot+x),Ot=Math.max(Math.max(Ot,E),Ot+E+x),a.comments===null?Gt>Wt&&(Wt=_v(ot,0,Gt-Wt),tt=Wt.x,rt=Wt.y,Wt=Gt,Mt=0):Wt=Vv(a,Wt,Mt),0>Mt&&(rt-=Mt,Mt=0),tt+=E+x),0<tn)b=nl(this,4),tn=nl(this,4),y?(b[2].h(0,Gt+x),b[3].h(b[2].x,Wt),tn[2].h(Ot,b[2].y),tn[3].h(tn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Ot,b[2].y),tn[2].h(b[2].x,Wt),tn[3].h(b[3].x,tn[2].y));else{for(b=nl(this,te.length+2),tn=nl(this,re.length+2),ot=0;ot<te.length;ot++)At=te[ot],b[ot+2].h(At.x+tt,At.y+rt);for(ot=0;ot<re.length;ot++)At=re[ot],tn[ot+2].h(At.x+tt,At.y+rt)}y?(b[0].h(at,0),b[1].h(b[0].x,Gt),b[2].y<b[1].y&&(b[2].x>b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].y<b[2].y&&(b[3].x>b[0].x?b[3].assign(b[2]):b[2].assign(b[3])),tn[0].h(at+E,0),tn[1].h(tn[0].x,Gt),tn[2].y<tn[1].y&&(tn[2].x<tn[0].x?tn[2].assign(tn[1]):tn[1].assign(tn[2])),tn[3].y<tn[2].y&&(tn[3].x<tn[0].x?tn[3].assign(tn[2]):tn[2].assign(tn[3])),b[2].y-=x/2,tn[2].y-=x/2):(b[0].h(0,Mt),b[1].h(E,b[0].y),b[2].x<b[1].x&&(b[2].y>b[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].x<b[2].x&&(b[3].y>b[0].y?b[3].assign(b[2]):b[2].assign(b[3])),tn[0].h(0,Mt+Gt),tn[1].h(E,tn[0].y),tn[2].x<tn[1].x&&(tn[2].y<tn[0].y?tn[2].assign(tn[1]):tn[1].assign(tn[2])),tn[3].x<tn[2].x&&(tn[3].y<tn[0].y?tn[3].assign(tn[2]):tn[2].assign(tn[3])),b[2].x-=x/2,tn[2].x-=x/2),UA(this,te),UA(this,re),a.Yo=b,a.kp=tn,a.la.h(at,Mt),a.Da.h(Ot,Wt)}break;default:Yt("Unhandled compaction value "+a.compaction.toString())}}};function u1(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=Af(x));var b=jv(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=yA(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];z=Math.max(z,x?ot.Da.width:ot.Da.height)}var at=y.alignment,At=at===Ku,ft=at===Vu;rt=Af(at);var pt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var xt=y.nodeSpacing,Ct=a.computeNodeIndent(y),Mt=At||ft?0:Ct/2,Gt=y.rowSpacing,Ot=0;(At||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Ot=Math.max(0,y.rowIndent)),At=y.width;var Wt=y.height,Zt=0,te=0,re=0,me=0,ln=0,Nn=0,Fn=0,tn=0,Ge=0,bi=0;if(rt&&!Op(at)&&135<E&&b.reverse(),Op(at))if(1<tt)for(var Si=0;Si<tt;Si++){var wr=b[Si],_r=wr.Da;Si%2===0&&Si!==tt-1?Ge=Math.max(Ge,(x?_r.width:_r.height)+a.computeBusNodeSpacing(wr)-xt):Si%2!==0&&(bi=Math.max(bi,(x?_r.width:_r.height)+a.computeBusNodeSpacing(wr)-xt))}else tt===1&&(Ge=x?b[0].Da.width:b[0].Da.height);if(rt)switch(at){case pc:case _u:te=135>E?h1(a,y,b,Ge,Zt,te):c1(a,y,b,Ge,Zt,te),Ge=te.x,Zt=te.width,te=te.height;break;case mc:for(pt=0;pt<tt;pt++)Mt=b[pt],re=Mt.Da,bi=Fn===0?0:Gt,x?(Mt.S.h(z-re.width,ln+bi),Zt=Math.max(Zt,re.width),te=Math.max(te,ln+bi+re.height),ln+=bi+re.height):(Mt.S.h(me+bi,z-re.height),Zt=Math.max(Zt,me+bi+re.width),te=Math.max(te,re.height),me+=bi+re.width),Fn++;break;case Sh:for(z=0;z<tt;z++)pt=b[z],Mt=pt.Da,re=Fn===0?0:Gt,x?(pt.S.h(xt/2+y.focus.x,ln+re),Zt=Math.max(Zt,Mt.width),te=Math.max(te,ln+re+Mt.height),ln+=re+Mt.height):(pt.S.h(me+re,xt/2+y.focus.y),Zt=Math.max(Zt,me+re+Mt.width),te=Math.max(te,Mt.height),me+=re+Mt.width),Fn++}else for(bi=0;bi<tt;bi++)Si=b[bi],wr=Si.Da,x?(0<pt&&0<Fn&&me+xt+wr.width>pt&&(me<z&&qf(y,at,z-me,0,tn,bi-1),Nn++,Fn=0,tn=bi,re=te,me=0,ln=135<E?-te-Gt:te+Gt),_r=Fn===0?Mt:xt,um(a,Si,0,ln),Si.S.h(me+_r,ln),Zt=Math.max(Zt,me+_r+wr.width),te=Math.max(te,re+(Nn===0?0:Gt)+wr.height),me+=_r+wr.width):(0<pt&&0<Fn&&ln+xt+wr.height>pt&&(ln<z&&qf(y,at,0,z-ln,tn,bi-1),Nn++,Fn=0,tn=bi,re=Zt,ln=0,me=135<E?-Zt-Gt:Zt+Gt),_r=Fn===0?Mt:xt,um(a,Si,me,0),Si.S.h(me,ln+_r),te=Math.max(te,ln+_r+wr.height),Zt=Math.max(Zt,re+(Nn===0?0:Gt)+wr.width),ln+=_r+wr.height),Fn++;switch(0<Nn&&(x?(te+=Math.max(0,ot),me<Zt&&qf(y,at,Zt-me,0,tn,tt-1),0<Ot&&(ft||Vd(y,Ot,0,0,tt-1),Zt+=Ot)):(Zt+=Math.max(0,ot),ln<te&&qf(y,at,0,te-ln,tn,tt-1),0<Ot&&(ft||Vd(y,0,Ot,0,tt-1),te+=Ot))),Ot=ft=0,at){case Hg:x?ft+=Zt/2-y.focus.x-Ct/2:Ot+=te/2-y.focus.y-Ct/2;break;case Wd:0<Nn?x?ft+=Zt/2-y.focus.x-Ct/2:Ot+=te/2-y.focus.y-Ct/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-Ct/2):(a=b[0].S.y+b[0].la.y,Ot+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Ct/2);break;case Ku:x?(ft-=Ct,Zt+=Ct):(Ot-=Ct,te+=Ct);break;case Vu:x?(ft+=Zt-y.width+Ct,Zt+=Ct):(Ot+=te-y.height+Ct,te+=Ct);break;case pc:case _u:x?1<tt?ft+=Ge+xt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Ot+=Ge+xt/2-y.focus.y:Ot+=b[0].focus.y-y.focus.y+b[0].la.y;break;case mc:x?ft+=Zt+xt/2-y.focus.x:Ot+=te+xt/2-y.focus.y;break;case Sh:break;default:a=a.customAlignment(y,ft,Ot,Zt,te),ft=a[0],Ot=a[1],Zt=a[2],te=a[3]}for(a=0;a<tt;a++)Ct=b[a],x?Ct.S.h(Ct.S.x+Ct.la.x-ft,Ct.S.y+(135<E?(rt?-te:-Ct.Da.height)+Ct.la.y-ot:Wt+ot+Ct.la.y)):Ct.S.h(Ct.S.x+(135<E?(rt?-Zt:-Ct.Da.width)+Ct.la.x-ot:At+ot+Ct.la.x),Ct.S.y+Ct.la.y-Ot);x?(Zt=Kv(y,Zt,ft),0>ft&&(ft=0),135<E&&(Ot+=te+ot),te=Math.max(Math.max(te,Wt),te+Wt+ot)):(135<E&&(ft+=Zt+ot),Zt=Math.max(Math.max(Zt,At),Zt+At+ot),te=Vv(y,te,Ot),0>Ot&&(Ot=0)),y.la.h(ft,Ot),y.Da.h(Zt,te)}}qi.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function h1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new be(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new be(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,at=yA(y)===90,At=0,ft=0,pt=0,xt=0;xt<tt;xt++)if(!(xt%2!==0||1<tt&&xt===tt-1)){var Ct=x[xt],Mt=Ct.Da,Gt=At===0?0:ot;if(at){var Ot=a.computeBusNodeSpacing(Ct)-rt;Ct.S.h(E-(Mt.width+Ot),pt+Gt),b=Math.max(b,Mt.width+Ot),z=Math.max(z,pt+Gt+Mt.height),pt+=Gt+Mt.height}else Ot=a.computeBusNodeSpacing(Ct)-rt,Ct.S.h(ft+Gt,E-(Mt.height+Ot)),z=Math.max(z,Mt.height+Ot),b=Math.max(b,ft+Gt+Mt.width),ft+=Gt+Mt.width;At++}for(At=0,Ct=ft,xt=pt,at?(ft=E+rt,pt=0):(ft=0,pt=E+rt),Mt=0;Mt<tt;Mt++)if(Mt%2!==0){Gt=x[Mt],Ot=Gt.Da;var Wt=At===0?0:ot;if(at){var Zt=a.computeBusNodeSpacing(Gt)-rt;Gt.S.h(ft+Zt,pt+Wt),b=Math.max(b,ft+Ot.width+Zt),z=Math.max(z,pt+Wt+Ot.height),pt+=Wt+Ot.height}else Zt=a.computeBusNodeSpacing(Gt)-rt,Gt.S.h(ft+Wt,pt+Zt),b=Math.max(b,ft+Wt+Ot.width),z=Math.max(z,pt+Ot.height+Zt),ft+=Wt+Ot.width;At++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,at?Math.max(Math.abs(xt),Math.abs(pt)):Math.max(Math.abs(Ct),Math.abs(ft))),at?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),at=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,at+tt.width),0>at&&(b-=at),z=Math.max(z,Math.max(xt,pt)+a+tt.height),0>x.S.x&&(E=Am(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(Ct,ft)+a+tt.width),pt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,pt+tt.height),0>pt&&(z-=pt),0>x.S.y&&(E=Am(y,x.S.y,!0,E,rt)))),new be(E,0,b,z)}function c1(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new be(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new be(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,at=yA(y)===270,At=0,ft=0,pt=0,xt=0;xt<tt;xt++)if(!(xt%2!==0||1<tt&&xt===tt-1)){var Ct=x[xt],Mt=Ct.Da,Gt=At===0?0:ot;if(at){var Ot=a.computeBusNodeSpacing(Ct)-rt;pt-=Gt+Mt.height,Ct.S.h(E-(Mt.width+Ot),pt),b=Math.max(b,Mt.width+Ot),z=Math.max(z,Math.abs(pt))}else Ot=a.computeBusNodeSpacing(Ct)-rt,ft-=Gt+Mt.width,Ct.S.h(ft,E-(Mt.height+Ot)),z=Math.max(z,Mt.height+Ot),b=Math.max(b,Math.abs(ft));At++}for(At=0,Ct=ft,xt=pt,at?(ft=E+rt,pt=0):(ft=0,pt=E+rt),Mt=0;Mt<tt;Mt++)if(Mt%2!==0){Gt=x[Mt],Ot=Gt.Da;var Wt=At===0?0:ot;if(at){var Zt=a.computeBusNodeSpacing(Gt)-rt;pt-=Wt+Ot.height,Gt.S.h(ft+Zt,pt),b=Math.max(b,ft+Ot.width+Zt),z=Math.max(z,Math.abs(pt))}else Zt=a.computeBusNodeSpacing(Gt)-rt,ft-=Wt+Ot.width,Gt.S.h(ft,pt+Zt),z=Math.max(z,pt+Ot.height+Zt),b=Math.max(b,Math.abs(ft));At++}for(1<tt&&tt%2===1&&(ot=x[tt-1],At=ot.Da,a=a.computeBusLastRowSpacing(ot,at?Math.max(Math.abs(xt),Math.abs(pt)):Math.max(Math.abs(Ct),Math.abs(ft))),at?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-At.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+At.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(xt,pt))+a+At.height),0>ot.S.x&&(E=Am(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-At.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(Ct,ft))+a+At.width),pt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,pt+At.height),0>pt&&(z-=pt),0>ot.S.y&&(E=Am(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],at?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new be(E,0,b,z)}qi.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},qi.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Am(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function Kv(a,y,x){switch(a.alignment){case Wd:case Hg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Ku:return a.width>y?a.width:y;case Vu:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case pc:case _u:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case mc:return a.width-a.focus.x+a.nodeSpacing/2+y;case Sh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Vv(a,y,x){switch(a.alignment){case Wd:case Hg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Ku:return a.height>y?a.height:y;case Vu:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case pc:case _u:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case mc:return a.height-a.focus.y+a.nodeSpacing/2+y;case Sh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function _v(a,y,x){switch(a){case Hg:y/=2,x/=2;break;case Wd:y/=2,x/=2;break;case Ku:x=y=0;break;case Vu:break;default:Yt("Unhandled alignment value "+a.toString())}return new Ht(y,x)}function qf(a,y,x,E,b,z){y=_v(y,x,E),Vd(a,y.x,y.y,b,z)}function Vd(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 um(a,y,x,E){var b=y.parent;switch(a.ud){case ju:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case _d:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Yt("Unhandled path value "+a.ud.toString())}}function hm(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function f1(a,y,x,E,b,z,tt,rt){var ot=yA(y),at=ot===90||ot===270,At=y.nodeSpacing;y=E;var ft=b;E=z;var pt=tt,xt=x.Yo,Ct=x.kp;tt=x.Da;var Mt=at?Math.max(pt,tt.height):Math.max(E,tt.width);if((xt===null||ot!==yA(x))&&(xt=nl(a,2),Ct=nl(a,2),at?(xt[0].h(0,0),xt[1].h(0,tt.height),Ct[0].h(tt.width,0),Ct[1].h(Ct[0].x,xt[1].y)):(xt[0].h(0,0),xt[1].h(tt.width,0),Ct[0].h(0,tt.height),Ct[1].h(xt[1].x,Ct[0].y))),at){if(pt=9999999,!(ft===null||2>ft.length||xt===null||2>xt.length))for(b=x=0;x<ft.length&&b<xt.length;){z=ft[x];var Gt=xt[b];ot=Gt.x,at=Gt.y,ot+=E;var Ot=z;x+1<ft.length&&(Ot=ft[x+1]);var Wt=Gt;Gt=Wt.x,Wt=Wt.y,b+1<xt.length&&(Wt=xt[b+1],Gt=Wt.x,Wt=Wt.y,Gt+=E);var Zt=pt;z.y===at?Zt=ot-z.x:z.y>at&&z.y<Wt?Zt=ot+(z.y-at)/(Wt-at)*(Gt-ot)-z.x:at>z.y&&at<Ot.y&&(Zt=ot-(z.x+(at-z.y)/(Ot.y-z.y)*(Ot.x-z.x))),Zt<pt&&(pt=Zt),Ot.y<=z.y?x++:Wt<=at?b++:(Ot.y<=Wt&&x++,Wt<=Ot.y&&b++)}if(pt=E-pt,pt+=At,x=xt,b=pt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(At=nl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)at=x[z++],At[E++].h(at.x+b,at.y);for(;ot<y.length;)at=y[ot++],At[E++].h(at.x,at.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)at=x[z++],At[E++].h(at.x+b,at.y);for(x=nl(a,E),ot=0;ot<E;ot++)x[ot].assign(At[ot]);UA(a,At),E=x}if(z=Ct,ot=pt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(At=nl(a,ft.length+z.length),b=at=x=0;x<ft.length&&ft[x].y<z[0].y;)Ot=ft[x++],At[b++].h(Ot.x,Ot.y);for(;at<z.length;)Ot=z[at++],At[b++].h(Ot.x+ot,Ot.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)ot=ft[x++],At[b++].h(ot.x,ot.y);for(z=nl(a,b),x=0;x<b;x++)z[x].assign(At[x]);UA(a,At),b=z}return z=Math.max(0,pt)+tt.width,tt=Mt,UA(a,y),UA(a,xt),UA(a,ft),UA(a,Ct),rt[0]=E,rt[1]=b,new be(pt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||xt===null||2>xt.length))for(b=x=0;x<ft.length&&b<xt.length;)z=ft[x],Gt=xt[b],ot=Gt.x,at=Gt.y,at+=pt,Ot=z,x+1<ft.length&&(Ot=ft[x+1]),Wt=Gt,Gt=Wt.x,Wt=Wt.y,b+1<xt.length&&(Wt=xt[b+1],Gt=Wt.x,Wt=Wt.y,Wt+=pt),Zt=E,z.x===ot?Zt=at-z.y:z.x>ot&&z.x<Gt?Zt=at+(z.x-ot)/(Gt-ot)*(Wt-at)-z.y:ot>z.x&&ot<Ot.x&&(Zt=at-(z.y+(ot-z.x)/(Ot.x-z.x)*(Ot.y-z.y))),Zt<E&&(E=Zt),Ot.x<=z.x?x++:Gt<=ot?b++:(Ot.x<=Gt&&x++,Gt<=Ot.x&&b++);if(pt-=E,pt+=At,x=xt,b=pt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(At=nl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)at=x[z++],At[E++].h(at.x,at.y+b);for(;ot<y.length;)at=y[ot++],At[E++].h(at.x,at.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)at=x[z++],At[E++].h(at.x,at.y+b);for(x=nl(a,E),ot=0;ot<E;ot++)x[ot].assign(At[ot]);UA(a,At),E=x}if(z=Ct,ot=pt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(At=nl(a,ft.length+z.length),b=at=x=0;x<ft.length&&ft[x].x<z[0].x;)Ot=ft[x++],At[b++].h(Ot.x,Ot.y);for(;at<z.length;)Ot=z[at++],At[b++].h(Ot.x,Ot.y+ot);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)ot=ft[x++],At[b++].h(ot.x,ot.y);for(z=nl(a,b),x=0;x<b;x++)z[x].assign(At[x]);UA(a,At),b=z}return z=Mt,tt=Math.max(0,pt)+tt.height,UA(a,y),UA(a,xt),UA(a,ft),UA(a,Ct),rt[0]=E,rt[1]=b,new be(pt,0,z,tt)}function nl(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new Ht;return a}function UA(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}qi.prototype.arrangeTrees=function(){if(this.Rb===pm)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Zl){var x=y.node;if(x!==null){var E=x.position;x=E.x,E=E.y,isFinite(x)||(x=0),isFinite(E)||(E=0),Wv(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Zl&&a.push(x);switch(this.sorting){case Og:break;case Hp:a.reverse();break;case Rp:a.sort(this.comparer);break;case Gp:a.sort(this.comparer),a.reverse();break;default:Yt("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Wv(this,b,y+b.la.x,x+b.la.y),this.Rb){case gm:x+=b.Da.height+this.$d.height;break;case Jv:y+=b.Da.width+this.$d.width;break;default:Yt("Unhandled arrangement value "+this.Rb.toString())}}}};function Wv(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];Wv(a,tt,x+tt.S.x,E+tt.S.y)}}}qi.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},qi.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},qi.prototype.Gu=function(){if(this.layerStyle===mm){for(var a=this.$v,y=[],x=null,E=this.network.vertexes.iterator;E.next();){var b=E.value;x===null?x=b.bounds.copy():x.ed(b.bounds);var z=y[b.level];z===void 0?z=this.computeLayerSpacing(b):z=Math.max(z,this.computeLayerSpacing(b)),y[b.level]=z}for(E=0;E<y.length;E++)y[E]===void 0&&(y[E]=0);if(this.angle===90||this.angle===270?(x.Bc(this.nodeSpacing/2,this.layerSpacing),E=new Ht(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Ht(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var rt=a[tt]+y[tt];this.angle===270?(z-=rt,b.push(new be(0,z,x,rt))):this.angle===90?(b.push(new be(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new be(z,0,rt,x))):(b.push(new be(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},qi.prototype.commitLayers=function(){},qi.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},qi.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Zl&&d1(this,y)}};function d1(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)d1(a,y[E])}}qi.prototype.setPortSpots=function(a){var y=a.alignment;if(Af(y)){var x=this.ud===ju,E=yA(a);switch(E){case 0:var b=rs;break;case 90:b=Ys;break;case 180:b=Io;break;default:b=vs}var z=a.children,tt=z.length;switch(y){case pc:case _u:for(y=0;y<tt;y++){var rt=z[y];if(rt=(x?rt.sourceEdges:rt.destinationEdges).first(),rt!==null&&(rt=rt.link,rt!==null)){var ot=E===90||E===270?Io:vs;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=Io;break;case 90:ot=vs;break;case 180:ot=rs;break;default:ot=Ys}else y%2===0&&(ot=E===90||E===270?rs:Ys);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case mc:for(E=E===90||E===270?rs:Ys,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case Sh:for(E=E===90||E===270?Io:vs,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=yA(a),this.ud===ju){for(b=a.destinationEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.fromSpot=rs;break;case 90:E.fromSpot=Ys;break;case 180:E.fromSpot=Io;break;default:E.fromSpot=vs}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=Io;break;case 90:E.toSpot=vs;break;case 180:E.toSpot=rs;break;default:E.toSpot=Ys}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=rs;break;case 90:E.toSpot=Ys;break;case 180:E.toSpot=Io;break;default:E.toSpot=vs}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=Io;break;case 90:E.fromSpot=vs;break;case 180:E.fromSpot=rs;break;default:E.fromSpot=Ys}else E.fromSpot=a.childPortSpot}};function yA(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}qi.prototype.computeLayerSpacing=function(a){var y=yA(a);y=y===90||y===270;var x=a.layerSpacing;if(0<a.layerSpacingParentOverlap){var E=Math.min(1,a.layerSpacingParentOverlap);x-=y?a.height*E:a.width*E}return x<(y?-a.height:-a.width)&&(x=y?-a.height:-a.width),x},qi.prototype.computeNodeIndent=function(a){var y=yA(a),x=a.nodeIndent;if(0<a.nodeIndentPastParent){var E=Math.min(1,a.nodeIndentPastParent);x+=y===90||y===270?a.width*E:a.height*E}return x=Math.max(0,x)},Ze.Object.defineProperties(qi.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==dm&&a!==Xv&&a!==Yv&&a!==Zv||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==qv&&a!==$v&&a!==mm||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==gm&&a!==Jv&&a!==pm||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Og&&a!==Hp&&a!==Rp&&!Gp||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):Yt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=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!==fm&&a!==zp||(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!==Og&&a!==Hp&&a!==Rp&&!Gp||(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!==fm&&a!==zp||(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 cm=new Be(qi,"PathDefault",-1),ju=new Be(qi,"PathDestination",0),_d=new Be(qi,"PathSource",1),Og=new Be(qi,"SortingForwards",10),Hp=new Be(qi,"SortingReverse",11),Rp=new Be(qi,"SortingAscending",12),Gp=new Be(qi,"SortingDescending",13),Hg=new Be(qi,"AlignmentCenterSubtrees",20),Wd=new Be(qi,"AlignmentCenterChildren",21),Ku=new Be(qi,"AlignmentStart",22),Vu=new Be(qi,"AlignmentEnd",23),pc=new Be(qi,"AlignmentBus",24),_u=new Be(qi,"AlignmentBusBranching",25),mc=new Be(qi,"AlignmentTopLeftBus",26),Sh=new Be(qi,"AlignmentBottomRightBus",27),fm=new Be(qi,"CompactionNone",30),zp=new Be(qi,"CompactionBlock",31),dm=new Be(qi,"StyleLayered",40),Yv=new Be(qi,"StyleLastParents",41),Xv=new Be(qi,"StyleAlternating",42),Zv=new Be(qi,"StyleRootOnly",43),gm=new Be(qi,"ArrangementVertical",50),Jv=new Be(qi,"ArrangementHorizontal",51),pm=new Be(qi,"ArrangementFixedRoots",52),qv=new Be(qi,"LayerIndividual",60),$v=new Be(qi,"LayerSiblings",61),mm=new Be(qi,"LayerUniform",62);qi.className="TreeLayout",qi.PathDefault=cm,qi.PathDestination=ju,qi.PathSource=_d,qi.SortingForwards=Og,qi.SortingReverse=Hp,qi.SortingAscending=Rp,qi.SortingDescending=Gp,qi.AlignmentCenterSubtrees=Hg,qi.AlignmentCenterChildren=Wd,qi.AlignmentStart=Ku,qi.AlignmentEnd=Vu,qi.AlignmentBus=pc,qi.AlignmentBusBranching=_u,qi.AlignmentTopLeftBus=mc,qi.AlignmentBottomRightBus=Sh,qi.CompactionNone=fm,qi.CompactionBlock=zp,qi.StyleLayered=dm,qi.StyleLastParents=Yv,qi.StyleAlternating=Xv,qi.StyleRootOnly=Zv,qi.ArrangementVertical=gm,qi.ArrangementHorizontal=Jv,qi.ArrangementFixedRoots=pm,qi.LayerIndividual=qv,qi.LayerSiblings=$v,qi.LayerUniform=mm;function Yd(a){qr.call(this,a)}Te(Yd,qr),Yd.prototype.createVertex=function(){return new Zl(this)},Yd.prototype.createEdge=function(){return new Rg(this)},Yd.className="TreeNetwork";function Zl(a){gs.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 Ht(0,0),this.Da=new Je(0,0),this.la=new Ht(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Og,this.hd=yv,this.Kb=0,this.Jb=Wd,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=zp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=is,this.wr=!0,this.Dp=is}Te(Zl,gs),Zl.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)},Ze.Object.defineProperties(Zl.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;x<y;x++);this.u=a}}},level:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},descendantCount:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}},maxChildrenCount:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},maxGenerationCount:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a)}},comments:{get:function(){return this.td},set:function(a){if(this.td!==a){if(a!==null)for(var y=a.length,x=0;x<y;x++);this.td=a}}},sorting:{get:function(){return this.nd},set:function(a){this.nd!==a&&(this.nd=a)}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a)}},angle:{get:function(){return this.Kb},set:function(a){this.Kb!==a&&(this.Kb=a)}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb!==a&&(this.Jb=a)}},nodeIndent:{get:function(){return this.Uq},set:function(a){this.Uq!==a&&(this.Uq=a)}},nodeIndentPastParent:{get:function(){return this.Vq},set:function(a){this.Vq!==a&&(this.Vq=a)}},nodeSpacing:{get:function(){return this.Wq},set:function(a){this.Wq!==a&&(this.Wq=a)}},layerSpacing:{get:function(){return this.ie},set:function(a){this.ie!==a&&(this.ie=a)}},layerSpacingParentOverlap:{get:function(){return this.Aq},set:function(a){this.Aq!==a&&(this.Aq=a)}},compaction:{get:function(){return this.Hp},set:function(a){this.Hp!==a&&(this.Hp=a)}},breadthLimit:{get:function(){return this.Ap},set:function(a){this.Ap!==a&&(this.Ap=a)}},rowSpacing:{get:function(){return this.nr},set:function(a){this.nr!==a&&(this.nr=a)}},rowIndent:{get:function(){return this.mr},set:function(a){this.mr!==a&&(this.mr=a)}},commentSpacing:{get:function(){return this.Gp},set:function(a){this.Gp!==a&&(this.Gp=a)}},commentMargin:{get:function(){return this.Fp},set:function(a){this.Fp!==a&&(this.Fp=a)}},setsPortSpot:{get:function(){return this.xr},set:function(a){this.xr!==a&&(this.xr=a)}},portSpot:{get:function(){return this.dr},set:function(a){this.dr.D(a)||(this.dr=a)}},setsChildPortSpot:{get:function(){return this.wr},set:function(a){this.wr!==a&&(this.wr=a)}},childPortSpot:{get:function(){return this.Dp},set:function(a){this.Dp.D(a)||(this.Dp=a)}},childrenCount:{get:function(){return this.children.length}},relativePosition:{get:function(){return this.S},set:function(a){this.S.set(a)}},subtreeSize:{get:function(){return this.Da},set:function(a){this.Da.set(a)}},subtreeOffset:{get:function(){return this.la},set:function(a){this.la.set(a)}}}),Zl.className="TreeVertex";function Rg(a){ml.call(this,a),this.$t=new Ht(0,0)}Te(Rg,ml),Rg.prototype.commit=function(){var a=this.link;if(a!==null&&!a.isAvoiding){var y=this.network.layout,x=null,E=null;switch(y.ud){case ju:x=this.fromVertex,E=this.toVertex;break;case _d:x=this.toVertex,E=this.fromVertex;break;default:Yt("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=yA(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===kl,at=a.isOrthogonal,At;if(a.uh(),at||ot){for(At=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),pt=a.i(2)}else{for(At=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),pt=a.i(a.pointsCount-1)}var xt=a.i(a.pointsCount-1);z===0?(x.alignment===Vu?(z=E.bottom+b.y,b.y===0&&ft.y>xt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Ku?(z=E.top+b.y,b.y===0&&ft.y<xt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(At,ft.x,z),At++,a.m(At,E.right+tt,z),At++,a.m(At,E.right+tt+(b.x-rt)/3,z),At++,a.m(At,E.right+tt+2*(b.x-rt)/3,z),At++,a.m(At,E.right+tt+(b.x-rt),z),At++,a.m(At,pt.x,z)):(at&&(a.m(At,E.right+tt/2,ft.y),At++),a.m(At,E.right+tt/2,z),At++,a.m(At,E.right+tt+b.x-(at?rt/2:rt),z),At++,at&&a.m(At,a.i(At-1).x,pt.y))):z===90?(x.alignment===Vu?(z=E.right+b.x,b.x===0&&ft.x>xt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Ku?(z=E.left+b.x,b.x===0&&ft.x<xt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(At,z,ft.y),At++,a.m(At,z,E.bottom+tt),At++,a.m(At,z,E.bottom+tt+(b.y-rt)/3),At++,a.m(At,z,E.bottom+tt+2*(b.y-rt)/3),At++,a.m(At,z,E.bottom+tt+(b.y-rt)),At++,a.m(At,z,pt.y)):(at&&(a.m(At,ft.x,E.bottom+tt/2),At++),a.m(At,z,E.bottom+tt/2),At++,a.m(At,z,E.bottom+tt+b.y-(at?rt/2:rt)),At++,at&&a.m(At,pt.x,a.i(At-1).y))):z===180?(x.alignment===Vu?(z=E.bottom+b.y,b.y===0&&ft.y>xt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===Ku?(z=E.top+b.y,b.y===0&&ft.y<xt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(At,ft.x,z),At++,a.m(At,E.left-tt,z),At++,a.m(At,E.left-tt+(b.x+rt)/3,z),At++,a.m(At,E.left-tt+2*(b.x+rt)/3,z),At++,a.m(At,E.left-tt+(b.x+rt),z),At++,a.m(At,pt.x,z)):(at&&(a.m(At,E.left-tt/2,ft.y),At++),a.m(At,E.left-tt/2,z),At++,a.m(At,E.left-tt+b.x+(at?rt/2:rt),z),At++,at&&a.m(At,a.i(At-1).x,pt.y))):z===270?(x.alignment===Vu?(z=E.right+b.x,b.x===0&&ft.x>xt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===Ku?(z=E.left+b.x,b.x===0&&ft.x<xt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(At,z,ft.y),At++,a.m(At,z,E.top-tt),At++,a.m(At,z,E.top-tt+(b.y+rt)/3),At++,a.m(At,z,E.top-tt+2*(b.y+rt)/3),At++,a.m(At,z,E.top-tt+(b.y+rt)),At++,a.m(At,z,pt.y)):(at&&(a.m(At,ft.x,E.top-tt/2),At++),a.m(At,z,E.top-tt/2),At++,a.m(At,z,E.top-tt+b.y+(at?rt/2:rt)),At++,at&&a.m(At,pt.x,a.i(At-1).y))):Yt("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=yA(x),y!==yA(b)&&(tt=E.computeLayerSpacing(x),rt=x.bounds,x=b.bounds,y===0&&x.left-rt.right<tt+1||y===90&&x.top-rt.bottom<tt+1||y===180&&rt.left-x.right<tt+1||y===270&&rt.top-x.bottom<tt+1||(a.vg(),x=a.curve===kl,b=a.isOrthogonal,E=Af(this.fromVertex.alignment),a.uh(),y===0?(y=rt.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=rt.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=rt.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=rt.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},Ze.Object.defineProperties(Rg.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)}},relativePoint:{get:function(){return this.$t},set:function(a){this.$t.set(a)}}}),Rg.className="TreeEdge",Ao.prototype.initializeStandardTools=function(){this.gb("Action",new Bl,this.mouseDownTools),this.gb("Relinking",new Xa,this.mouseDownTools),this.gb("LinkReshaping",new jo,this.mouseDownTools),this.gb("Rotating",new aa,this.mouseDownTools),this.gb("Resizing",new zs,this.mouseDownTools),this.gb("Linking",new Gs,this.mouseMoveTools),this.gb("Dragging",new Co,this.mouseMoveTools),this.gb("DragSelecting",new hl,this.mouseMoveTools),this.gb("Panning",new Ns,this.mouseMoveTools),this.gb("ContextMenu",new la,this.mouseUpTools),this.gb("TextEditing",new to,this.mouseUpTools),this.gb("ClickCreating",new Su,this.mouseUpTools),this.gb("ClickSelecting",new oh,this.mouseUpTools)},ou("Horizontal",new io),ou("Spot",new Uo),ou("Table",new ra),ou("Viewbox",new ds),ou("TableRow",new dl),ou("TableColumn",new Ml),ou("Graduated",new ru),ou("Grid",new va),Of.add("GraphLinksModel",Fs),Of.add("TreeModel",Gl);var vm=He.go,ty={get licenseKey(){return ge.licenseKey},set licenseKey(a){ge.licenseKey=a},get version(){return ge.version},Group:Ti,EnumValue:Be,List:_t,Set:le,Map:vn,Point:Ht,Size:Je,Rect:be,Margin:Xi,Spot:ni,Geometry:qe,PathFigure:As,PathSegment:gr,InputEvent:Is,DiagramEvent:fu,ChangedEvent:yo,Model:Kn,GraphLinksModel:sr,TreeModel:Ia,Binding:Zo,Transaction:ps,UndoManager:Bo,CommandHandler:Rt,Tool:ur,DraggingTool:Co,DraggingInfo:kA,DraggingOptions:st,LinkingBaseTool:To,LinkingTool:Gs,RelinkingTool:Xa,LinkReshapingTool:jo,ResizingTool:zs,RotatingTool:aa,ClickSelectingTool:oh,ActionTool:Bl,ClickCreatingTool:Su,HTMLInfo:iA,ContextMenuTool:la,DragSelectingTool:hl,PanningTool:Ns,TextEditingTool:to,ToolManager:Ao,Animation:Qs,AnimationManager:Ha,AnimationTrigger:Dl,Layer:ms,Diagram:ge,Palette:ht,Overview:dt,Brush:Lr,GraphObject:oe,Panel:Ve,RowColumnDefinition:ss,Shape:Oi,TextBlock:Jr,Picture:Ka,Part:ei,Adornment:vr,Node:fn,Link:en,Placeholder:Ma,Layout:mo,LayoutNetwork:qr,LayoutVertex:gs,LayoutEdge:ml,GridLayout:Ds,PanelLayout:Er,CircularLayout:Eo,CircularNetwork:Qg,CircularVertex:Tp,CircularEdge:q0,ForceDirectedLayout:$s,ForceDirectedNetwork:Kd,ForceDirectedVertex:Ip,ForceDirectedEdge:Np,LayeredDigraphLayout:Qr,LayeredDigraphNetwork:Dg,LayeredDigraphVertex:jl,LayeredDigraphEdge:Dp,TreeLayout:qi,TreeNetwork:Yd,TreeVertex:Zl,TreeEdge:Rg};typeof vm=="object"&&vm.version&&un("WARNING: a `go` object on the root object is already defined. "+("Debug"in vm?"debug ":"")+"version: "+vm.version+", replaced with version: "+ty.version),ge.prototype.go=ty,He.go=ty,typeof Pn.exports=="object"&&(Pn.exports=typeof ne.g!="undefined"?ne.g.go:self.go)}();var bt=typeof ne.g!="undefined"?ne.g.go:self.go;const xe=typeof ne.g!="undefined"?ne.g.go:self.go,Me=xe.Group,je=xe.EnumValue,ke=xe.List,ye=xe.Set,pe=xe.Map,Ue=xe.Point,Pe=xe.Size,ie=xe.Rect,An=xe.Margin,we=xe.Spot,xn=xe.Geometry,Dt=xe.PathFigure,et=xe.PathSegment,nt=xe.InputEvent,ct=xe.DiagramEvent,lt=xe.ChangedEvent,gt=xe.Model,yt=xe.GraphLinksModel,Et=xe.TreeModel,Nt=xe.Binding,Vt=xe.Transaction,Jt=xe.UndoManager,ce=xe.CommandHandler,de=xe.Tool,Ae=xe.DraggingTool,De=xe.DraggingInfo,ve=xe.LinkingBaseTool,We=xe.LinkingTool,nn=xe.RelinkingTool,an=xe.LinkReshapingTool,In=xe.ResizingTool,En=xe.RotatingTool,ui=xe.ClickSelectingTool,fi=xe.ActionTool,ue=xe.ClickCreatingTool,Kt=xe.HTMLInfo,dn=xe.ContextMenuTool,Ai=xe.DragSelectingTool,qn=xe.PanningTool,Ke=xe.TextEditingTool,yn=xe.ToolManager,Sn=xe.Animation,si=xe.AnimationManager,Bn=xe.AnimationTrigger,Se=xe.Layer,Fe=xe.Diagram,pn=xe.Palette,Cn=xe.Overview,Ut=xe.Brush,Lt=xe.GraphObject,Bt=xe.Panel,Tt=xe.RowColumnDefinition,jt=xe.Shape,kt=xe.TextBlock,Ce=xe.TextBlockMetrics,on=xe.Picture,Gn=xe.Part,Qn=xe.Adornment,_n=xe.Node,_e=xe.Link,Zn=xe.Placeholder,Dn=xe.Layout,ai=xe.LayoutNetwork,vi=xe.LayoutVertex,Rn=xe.LayoutEdge,_i=xe.GridLayout,ii=xe.PanelLayout,ji=xe.CircularLayout,Vi=xe.CircularNetwork,Wr=xe.CircularVertex,pr=xe.CircularEdge,mr=xe.ForceDirectedLayout,Sr=xe.ForceDirectedNetwork,$r=xe.ForceDirectedVertex,ar=xe.ForceDirectedEdge,Yr=xe.LayeredDigraphLayout,kr=xe.LayeredDigraphNetwork,no=xe.LayeredDigraphVertex,Oo=xe.LayeredDigraphEdge,$o=xe.TreeLayout,ko=xe.TreeNetwork,oo=xe.TreeVertex,tr=xe.TreeEdge,Hr=xe.version},64270:function(Pn){(function(gi,ne){Pn.exports=ne()})(this,function(){"use strict";var gi=function(vt,mt){return gi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(St,wt){St.__proto__=wt}||function(St,wt){for(var Qt in wt)Object.prototype.hasOwnProperty.call(wt,Qt)&&(St[Qt]=wt[Qt])},gi(vt,mt)};function ne(vt,mt){if(typeof mt!="function"&&mt!==null)throw new TypeError("Class extends value "+String(mt)+" is not a constructor or null");gi(vt,mt);function St(){this.constructor=vt}vt.prototype=mt===null?Object.create(mt):(St.prototype=mt.prototype,new St)}var bt=function(){return bt=Object.assign||function(mt){for(var St,wt=1,Qt=arguments.length;wt<Qt;wt++){St=arguments[wt];for(var Xt in St)Object.prototype.hasOwnProperty.call(St,Xt)&&(mt[Xt]=St[Xt])}return mt},bt.apply(this,arguments)};function xe(vt,mt,St,wt){function Qt(Xt){return Xt instanceof St?Xt:new St(function(ae){ae(Xt)})}return new(St||(St=Promise))(function(Xt,ae){function Ee($e){try{Xe(wt.next($e))}catch(gn){ae(gn)}}function fe($e){try{Xe(wt.throw($e))}catch(gn){ae(gn)}}function Xe($e){$e.done?Xt($e.value):Qt($e.value).then(Ee,fe)}Xe((wt=wt.apply(vt,mt||[])).next())})}function Me(vt,mt){var St={label:0,sent:function(){if(Xt[0]&1)throw Xt[1];return Xt[1]},trys:[],ops:[]},wt,Qt,Xt,ae;return ae={next:Ee(0),throw:Ee(1),return:Ee(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function Ee(Xe){return function($e){return fe([Xe,$e])}}function fe(Xe){if(wt)throw new TypeError("Generator is already executing.");for(;St;)try{if(wt=1,Qt&&(Xt=Xe[0]&2?Qt.return:Xe[0]?Qt.throw||((Xt=Qt.return)&&Xt.call(Qt),0):Qt.next)&&!(Xt=Xt.call(Qt,Xe[1])).done)return Xt;switch(Qt=0,Xt&&(Xe=[Xe[0]&2,Xt.value]),Xe[0]){case 0:case 1:Xt=Xe;break;case 4:return St.label++,{value:Xe[1],done:!1};case 5:St.label++,Qt=Xe[1],Xe=[0];continue;case 7:Xe=St.ops.pop(),St.trys.pop();continue;default:if(Xt=St.trys,!(Xt=Xt.length>0&&Xt[Xt.length-1])&&(Xe[0]===6||Xe[0]===2)){St=0;continue}if(Xe[0]===3&&(!Xt||Xe[1]>Xt[0]&&Xe[1]<Xt[3])){St.label=Xe[1];break}if(Xe[0]===6&&St.label<Xt[1]){St.label=Xt[1],Xt=Xe;break}if(Xt&&St.label<Xt[2]){St.label=Xt[2],St.ops.push(Xe);break}Xt[2]&&St.ops.pop(),St.trys.pop();continue}Xe=mt.call(vt,St)}catch($e){Xe=[6,$e],Qt=0}finally{wt=Xt=0}if(Xe[0]&5)throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}}function je(vt,mt,St){if(St||arguments.length===2)for(var wt=0,Qt=mt.length,Xt;wt<Qt;wt++)(Xt||!(wt in mt))&&(Xt||(Xt=Array.prototype.slice.call(mt,0,wt)),Xt[wt]=mt[wt]);return vt.concat(Xt||mt)}for(var ke=function(){function vt(mt,St,wt,Qt){this.left=mt,this.top=St,this.width=wt,this.height=Qt}return vt.prototype.add=function(mt,St,wt,Qt){return new vt(this.left+mt,this.top+St,this.width+wt,this.height+Qt)},vt.fromClientRect=function(mt,St){return new vt(St.left+mt.windowBounds.left,St.top+mt.windowBounds.top,St.width,St.height)},vt.fromDOMRectList=function(mt,St){var wt=Array.from(St).find(function(Qt){return Qt.width!==0});return wt?new vt(wt.left+mt.windowBounds.left,wt.top+mt.windowBounds.top,wt.width,wt.height):vt.EMPTY},vt.EMPTY=new vt(0,0,0,0),vt}(),ye=function(vt,mt){return ke.fromClientRect(vt,mt.getBoundingClientRect())},pe=function(vt){var mt=vt.body,St=vt.documentElement;if(!mt||!St)throw new Error("Unable to get document size");var wt=Math.max(Math.max(mt.scrollWidth,St.scrollWidth),Math.max(mt.offsetWidth,St.offsetWidth),Math.max(mt.clientWidth,St.clientWidth)),Qt=Math.max(Math.max(mt.scrollHeight,St.scrollHeight),Math.max(mt.offsetHeight,St.offsetHeight),Math.max(mt.clientHeight,St.clientHeight));return new ke(0,0,wt,Qt)},Ue=function(vt){for(var mt=[],St=0,wt=vt.length;St<wt;){var Qt=vt.charCodeAt(St++);if(Qt>=55296&&Qt<=56319&&St<wt){var Xt=vt.charCodeAt(St++);(Xt&64512)===56320?mt.push(((Qt&1023)<<10)+(Xt&1023)+65536):(mt.push(Qt),St--)}else mt.push(Qt)}return mt},Pe=function(){for(var vt=[],mt=0;mt<arguments.length;mt++)vt[mt]=arguments[mt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,vt);var St=vt.length;if(!St)return"";for(var wt=[],Qt=-1,Xt="";++Qt<St;){var ae=vt[Qt];ae<=65535?wt.push(ae):(ae-=65536,wt.push((ae>>10)+55296,ae%1024+56320)),(Qt+1===St||wt.length>16384)&&(Xt+=String.fromCharCode.apply(String,wt),wt.length=0)}return Xt},ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",An=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),we=0;we<ie.length;we++)An[ie.charCodeAt(we)]=we;for(var xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),et=0;et<xn.length;et++)Dt[xn.charCodeAt(et)]=et;for(var nt=function(vt){var mt=vt.length*.75,St=vt.length,wt,Qt=0,Xt,ae,Ee,fe;vt[vt.length-1]==="="&&(mt--,vt[vt.length-2]==="="&&mt--);var Xe=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(mt):new Array(mt),$e=Array.isArray(Xe)?Xe:new Uint8Array(Xe);for(wt=0;wt<St;wt+=4)Xt=Dt[vt.charCodeAt(wt)],ae=Dt[vt.charCodeAt(wt+1)],Ee=Dt[vt.charCodeAt(wt+2)],fe=Dt[vt.charCodeAt(wt+3)],$e[Qt++]=Xt<<2|ae>>4,$e[Qt++]=(ae&15)<<4|Ee>>2,$e[Qt++]=(Ee&3)<<6|fe&63;return Xe},ct=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=2)St.push(vt[wt+1]<<8|vt[wt]);return St},lt=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=4)St.push(vt[wt+3]<<24|vt[wt+2]<<16|vt[wt+1]<<8|vt[wt]);return St},gt=5,yt=11,Et=2,Nt=yt-gt,Vt=65536>>gt,Jt=1<<gt,ce=Jt-1,de=1024>>gt,Ae=Vt+de,De=Ae,ve=32,We=De+ve,nn=65536>>yt,an=1<<Nt,In=an-1,En=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint16Array(Array.prototype.slice.call(vt,mt,St))},ui=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint32Array(Array.prototype.slice.call(vt,mt,St))},fi=function(vt,mt){var St=nt(vt),wt=Array.isArray(St)?lt(St):new Uint32Array(St),Qt=Array.isArray(St)?ct(St):new Uint16Array(St),Xt=24,ae=En(Qt,Xt/2,wt[4]/2),Ee=wt[5]===2?En(Qt,(Xt+wt[4])/2):ui(wt,Math.ceil((Xt+wt[4])/4));return new ue(wt[0],wt[1],wt[2],wt[3],ae,Ee)},ue=function(){function vt(mt,St,wt,Qt,Xt,ae){this.initialValue=mt,this.errorValue=St,this.highStart=wt,this.highValueIndex=Qt,this.index=Xt,this.data=ae}return vt.prototype.get=function(mt){var St;if(mt>=0){if(mt<55296||mt>56319&&mt<=65535)return St=this.index[mt>>gt],St=(St<<Et)+(mt&ce),this.data[St];if(mt<=65535)return St=this.index[Vt+(mt-55296>>gt)],St=(St<<Et)+(mt&ce),this.data[St];if(mt<this.highStart)return St=We-nn+(mt>>yt),St=this.index[St],St+=mt>>gt&In,St=this.index[St],St=(St<<Et)+(mt&ce),this.data[St];if(mt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},vt}(),Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ai=0;Ai<Kt.length;Ai++)dn[Kt.charCodeAt(Ai)]=Ai;var qn="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Ke=50,yn=1,Sn=2,si=3,Bn=4,Se=5,Fe=7,pn=8,Cn=9,Ut=10,Lt=11,Bt=12,Tt=13,jt=14,kt=15,Ce=16,on=17,Gn=18,Qn=19,_n=20,_e=21,Zn=22,Dn=23,ai=24,vi=25,Rn=26,_i=27,ii=28,ji=29,Vi=30,Wr=31,pr=32,mr=33,Sr=34,$r=35,ar=36,Yr=37,kr=38,no=39,Oo=40,$o=41,ko=42,oo=43,tr=[9001,65288],Hr="!",Pt="\xD7",so="\xF7",zr=fi(qn),ri=[Vi,ar],pi=[yn,Sn,si,Se],Ci=[Ut,pn],Qi=[_i,Rn],Tr=pi.concat(Ci),Re=[kr,no,Oo,Sr,$r],Oe=[kt,Tt],Te=function(vt,mt){mt===void 0&&(mt="strict");var St=[],wt=[],Qt=[];return vt.forEach(function(Xt,ae){var Ee=zr.get(Xt);if(Ee>Ke?(Qt.push(!0),Ee-=Ke):Qt.push(!1),["normal","auto","loose"].indexOf(mt)!==-1&&[8208,8211,12316,12448].indexOf(Xt)!==-1)return wt.push(ae),St.push(Ce);if(Ee===Bn||Ee===Lt){if(ae===0)return wt.push(ae),St.push(Vi);var fe=St[ae-1];return Tr.indexOf(fe)===-1?(wt.push(wt[ae-1]),St.push(fe)):(wt.push(ae),St.push(Vi))}if(wt.push(ae),Ee===Wr)return St.push(mt==="strict"?_e:Yr);if(Ee===ko||Ee===ji)return St.push(Vi);if(Ee===oo)return Xt>=131072&&Xt<=196605||Xt>=196608&&Xt<=262141?St.push(Yr):St.push(Vi);St.push(Ee)}),[wt,St,Qt]},Ze=function(vt,mt,St,wt){var Qt=wt[St];if(Array.isArray(vt)?vt.indexOf(Qt)!==-1:vt===Qt)for(var Xt=St;Xt<=wt.length;){Xt++;var ae=wt[Xt];if(ae===mt)return!0;if(ae!==Ut)break}if(Qt===Ut)for(var Xt=St;Xt>0;){Xt--;var Ee=wt[Xt];if(Array.isArray(vt)?vt.indexOf(Ee)!==-1:vt===Ee)for(var fe=St;fe<=wt.length;){fe++;var ae=wt[fe];if(ae===mt)return!0;if(ae!==Ut)break}if(Ee!==Ut)break}return!1},yi=function(vt,mt){for(var St=vt;St>=0;){var wt=mt[St];if(wt===Ut)St--;else return wt}return 0},hi=function(vt,mt,St,wt,Qt){if(St[wt]===0)return Pt;var Xt=wt-1;if(Array.isArray(Qt)&&Qt[Xt]===!0)return Pt;var ae=Xt-1,Ee=Xt+1,fe=mt[Xt],Xe=ae>=0?mt[ae]:0,$e=mt[Ee];if(fe===Sn&&$e===si)return Pt;if(pi.indexOf(fe)!==-1)return Hr;if(pi.indexOf($e)!==-1||Ci.indexOf($e)!==-1)return Pt;if(yi(Xt,mt)===pn)return so;if(zr.get(vt[Xt])===Lt||(fe===pr||fe===mr)&&zr.get(vt[Ee])===Lt||fe===Fe||$e===Fe||fe===Cn||[Ut,Tt,kt].indexOf(fe)===-1&&$e===Cn||[on,Gn,Qn,ai,ii].indexOf($e)!==-1||yi(Xt,mt)===Zn||Ze(Dn,Zn,Xt,mt)||Ze([on,Gn],_e,Xt,mt)||Ze(Bt,Bt,Xt,mt))return Pt;if(fe===Ut)return so;if(fe===Dn||$e===Dn)return Pt;if($e===Ce||fe===Ce)return so;if([Tt,kt,_e].indexOf($e)!==-1||fe===jt||Xe===ar&&Oe.indexOf(fe)!==-1||fe===ii&&$e===ar||$e===_n||ri.indexOf($e)!==-1&&fe===vi||ri.indexOf(fe)!==-1&&$e===vi||fe===_i&&[Yr,pr,mr].indexOf($e)!==-1||[Yr,pr,mr].indexOf(fe)!==-1&&$e===Rn||ri.indexOf(fe)!==-1&&Qi.indexOf($e)!==-1||Qi.indexOf(fe)!==-1&&ri.indexOf($e)!==-1||[_i,Rn].indexOf(fe)!==-1&&($e===vi||[Zn,kt].indexOf($e)!==-1&&mt[Ee+1]===vi)||[Zn,kt].indexOf(fe)!==-1&&$e===vi||fe===vi&&[vi,ii,ai].indexOf($e)!==-1)return Pt;if([vi,ii,ai,on,Gn].indexOf($e)!==-1)for(var gn=Xt;gn>=0;){var $n=mt[gn];if($n===vi)return Pt;if([ii,ai].indexOf($n)!==-1)gn--;else break}if([_i,Rn].indexOf($e)!==-1)for(var gn=[on,Gn].indexOf(fe)!==-1?ae:Xt;gn>=0;){var $n=mt[gn];if($n===vi)return Pt;if([ii,ai].indexOf($n)!==-1)gn--;else break}if(kr===fe&&[kr,no,Sr,$r].indexOf($e)!==-1||[no,Sr].indexOf(fe)!==-1&&[no,Oo].indexOf($e)!==-1||[Oo,$r].indexOf(fe)!==-1&&$e===Oo||Re.indexOf(fe)!==-1&&[_n,Rn].indexOf($e)!==-1||Re.indexOf($e)!==-1&&fe===_i||ri.indexOf(fe)!==-1&&ri.indexOf($e)!==-1||fe===ai&&ri.indexOf($e)!==-1||ri.concat(vi).indexOf(fe)!==-1&&$e===Zn&&tr.indexOf(vt[Ee])===-1||ri.concat(vi).indexOf($e)!==-1&&fe===Gn)return Pt;if(fe===$o&&$e===$o){for(var rr=St[Xt],Ni=1;rr>0&&(rr--,mt[rr]===$o);)Ni++;if(Ni%2!==0)return Pt}return fe===pr&&$e===mr?Pt:so},Zi=function(vt,mt){mt||(mt={lineBreak:"normal",wordBreak:"normal"});var St=Te(vt,mt.lineBreak),wt=St[0],Qt=St[1],Xt=St[2];(mt.wordBreak==="break-all"||mt.wordBreak==="break-word")&&(Qt=Qt.map(function(Ee){return[vi,Vi,ko].indexOf(Ee)!==-1?Yr:Ee}));var ae=mt.wordBreak==="keep-all"?Xt.map(function(Ee,fe){return Ee&&vt[fe]>=19968&&vt[fe]<=40959}):void 0;return[wt,Qt,ae]},He=function(){function vt(mt,St,wt,Qt){this.codePoints=mt,this.required=St===Hr,this.start=wt,this.end=Qt}return vt.prototype.slice=function(){return Pe.apply(void 0,this.codePoints.slice(this.start,this.end))},vt}(),Le=function(vt,mt){var St=Ue(vt),wt=Zi(St,mt),Qt=wt[0],Xt=wt[1],ae=wt[2],Ee=St.length,fe=0,Xe=0;return{next:function(){if(Xe>=Ee)return{done:!0,value:null};for(var $e=Pt;Xe<Ee&&($e=hi(St,Xt,Qt,++Xe,ae))===Pt;);if($e!==Pt||Xe===Ee){var gn=new He(St,$e,fe,Xe);return fe=Xe,{value:gn,done:!1}}return{done:!0,value:null}}}},kn=1,Bi=2,sn=4,Yt=8,he=10,wn=47,un=92,Ne=9,mn=32,xi=34,Mi=61,Gi=35,bn=36,Ln=37,On=39,Yi=40,ki=41,hn=95,Vn=45,Fr=33,Ur=60,vo=62,Be=64,wi=91,ir=93,li=61,br=123,lr=63,xr=125,Ar=124,qt=126,$t=128,_t=65533,Qe=42,le=43,rn=44,Wn=58,Un=59,mi=46,zn=0,cn=8,Yn=11,Ki=14,Wi=31,vn=127,Ht=-1,Ii=48,Mr=97,Rr=101,yr=102,Ei=117,jn=122,oi=65,Pi=69,Tn=70,ti=85,Jn=90,Mn=function(vt){return vt>=Ii&&vt<=57},ci=function(vt){return vt>=55296&&vt<=57343},Je=function(vt){return Mn(vt)||vt>=oi&&vt<=Tn||vt>=Mr&&vt<=yr},er=function(vt){return vt>=Mr&&vt<=jn},fr=function(vt){return vt>=oi&&vt<=Jn},Or=function(vt){return er(vt)||fr(vt)},nr=function(vt){return vt>=$t},jr=function(vt){return vt===he||vt===Ne||vt===mn},Kr=function(vt){return Or(vt)||nr(vt)||vt===hn},Ho=function(vt){return Kr(vt)||Mn(vt)||vt===Vn},ao=function(vt){return vt>=zn&&vt<=cn||vt===Yn||vt>=Ki&&vt<=Wi||vt===vn},bo=function(vt,mt){return vt!==un?!1:mt!==he},ho=function(vt,mt,St){return vt===Vn?Kr(mt)||bo(mt,St):Kr(vt)?!0:!!(vt===un&&bo(vt,mt))},be=function(vt,mt,St){return vt===le||vt===Vn?Mn(mt)?!0:mt===mi&&Mn(St):Mn(vt===mi?mt:vt)},co=function(vt){var mt=0,St=1;(vt[mt]===le||vt[mt]===Vn)&&(vt[mt]===Vn&&(St=-1),mt++);for(var wt=[];Mn(vt[mt]);)wt.push(vt[mt++]);var Qt=wt.length?parseInt(Pe.apply(void 0,wt),10):0;vt[mt]===mi&&mt++;for(var Xt=[];Mn(vt[mt]);)Xt.push(vt[mt++]);var ae=Xt.length,Ee=ae?parseInt(Pe.apply(void 0,Xt),10):0;(vt[mt]===Pi||vt[mt]===Rr)&&mt++;var fe=1;(vt[mt]===le||vt[mt]===Vn)&&(vt[mt]===Vn&&(fe=-1),mt++);for(var Xe=[];Mn(vt[mt]);)Xe.push(vt[mt++]);var $e=Xe.length?parseInt(Pe.apply(void 0,Xe),10):0;return St*(Qt+Ee*Math.pow(10,-ae))*Math.pow(10,fe*$e)},ls={type:2},ks={type:3},lo={type:4},xa={type:13},ta={type:8},Da={type:21},Gr={type:9},Ro={type:10},Vs={type:11},Vl={type:12},zA={type:14},Ba={type:23},Xi={type:1},xA={type:25},jA={type:24},Wa={type:26},Hs={type:27},hu={type:28},ni={type:29},$i={type:31},dr={type:32},Cr=function(){function vt(){this._value=[]}return vt.prototype.write=function(mt){this._value=this._value.concat(Ue(mt))},vt.prototype.read=function(){for(var mt=[],St=this.consumeToken();St!==dr;)mt.push(St),St=this.consumeToken();return mt},vt.prototype.consumeToken=function(){var mt=this.consumeCodePoint();switch(mt){case xi:return this.consumeStringToken(xi);case Gi:var St=this.peekCodePoint(0),wt=this.peekCodePoint(1),Qt=this.peekCodePoint(2);if(Ho(St)||bo(wt,Qt)){var Xt=ho(St,wt,Qt)?Bi:kn,ae=this.consumeName();return{type:5,value:ae,flags:Xt}}break;case bn:if(this.peekCodePoint(0)===Mi)return this.consumeCodePoint(),xa;break;case On:return this.consumeStringToken(On);case Yi:return ls;case ki:return ks;case Qe:if(this.peekCodePoint(0)===Mi)return this.consumeCodePoint(),zA;break;case le:if(be(mt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(mt),this.consumeNumericToken();break;case rn:return lo;case Vn:var Ee=mt,fe=this.peekCodePoint(0),Xe=this.peekCodePoint(1);if(be(Ee,fe,Xe))return this.reconsumeCodePoint(mt),this.consumeNumericToken();if(ho(Ee,fe,Xe))return this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();if(fe===Vn&&Xe===vo)return this.consumeCodePoint(),this.consumeCodePoint(),jA;break;case mi:if(be(mt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(mt),this.consumeNumericToken();break;case wn:if(this.peekCodePoint(0)===Qe)for(this.consumeCodePoint();;){var $e=this.consumeCodePoint();if($e===Qe&&($e=this.consumeCodePoint(),$e===wn))return this.consumeToken();if($e===Ht)return this.consumeToken()}break;case Wn:return Wa;case Un:return Hs;case Ur:if(this.peekCodePoint(0)===Fr&&this.peekCodePoint(1)===Vn&&this.peekCodePoint(2)===Vn)return this.consumeCodePoint(),this.consumeCodePoint(),xA;break;case Be:var gn=this.peekCodePoint(0),$n=this.peekCodePoint(1),rr=this.peekCodePoint(2);if(ho(gn,$n,rr)){var ae=this.consumeName();return{type:7,value:ae}}break;case wi:return hu;case un:if(bo(mt,this.peekCodePoint(0)))return this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();break;case ir:return ni;case li:if(this.peekCodePoint(0)===Mi)return this.consumeCodePoint(),ta;break;case br:return Vs;case xr:return Vl;case Ei:case ti:var Ni=this.peekCodePoint(0),zi=this.peekCodePoint(1);return Ni===le&&(Je(zi)||zi===lr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(mt),this.consumeIdentLikeToken();case Ar:if(this.peekCodePoint(0)===Mi)return this.consumeCodePoint(),Gr;if(this.peekCodePoint(0)===Ar)return this.consumeCodePoint(),Da;break;case qt:if(this.peekCodePoint(0)===Mi)return this.consumeCodePoint(),Ro;break;case Ht:return dr}return jr(mt)?(this.consumeWhiteSpace(),$i):Mn(mt)?(this.reconsumeCodePoint(mt),this.consumeNumericToken()):Kr(mt)?(this.reconsumeCodePoint(mt),this.consumeIdentLikeToken()):{type:6,value:Pe(mt)}},vt.prototype.consumeCodePoint=function(){var mt=this._value.shift();return typeof mt=="undefined"?-1:mt},vt.prototype.reconsumeCodePoint=function(mt){this._value.unshift(mt)},vt.prototype.peekCodePoint=function(mt){return mt>=this._value.length?-1:this._value[mt]},vt.prototype.consumeUnicodeRangeToken=function(){for(var mt=[],St=this.consumeCodePoint();Je(St)&&mt.length<6;)mt.push(St),St=this.consumeCodePoint();for(var wt=!1;St===lr&&mt.length<6;)mt.push(St),St=this.consumeCodePoint(),wt=!0;if(wt){var Qt=parseInt(Pe.apply(void 0,mt.map(function(fe){return fe===lr?Ii:fe})),16),Xt=parseInt(Pe.apply(void 0,mt.map(function(fe){return fe===lr?Tn:fe})),16);return{type:30,start:Qt,end:Xt}}var ae=parseInt(Pe.apply(void 0,mt),16);if(this.peekCodePoint(0)===Vn&&Je(this.peekCodePoint(1))){this.consumeCodePoint(),St=this.consumeCodePoint();for(var Ee=[];Je(St)&&Ee.length<6;)Ee.push(St),St=this.consumeCodePoint();var Xt=parseInt(Pe.apply(void 0,Ee),16);return{type:30,start:ae,end:Xt}}else return{type:30,start:ae,end:ae}},vt.prototype.consumeIdentLikeToken=function(){var mt=this.consumeName();return mt.toLowerCase()==="url"&&this.peekCodePoint(0)===Yi?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Yi?(this.consumeCodePoint(),{type:19,value:mt}):{type:20,value:mt}},vt.prototype.consumeUrlToken=function(){var mt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ht)return{type:22,value:""};var St=this.peekCodePoint(0);if(St===On||St===xi){var wt=this.consumeStringToken(this.consumeCodePoint());return wt.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ht||this.peekCodePoint(0)===ki)?(this.consumeCodePoint(),{type:22,value:wt.value}):(this.consumeBadUrlRemnants(),Ba)}for(;;){var Qt=this.consumeCodePoint();if(Qt===Ht||Qt===ki)return{type:22,value:Pe.apply(void 0,mt)};if(jr(Qt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ht||this.peekCodePoint(0)===ki?(this.consumeCodePoint(),{type:22,value:Pe.apply(void 0,mt)}):(this.consumeBadUrlRemnants(),Ba);if(Qt===xi||Qt===On||Qt===Yi||ao(Qt))return this.consumeBadUrlRemnants(),Ba;if(Qt===un)if(bo(Qt,this.peekCodePoint(0)))mt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Ba;else mt.push(Qt)}},vt.prototype.consumeWhiteSpace=function(){for(;jr(this.peekCodePoint(0));)this.consumeCodePoint()},vt.prototype.consumeBadUrlRemnants=function(){for(;;){var mt=this.consumeCodePoint();if(mt===ki||mt===Ht)return;bo(mt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},vt.prototype.consumeStringSlice=function(mt){for(var St=5e4,wt="";mt>0;){var Qt=Math.min(St,mt);wt+=Pe.apply(void 0,this._value.splice(0,Qt)),mt-=Qt}return this._value.shift(),wt},vt.prototype.consumeStringToken=function(mt){var St="",wt=0;do{var Qt=this._value[wt];if(Qt===Ht||Qt===void 0||Qt===mt)return St+=this.consumeStringSlice(wt),{type:0,value:St};if(Qt===he)return this._value.splice(0,wt),Xi;if(Qt===un){var Xt=this._value[wt+1];Xt!==Ht&&Xt!==void 0&&(Xt===he?(St+=this.consumeStringSlice(wt),wt=-1,this._value.shift()):bo(Qt,Xt)&&(St+=this.consumeStringSlice(wt),St+=Pe(this.consumeEscapedCodePoint()),wt=-1))}wt++}while(!0)},vt.prototype.consumeNumber=function(){var mt=[],St=sn,wt=this.peekCodePoint(0);for((wt===le||wt===Vn)&&mt.push(this.consumeCodePoint());Mn(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());wt=this.peekCodePoint(0);var Qt=this.peekCodePoint(1);if(wt===mi&&Mn(Qt))for(mt.push(this.consumeCodePoint(),this.consumeCodePoint()),St=Yt;Mn(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());wt=this.peekCodePoint(0),Qt=this.peekCodePoint(1);var Xt=this.peekCodePoint(2);if((wt===Pi||wt===Rr)&&((Qt===le||Qt===Vn)&&Mn(Xt)||Mn(Qt)))for(mt.push(this.consumeCodePoint(),this.consumeCodePoint()),St=Yt;Mn(this.peekCodePoint(0));)mt.push(this.consumeCodePoint());return[co(mt),St]},vt.prototype.consumeNumericToken=function(){var mt=this.consumeNumber(),St=mt[0],wt=mt[1],Qt=this.peekCodePoint(0),Xt=this.peekCodePoint(1),ae=this.peekCodePoint(2);if(ho(Qt,Xt,ae)){var Ee=this.consumeName();return{type:15,number:St,flags:wt,unit:Ee}}return Qt===Ln?(this.consumeCodePoint(),{type:16,number:St,flags:wt}):{type:17,number:St,flags:wt}},vt.prototype.consumeEscapedCodePoint=function(){var mt=this.consumeCodePoint();if(Je(mt)){for(var St=Pe(mt);Je(this.peekCodePoint(0))&&St.length<6;)St+=Pe(this.consumeCodePoint());jr(this.peekCodePoint(0))&&this.consumeCodePoint();var wt=parseInt(St,16);return wt===0||ci(wt)||wt>1114111?_t:wt}return mt===Ht?_t:mt},vt.prototype.consumeName=function(){for(var mt="";;){var St=this.consumeCodePoint();if(Ho(St))mt+=Pe(St);else if(bo(St,this.peekCodePoint(0)))mt+=Pe(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(St),mt}},vt}(),Dr=function(){function vt(mt){this._tokens=mt}return vt.create=function(mt){var St=new Cr;return St.write(mt),new vt(St.read())},vt.parseValue=function(mt){return vt.create(mt).parseComponentValue()},vt.parseValues=function(mt){return vt.create(mt).parseComponentValues()},vt.prototype.parseComponentValue=function(){for(var mt=this.consumeToken();mt.type===31;)mt=this.consumeToken();if(mt.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(mt);var St=this.consumeComponentValue();do mt=this.consumeToken();while(mt.type===31);if(mt.type===32)return St;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},vt.prototype.parseComponentValues=function(){for(var mt=[];;){var St=this.consumeComponentValue();if(St.type===32)return mt;mt.push(St),mt.push()}},vt.prototype.consumeComponentValue=function(){var mt=this.consumeToken();switch(mt.type){case 11:case 28:case 2:return this.consumeSimpleBlock(mt.type);case 19:return this.consumeFunction(mt)}return mt},vt.prototype.consumeSimpleBlock=function(mt){for(var St={type:mt,values:[]},wt=this.consumeToken();;){if(wt.type===32||ca(wt,mt))return St;this.reconsumeToken(wt),St.values.push(this.consumeComponentValue()),wt=this.consumeToken()}},vt.prototype.consumeFunction=function(mt){for(var St={name:mt.value,values:[],type:18};;){var wt=this.consumeToken();if(wt.type===32||wt.type===3)return St;this.reconsumeToken(wt),St.values.push(this.consumeComponentValue())}},vt.prototype.consumeToken=function(){var mt=this._tokens.shift();return typeof mt=="undefined"?dr:mt},vt.prototype.reconsumeToken=function(mt){this._tokens.unshift(mt)},vt}(),So=function(vt){return vt.type===15},Ui=function(vt){return vt.type===17},xo=function(vt){return vt.type===20},ea=function(vt){return vt.type===0},Bs=function(vt,mt){return xo(vt)&&vt.value===mt},Go=function(vt){return vt.type!==31},_s=function(vt){return vt.type!==31&&vt.type!==4},bs=function(vt){var mt=[],St=[];return vt.forEach(function(wt){if(wt.type===4){if(St.length===0)throw new Error("Error parsing function args, zero tokens for arg");mt.push(St),St=[];return}wt.type!==31&&St.push(wt)}),St.length&&mt.push(St),mt},ca=function(vt,mt){return mt===11&&vt.type===12||mt===28&&vt.type===29?!0:mt===2&&vt.type===3},Ws=function(vt){return vt.type===17||vt.type===15},ns=function(vt){return vt.type===16||Ws(vt)},xl=function(vt){return vt.length>1?[vt[0],vt[1]]:[vt[0]]},Ts={type:17,number:0,flags:sn},Zu={type:16,number:50,flags:sn},Il={type:16,number:100,flags:sn},Ya=function(vt,mt,St){var wt=vt[0],Qt=vt[1];return[No(wt,mt),No(typeof Qt!="undefined"?Qt:wt,St)]},No=function(vt,mt){if(vt.type===16)return vt.number/100*mt;if(So(vt))switch(vt.unit){case"rem":case"em":return 16*vt.number;case"px":default:return vt.number}return vt.number},al="deg",Ju="grad",qu="rad",Eh="turn",is={name:"angle",parse:function(vt,mt){if(mt.type===15)switch(mt.unit){case al:return Math.PI*mt.number/180;case Ju:return Math.PI/200*mt.number;case qu:return mt.number;case Eh:return Math.PI*2*mt.number}throw new Error("Unsupported angle type")}},Lc=function(vt){return vt.type===15&&(vt.unit===al||vt.unit===Ju||vt.unit===qu||vt.unit===Eh)},$u=function(vt){var mt=vt.filter(xo).map(function(St){return St.value}).join(" ");switch(mt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ts,Ts];case"to top":case"bottom":return fa(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ts,Il];case"to right":case"left":return fa(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Il,Il];case"to bottom":case"top":return fa(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Il,Ts];case"to left":case"right":return fa(270)}return 0},fa=function(vt){return Math.PI*vt/180},ll={name:"color",parse:function(vt,mt){if(mt.type===18){var St=Mo[mt.name];if(typeof St=="undefined")throw new Error('Attempting to parse an unsupported color function "'+mt.name+'"');return St(vt,mt.values)}if(mt.type===5){if(mt.value.length===3){var wt=mt.value.substring(0,1),Qt=mt.value.substring(1,2),Xt=mt.value.substring(2,3);return rs(parseInt(wt+wt,16),parseInt(Qt+Qt,16),parseInt(Xt+Xt,16),1)}if(mt.value.length===4){var wt=mt.value.substring(0,1),Qt=mt.value.substring(1,2),Xt=mt.value.substring(2,3),ae=mt.value.substring(3,4);return rs(parseInt(wt+wt,16),parseInt(Qt+Qt,16),parseInt(Xt+Xt,16),parseInt(ae+ae,16)/255)}if(mt.value.length===6){var wt=mt.value.substring(0,2),Qt=mt.value.substring(2,4),Xt=mt.value.substring(4,6);return rs(parseInt(wt,16),parseInt(Qt,16),parseInt(Xt,16),1)}if(mt.value.length===8){var wt=mt.value.substring(0,2),Qt=mt.value.substring(2,4),Xt=mt.value.substring(4,6),ae=mt.value.substring(6,8);return rs(parseInt(wt,16),parseInt(Qt,16),parseInt(Xt,16),parseInt(ae,16)/255)}}if(mt.type===20){var Ee=ys[mt.value.toUpperCase()];if(typeof Ee!="undefined")return Ee}return ys.TRANSPARENT}},vs=function(vt){return(255&vt)===0},Io=function(vt){var mt=255&vt,St=255&vt>>8,wt=255&vt>>16,Qt=255&vt>>24;return mt<255?"rgba("+Qt+","+wt+","+St+","+mt/255+")":"rgb("+Qt+","+wt+","+St+")"},rs=function(vt,mt,St,wt){return(vt<<24|mt<<16|St<<8|Math.round(wt*255)<<0)>>>0},Ys=function(vt,mt){if(vt.type===17)return vt.number;if(vt.type===16){var St=mt===3?1:255;return mt===3?vt.number/100*St:Math.round(vt.number/100*St)}return 0},th=function(vt,mt){var St=mt.filter(_s);if(St.length===3){var wt=St.map(Ys),Qt=wt[0],Xt=wt[1],ae=wt[2];return rs(Qt,Xt,ae,1)}if(St.length===4){var Ee=St.map(Ys),Qt=Ee[0],Xt=Ee[1],ae=Ee[2],fe=Ee[3];return rs(Qt,Xt,ae,fe)}return 0};function BA(vt,mt,St){return St<0&&(St+=1),St>=1&&(St-=1),St<1/6?(mt-vt)*St*6+vt:St<1/2?mt:St<2/3?(mt-vt)*6*(2/3-St)+vt:vt}var Wo=function(vt,mt){var St=mt.filter(_s),wt=St[0],Qt=St[1],Xt=St[2],ae=St[3],Ee=(wt.type===17?fa(wt.number):is.parse(vt,wt))/(Math.PI*2),fe=ns(Qt)?Qt.number/100:0,Xe=ns(Xt)?Xt.number/100:0,$e=typeof ae!="undefined"&&ns(ae)?No(ae,1):1;if(fe===0)return rs(Xe*255,Xe*255,Xe*255,1);var gn=Xe<=.5?Xe*(fe+1):Xe+fe-Xe*fe,$n=Xe*2-gn,rr=BA($n,gn,Ee+1/3),Ni=BA($n,gn,Ee),zi=BA($n,gn,Ee-1/3);return rs(rr*255,Ni*255,zi*255,$e)},Mo={hsl:Wo,hsla:Wo,rgb:th,rgba:th},Xr=function(vt,mt){return ll.parse(vt,Dr.create(mt).parseComponentValue())},ys={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Fi={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(vt,mt){return mt.map(function(St){if(xo(St))switch(St.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Rs={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},se=function(vt,mt){var St=ll.parse(vt,mt[0]),wt=mt[1];return wt&&ns(wt)?{color:St,stop:wt}:{color:St,stop:null}},qe=function(vt,mt){var St=vt[0],wt=vt[vt.length-1];St.stop===null&&(St.stop=Ts),wt.stop===null&&(wt.stop=Il);for(var Qt=[],Xt=0,ae=0;ae<vt.length;ae++){var Ee=vt[ae].stop;if(Ee!==null){var fe=No(Ee,mt);fe>Xt?Qt.push(fe):Qt.push(Xt),Xt=fe}else Qt.push(null)}for(var Xe=null,ae=0;ae<Qt.length;ae++){var $e=Qt[ae];if($e===null)Xe===null&&(Xe=ae);else if(Xe!==null){for(var gn=ae-Xe,$n=Qt[Xe-1],rr=($e-$n)/(gn+1),Ni=1;Ni<=gn;Ni++)Qt[Xe+Ni-1]=rr*Ni;Xe=null}}return vt.map(function(zi,po){var Br=zi.color;return{color:Br,stop:Math.max(Math.min(1,Qt[po]/mt),0)}})},Nl=function(vt,mt,St){var wt=mt/2,Qt=St/2,Xt=No(vt[0],mt)-wt,ae=Qt-No(vt[1],St);return(Math.atan2(ae,Xt)+Math.PI*2)%(Math.PI*2)},CA=function(vt,mt,St){var wt=typeof vt=="number"?vt:Nl(vt,mt,St),Qt=Math.abs(mt*Math.sin(wt))+Math.abs(St*Math.cos(wt)),Xt=mt/2,ae=St/2,Ee=Qt/2,fe=Math.sin(wt-Math.PI/2)*Ee,Xe=Math.cos(wt-Math.PI/2)*Ee;return[Qt,Xt-Xe,Xt+Xe,ae-fe,ae+fe]},Cs=function(vt,mt){return Math.sqrt(vt*vt+mt*mt)},Ca=function(vt,mt,St,wt,Qt){var Xt=[[0,0],[0,mt],[vt,0],[vt,mt]];return Xt.reduce(function(ae,Ee){var fe=Ee[0],Xe=Ee[1],$e=Cs(St-fe,wt-Xe);return(Qt?$e<ae.optimumDistance:$e>ae.optimumDistance)?{optimumCorner:Ee,optimumDistance:$e}:ae},{optimumDistance:Qt?1/0:-1/0,optimumCorner:null}).optimumCorner},_l=function(vt,mt,St,wt,Qt){var Xt=0,ae=0;switch(vt.size){case 0:vt.shape===0?Xt=ae=Math.min(Math.abs(mt),Math.abs(mt-wt),Math.abs(St),Math.abs(St-Qt)):vt.shape===1&&(Xt=Math.min(Math.abs(mt),Math.abs(mt-wt)),ae=Math.min(Math.abs(St),Math.abs(St-Qt)));break;case 2:if(vt.shape===0)Xt=ae=Math.min(Cs(mt,St),Cs(mt,St-Qt),Cs(mt-wt,St),Cs(mt-wt,St-Qt));else if(vt.shape===1){var Ee=Math.min(Math.abs(St),Math.abs(St-Qt))/Math.min(Math.abs(mt),Math.abs(mt-wt)),fe=Ca(wt,Qt,mt,St,!0),Xe=fe[0],$e=fe[1];Xt=Cs(Xe-mt,($e-St)/Ee),ae=Ee*Xt}break;case 1:vt.shape===0?Xt=ae=Math.max(Math.abs(mt),Math.abs(mt-wt),Math.abs(St),Math.abs(St-Qt)):vt.shape===1&&(Xt=Math.max(Math.abs(mt),Math.abs(mt-wt)),ae=Math.max(Math.abs(St),Math.abs(St-Qt)));break;case 3:if(vt.shape===0)Xt=ae=Math.max(Cs(mt,St),Cs(mt,St-Qt),Cs(mt-wt,St),Cs(mt-wt,St-Qt));else if(vt.shape===1){var Ee=Math.max(Math.abs(St),Math.abs(St-Qt))/Math.max(Math.abs(mt),Math.abs(mt-wt)),gn=Ca(wt,Qt,mt,St,!1),Xe=gn[0],$e=gn[1];Xt=Cs(Xe-mt,($e-St)/Ee),ae=Ee*Xt}break}return Array.isArray(vt.size)&&(Xt=No(vt.size[0],wt),ae=vt.size.length===2?No(vt.size[1],Qt):Xt),[Xt,ae]},KA=function(vt,mt){var St=fa(180),wt=[];return bs(mt).forEach(function(Qt,Xt){if(Xt===0){var ae=Qt[0];if(ae.type===20&&ae.value==="to"){St=$u(Qt);return}else if(Lc(ae)){St=is.parse(vt,ae);return}}var Ee=se(vt,Qt);wt.push(Ee)}),{angle:St,stops:wt,type:1}},cu=function(vt,mt){var St=fa(180),wt=[];return bs(mt).forEach(function(Qt,Xt){if(Xt===0){var ae=Qt[0];if(ae.type===20&&["top","left","right","bottom"].indexOf(ae.value)!==-1){St=$u(Qt);return}else if(Lc(ae)){St=(is.parse(vt,ae)+fa(270))%fa(360);return}}var Ee=se(vt,Qt);wt.push(Ee)}),{angle:St,stops:wt,type:1}},As=function(vt,mt){var St=fa(180),wt=[],Qt=1,Xt=0,ae=3,Ee=[];return bs(mt).forEach(function(fe,Xe){var $e=fe[0];if(Xe===0){if(xo($e)&&$e.value==="linear"){Qt=1;return}else if(xo($e)&&$e.value==="radial"){Qt=2;return}}if($e.type===18){if($e.name==="from"){var gn=ll.parse(vt,$e.values[0]);wt.push({stop:Ts,color:gn})}else if($e.name==="to"){var gn=ll.parse(vt,$e.values[0]);wt.push({stop:Il,color:gn})}else if($e.name==="color-stop"){var $n=$e.values.filter(_s);if($n.length===2){var gn=ll.parse(vt,$n[1]),rr=$n[0];Ui(rr)&&wt.push({stop:{type:16,number:rr.number*100,flags:rr.flags},color:gn})}}}}),Qt===1?{angle:(St+fa(180))%fa(360),stops:wt,type:Qt}:{size:ae,shape:Xt,stops:wt,position:Ee,type:Qt}},gr="closest-side",Pa="farthest-side",Al="closest-corner",os="farthest-corner",Vr="circle",Es="ellipse",Oa="cover",zo="contain",ul=function(vt,mt){var St=0,wt=3,Qt=[],Xt=[];return bs(mt).forEach(function(ae,Ee){var fe=!0;if(Ee===0){var Xe=!1;fe=ae.reduce(function(gn,$n){if(Xe)if(xo($n))switch($n.value){case"center":return Xt.push(Zu),gn;case"top":case"left":return Xt.push(Ts),gn;case"right":case"bottom":return Xt.push(Il),gn}else(ns($n)||Ws($n))&&Xt.push($n);else if(xo($n))switch($n.value){case Vr:return St=0,!1;case Es:return St=1,!1;case"at":return Xe=!0,!1;case gr:return wt=0,!1;case Oa:case Pa:return wt=1,!1;case zo:case Al:return wt=2,!1;case os:return wt=3,!1}else if(Ws($n)||ns($n))return Array.isArray(wt)||(wt=[]),wt.push($n),!1;return gn},fe)}if(fe){var $e=se(vt,ae);Qt.push($e)}}),{size:wt,shape:St,stops:Qt,position:Xt,type:2}},Is=function(vt,mt){var St=0,wt=3,Qt=[],Xt=[];return bs(mt).forEach(function(ae,Ee){var fe=!0;if(Ee===0?fe=ae.reduce(function($e,gn){if(xo(gn))switch(gn.value){case"center":return Xt.push(Zu),!1;case"top":case"left":return Xt.push(Ts),!1;case"right":case"bottom":return Xt.push(Il),!1}else if(ns(gn)||Ws(gn))return Xt.push(gn),!1;return $e},fe):Ee===1&&(fe=ae.reduce(function($e,gn){if(xo(gn))switch(gn.value){case Vr:return St=0,!1;case Es:return St=1,!1;case zo:case gr:return wt=0,!1;case Pa:return wt=1,!1;case Al:return wt=2,!1;case Oa:case os:return wt=3,!1}else if(Ws(gn)||ns(gn))return Array.isArray(wt)||(wt=[]),wt.push(gn),!1;return $e},fe)),fe){var Xe=se(vt,ae);Qt.push(Xe)}}),{size:wt,shape:St,stops:Qt,position:Xt,type:2}},fu=function(vt){return vt.type===1},yo=function(vt){return vt.type===2},da={name:"image",parse:function(vt,mt){if(mt.type===22){var St={url:mt.value,type:0};return vt.cache.addImage(mt.value),St}if(mt.type===18){var wt=Qo[mt.name];if(typeof wt=="undefined")throw new Error('Attempting to parse an unsupported image function "'+mt.name+'"');return wt(vt,mt.values)}throw new Error("Unsupported image type "+mt.type)}};function fo(vt){return!(vt.type===20&&vt.value==="none")&&(vt.type!==18||!!Qo[vt.name])}var Qo={"linear-gradient":KA,"-moz-linear-gradient":cu,"-ms-linear-gradient":cu,"-o-linear-gradient":cu,"-webkit-linear-gradient":cu,"radial-gradient":ul,"-moz-radial-gradient":Is,"-ms-radial-gradient":Is,"-o-radial-gradient":Is,"-webkit-radial-gradient":Is,"-webkit-gradient":As},ts={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){if(mt.length===0)return[];var St=mt[0];return St.type===20&&St.value==="none"?[]:mt.filter(function(wt){return _s(wt)&&fo(wt)}).map(function(wt){return da.parse(vt,wt)})}},ps={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(vt,mt){return mt.map(function(St){if(xo(St))switch(St.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Bo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(vt,mt){return bs(mt).map(function(St){return St.filter(ns)}).map(xl)}},eh={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(vt,mt){return bs(mt).map(function(St){return St.filter(xo).map(function(wt){return wt.value}).join(" ")}).map(ur)}},ur=function(vt){switch(vt){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},nh;(function(vt){vt.AUTO="auto",vt.CONTAIN="contain",vt.COVER="cover"})(nh||(nh={}));var Ao={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(vt,mt){return bs(mt).map(function(St){return St.filter(ig)})}},ig=function(vt){return xo(vt)||ns(vt)},VA=function(vt){return{name:"border-"+vt+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Ec=VA("top"),sd=VA("right"),vf=VA("bottom"),_A=VA("left"),PA=function(vt){return{name:"border-radius-"+vt,initialValue:"0 0",prefix:!1,type:1,parse:function(mt,St){return xl(St.filter(ns))}}},Co=PA("top-left"),FA=PA("top-right"),yf=PA("bottom-right"),ih=PA("bottom-left"),Mh=function(vt){return{name:"border-"+vt+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(mt,St){switch(St){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},WA=Mh("top"),Ql=Mh("right"),du=Mh("bottom"),tA=Mh("left"),eA=function(vt){return{name:"border-"+vt+"-width",initialValue:"0",type:0,prefix:!1,parse:function(mt,St){return So(St)?St.number:0}}},wf=eA("top"),ad=eA("right"),ld=eA("bottom"),rg=eA("left"),gu={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},pu={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"rtl":return 1;case"ltr":default:return 0}}},Jg={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(xo).reduce(function(St,wt){return St|qg(wt.value)},0)}},qg=function(vt){switch(vt){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},$g={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},og={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(vt,mt){return mt.type===20&&mt.value==="normal"?0:mt.type===17||mt.type===15?mt.number:0}},us;(function(vt){vt.NORMAL="normal",vt.STRICT="strict"})(us||(us={}));var mu={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"strict":return us.STRICT;case"normal":default:return us.NORMAL}}},To={name:"line-height",initialValue:"normal",prefix:!1,type:4},Xs=function(vt,mt){return xo(vt)&&vt.value==="normal"?1.2*mt:vt.type===17?mt*vt.number:ns(vt)?No(vt,mt):mt},oa={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(vt,mt){return mt.type===20&&mt.value==="none"?null:da.parse(vt,mt)}},sa={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"inside":return 0;case"outside":default:return 1}}},vu={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Gs=function(vt){return{name:"margin-"+vt,initialValue:"0",prefix:!1,type:4}},rh=Gs("top"),sg=Gs("right"),ag=Gs("bottom"),Xa=Gs("left"),Sf={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(xo).map(function(St){switch(St.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},jo={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"break-word":return"break-word";case"normal":default:return"normal"}}},nA=function(vt){return{name:"padding-"+vt,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ad=nA("top"),yu=nA("right"),wu=nA("bottom"),xf=nA("left"),zs={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},aa={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},oh={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.length===1&&Bs(mt[0],"none")?[]:bs(mt).map(function(St){for(var wt={color:ys.TRANSPARENT,offsetX:Ts,offsetY:Ts,blur:Ts},Qt=0,Xt=0;Xt<St.length;Xt++){var ae=St[Xt];Ws(ae)?(Qt===0?wt.offsetX=ae:Qt===1?wt.offsetY=ae:wt.blur=ae,Qt++):wt.color=ll.parse(vt,ae)}return wt})}},Bl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Su={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(vt,mt){if(mt.type===20&&mt.value==="none")return null;if(mt.type===18){var St=iA[mt.name];if(typeof St=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+mt.name+'"');return St(mt.values)}return null}},hl=function(vt){var mt=vt.filter(function(St){return St.type===17}).map(function(St){return St.number});return mt.length===6?mt:null},Ns=function(vt){var mt=vt.filter(function(fe){return fe.type===17}).map(function(fe){return fe.number}),St=mt[0],wt=mt[1];mt[2],mt[3];var Qt=mt[4],Xt=mt[5];mt[6],mt[7],mt[8],mt[9],mt[10],mt[11];var ae=mt[12],Ee=mt[13];return mt[14],mt[15],mt.length===16?[St,wt,Qt,Xt,ae,Ee]:null},iA={matrix:hl,matrix3d:Ns},cl={type:16,number:50,flags:sn},la=[cl,cl],Ul={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(vt,mt){var St=mt.filter(ns);return St.length!==2?la:[St[0],St[1]]}},Ko={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Za;(function(vt){vt.NORMAL="normal",vt.BREAK_ALL="break-all",vt.KEEP_ALL="keep-all"})(Za||(Za={}));for(var YA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"break-all":return Za.BREAK_ALL;case"keep-all":return Za.KEEP_ALL;case"normal":default:return Za.NORMAL}}},xu={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(vt,mt){if(mt.type===20)return{auto:!0,order:0};if(Ui(mt))return{auto:!1,order:mt.number};throw new Error("Invalid z-index number parsed")}},Bu={name:"time",parse:function(vt,mt){if(mt.type===15)switch(mt.unit.toLowerCase()){case"s":return 1e3*mt.number;case"ms":return mt.number}throw new Error("Unsupported time type")}},Mc={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(vt,mt){return Ui(mt)?mt.number:1}},kh={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},kc={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(xo).map(function(St){switch(St.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(St){return St!==0})}},to={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(vt,mt){var St=[],wt=[];return mt.forEach(function(Qt){switch(Qt.type){case 20:case 0:St.push(Qt.value);break;case 17:St.push(Qt.number.toString());break;case 4:wt.push(St.join(" ")),St.length=0;break}}),St.length&&wt.push(St.join(" ")),wt.map(function(Qt){return Qt.indexOf(" ")===-1?Qt:"'"+Qt+"'"})}},bc={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ud={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(vt,mt){if(Ui(mt))return mt.number;if(xo(mt))switch(mt.value){case"bold":return 700;case"normal":default:return 400}return 400}},Bf={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.filter(xo).map(function(St){return St.value})}},rA={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(vt,mt){switch(mt){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Zs=function(vt,mt){return(vt&mt)!==0},Tc={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){if(mt.length===0)return[];var St=mt[0];return St.type===20&&St.value==="none"?[]:mt}},tp={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return null;var St=mt[0];if(St.type===20&&St.value==="none")return null;for(var wt=[],Qt=mt.filter(Go),Xt=0;Xt<Qt.length;Xt++){var ae=Qt[Xt],Ee=Qt[Xt+1];if(ae.type===20){var fe=Ee&&Ui(Ee)?Ee.number:1;wt.push({counter:ae.value,increment:fe})}}return wt}},bh={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return[];for(var St=[],wt=mt.filter(Go),Qt=0;Qt<wt.length;Qt++){var Xt=wt[Qt],ae=wt[Qt+1];if(xo(Xt)&&Xt.value!=="none"){var Ee=ae&&Ui(ae)?ae.number:0;St.push({counter:Xt.value,reset:Ee})}}return St}},Cf={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(vt,mt){return mt.filter(So).map(function(St){return Bu.parse(vt,St)})}},Th={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(vt,mt){if(mt.length===0)return null;var St=mt[0];if(St.type===20&&St.value==="none")return null;var wt=[],Qt=mt.filter(ea);if(Qt.length%2!==0)return null;for(var Xt=0;Xt<Qt.length;Xt+=2){var ae=Qt[Xt].value,Ee=Qt[Xt+1].value;wt.push({open:ae,close:Ee})}return wt}},Ih=function(vt,mt,St){if(!vt)return"";var wt=vt[Math.min(mt,vt.length-1)];return wt?St?wt.open:wt.close:""},Ic={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(vt,mt){return mt.length===1&&Bs(mt[0],"none")?[]:bs(mt).map(function(St){for(var wt={color:255,offsetX:Ts,offsetY:Ts,blur:Ts,spread:Ts,inset:!1},Qt=0,Xt=0;Xt<St.length;Xt++){var ae=St[Xt];Bs(ae,"inset")?wt.inset=!0:Ws(ae)?(Qt===0?wt.offsetX=ae:Qt===1?wt.offsetY=ae:Qt===2?wt.blur=ae:wt.spread=ae,Qt++):wt.color=ll.parse(vt,ae)}return wt})}},hd={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(vt,mt){var St=[0,1,2],wt=[];return mt.filter(xo).forEach(function(Qt){switch(Qt.value){case"stroke":wt.push(1);break;case"fill":wt.push(0);break;case"markers":wt.push(2);break}}),St.forEach(function(Qt){wt.indexOf(Qt)===-1&&wt.push(Qt)}),wt}},Nc={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Nh={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(vt,mt){return So(mt)?mt.number:0}},Cu=function(){function vt(mt,St){var wt,Qt;this.animationDuration=hr(mt,Cf,St.animationDuration),this.backgroundClip=hr(mt,Fi,St.backgroundClip),this.backgroundColor=hr(mt,Rs,St.backgroundColor),this.backgroundImage=hr(mt,ts,St.backgroundImage),this.backgroundOrigin=hr(mt,ps,St.backgroundOrigin),this.backgroundPosition=hr(mt,Bo,St.backgroundPosition),this.backgroundRepeat=hr(mt,eh,St.backgroundRepeat),this.backgroundSize=hr(mt,Ao,St.backgroundSize),this.borderTopColor=hr(mt,Ec,St.borderTopColor),this.borderRightColor=hr(mt,sd,St.borderRightColor),this.borderBottomColor=hr(mt,vf,St.borderBottomColor),this.borderLeftColor=hr(mt,_A,St.borderLeftColor),this.borderTopLeftRadius=hr(mt,Co,St.borderTopLeftRadius),this.borderTopRightRadius=hr(mt,FA,St.borderTopRightRadius),this.borderBottomRightRadius=hr(mt,yf,St.borderBottomRightRadius),this.borderBottomLeftRadius=hr(mt,ih,St.borderBottomLeftRadius),this.borderTopStyle=hr(mt,WA,St.borderTopStyle),this.borderRightStyle=hr(mt,Ql,St.borderRightStyle),this.borderBottomStyle=hr(mt,du,St.borderBottomStyle),this.borderLeftStyle=hr(mt,tA,St.borderLeftStyle),this.borderTopWidth=hr(mt,wf,St.borderTopWidth),this.borderRightWidth=hr(mt,ad,St.borderRightWidth),this.borderBottomWidth=hr(mt,ld,St.borderBottomWidth),this.borderLeftWidth=hr(mt,rg,St.borderLeftWidth),this.boxShadow=hr(mt,Ic,St.boxShadow),this.color=hr(mt,gu,St.color),this.direction=hr(mt,pu,St.direction),this.display=hr(mt,Jg,St.display),this.float=hr(mt,$g,St.cssFloat),this.fontFamily=hr(mt,to,St.fontFamily),this.fontSize=hr(mt,bc,St.fontSize),this.fontStyle=hr(mt,rA,St.fontStyle),this.fontVariant=hr(mt,Bf,St.fontVariant),this.fontWeight=hr(mt,ud,St.fontWeight),this.letterSpacing=hr(mt,og,St.letterSpacing),this.lineBreak=hr(mt,mu,St.lineBreak),this.lineHeight=hr(mt,To,St.lineHeight),this.listStyleImage=hr(mt,oa,St.listStyleImage),this.listStylePosition=hr(mt,sa,St.listStylePosition),this.listStyleType=hr(mt,vu,St.listStyleType),this.marginTop=hr(mt,rh,St.marginTop),this.marginRight=hr(mt,sg,St.marginRight),this.marginBottom=hr(mt,ag,St.marginBottom),this.marginLeft=hr(mt,Xa,St.marginLeft),this.opacity=hr(mt,Mc,St.opacity);var Xt=hr(mt,Sf,St.overflow);this.overflowX=Xt[0],this.overflowY=Xt[Xt.length>1?1:0],this.overflowWrap=hr(mt,jo,St.overflowWrap),this.paddingTop=hr(mt,Ad,St.paddingTop),this.paddingRight=hr(mt,yu,St.paddingRight),this.paddingBottom=hr(mt,wu,St.paddingBottom),this.paddingLeft=hr(mt,xf,St.paddingLeft),this.paintOrder=hr(mt,hd,St.paintOrder),this.position=hr(mt,aa,St.position),this.textAlign=hr(mt,zs,St.textAlign),this.textDecorationColor=hr(mt,kh,(wt=St.textDecorationColor)!==null&&wt!==void 0?wt:St.color),this.textDecorationLine=hr(mt,kc,(Qt=St.textDecorationLine)!==null&&Qt!==void 0?Qt:St.textDecoration),this.textShadow=hr(mt,oh,St.textShadow),this.textTransform=hr(mt,Bl,St.textTransform),this.transform=hr(mt,Su,St.transform),this.transformOrigin=hr(mt,Ul,St.transformOrigin),this.visibility=hr(mt,Ko,St.visibility),this.webkitTextStrokeColor=hr(mt,Nc,St.webkitTextStrokeColor),this.webkitTextStrokeWidth=hr(mt,Nh,St.webkitTextStrokeWidth),this.wordBreak=hr(mt,YA,St.wordBreak),this.zIndex=hr(mt,xu,St.zIndex)}return vt.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},vt.prototype.isTransparent=function(){return vs(this.backgroundColor)},vt.prototype.isTransformed=function(){return this.transform!==null},vt.prototype.isPositioned=function(){return this.position!==0},vt.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},vt.prototype.isFloating=function(){return this.float!==0},vt.prototype.isInlineLevel=function(){return Zs(this.display,4)||Zs(this.display,33554432)||Zs(this.display,268435456)||Zs(this.display,536870912)||Zs(this.display,67108864)||Zs(this.display,134217728)},vt}(),Ha=function(){function vt(mt,St){this.content=hr(mt,Tc,St.content),this.quotes=hr(mt,Th,St.quotes)}return vt}(),oA=function(){function vt(mt,St){this.counterIncrement=hr(mt,tp,St.counterIncrement),this.counterReset=hr(mt,bh,St.counterReset)}return vt}(),hr=function(vt,mt,St){var wt=new Cr,Qt=St!==null&&typeof St!="undefined"?St.toString():mt.initialValue;wt.write(Qt);var Xt=new Dr(wt.read());switch(mt.type){case 2:var ae=Xt.parseComponentValue();return mt.parse(vt,xo(ae)?ae.value:mt.initialValue);case 0:return mt.parse(vt,Xt.parseComponentValue());case 1:return mt.parse(vt,Xt.parseComponentValues());case 4:return Xt.parseComponentValue();case 3:switch(mt.format){case"angle":return is.parse(vt,Xt.parseComponentValue());case"color":return ll.parse(vt,Xt.parseComponentValue());case"image":return da.parse(vt,Xt.parseComponentValue());case"length":var Ee=Xt.parseComponentValue();return Ws(Ee)?Ee:Ts;case"length-percentage":var fe=Xt.parseComponentValue();return ns(fe)?fe:Ts;case"time":return Bu.parse(vt,Xt.parseComponentValue())}break}},XA="data-html2canvas-debug",Pf=function(vt){var mt=vt.getAttribute(XA);switch(mt){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Qh=function(vt,mt){var St=Pf(vt);return St===1||mt===St},sA=function(){function vt(mt,St){if(this.context=mt,this.textNodes=[],this.elements=[],this.flags=0,Qh(St,3))debugger;this.styles=new Cu(mt,window.getComputedStyle(St,null)),Xh(St)&&(this.styles.animationDuration.some(function(wt){return wt>0})&&(St.style.animationDuration="0s"),this.styles.transform!==null&&(St.style.transform="none")),this.bounds=ye(this.context,St),Qh(St,4)&&(this.flags|=16)}return vt}(),Pu="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uh=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),sh=0;sh<Fu.length;sh++)Uh[Fu.charCodeAt(sh)]=sh;for(var Fa=function(vt){var mt=vt.length*.75,St=vt.length,wt,Qt=0,Xt,ae,Ee,fe;vt[vt.length-1]==="="&&(mt--,vt[vt.length-2]==="="&&mt--);var Xe=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(mt):new Array(mt),$e=Array.isArray(Xe)?Xe:new Uint8Array(Xe);for(wt=0;wt<St;wt+=4)Xt=Uh[vt.charCodeAt(wt)],ae=Uh[vt.charCodeAt(wt+1)],Ee=Uh[vt.charCodeAt(wt+2)],fe=Uh[vt.charCodeAt(wt+3)],$e[Qt++]=Xt<<2|ae>>4,$e[Qt++]=(ae&15)<<4|Ee>>2,$e[Qt++]=(Ee&3)<<6|fe&63;return Xe},ah=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=2)St.push(vt[wt+1]<<8|vt[wt]);return St},cd=function(vt){for(var mt=vt.length,St=[],wt=0;wt<mt;wt+=4)St.push(vt[wt+3]<<24|vt[wt+2]<<16|vt[wt+1]<<8|vt[wt]);return St},aA=5,lh=11,lA=2,Qc=lh-aA,Ff=65536>>aA,Qs=1<<aA,Ah=Qs-1,Lu=1024>>aA,uh=Ff+Lu,Uc=uh,fd=32,Dh=Uc+fd,lg=65536>>lh,hh=1<<Qc,Dl=hh-1,dd=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint16Array(Array.prototype.slice.call(vt,mt,St))},gd=function(vt,mt,St){return vt.slice?vt.slice(mt,St):new Uint32Array(Array.prototype.slice.call(vt,mt,St))},ch=function(vt,mt){var St=Fa(vt),wt=Array.isArray(St)?cd(St):new Uint32Array(St),Qt=Array.isArray(St)?ah(St):new Uint16Array(St),Xt=24,ae=dd(Qt,Xt/2,wt[4]/2),Ee=wt[5]===2?dd(Qt,(Xt+wt[4])/2):gd(wt,Math.ceil((Xt+wt[4])/4));return new Oh(wt[0],wt[1],wt[2],wt[3],ae,Ee)},Oh=function(){function vt(mt,St,wt,Qt,Xt,ae){this.initialValue=mt,this.errorValue=St,this.highStart=wt,this.highValueIndex=Qt,this.index=Xt,this.data=ae}return vt.prototype.get=function(mt){var St;if(mt>=0){if(mt<55296||mt>56319&&mt<=65535)return St=this.index[mt>>aA],St=(St<<lA)+(mt&Ah),this.data[St];if(mt<=65535)return St=this.index[Ff+(mt-55296>>aA)],St=(St<<lA)+(mt&Ah),this.data[St];if(mt<this.highStart)return St=Dh-lg+(mt>>lh),St=this.index[St],St+=mt>>aA&Dl,St=this.index[St],St=(St<<lA)+(mt&Ah),this.data[St];if(mt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},vt}(),ms="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ZA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Dc=0;Dc<ms.length;Dc++)ZA[ms.charCodeAt(Dc)]=Dc;var Lf=1,Ef=2,ge=3,Eu=4,AA=5,Ag=7,Mf=8,kf=9,Oc=10,ug=11,Aa=12,Hh=13,bf=14,Tf=15,hg=function(vt){for(var mt=[],St=0,wt=vt.length;St<wt;){var Qt=vt.charCodeAt(St++);if(Qt>=55296&&Qt<=56319&&St<wt){var Xt=vt.charCodeAt(St++);(Xt&64512)===56320?mt.push(((Qt&1023)<<10)+(Xt&1023)+65536):(mt.push(Qt),St--)}else mt.push(Qt)}return mt},cg=function(){for(var vt=[],mt=0;mt<arguments.length;mt++)vt[mt]=arguments[mt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,vt);var St=vt.length;if(!St)return"";for(var wt=[],Qt=-1,Xt="";++Qt<St;){var ae=vt[Qt];ae<=65535?wt.push(ae):(ae-=65536,wt.push((ae>>10)+55296,ae%1024+56320)),(Qt+1===St||wt.length>16384)&&(Xt+=String.fromCharCode.apply(String,wt),wt.length=0)}return Xt},fg=ch(Pu),Cl="\xD7",Ja="\xF7",Rh=function(vt){return fg.get(vt)},pd=function(vt,mt,St){var wt=St-2,Qt=mt[wt],Xt=mt[St-1],ae=mt[St];if(Xt===Ef&&ae===ge)return Cl;if(Xt===Ef||Xt===ge||Xt===Eu||ae===Ef||ae===ge||ae===Eu)return Ja;if(Xt===Mf&&[Mf,kf,ug,Aa].indexOf(ae)!==-1||(Xt===ug||Xt===kf)&&(ae===kf||ae===Oc)||(Xt===Aa||Xt===Oc)&&ae===Oc||ae===Hh||ae===AA||ae===Ag||Xt===Lf)return Cl;if(Xt===Hh&&ae===bf){for(;Qt===AA;)Qt=mt[--wt];if(Qt===bf)return Cl}if(Xt===Tf&&ae===Tf){for(var Ee=0;Qt===Tf;)Ee++,Qt=mt[--wt];if(Ee%2===0)return Cl}return Ja},LA=function(vt){var mt=hg(vt),St=mt.length,wt=0,Qt=0,Xt=mt.map(Rh);return{next:function(){if(wt>=St)return{done:!0,value:null};for(var ae=Cl;wt<St&&(ae=pd(mt,Xt,++wt))===Cl;);if(ae!==Cl||wt===St){var Ee=cg.apply(null,mt.slice(Qt,wt));return Qt=wt,{value:Ee,done:!1}}return{done:!0,value:null}}}},Hc=function(vt){for(var mt=LA(vt),St=[],wt;!(wt=mt.next()).done;)wt.value&&St.push(wt.value.slice());return St},If=function(vt){var mt=123;if(vt.createRange){var St=vt.createRange();if(St.getBoundingClientRect){var wt=vt.createElement("boundtest");wt.style.height=mt+"px",wt.style.display="block",vt.body.appendChild(wt),St.selectNode(wt);var Qt=St.getBoundingClientRect(),Xt=Math.round(Qt.height);if(vt.body.removeChild(wt),Xt===mt)return!0}}return!1},Rc=function(vt){var mt=vt.createElement("boundtest");mt.style.width="50px",mt.style.display="block",mt.style.fontSize="12px",mt.style.letterSpacing="0px",mt.style.wordSpacing="0px",vt.body.appendChild(mt);var St=vt.createRange();mt.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var wt=mt.firstChild,Qt=Ue(wt.data).map(function(fe){return Pe(fe)}),Xt=0,ae={},Ee=Qt.every(function(fe,Xe){St.setStart(wt,Xt),St.setEnd(wt,Xt+fe.length);var $e=St.getBoundingClientRect();Xt+=fe.length;var gn=$e.x>ae.x||$e.y>ae.y;return ae=$e,Xe===0?!0:gn});return vt.body.removeChild(mt),Ee},fl=function(){return typeof new Image().crossOrigin!="undefined"},md=function(){return typeof new XMLHttpRequest().responseType=="string"},vd=function(vt){var mt=new Image,St=vt.createElement("canvas"),wt=St.getContext("2d");if(!wt)return!1;mt.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{wt.drawImage(mt,0,0),St.toDataURL()}catch(Qt){return!1}return!0},Pl=function(vt){return vt[0]===0&&vt[1]===255&&vt[2]===0&&vt[3]===255},Gh=function(vt){var mt=vt.createElement("canvas"),St=100;mt.width=St,mt.height=St;var wt=mt.getContext("2d");if(!wt)return Promise.reject(!1);wt.fillStyle="rgb(0, 255, 0)",wt.fillRect(0,0,St,St);var Qt=new Image,Xt=mt.toDataURL();Qt.src=Xt;var ae=Gc(St,St,0,0,Qt);return wt.fillStyle="red",wt.fillRect(0,0,St,St),yd(ae).then(function(Ee){wt.drawImage(Ee,0,0);var fe=wt.getImageData(0,0,St,St).data;wt.fillStyle="red",wt.fillRect(0,0,St,St);var Xe=vt.createElement("div");return Xe.style.backgroundImage="url("+Xt+")",Xe.style.height=St+"px",Pl(fe)?yd(Gc(St,St,0,0,Xe)):Promise.reject(!1)}).then(function(Ee){return wt.drawImage(Ee,0,0),Pl(wt.getImageData(0,0,St,St).data)}).catch(function(){return!1})},Gc=function(vt,mt,St,wt,Qt){var Xt="http://www.w3.org/2000/svg",ae=document.createElementNS(Xt,"svg"),Ee=document.createElementNS(Xt,"foreignObject");return ae.setAttributeNS(null,"width",vt.toString()),ae.setAttributeNS(null,"height",mt.toString()),Ee.setAttributeNS(null,"width","100%"),Ee.setAttributeNS(null,"height","100%"),Ee.setAttributeNS(null,"x",St.toString()),Ee.setAttributeNS(null,"y",wt.toString()),Ee.setAttributeNS(null,"externalResourcesRequired","true"),ae.appendChild(Ee),Ee.appendChild(Qt),ae},yd=function(vt){return new Promise(function(mt,St){var wt=new Image;wt.onload=function(){return mt(wt)},wt.onerror=St,wt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(vt))})},js={get SUPPORT_RANGE_BOUNDS(){var vt=If(document);return Object.defineProperty(js,"SUPPORT_RANGE_BOUNDS",{value:vt}),vt},get SUPPORT_WORD_BREAKING(){var vt=js.SUPPORT_RANGE_BOUNDS&&Rc(document);return Object.defineProperty(js,"SUPPORT_WORD_BREAKING",{value:vt}),vt},get SUPPORT_SVG_DRAWING(){var vt=vd(document);return Object.defineProperty(js,"SUPPORT_SVG_DRAWING",{value:vt}),vt},get SUPPORT_FOREIGNOBJECT_DRAWING(){var vt=typeof Array.from=="function"&&typeof window.fetch=="function"?Gh(document):Promise.resolve(!1);return Object.defineProperty(js,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:vt}),vt},get SUPPORT_CORS_IMAGES(){var vt=fl();return Object.defineProperty(js,"SUPPORT_CORS_IMAGES",{value:vt}),vt},get SUPPORT_RESPONSE_TYPE(){var vt=md();return Object.defineProperty(js,"SUPPORT_RESPONSE_TYPE",{value:vt}),vt},get SUPPORT_CORS_XHR(){var vt="withCredentials"in new XMLHttpRequest;return Object.defineProperty(js,"SUPPORT_CORS_XHR",{value:vt}),vt},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var vt=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(js,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:vt}),vt}},ga=function(){function vt(mt,St){this.text=mt,this.bounds=St}return vt}(),wd=function(vt,mt,St,wt){var Qt=Kh(mt,St),Xt=[],ae=0;return Qt.forEach(function(Ee){if(St.textDecorationLine.length||Ee.trim().length>0)if(js.SUPPORT_RANGE_BOUNDS){var fe=zh(wt,ae,Ee.length).getClientRects();if(fe.length>1){var Xe=jh(Ee),$e=0;Xe.forEach(function($n){Xt.push(new ga($n,ke.fromDOMRectList(vt,zh(wt,$e+ae,$n.length).getClientRects()))),$e+=$n.length})}else Xt.push(new ga(Ee,ke.fromDOMRectList(vt,fe)))}else{var gn=wt.splitText(Ee.length);Xt.push(new ga(Ee,Us(vt,wt))),wt=gn}else js.SUPPORT_RANGE_BOUNDS||(wt=wt.splitText(Ee.length));ae+=Ee.length}),Xt},Us=function(vt,mt){var St=mt.ownerDocument;if(St){var wt=St.createElement("html2canvaswrapper");wt.appendChild(mt.cloneNode(!0));var Qt=mt.parentNode;if(Qt){Qt.replaceChild(wt,mt);var Xt=ye(vt,wt);return wt.firstChild&&Qt.replaceChild(wt.firstChild,wt),Xt}}return ke.EMPTY},zh=function(vt,mt,St){var wt=vt.ownerDocument;if(!wt)throw new Error("Node has no owner document");var Qt=wt.createRange();return Qt.setStart(vt,mt),Qt.setEnd(vt,mt+St),Qt},jh=function(vt){if(js.SUPPORT_NATIVE_TEXT_SEGMENTATION){var mt=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(mt.segment(vt)).map(function(St){return St.segment})}return Hc(vt)},Mu=function(vt,mt){if(js.SUPPORT_NATIVE_TEXT_SEGMENTATION){var St=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(St.segment(vt)).map(function(wt){return wt.segment})}return Sd(vt,mt)},Kh=function(vt,mt){return mt.letterSpacing!==0?jh(vt):Mu(vt,mt)},Vh=[32,160,4961,65792,65793,4153,4241],Sd=function(vt,mt){for(var St=Le(vt,{lineBreak:mt.lineBreak,wordBreak:mt.overflowWrap==="break-word"?"break-word":mt.wordBreak}),wt=[],Qt,Xt=function(){if(Qt.value){var ae=Qt.value.slice(),Ee=Ue(ae),fe="";Ee.forEach(function(Xe){Vh.indexOf(Xe)===-1?fe+=Pe(Xe):(fe.length&&wt.push(fe),wt.push(Pe(Xe)),fe="")}),fe.length&&wt.push(fe)}};!(Qt=St.next()).done;)Xt();return wt},_h=function(){function vt(mt,St,wt){this.text=xd(St.data,wt.textTransform),this.textBounds=wd(mt,this.text,wt,St)}return vt}(),xd=function(vt,mt){switch(mt){case 1:return vt.toLowerCase();case 3:return vt.replace(EA,fh);case 2:return vt.toUpperCase();default:return vt}},EA=/(^|\s|:|-|\(|\))([a-z])/g,fh=function(vt,mt,St){return vt.length>0?mt+St.toUpperCase():vt},zc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.src=wt.currentSrc||wt.src,Qt.intrinsicWidth=wt.naturalWidth,Qt.intrinsicHeight=wt.naturalHeight,Qt.context.cache.addImage(Qt.src),Qt}return mt}(sA),jc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.canvas=wt,Qt.intrinsicWidth=wt.width,Qt.intrinsicHeight=wt.height,Qt}return mt}(sA),Kc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this,Xt=new XMLSerializer,ae=ye(St,wt);return wt.setAttribute("width",ae.width+"px"),wt.setAttribute("height",ae.height+"px"),Qt.svg="data:image/svg+xml,"+encodeURIComponent(Xt.serializeToString(wt)),Qt.intrinsicWidth=wt.width.baseVal.value,Qt.intrinsicHeight=wt.height.baseVal.value,Qt.context.cache.addImage(Qt.svg),Qt}return mt}(sA),ku=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.value=wt.value,Qt}return mt}(sA),Vc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.start=wt.start,Qt.reversed=typeof wt.reversed=="boolean"&&wt.reversed===!0,Qt}return mt}(sA),Bd=[{type:15,flags:0,unit:"px",number:3}],Cd=[{type:16,flags:0,number:50}],uA=function(vt){return vt.width>vt.height?new ke(vt.left+(vt.width-vt.height)/2,vt.top,vt.height,vt.height):vt.width<vt.height?new ke(vt.left,vt.top+(vt.height-vt.width)/2,vt.width,vt.width):vt},dg=function(vt){var mt=vt.type===dh?new Array(vt.value.length+1).join("\u2022"):vt.value;return mt.length===0?vt.placeholder||"":mt},Wh="checkbox",JA="radio",dh="password",Nf=707406591,Ol=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;switch(Qt.type=wt.type.toLowerCase(),Qt.checked=wt.checked,Qt.value=dg(wt),(Qt.type===Wh||Qt.type===JA)&&(Qt.styles.backgroundColor=3739148031,Qt.styles.borderTopColor=Qt.styles.borderRightColor=Qt.styles.borderBottomColor=Qt.styles.borderLeftColor=2779096575,Qt.styles.borderTopWidth=Qt.styles.borderRightWidth=Qt.styles.borderBottomWidth=Qt.styles.borderLeftWidth=1,Qt.styles.borderTopStyle=Qt.styles.borderRightStyle=Qt.styles.borderBottomStyle=Qt.styles.borderLeftStyle=1,Qt.styles.backgroundClip=[0],Qt.styles.backgroundOrigin=[0],Qt.bounds=uA(Qt.bounds)),Qt.type){case Wh:Qt.styles.borderTopRightRadius=Qt.styles.borderTopLeftRadius=Qt.styles.borderBottomRightRadius=Qt.styles.borderBottomLeftRadius=Bd;break;case JA:Qt.styles.borderTopRightRadius=Qt.styles.borderTopLeftRadius=Qt.styles.borderBottomRightRadius=Qt.styles.borderBottomLeftRadius=Cd;break}return Qt}return mt}(sA),Qf=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this,Xt=wt.options[wt.selectedIndex||0];return Qt.value=Xt&&Xt.text||"",Qt}return mt}(sA),_c=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.value=wt.value,Qt}return mt}(sA),Pd=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;Qt.src=wt.src,Qt.width=parseInt(wt.width,10)||0,Qt.height=parseInt(wt.height,10)||0,Qt.backgroundColor=Qt.styles.backgroundColor;try{if(wt.contentWindow&&wt.contentWindow.document&&wt.contentWindow.document.documentElement){Qt.tree=Ld(St,wt.contentWindow.document.documentElement);var Xt=wt.contentWindow.document.documentElement?Xr(St,getComputedStyle(wt.contentWindow.document.documentElement).backgroundColor):ys.TRANSPARENT,ae=wt.contentWindow.document.body?Xr(St,getComputedStyle(wt.contentWindow.document.body).backgroundColor):ys.TRANSPARENT;Qt.backgroundColor=vs(Xt)?vs(ae)?Qt.styles.backgroundColor:ae:Xt}}catch(Ee){}return Qt}return mt}(sA),Fd=["OL","UL","MENU"],Yh=function(vt,mt,St,wt){for(var Qt=mt.firstChild,Xt=void 0;Qt;Qt=Xt)if(Xt=Qt.nextSibling,Wc(Qt)&&Qt.data.trim().length>0)St.textNodes.push(new _h(vt,Qt,St.styles));else if(gh(Qt))if(Hf(Qt)&&Qt.assignedNodes)Qt.assignedNodes().forEach(function(Ee){return Yh(vt,Ee,St,wt)});else{var ae=gg(vt,Qt);ae.styles.isVisible()&&(Uf(Qt,ae,wt)?ae.flags|=4:Df(ae.styles)&&(ae.flags|=2),Fd.indexOf(Qt.tagName)!==-1&&(ae.flags|=8),St.elements.push(ae),Qt.slot,Qt.shadowRoot?Yh(vt,Qt.shadowRoot,ae,wt):!Zh(Qt)&&!Md(Qt)&&!Jh(Qt)&&Yh(vt,Qt,ae,wt))}},gg=function(vt,mt){return Ks(mt)?new zc(vt,mt):ph(mt)?new jc(vt,mt):Md(mt)?new Kc(vt,mt):Ed(mt)?new ku(vt,mt):Yc(mt)?new Vc(vt,mt):pg(mt)?new Ol(vt,mt):Jh(mt)?new Qf(vt,mt):Zh(mt)?new _c(vt,mt):Ra(mt)?new Pd(vt,mt):new sA(vt,mt)},Ld=function(vt,mt){var St=gg(vt,mt);return St.flags|=4,Yh(vt,mt,St,St),St},Uf=function(vt,mt,St){return mt.styles.isPositionedWithZIndex()||mt.styles.opacity<1||mt.styles.isTransformed()||Po(vt)&&St.styles.isTransparent()},Df=function(vt){return vt.isPositioned()||vt.isFloating()},Wc=function(vt){return vt.nodeType===Node.TEXT_NODE},gh=function(vt){return vt.nodeType===Node.ELEMENT_NODE},Xh=function(vt){return gh(vt)&&typeof vt.style!="undefined"&&!hA(vt)},hA=function(vt){return typeof vt.className=="object"},Ed=function(vt){return vt.tagName==="LI"},Yc=function(vt){return vt.tagName==="OL"},pg=function(vt){return vt.tagName==="INPUT"},Of=function(vt){return vt.tagName==="HTML"},Md=function(vt){return vt.tagName==="svg"},Po=function(vt){return vt.tagName==="BODY"},ph=function(vt){return vt.tagName==="CANVAS"},bu=function(vt){return vt.tagName==="VIDEO"},Ks=function(vt){return vt.tagName==="IMG"},Ra=function(vt){return vt.tagName==="IFRAME"},Tu=function(vt){return vt.tagName==="STYLE"},Xc=function(vt){return vt.tagName==="SCRIPT"},Zh=function(vt){return vt.tagName==="TEXTAREA"},Jh=function(vt){return vt.tagName==="SELECT"},Hf=function(vt){return vt.tagName==="SLOT"},Rf=function(vt){return vt.tagName.indexOf("-")>0},kd=function(){function vt(){this.counters={}}return vt.prototype.getCounterValue=function(mt){var St=this.counters[mt];return St&&St.length?St[St.length-1]:1},vt.prototype.getCounterValues=function(mt){var St=this.counters[mt];return St||[]},vt.prototype.pop=function(mt){var St=this;mt.forEach(function(wt){return St.counters[wt].pop()})},vt.prototype.parse=function(mt){var St=this,wt=mt.counterIncrement,Qt=mt.counterReset,Xt=!0;wt!==null&&wt.forEach(function(Ee){var fe=St.counters[Ee.counter];fe&&Ee.increment!==0&&(Xt=!1,fe.length||fe.push(1),fe[Math.max(0,fe.length-1)]+=Ee.increment)});var ae=[];return Xt&&Qt.forEach(function(Ee){var fe=St.counters[Ee.counter];ae.push(Ee.counter),fe||(fe=St.counters[Ee.counter]=[]),fe.push(Ee.reset)}),ae},vt}(),qA={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},qh={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Iu={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Yo={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},$A=function(vt,mt,St,wt,Qt,Xt){return vt<mt||vt>St?ht(vt,Qt,Xt.length>0):wt.integers.reduce(function(ae,Ee,fe){for(;vt>=Ee;)vt-=Ee,ae+=wt.values[fe];return ae},"")+Xt},Gf=function(vt,mt,St,wt){var Qt="";do St||vt--,Qt=wt(vt)+Qt,vt/=mt;while(vt*mt>=mt);return Qt},Ps=function(vt,mt,St,wt,Qt){var Xt=St-mt+1;return(vt<0?"-":"")+(Gf(Math.abs(vt),Xt,wt,function(ae){return Pe(Math.floor(ae%Xt)+mt)})+Qt)},Wl=function(vt,mt,St){St===void 0&&(St=". ");var wt=mt.length;return Gf(Math.abs(vt),wt,!1,function(Qt){return mt[Math.floor(Qt%wt)]})+St},MA=1,tu=2,hs=4,$h=8,Fl=function(vt,mt,St,wt,Qt,Xt){if(vt<-9999||vt>9999)return ht(vt,4,Qt.length>0);var ae=Math.abs(vt),Ee=Qt;if(ae===0)return mt[0]+Ee;for(var fe=0;ae>0&&fe<=4;fe++){var Xe=ae%10;Xe===0&&Zs(Xt,MA)&&Ee!==""?Ee=mt[Xe]+Ee:Xe>1||Xe===1&&fe===0||Xe===1&&fe===1&&Zs(Xt,tu)||Xe===1&&fe===1&&Zs(Xt,hs)&&vt>100||Xe===1&&fe>1&&Zs(Xt,$h)?Ee=mt[Xe]+(fe>0?St[fe-1]:"")+Ee:Xe===1&&fe>0&&(Ee=St[fe-1]+Ee),ae=Math.floor(ae/10)}return(vt<0?wt:"")+Ee},kA="\u5341\u767E\u5343\u842C",tc="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",ht=function(vt,mt,St){var wt=St?". ":"",Qt=St?"\u3001":"",Xt=St?", ":"",ae=St?" ":"";switch(mt){case 0:return"\u2022"+ae;case 1:return"\u25E6"+ae;case 2:return"\u25FE"+ae;case 5:var Ee=Ps(vt,48,57,!0,wt);return Ee.length<4?"0"+Ee:Ee;case 4:return Wl(vt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Qt);case 6:return $A(vt,1,3999,qA,3,wt).toLowerCase();case 7:return $A(vt,1,3999,qA,3,wt);case 8:return Ps(vt,945,969,!1,wt);case 9:return Ps(vt,97,122,!1,wt);case 10:return Ps(vt,65,90,!1,wt);case 11:return Ps(vt,1632,1641,!0,wt);case 12:case 49:return $A(vt,1,9999,qh,3,wt);case 35:return $A(vt,1,9999,qh,3,wt).toLowerCase();case 13:return Ps(vt,2534,2543,!0,wt);case 14:case 30:return Ps(vt,6112,6121,!0,wt);case 15:return Wl(vt,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Qt);case 16:return Wl(vt,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Qt);case 17:case 48:return Fl(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",kA,"\u8CA0",Qt,tu|hs|$h);case 47:return Fl(vt,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",tc,"\u8CA0",Qt,MA|tu|hs|$h);case 42:return Fl(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",kA,"\u8D1F",Qt,tu|hs|$h);case 41:return Fl(vt,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",tc,"\u8D1F",Qt,MA|tu|hs|$h);case 26:return Fl(vt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,Qt,0);case 25:return Fl(vt,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,Qt,MA|tu|hs);case 31:return Fl(vt,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,Xt,MA|tu|hs);case 33:return Fl(vt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,Xt,0);case 32:return Fl(vt,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,Xt,MA|tu|hs);case 18:return Ps(vt,2406,2415,!0,wt);case 20:return $A(vt,1,19999,Yo,3,wt);case 21:return Ps(vt,2790,2799,!0,wt);case 22:return Ps(vt,2662,2671,!0,wt);case 22:return $A(vt,1,10999,Iu,3,wt);case 23:return Wl(vt,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Wl(vt,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return Ps(vt,3302,3311,!0,wt);case 28:return Wl(vt,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",Qt);case 29:return Wl(vt,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",Qt);case 34:return Ps(vt,3792,3801,!0,wt);case 37:return Ps(vt,6160,6169,!0,wt);case 38:return Ps(vt,4160,4169,!0,wt);case 39:return Ps(vt,2918,2927,!0,wt);case 40:return Ps(vt,1776,1785,!0,wt);case 43:return Ps(vt,3046,3055,!0,wt);case 44:return Ps(vt,3174,3183,!0,wt);case 45:return Ps(vt,3664,3673,!0,wt);case 46:return Ps(vt,3872,3881,!0,wt);case 3:default:return Ps(vt,48,57,!0,wt)}},ut="data-html2canvas-ignore",dt=function(){function vt(mt,St,wt){if(this.context=mt,this.options=wt,this.scrolledElements=[],this.referenceElement=St,this.counters=new kd,this.quoteDepth=0,!St.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(St.ownerDocument.documentElement,!1)}return vt.prototype.toIFrame=function(mt,St){var wt=this,Qt=It(mt,St);if(!Qt.contentWindow)return Promise.reject("Unable to find iframe window");var Xt=mt.defaultView.pageXOffset,ae=mt.defaultView.pageYOffset,Ee=Qt.contentWindow,fe=Ee.document,Xe=ee(Qt).then(function(){return xe(wt,void 0,void 0,function(){var $e,gn;return Me(this,function($n){switch($n.label){case 0:return this.scrolledElements.forEach(Hn),Ee&&(Ee.scrollTo(St.left,St.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Ee.scrollY!==St.top||Ee.scrollX!==St.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Ee.scrollX-St.left,Ee.scrollY-St.top,0,0))),$e=this.options.onclone,gn=this.clonedReferenceElement,typeof gn=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:fe.fonts&&fe.fonts.ready?[4,fe.fonts.ready]:[3,2];case 1:$n.sent(),$n.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Rt(fe)]:[3,4];case 3:$n.sent(),$n.label=4;case 4:return typeof $e=="function"?[2,Promise.resolve().then(function(){return $e(fe,gn)}).then(function(){return Qt})]:[2,Qt]}})})});return fe.open(),fe.write(Ye(document.doctype)+"<html></html>"),ze(this.referenceElement.ownerDocument,Xt,ae),fe.replaceChild(fe.adoptNode(this.documentElement),fe.documentElement),fe.close(),Xe},vt.prototype.createElementClone=function(mt){if(Qh(mt,2))debugger;if(ph(mt))return this.createCanvasClone(mt);if(bu(mt))return this.createVideoClone(mt);if(Tu(mt))return this.createStyleClone(mt);var St=mt.cloneNode(!1);return Ks(St)&&(Ks(mt)&&mt.currentSrc&&mt.currentSrc!==mt.src&&(St.src=mt.currentSrc,St.srcset=""),St.loading==="lazy"&&(St.loading="eager")),Rf(St)?this.createCustomElementClone(St):St},vt.prototype.createCustomElementClone=function(mt){var St=document.createElement("html2canvascustomelement");return oe(mt.style,St),St},vt.prototype.createStyleClone=function(mt){try{var St=mt.sheet;if(St&&St.cssRules){var wt=[].slice.call(St.cssRules,0).reduce(function(Xt,ae){return ae&&typeof ae.cssText=="string"?Xt+ae.cssText:Xt},""),Qt=mt.cloneNode(!1);return Qt.textContent=wt,Qt}}catch(Xt){if(this.context.logger.error("Unable to access cssRules property",Xt),Xt.name!=="SecurityError")throw Xt}return mt.cloneNode(!1)},vt.prototype.createCanvasClone=function(mt){var St;if(this.options.inlineImages&&mt.ownerDocument){var wt=mt.ownerDocument.createElement("img");try{return wt.src=mt.toDataURL(),wt}catch(Xe){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",mt)}}var Qt=mt.cloneNode(!1);try{Qt.width=mt.width,Qt.height=mt.height;var Xt=mt.getContext("2d"),ae=Qt.getContext("2d");if(ae)if(!this.options.allowTaint&&Xt)ae.putImageData(Xt.getImageData(0,0,mt.width,mt.height),0,0);else{var Ee=(St=mt.getContext("webgl2"))!==null&&St!==void 0?St:mt.getContext("webgl");if(Ee){var fe=Ee.getContextAttributes();(fe==null?void 0:fe.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",mt)}ae.drawImage(mt,0,0)}return Qt}catch(Xe){this.context.logger.info("Unable to clone canvas as it is tainted",mt)}return Qt},vt.prototype.createVideoClone=function(mt){var St=mt.ownerDocument.createElement("canvas");St.width=mt.offsetWidth,St.height=mt.offsetHeight;var wt=St.getContext("2d");try{return wt&&(wt.drawImage(mt,0,0,St.width,St.height),this.options.allowTaint||wt.getImageData(0,0,St.width,St.height)),St}catch(Xt){this.context.logger.info("Unable to clone video as it is tainted",mt)}var Qt=mt.ownerDocument.createElement("canvas");return Qt.width=mt.offsetWidth,Qt.height=mt.offsetHeight,Qt},vt.prototype.appendChildNode=function(mt,St,wt){(!gh(St)||!Xc(St)&&!St.hasAttribute(ut)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(St)))&&(!this.options.copyStyles||!gh(St)||!Tu(St))&&mt.appendChild(this.cloneNode(St,wt))},vt.prototype.cloneChildNodes=function(mt,St,wt){for(var Qt=this,Xt=mt.shadowRoot?mt.shadowRoot.firstChild:mt.firstChild;Xt;Xt=Xt.nextSibling)if(gh(Xt)&&Hf(Xt)&&typeof Xt.assignedNodes=="function"){var ae=Xt.assignedNodes();ae.length&&ae.forEach(function(Ee){return Qt.appendChildNode(St,Ee,wt)})}else this.appendChildNode(St,Xt,wt)},vt.prototype.cloneNode=function(mt,St){if(Wc(mt))return document.createTextNode(mt.data);if(!mt.ownerDocument)return mt.cloneNode(!1);var wt=mt.ownerDocument.defaultView;if(wt&&gh(mt)&&(Xh(mt)||hA(mt))){var Qt=this.createElementClone(mt);Qt.style.transitionProperty="none";var Xt=wt.getComputedStyle(mt),ae=wt.getComputedStyle(mt,":before"),Ee=wt.getComputedStyle(mt,":after");this.referenceElement===mt&&Xh(Qt)&&(this.clonedReferenceElement=Qt),Po(Qt)&&or(Qt);var fe=this.counters.parse(new oA(this.context,Xt)),Xe=this.resolvePseudoContent(mt,Qt,ae,Ft.BEFORE);Rf(mt)&&(St=!0),bu(mt)||this.cloneChildNodes(mt,Qt,St),Xe&&Qt.insertBefore(Xe,Qt.firstChild);var $e=this.resolvePseudoContent(mt,Qt,Ee,Ft.AFTER);return $e&&Qt.appendChild($e),this.counters.pop(fe),(Xt&&(this.options.copyStyles||hA(mt))&&!Ra(mt)||St)&&oe(Xt,Qt),(mt.scrollTop!==0||mt.scrollLeft!==0)&&this.scrolledElements.push([Qt,mt.scrollLeft,mt.scrollTop]),(Zh(mt)||Jh(mt))&&(Zh(Qt)||Jh(Qt))&&(Qt.value=mt.value),Qt}return mt.cloneNode(!1)},vt.prototype.resolvePseudoContent=function(mt,St,wt,Qt){var Xt=this;if(wt){var ae=wt.content,Ee=St.ownerDocument;if(!(!Ee||!ae||ae==="none"||ae==="-moz-alt-content"||wt.display==="none")){this.counters.parse(new oA(this.context,wt));var fe=new Ha(this.context,wt),Xe=Ee.createElement("html2canvaspseudoelement");oe(wt,Xe),fe.content.forEach(function(gn){if(gn.type===0)Xe.appendChild(Ee.createTextNode(gn.value));else if(gn.type===22){var $n=Ee.createElement("img");$n.src=gn.value,$n.style.opacity="1",Xe.appendChild($n)}else if(gn.type===18){if(gn.name==="attr"){var rr=gn.values.filter(xo);rr.length&&Xe.appendChild(Ee.createTextNode(mt.getAttribute(rr[0].value)||""))}else if(gn.name==="counter"){var Ni=gn.values.filter(_s),zi=Ni[0],po=Ni[1];if(zi&&xo(zi)){var Br=Xt.counters.getCounterValue(zi.value),Pr=po&&xo(po)?vu.parse(Xt.context,po.value):3;Xe.appendChild(Ee.createTextNode(ht(Br,Pr,!1)))}}else if(gn.name==="counters"){var Er=gn.values.filter(_s),zi=Er[0],Lo=Er[1],po=Er[2];if(zi&&xo(zi)){var io=Xt.counters.getCounterValues(zi.value),cr=po&&xo(po)?vu.parse(Xt.context,po.value):3,Uo=Lo&&Lo.type===0?Lo.value:"",Vo=io.map(function(dl){return ht(dl,cr,!1)}).join(Uo);Xe.appendChild(Ee.createTextNode(Vo))}}}else if(gn.type===20)switch(gn.value){case"open-quote":Xe.appendChild(Ee.createTextNode(Ih(fe.quotes,Xt.quoteDepth++,!0)));break;case"close-quote":Xe.appendChild(Ee.createTextNode(Ih(fe.quotes,--Xt.quoteDepth,!1)));break;default:Xe.appendChild(Ee.createTextNode(gn.value))}}),Xe.className=Li+" "+Ji;var $e=Qt===Ft.BEFORE?" "+Li:" "+Ji;return hA(St)?St.className.baseValue+=$e:St.className+=$e,Xe}}},vt.destroy=function(mt){return mt.parentNode?(mt.parentNode.removeChild(mt),!0):!1},vt}(),Ft;(function(vt){vt[vt.BEFORE=0]="BEFORE",vt[vt.AFTER=1]="AFTER"})(Ft||(Ft={}));var It=function(vt,mt){var St=vt.createElement("iframe");return St.className="html2canvas-container",St.style.visibility="hidden",St.style.position="fixed",St.style.left="-10000px",St.style.top="0px",St.style.border="0",St.width=mt.width.toString(),St.height=mt.height.toString(),St.scrolling="no",St.setAttribute(ut,"true"),vt.body.appendChild(St),St},zt=function(vt){return new Promise(function(mt){if(vt.complete){mt();return}if(!vt.src){mt();return}vt.onload=mt,vt.onerror=mt})},Rt=function(vt){return Promise.all([].slice.call(vt.images,0).map(zt))},ee=function(vt){return new Promise(function(mt,St){var wt=vt.contentWindow;if(!wt)return St("No window assigned for iframe");var Qt=wt.document;wt.onload=vt.onload=function(){wt.onload=vt.onload=null;var Xt=setInterval(function(){Qt.body.childNodes.length>0&&Qt.readyState==="complete"&&(clearInterval(Xt),mt(vt))},50)}})},Ie=["all","d","content"],oe=function(vt,mt){for(var St=vt.length-1;St>=0;St--){var wt=vt.item(St);Ie.indexOf(wt)===-1&&mt.style.setProperty(wt,vt.getPropertyValue(wt))}return mt},Ye=function(vt){var mt="";return vt&&(mt+="<!DOCTYPE ",vt.name&&(mt+=vt.name),vt.internalSubset&&(mt+=vt.internalSubset),vt.publicId&&(mt+='"'+vt.publicId+'"'),vt.systemId&&(mt+='"'+vt.systemId+'"'),mt+=">"),mt},ze=function(vt,mt,St){vt&&vt.defaultView&&(mt!==vt.defaultView.pageXOffset||St!==vt.defaultView.pageYOffset)&&vt.defaultView.scrollTo(mt,St)},Hn=function(vt){var mt=vt[0],St=vt[1],wt=vt[2];mt.scrollLeft=St,mt.scrollTop=wt},Xn=":before",di=":after",Li="___html2canvas___pseudoelement_before",Ji="___html2canvas___pseudoelement_after",Ri=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,or=function(vt){Ir(vt,"."+Li+Xn+Ri+`
|
|
.`+Ji+di+Ri)},Ir=function(vt,mt){var St=vt.ownerDocument;if(St){var wt=St.createElement("style");wt.textContent=mt,vt.appendChild(wt)}},Hi=function(){function vt(){}return vt.getOrigin=function(mt){var St=vt._link;return St?(St.href=mt,St.href=St.href,St.protocol+St.hostname+St.port):"about:blank"},vt.isSameOrigin=function(mt){return vt.getOrigin(mt)===vt._origin},vt.setContext=function(mt){vt._link=mt.document.createElement("a"),vt._origin=vt.getOrigin(mt.location.href)},vt._origin="about:blank",vt}(),eo=function(){function vt(mt,St){this.context=mt,this._options=St,this._cache={}}return vt.prototype.addImage=function(mt){var St=Promise.resolve();return this.has(mt)||(Ga(mt)||qa(mt))&&(this._cache[mt]=this.loadImage(mt)).catch(function(){}),St},vt.prototype.match=function(mt){return this._cache[mt]},vt.prototype.loadImage=function(mt){return xe(this,void 0,void 0,function(){var St,wt,Qt,Xt,ae=this;return Me(this,function(Ee){switch(Ee.label){case 0:return St=Hi.isSameOrigin(mt),wt=!ua(mt)&&this._options.useCORS===!0&&js.SUPPORT_CORS_IMAGES&&!St,Qt=!ua(mt)&&!St&&!Ga(mt)&&typeof this._options.proxy=="string"&&js.SUPPORT_CORS_XHR&&!wt,!St&&this._options.allowTaint===!1&&!ua(mt)&&!Ga(mt)&&!Qt&&!wt?[2]:(Xt=mt,Qt?[4,this.proxy(Xt)]:[3,2]);case 1:Xt=Ee.sent(),Ee.label=2;case 2:return this.context.logger.debug("Added image "+mt.substring(0,256)),[4,new Promise(function(fe,Xe){var $e=new Image;$e.onload=function(){return fe($e)},$e.onerror=Xe,(Js(Xt)||wt)&&($e.crossOrigin="anonymous"),$e.src=Xt,$e.complete===!0&&setTimeout(function(){return fe($e)},500),ae._options.imageTimeout>0&&setTimeout(function(){return Xe("Timed out ("+ae._options.imageTimeout+"ms) loading image")},ae._options.imageTimeout)})];case 3:return[2,Ee.sent()]}})})},vt.prototype.has=function(mt){return typeof this._cache[mt]!="undefined"},vt.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},vt.prototype.proxy=function(mt){var St=this,wt=this._options.proxy;if(!wt)throw new Error("No proxy defined");var Qt=mt.substring(0,256);return new Promise(function(Xt,ae){var Ee=js.SUPPORT_RESPONSE_TYPE?"blob":"text",fe=new XMLHttpRequest;fe.onload=function(){if(fe.status===200)if(Ee==="text")Xt(fe.response);else{var gn=new FileReader;gn.addEventListener("load",function(){return Xt(gn.result)},!1),gn.addEventListener("error",function($n){return ae($n)},!1),gn.readAsDataURL(fe.response)}else ae("Failed to proxy resource "+Qt+" with status code "+fe.status)},fe.onerror=ae;var Xe=wt.indexOf("?")>-1?"&":"?";if(fe.open("GET",""+wt+Xe+"url="+encodeURIComponent(mt)+"&responseType="+Ee),Ee!=="text"&&fe instanceof XMLHttpRequest&&(fe.responseType=Ee),St._options.imageTimeout){var $e=St._options.imageTimeout;fe.timeout=$e,fe.ontimeout=function(){return ae("Timed out ("+$e+"ms) proxying "+Qt)}}fe.send()})},vt}(),cs=/^data:image\/svg\+xml/i,na=/^data:image\/.*;base64,/i,ws=/^data:image\/.*/i,qa=function(vt){return js.SUPPORT_SVG_DRAWING||!pa(vt)},ua=function(vt){return ws.test(vt)},Js=function(vt){return na.test(vt)},Ga=function(vt){return vt.substr(0,4)==="blob"},pa=function(vt){return vt.substr(-3).toLowerCase()==="svg"||cs.test(vt)},Di=function(){function vt(mt,St){this.type=0,this.x=mt,this.y=St}return vt.prototype.add=function(mt,St){return new vt(this.x+mt,this.y+St)},vt}(),wo=function(vt,mt,St){return new Di(vt.x+(mt.x-vt.x)*St,vt.y+(mt.y-vt.y)*St)},fs=function(){function vt(mt,St,wt,Qt){this.type=1,this.start=mt,this.startControl=St,this.endControl=wt,this.end=Qt}return vt.prototype.subdivide=function(mt,St){var wt=wo(this.start,this.startControl,mt),Qt=wo(this.startControl,this.endControl,mt),Xt=wo(this.endControl,this.end,mt),ae=wo(wt,Qt,mt),Ee=wo(Qt,Xt,mt),fe=wo(ae,Ee,mt);return St?new vt(this.start,wt,ae,fe):new vt(fe,Ee,Xt,this.end)},vt.prototype.add=function(mt,St){return new vt(this.start.add(mt,St),this.startControl.add(mt,St),this.endControl.add(mt,St),this.end.add(mt,St))},vt.prototype.reverse=function(){return new vt(this.end,this.endControl,this.startControl,this.start)},vt}(),es=function(vt){return vt.type===1},ma=function(){function vt(mt){var St=mt.styles,wt=mt.bounds,Qt=Ya(St.borderTopLeftRadius,wt.width,wt.height),Xt=Qt[0],ae=Qt[1],Ee=Ya(St.borderTopRightRadius,wt.width,wt.height),fe=Ee[0],Xe=Ee[1],$e=Ya(St.borderBottomRightRadius,wt.width,wt.height),gn=$e[0],$n=$e[1],rr=Ya(St.borderBottomLeftRadius,wt.width,wt.height),Ni=rr[0],zi=rr[1],po=[];po.push((Xt+fe)/wt.width),po.push((Ni+gn)/wt.width),po.push((ae+zi)/wt.height),po.push((Xe+$n)/wt.height);var Br=Math.max.apply(Math,po);Br>1&&(Xt/=Br,ae/=Br,fe/=Br,Xe/=Br,gn/=Br,$n/=Br,Ni/=Br,zi/=Br);var Pr=wt.width-fe,Er=wt.height-$n,Lo=wt.width-gn,io=wt.height-zi,cr=St.borderTopWidth,Uo=St.borderRightWidth,Vo=St.borderBottomWidth,ro=St.borderLeftWidth,ra=No(St.paddingTop,mt.bounds.width),dl=No(St.paddingRight,mt.bounds.width),Ml=No(St.paddingBottom,mt.bounds.width),ds=No(St.paddingLeft,mt.bounds.width);this.topLeftBorderDoubleOuterBox=Xt>0||ae>0?Zr(wt.left+ro/3,wt.top+cr/3,Xt-ro/3,ae-cr/3,Fo.TOP_LEFT):new Di(wt.left+ro/3,wt.top+cr/3),this.topRightBorderDoubleOuterBox=Xt>0||ae>0?Zr(wt.left+Pr,wt.top+cr/3,fe-Uo/3,Xe-cr/3,Fo.TOP_RIGHT):new Di(wt.left+wt.width-Uo/3,wt.top+cr/3),this.bottomRightBorderDoubleOuterBox=gn>0||$n>0?Zr(wt.left+Lo,wt.top+Er,gn-Uo/3,$n-Vo/3,Fo.BOTTOM_RIGHT):new Di(wt.left+wt.width-Uo/3,wt.top+wt.height-Vo/3),this.bottomLeftBorderDoubleOuterBox=Ni>0||zi>0?Zr(wt.left+ro/3,wt.top+io,Ni-ro/3,zi-Vo/3,Fo.BOTTOM_LEFT):new Di(wt.left+ro/3,wt.top+wt.height-Vo/3),this.topLeftBorderDoubleInnerBox=Xt>0||ae>0?Zr(wt.left+ro*2/3,wt.top+cr*2/3,Xt-ro*2/3,ae-cr*2/3,Fo.TOP_LEFT):new Di(wt.left+ro*2/3,wt.top+cr*2/3),this.topRightBorderDoubleInnerBox=Xt>0||ae>0?Zr(wt.left+Pr,wt.top+cr*2/3,fe-Uo*2/3,Xe-cr*2/3,Fo.TOP_RIGHT):new Di(wt.left+wt.width-Uo*2/3,wt.top+cr*2/3),this.bottomRightBorderDoubleInnerBox=gn>0||$n>0?Zr(wt.left+Lo,wt.top+Er,gn-Uo*2/3,$n-Vo*2/3,Fo.BOTTOM_RIGHT):new Di(wt.left+wt.width-Uo*2/3,wt.top+wt.height-Vo*2/3),this.bottomLeftBorderDoubleInnerBox=Ni>0||zi>0?Zr(wt.left+ro*2/3,wt.top+io,Ni-ro*2/3,zi-Vo*2/3,Fo.BOTTOM_LEFT):new Di(wt.left+ro*2/3,wt.top+wt.height-Vo*2/3),this.topLeftBorderStroke=Xt>0||ae>0?Zr(wt.left+ro/2,wt.top+cr/2,Xt-ro/2,ae-cr/2,Fo.TOP_LEFT):new Di(wt.left+ro/2,wt.top+cr/2),this.topRightBorderStroke=Xt>0||ae>0?Zr(wt.left+Pr,wt.top+cr/2,fe-Uo/2,Xe-cr/2,Fo.TOP_RIGHT):new Di(wt.left+wt.width-Uo/2,wt.top+cr/2),this.bottomRightBorderStroke=gn>0||$n>0?Zr(wt.left+Lo,wt.top+Er,gn-Uo/2,$n-Vo/2,Fo.BOTTOM_RIGHT):new Di(wt.left+wt.width-Uo/2,wt.top+wt.height-Vo/2),this.bottomLeftBorderStroke=Ni>0||zi>0?Zr(wt.left+ro/2,wt.top+io,Ni-ro/2,zi-Vo/2,Fo.BOTTOM_LEFT):new Di(wt.left+ro/2,wt.top+wt.height-Vo/2),this.topLeftBorderBox=Xt>0||ae>0?Zr(wt.left,wt.top,Xt,ae,Fo.TOP_LEFT):new Di(wt.left,wt.top),this.topRightBorderBox=fe>0||Xe>0?Zr(wt.left+Pr,wt.top,fe,Xe,Fo.TOP_RIGHT):new Di(wt.left+wt.width,wt.top),this.bottomRightBorderBox=gn>0||$n>0?Zr(wt.left+Lo,wt.top+Er,gn,$n,Fo.BOTTOM_RIGHT):new Di(wt.left+wt.width,wt.top+wt.height),this.bottomLeftBorderBox=Ni>0||zi>0?Zr(wt.left,wt.top+io,Ni,zi,Fo.BOTTOM_LEFT):new Di(wt.left,wt.top+wt.height),this.topLeftPaddingBox=Xt>0||ae>0?Zr(wt.left+ro,wt.top+cr,Math.max(0,Xt-ro),Math.max(0,ae-cr),Fo.TOP_LEFT):new Di(wt.left+ro,wt.top+cr),this.topRightPaddingBox=fe>0||Xe>0?Zr(wt.left+Math.min(Pr,wt.width-Uo),wt.top+cr,Pr>wt.width+Uo?0:Math.max(0,fe-Uo),Math.max(0,Xe-cr),Fo.TOP_RIGHT):new Di(wt.left+wt.width-Uo,wt.top+cr),this.bottomRightPaddingBox=gn>0||$n>0?Zr(wt.left+Math.min(Lo,wt.width-ro),wt.top+Math.min(Er,wt.height-Vo),Math.max(0,gn-Uo),Math.max(0,$n-Vo),Fo.BOTTOM_RIGHT):new Di(wt.left+wt.width-Uo,wt.top+wt.height-Vo),this.bottomLeftPaddingBox=Ni>0||zi>0?Zr(wt.left+ro,wt.top+Math.min(io,wt.height-Vo),Math.max(0,Ni-ro),Math.max(0,zi-Vo),Fo.BOTTOM_LEFT):new Di(wt.left+ro,wt.top+wt.height-Vo),this.topLeftContentBox=Xt>0||ae>0?Zr(wt.left+ro+ds,wt.top+cr+ra,Math.max(0,Xt-(ro+ds)),Math.max(0,ae-(cr+ra)),Fo.TOP_LEFT):new Di(wt.left+ro+ds,wt.top+cr+ra),this.topRightContentBox=fe>0||Xe>0?Zr(wt.left+Math.min(Pr,wt.width+ro+ds),wt.top+cr+ra,Pr>wt.width+ro+ds?0:fe-ro+ds,Xe-(cr+ra),Fo.TOP_RIGHT):new Di(wt.left+wt.width-(Uo+dl),wt.top+cr+ra),this.bottomRightContentBox=gn>0||$n>0?Zr(wt.left+Math.min(Lo,wt.width-(ro+ds)),wt.top+Math.min(Er,wt.height+cr+ra),Math.max(0,gn-(Uo+dl)),$n-(Vo+Ml),Fo.BOTTOM_RIGHT):new Di(wt.left+wt.width-(Uo+dl),wt.top+wt.height-(Vo+Ml)),this.bottomLeftContentBox=Ni>0||zi>0?Zr(wt.left+ro+ds,wt.top+io,Math.max(0,Ni-(ro+ds)),zi-(Vo+Ml),Fo.BOTTOM_LEFT):new Di(wt.left+ro+ds,wt.top+wt.height-(Vo+Ml))}return vt}(),Fo;(function(vt){vt[vt.TOP_LEFT=0]="TOP_LEFT",vt[vt.TOP_RIGHT=1]="TOP_RIGHT",vt[vt.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",vt[vt.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Fo||(Fo={}));var Zr=function(vt,mt,St,wt,Qt){var Xt=4*((Math.sqrt(2)-1)/3),ae=St*Xt,Ee=wt*Xt,fe=vt+St,Xe=mt+wt;switch(Qt){case Fo.TOP_LEFT:return new fs(new Di(vt,Xe),new Di(vt,Xe-Ee),new Di(fe-ae,mt),new Di(fe,mt));case Fo.TOP_RIGHT:return new fs(new Di(vt,mt),new Di(vt+ae,mt),new Di(fe,Xe-Ee),new Di(fe,Xe));case Fo.BOTTOM_RIGHT:return new fs(new Di(fe,mt),new Di(fe,mt+Ee),new Di(vt+ae,Xe),new Di(vt,Xe));case Fo.BOTTOM_LEFT:default:return new fs(new Di(fe,Xe),new Di(fe-ae,Xe),new Di(vt,mt+Ee),new Di(vt,mt))}},$a=function(vt){return[vt.topLeftBorderBox,vt.topRightBorderBox,vt.bottomRightBorderBox,vt.bottomLeftBorderBox]},Ms=function(vt){return[vt.topLeftContentBox,vt.topRightContentBox,vt.bottomRightContentBox,vt.bottomLeftContentBox]},Nu=function(vt){return[vt.topLeftPaddingBox,vt.topRightPaddingBox,vt.bottomRightPaddingBox,vt.bottomLeftPaddingBox]},Ll=function(){function vt(mt,St,wt){this.offsetX=mt,this.offsetY=St,this.matrix=wt,this.type=0,this.target=6}return vt}(),La=function(){function vt(mt,St){this.path=mt,this.target=St,this.type=1}return vt}(),tl=function(){function vt(mt){this.opacity=mt,this.type=2,this.target=6}return vt}(),Xo=function(vt){return vt.type===0},ia=function(vt){return vt.type===1},bA=function(vt){return vt.type===2},mh=function(vt,mt){return vt.length===mt.length?vt.some(function(St,wt){return St===mt[wt]}):!1},Jp=function(vt,mt,St,wt,Qt){return vt.map(function(Xt,ae){switch(ae){case 0:return Xt.add(mt,St);case 1:return Xt.add(mt+wt,St);case 2:return Xt.add(mt+wt,St+Qt);case 3:return Xt.add(mt,St+Qt)}return Xt})},el=function(){function vt(mt){this.element=mt,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return vt}(),mg=function(){function vt(mt,St){if(this.container=mt,this.parent=St,this.effects=[],this.curves=new ma(this.container),this.container.styles.opacity<1&&this.effects.push(new tl(this.container.styles.opacity)),this.container.styles.transform!==null){var wt=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Qt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,Xt=this.container.styles.transform;this.effects.push(new Ll(wt,Qt,Xt))}if(this.container.styles.overflowX!==0){var ae=$a(this.curves),Ee=Nu(this.curves);mh(ae,Ee)?this.effects.push(new La(ae,6)):(this.effects.push(new La(ae,2)),this.effects.push(new La(Ee,4)))}}return vt.prototype.getEffects=function(mt){for(var St=[2,3].indexOf(this.container.styles.position)===-1,wt=this.parent,Qt=this.effects.slice(0);wt;){var Xt=wt.effects.filter(function(fe){return!ia(fe)});if(St||wt.container.styles.position!==0||!wt.parent){if(Qt.unshift.apply(Qt,Xt),St=[2,3].indexOf(wt.container.styles.position)===-1,wt.container.styles.overflowX!==0){var ae=$a(wt.curves),Ee=Nu(wt.curves);mh(ae,Ee)||Qt.unshift(new La(Ee,6))}}else Qt.unshift.apply(Qt,Xt);wt=wt.parent}return Qt.filter(function(fe){return Zs(fe.target,mt)})},vt}(),TA=function(vt,mt,St,wt){vt.container.elements.forEach(function(Qt){var Xt=Zs(Qt.flags,4),ae=Zs(Qt.flags,2),Ee=new mg(Qt,vt);Zs(Qt.styles.display,2048)&&wt.push(Ee);var fe=Zs(Qt.flags,8)?[]:wt;if(Xt||ae){var Xe=Xt||Qt.styles.isPositioned()?St:mt,$e=new el(Ee);if(Qt.styles.isPositioned()||Qt.styles.opacity<1||Qt.styles.isTransformed()){var gn=Qt.styles.zIndex.order;if(gn<0){var $n=0;Xe.negativeZIndex.some(function(Ni,zi){return gn>Ni.element.container.styles.zIndex.order?($n=zi,!1):$n>0}),Xe.negativeZIndex.splice($n,0,$e)}else if(gn>0){var rr=0;Xe.positiveZIndex.some(function(Ni,zi){return gn>=Ni.element.container.styles.zIndex.order?(rr=zi+1,!1):rr>0}),Xe.positiveZIndex.splice(rr,0,$e)}else Xe.zeroOrAutoZIndexOrTransformedOrOpacity.push($e)}else Qt.styles.isFloating()?Xe.nonPositionedFloats.push($e):Xe.nonPositionedInlineLevel.push($e);TA(Ee,$e,Xt?$e:St,fe)}else Qt.styles.isInlineLevel()?mt.inlineLevel.push(Ee):mt.nonInlineLevel.push(Ee),TA(Ee,mt,St,fe);Zs(Qt.flags,8)&&bd(Qt,fe)})},bd=function(vt,mt){for(var St=vt instanceof Vc?vt.start:1,wt=vt instanceof Vc?vt.reversed:!1,Qt=0;Qt<mt.length;Qt++){var Xt=mt[Qt];Xt.container instanceof ku&&typeof Xt.container.value=="number"&&Xt.container.value!==0&&(St=Xt.container.value),Xt.listValue=ht(St,Xt.container.styles.listStyleType,!0),St+=wt?-1:1}},zf=function(vt){var mt=new mg(vt,null),St=new el(mt),wt=[];return TA(mt,St,St,wt),bd(mt.container,wt),St},ec=function(vt,mt){switch(mt){case 0:return qs(vt.topLeftBorderBox,vt.topLeftPaddingBox,vt.topRightBorderBox,vt.topRightPaddingBox);case 1:return qs(vt.topRightBorderBox,vt.topRightPaddingBox,vt.bottomRightBorderBox,vt.bottomRightPaddingBox);case 2:return qs(vt.bottomRightBorderBox,vt.bottomRightPaddingBox,vt.bottomLeftBorderBox,vt.bottomLeftPaddingBox);case 3:default:return qs(vt.bottomLeftBorderBox,vt.bottomLeftPaddingBox,vt.topLeftBorderBox,vt.topLeftPaddingBox)}},vh=function(vt,mt){switch(mt){case 0:return qs(vt.topLeftBorderBox,vt.topLeftBorderDoubleOuterBox,vt.topRightBorderBox,vt.topRightBorderDoubleOuterBox);case 1:return qs(vt.topRightBorderBox,vt.topRightBorderDoubleOuterBox,vt.bottomRightBorderBox,vt.bottomRightBorderDoubleOuterBox);case 2:return qs(vt.bottomRightBorderBox,vt.bottomRightBorderDoubleOuterBox,vt.bottomLeftBorderBox,vt.bottomLeftBorderDoubleOuterBox);case 3:default:return qs(vt.bottomLeftBorderBox,vt.bottomLeftBorderDoubleOuterBox,vt.topLeftBorderBox,vt.topLeftBorderDoubleOuterBox)}},Td=function(vt,mt){switch(mt){case 0:return qs(vt.topLeftBorderDoubleInnerBox,vt.topLeftPaddingBox,vt.topRightBorderDoubleInnerBox,vt.topRightPaddingBox);case 1:return qs(vt.topRightBorderDoubleInnerBox,vt.topRightPaddingBox,vt.bottomRightBorderDoubleInnerBox,vt.bottomRightPaddingBox);case 2:return qs(vt.bottomRightBorderDoubleInnerBox,vt.bottomRightPaddingBox,vt.bottomLeftBorderDoubleInnerBox,vt.bottomLeftPaddingBox);case 3:default:return qs(vt.bottomLeftBorderDoubleInnerBox,vt.bottomLeftPaddingBox,vt.topLeftBorderDoubleInnerBox,vt.topLeftPaddingBox)}},nc=function(vt,mt){switch(mt){case 0:return Qu(vt.topLeftBorderStroke,vt.topRightBorderStroke);case 1:return Qu(vt.topRightBorderStroke,vt.bottomRightBorderStroke);case 2:return Qu(vt.bottomRightBorderStroke,vt.bottomLeftBorderStroke);case 3:default:return Qu(vt.bottomLeftBorderStroke,vt.topLeftBorderStroke)}},Qu=function(vt,mt){var St=[];return es(vt)?St.push(vt.subdivide(.5,!1)):St.push(vt),es(mt)?St.push(mt.subdivide(.5,!0)):St.push(mt),St},qs=function(vt,mt,St,wt){var Qt=[];return es(vt)?Qt.push(vt.subdivide(.5,!1)):Qt.push(vt),es(St)?Qt.push(St.subdivide(.5,!0)):Qt.push(St),es(wt)?Qt.push(wt.subdivide(.5,!0).reverse()):Qt.push(wt),es(mt)?Qt.push(mt.subdivide(.5,!1).reverse()):Qt.push(mt),Qt},Ea=function(vt){var mt=vt.bounds,St=vt.styles;return mt.add(St.borderLeftWidth,St.borderTopWidth,-(St.borderRightWidth+St.borderLeftWidth),-(St.borderTopWidth+St.borderBottomWidth))},Id=function(vt){var mt=vt.styles,St=vt.bounds,wt=No(mt.paddingLeft,St.width),Qt=No(mt.paddingRight,St.width),Xt=No(mt.paddingTop,St.width),ae=No(mt.paddingBottom,St.width);return St.add(wt+mt.borderLeftWidth,Xt+mt.borderTopWidth,-(mt.borderRightWidth+mt.borderLeftWidth+wt+Qt),-(mt.borderTopWidth+mt.borderBottomWidth+Xt+ae))},qp=function(vt,mt){return vt===0?mt.bounds:vt===2?Id(mt):Ea(mt)},$p=function(vt,mt){return vt===0?mt.bounds:vt===2?Id(mt):Ea(mt)},ic=function(vt,mt,St){var wt=qp(oc(vt.styles.backgroundOrigin,mt),vt),Qt=$p(oc(vt.styles.backgroundClip,mt),vt),Xt=t0(oc(vt.styles.backgroundSize,mt),St,wt),ae=Xt[0],Ee=Xt[1],fe=Ya(oc(vt.styles.backgroundPosition,mt),wt.width-ae,wt.height-Ee),Xe=Qd(oc(vt.styles.backgroundRepeat,mt),fe,Xt,wt,Qt),$e=Math.round(wt.left+fe[0]),gn=Math.round(wt.top+fe[1]);return[Xe,$e,gn,ae,Ee]},rc=function(vt){return xo(vt)&&vt.value===nh.AUTO},Nd=function(vt){return typeof vt=="number"},t0=function(vt,mt,St){var wt=mt[0],Qt=mt[1],Xt=mt[2],ae=vt[0],Ee=vt[1];if(!ae)return[0,0];if(ns(ae)&&Ee&&ns(Ee))return[No(ae,St.width),No(Ee,St.height)];var fe=Nd(Xt);if(xo(ae)&&(ae.value===nh.CONTAIN||ae.value===nh.COVER)){if(Nd(Xt)){var Xe=St.width/St.height;return Xe<Xt!=(ae.value===nh.COVER)?[St.width,St.width/Xt]:[St.height*Xt,St.height]}return[St.width,St.height]}var $e=Nd(wt),gn=Nd(Qt),$n=$e||gn;if(rc(ae)&&(!Ee||rc(Ee))){if($e&&gn)return[wt,Qt];if(!fe&&!$n)return[St.width,St.height];if($n&&fe){var rr=$e?wt:Qt*Xt,Ni=gn?Qt:wt/Xt;return[rr,Ni]}var zi=$e?wt:St.width,po=gn?Qt:St.height;return[zi,po]}if(fe){var Br=0,Pr=0;return ns(ae)?Br=No(ae,St.width):ns(Ee)&&(Pr=No(Ee,St.height)),rc(ae)?Br=Pr*Xt:(!Ee||rc(Ee))&&(Pr=Br/Xt),[Br,Pr]}var Er=null,Lo=null;if(ns(ae)?Er=No(ae,St.width):Ee&&ns(Ee)&&(Lo=No(Ee,St.height)),Er!==null&&(!Ee||rc(Ee))&&(Lo=$e&&gn?Er/wt*Qt:St.height),Lo!==null&&rc(ae)&&(Er=$e&&gn?Lo/Qt*wt:St.width),Er!==null&&Lo!==null)return[Er,Lo];throw new Error("Unable to calculate background-size for element")},oc=function(vt,mt){var St=vt[mt];return typeof St=="undefined"?vt[0]:St},Qd=function(vt,mt,St,wt,Qt){var Xt=mt[0],ae=mt[1],Ee=St[0],fe=St[1];switch(vt){case 2:return[new Di(Math.round(wt.left),Math.round(wt.top+ae)),new Di(Math.round(wt.left+wt.width),Math.round(wt.top+ae)),new Di(Math.round(wt.left+wt.width),Math.round(fe+wt.top+ae)),new Di(Math.round(wt.left),Math.round(fe+wt.top+ae))];case 3:return[new Di(Math.round(wt.left+Xt),Math.round(wt.top)),new Di(Math.round(wt.left+Xt+Ee),Math.round(wt.top)),new Di(Math.round(wt.left+Xt+Ee),Math.round(wt.height+wt.top)),new Di(Math.round(wt.left+Xt),Math.round(wt.height+wt.top))];case 1:return[new Di(Math.round(wt.left+Xt),Math.round(wt.top+ae)),new Di(Math.round(wt.left+Xt+Ee),Math.round(wt.top+ae)),new Di(Math.round(wt.left+Xt+Ee),Math.round(wt.top+ae+fe)),new Di(Math.round(wt.left+Xt),Math.round(wt.top+ae+fe))];default:return[new Di(Math.round(Qt.left),Math.round(Qt.top)),new Di(Math.round(Qt.left+Qt.width),Math.round(Qt.top)),new Di(Math.round(Qt.left+Qt.width),Math.round(Qt.height+Qt.top)),new Di(Math.round(Qt.left),Math.round(Qt.height+Qt.top))]}},vg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",cA="Hidden Text",eu=function(){function vt(mt){this._data={},this._document=mt}return vt.prototype.parseMetrics=function(mt,St){var wt=this._document.createElement("div"),Qt=this._document.createElement("img"),Xt=this._document.createElement("span"),ae=this._document.body;wt.style.visibility="hidden",wt.style.fontFamily=mt,wt.style.fontSize=St,wt.style.margin="0",wt.style.padding="0",wt.style.whiteSpace="nowrap",ae.appendChild(wt),Qt.src=vg,Qt.width=1,Qt.height=1,Qt.style.margin="0",Qt.style.padding="0",Qt.style.verticalAlign="baseline",Xt.style.fontFamily=mt,Xt.style.fontSize=St,Xt.style.margin="0",Xt.style.padding="0",Xt.appendChild(this._document.createTextNode(cA)),wt.appendChild(Xt),wt.appendChild(Qt);var Ee=Qt.offsetTop-Xt.offsetTop+2;wt.removeChild(Xt),wt.appendChild(this._document.createTextNode(cA)),wt.style.lineHeight="normal",Qt.style.verticalAlign="super";var fe=Qt.offsetTop-wt.offsetTop+2;return ae.removeChild(wt),{baseline:Ee,middle:fe}},vt.prototype.getMetrics=function(mt,St){var wt=mt+" "+St;return typeof this._data[wt]=="undefined"&&(this._data[wt]=this.parseMetrics(mt,St)),this._data[wt]},vt}(),Ud=function(){function vt(mt,St){this.context=mt,this.options=St}return vt}(),El=1e4,sc=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt._activeEffects=[],Qt.canvas=wt.canvas?wt.canvas:document.createElement("canvas"),Qt.ctx=Qt.canvas.getContext("2d"),wt.canvas||(Qt.canvas.width=Math.floor(wt.width*wt.scale),Qt.canvas.height=Math.floor(wt.height*wt.scale),Qt.canvas.style.width=wt.width+"px",Qt.canvas.style.height=wt.height+"px"),Qt.fontMetrics=new eu(document),Qt.ctx.scale(Qt.options.scale,Qt.options.scale),Qt.ctx.translate(-wt.x,-wt.y),Qt.ctx.textBaseline="bottom",Qt._activeEffects=[],Qt.context.logger.debug("Canvas renderer initialized ("+wt.width+"x"+wt.height+") with scale "+wt.scale),Qt}return mt.prototype.applyEffects=function(St){for(var wt=this;this._activeEffects.length;)this.popEffect();St.forEach(function(Qt){return wt.applyEffect(Qt)})},mt.prototype.applyEffect=function(St){this.ctx.save(),bA(St)&&(this.ctx.globalAlpha=St.opacity),Xo(St)&&(this.ctx.translate(St.offsetX,St.offsetY),this.ctx.transform(St.matrix[0],St.matrix[1],St.matrix[2],St.matrix[3],St.matrix[4],St.matrix[5]),this.ctx.translate(-St.offsetX,-St.offsetY)),ia(St)&&(this.path(St.path),this.ctx.clip()),this._activeEffects.push(St)},mt.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},mt.prototype.renderStack=function(St){return xe(this,void 0,void 0,function(){var wt;return Me(this,function(Qt){switch(Qt.label){case 0:return wt=St.element.container.styles,wt.isVisible()?[4,this.renderStackContent(St)]:[3,2];case 1:Qt.sent(),Qt.label=2;case 2:return[2]}})})},mt.prototype.renderNode=function(St){return xe(this,void 0,void 0,function(){return Me(this,function(wt){switch(wt.label){case 0:if(Zs(St.container.flags,16))debugger;return St.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(St)]:[3,3];case 1:return wt.sent(),[4,this.renderNodeContent(St)];case 2:wt.sent(),wt.label=3;case 3:return[2]}})})},mt.prototype.renderTextWithLetterSpacing=function(St,wt,Qt){var Xt=this;if(wt===0)this.ctx.fillText(St.text,St.bounds.left,St.bounds.top+Qt);else{var ae=jh(St.text);ae.reduce(function(Ee,fe){return Xt.ctx.fillText(fe,Ee,St.bounds.top+Qt),Ee+Xt.ctx.measureText(fe).width},St.bounds.left)}},mt.prototype.createFontStyle=function(St){var wt=St.fontVariant.filter(function(ae){return ae==="normal"||ae==="small-caps"}).join(""),Qt=n0(St.fontFamily).join(", "),Xt=So(St.fontSize)?""+St.fontSize.number+St.fontSize.unit:St.fontSize.number+"px";return[[St.fontStyle,wt,St.fontWeight,Xt,Qt].join(" "),Qt,Xt]},mt.prototype.renderTextNode=function(St,wt){return xe(this,void 0,void 0,function(){var Qt,Xt,ae,Ee,fe,Xe,$e,gn,$n=this;return Me(this,function(rr){return Qt=this.createFontStyle(wt),Xt=Qt[0],ae=Qt[1],Ee=Qt[2],this.ctx.font=Xt,this.ctx.direction=wt.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",fe=this.fontMetrics.getMetrics(ae,Ee),Xe=fe.baseline,$e=fe.middle,gn=wt.paintOrder,St.textBounds.forEach(function(Ni){gn.forEach(function(zi){switch(zi){case 0:$n.ctx.fillStyle=Io(wt.color),$n.renderTextWithLetterSpacing(Ni,wt.letterSpacing,Xe);var po=wt.textShadow;po.length&&Ni.text.trim().length&&(po.slice(0).reverse().forEach(function(Br){$n.ctx.shadowColor=Io(Br.color),$n.ctx.shadowOffsetX=Br.offsetX.number*$n.options.scale,$n.ctx.shadowOffsetY=Br.offsetY.number*$n.options.scale,$n.ctx.shadowBlur=Br.blur.number,$n.renderTextWithLetterSpacing(Ni,wt.letterSpacing,Xe)}),$n.ctx.shadowColor="",$n.ctx.shadowOffsetX=0,$n.ctx.shadowOffsetY=0,$n.ctx.shadowBlur=0),wt.textDecorationLine.length&&($n.ctx.fillStyle=Io(wt.textDecorationColor||wt.color),wt.textDecorationLine.forEach(function(Br){switch(Br){case 1:$n.ctx.fillRect(Ni.bounds.left,Math.round(Ni.bounds.top+Xe),Ni.bounds.width,1);break;case 2:$n.ctx.fillRect(Ni.bounds.left,Math.round(Ni.bounds.top),Ni.bounds.width,1);break;case 3:$n.ctx.fillRect(Ni.bounds.left,Math.ceil(Ni.bounds.top+$e),Ni.bounds.width,1);break}}));break;case 1:wt.webkitTextStrokeWidth&&Ni.text.trim().length&&($n.ctx.strokeStyle=Io(wt.webkitTextStrokeColor),$n.ctx.lineWidth=wt.webkitTextStrokeWidth,$n.ctx.lineJoin=window.chrome?"miter":"round",$n.ctx.strokeText(Ni.text,Ni.bounds.left,Ni.bounds.top+Xe)),$n.ctx.strokeStyle="",$n.ctx.lineWidth=0,$n.ctx.lineJoin="miter";break}})}),[2]})})},mt.prototype.renderReplacedElement=function(St,wt,Qt){if(Qt&&St.intrinsicWidth>0&&St.intrinsicHeight>0){var Xt=Id(St),ae=Nu(wt);this.path(ae),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Qt,0,0,St.intrinsicWidth,St.intrinsicHeight,Xt.left,Xt.top,Xt.width,Xt.height),this.ctx.restore()}},mt.prototype.renderNodeContent=function(St){return xe(this,void 0,void 0,function(){var wt,Qt,Xt,ae,Ee,fe,Pr,Pr,Xe,$e,gn,$n,Lo,rr,Ni,io,zi,po,Br,Pr,Er,Lo,io;return Me(this,function(cr){switch(cr.label){case 0:this.applyEffects(St.getEffects(4)),wt=St.container,Qt=St.curves,Xt=wt.styles,ae=0,Ee=wt.textNodes,cr.label=1;case 1:return ae<Ee.length?(fe=Ee[ae],[4,this.renderTextNode(fe,Xt)]):[3,4];case 2:cr.sent(),cr.label=3;case 3:return ae++,[3,1];case 4:if(!(wt instanceof zc))return[3,8];cr.label=5;case 5:return cr.trys.push([5,7,,8]),[4,this.context.cache.match(wt.src)];case 6:return Pr=cr.sent(),this.renderReplacedElement(wt,Qt,Pr),[3,8];case 7:return cr.sent(),this.context.logger.error("Error loading image "+wt.src),[3,8];case 8:if(wt instanceof jc&&this.renderReplacedElement(wt,Qt,wt.canvas),!(wt instanceof Kc))return[3,12];cr.label=9;case 9:return cr.trys.push([9,11,,12]),[4,this.context.cache.match(wt.svg)];case 10:return Pr=cr.sent(),this.renderReplacedElement(wt,Qt,Pr),[3,12];case 11:return cr.sent(),this.context.logger.error("Error loading svg "+wt.svg.substring(0,255)),[3,12];case 12:return wt instanceof Pd&&wt.tree?(Xe=new mt(this.context,{scale:this.options.scale,backgroundColor:wt.backgroundColor,x:0,y:0,width:wt.width,height:wt.height}),[4,Xe.render(wt.tree)]):[3,14];case 13:$e=cr.sent(),wt.width&&wt.height&&this.ctx.drawImage($e,0,0,wt.width,wt.height,wt.bounds.left,wt.bounds.top,wt.bounds.width,wt.bounds.height),cr.label=14;case 14:if(wt instanceof Ol&&(gn=Math.min(wt.bounds.width,wt.bounds.height),wt.type===Wh?wt.checked&&(this.ctx.save(),this.path([new Di(wt.bounds.left+gn*.39363,wt.bounds.top+gn*.79),new Di(wt.bounds.left+gn*.16,wt.bounds.top+gn*.5549),new Di(wt.bounds.left+gn*.27347,wt.bounds.top+gn*.44071),new Di(wt.bounds.left+gn*.39694,wt.bounds.top+gn*.5649),new Di(wt.bounds.left+gn*.72983,wt.bounds.top+gn*.23),new Di(wt.bounds.left+gn*.84,wt.bounds.top+gn*.34085),new Di(wt.bounds.left+gn*.39363,wt.bounds.top+gn*.79)]),this.ctx.fillStyle=Io(Nf),this.ctx.fill(),this.ctx.restore()):wt.type===JA&&wt.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(wt.bounds.left+gn/2,wt.bounds.top+gn/2,gn/4,0,Math.PI*2,!0),this.ctx.fillStyle=Io(Nf),this.ctx.fill(),this.ctx.restore())),km(wt)&&wt.value.length){switch($n=this.createFontStyle(Xt),Lo=$n[0],rr=$n[1],Ni=this.fontMetrics.getMetrics(Lo,rr).baseline,this.ctx.font=Lo,this.ctx.fillStyle=Io(Xt.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Lr(wt.styles.textAlign),io=Id(wt),zi=0,wt.styles.textAlign){case 1:zi+=io.width/2;break;case 2:zi+=io.width;break}po=io.add(zi,0,0,-io.height/2+1),this.ctx.save(),this.path([new Di(io.left,io.top),new Di(io.left+io.width,io.top),new Di(io.left+io.width,io.top+io.height),new Di(io.left,io.top+io.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new ga(wt.value,po),Xt.letterSpacing,Ni),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Zs(wt.styles.display,2048))return[3,20];if(wt.styles.listStyleImage===null)return[3,19];if(Br=wt.styles.listStyleImage,Br.type!==0)return[3,18];Pr=void 0,Er=Br.url,cr.label=15;case 15:return cr.trys.push([15,17,,18]),[4,this.context.cache.match(Er)];case 16:return Pr=cr.sent(),this.ctx.drawImage(Pr,wt.bounds.left-(Pr.width+10),wt.bounds.top),[3,18];case 17:return cr.sent(),this.context.logger.error("Error loading list-style-image "+Er),[3,18];case 18:return[3,20];case 19:St.listValue&&wt.styles.listStyleType!==-1&&(Lo=this.createFontStyle(Xt)[0],this.ctx.font=Lo,this.ctx.fillStyle=Io(Xt.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",io=new ke(wt.bounds.left,wt.bounds.top+No(wt.styles.paddingTop,wt.bounds.width),wt.bounds.width,Xs(Xt.lineHeight,Xt.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new ga(St.listValue,io),Xt.letterSpacing,Xs(Xt.lineHeight,Xt.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),cr.label=20;case 20:return[2]}})})},mt.prototype.renderStackContent=function(St){return xe(this,void 0,void 0,function(){var wt,Qt,Br,Xt,ae,Br,Ee,fe,Br,Xe,$e,Br,gn,$n,Br,rr,Ni,Br,zi,po,Br;return Me(this,function(Pr){switch(Pr.label){case 0:if(Zs(St.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(St.element)];case 1:Pr.sent(),wt=0,Qt=St.negativeZIndex,Pr.label=2;case 2:return wt<Qt.length?(Br=Qt[wt],[4,this.renderStack(Br)]):[3,5];case 3:Pr.sent(),Pr.label=4;case 4:return wt++,[3,2];case 5:return[4,this.renderNodeContent(St.element)];case 6:Pr.sent(),Xt=0,ae=St.nonInlineLevel,Pr.label=7;case 7:return Xt<ae.length?(Br=ae[Xt],[4,this.renderNode(Br)]):[3,10];case 8:Pr.sent(),Pr.label=9;case 9:return Xt++,[3,7];case 10:Ee=0,fe=St.nonPositionedFloats,Pr.label=11;case 11:return Ee<fe.length?(Br=fe[Ee],[4,this.renderStack(Br)]):[3,14];case 12:Pr.sent(),Pr.label=13;case 13:return Ee++,[3,11];case 14:Xe=0,$e=St.nonPositionedInlineLevel,Pr.label=15;case 15:return Xe<$e.length?(Br=$e[Xe],[4,this.renderStack(Br)]):[3,18];case 16:Pr.sent(),Pr.label=17;case 17:return Xe++,[3,15];case 18:gn=0,$n=St.inlineLevel,Pr.label=19;case 19:return gn<$n.length?(Br=$n[gn],[4,this.renderNode(Br)]):[3,22];case 20:Pr.sent(),Pr.label=21;case 21:return gn++,[3,19];case 22:rr=0,Ni=St.zeroOrAutoZIndexOrTransformedOrOpacity,Pr.label=23;case 23:return rr<Ni.length?(Br=Ni[rr],[4,this.renderStack(Br)]):[3,26];case 24:Pr.sent(),Pr.label=25;case 25:return rr++,[3,23];case 26:zi=0,po=St.positiveZIndex,Pr.label=27;case 27:return zi<po.length?(Br=po[zi],[4,this.renderStack(Br)]):[3,30];case 28:Pr.sent(),Pr.label=29;case 29:return zi++,[3,27];case 30:return[2]}})})},mt.prototype.mask=function(St){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(St.slice(0).reverse()),this.ctx.closePath()},mt.prototype.path=function(St){this.ctx.beginPath(),this.formatPath(St),this.ctx.closePath()},mt.prototype.formatPath=function(St){var wt=this;St.forEach(function(Qt,Xt){var ae=es(Qt)?Qt.start:Qt;Xt===0?wt.ctx.moveTo(ae.x,ae.y):wt.ctx.lineTo(ae.x,ae.y),es(Qt)&&wt.ctx.bezierCurveTo(Qt.startControl.x,Qt.startControl.y,Qt.endControl.x,Qt.endControl.y,Qt.end.x,Qt.end.y)})},mt.prototype.renderRepeat=function(St,wt,Qt,Xt){this.path(St),this.ctx.fillStyle=wt,this.ctx.translate(Qt,Xt),this.ctx.fill(),this.ctx.translate(-Qt,-Xt)},mt.prototype.resizeImage=function(St,wt,Qt){var Xt;if(St.width===wt&&St.height===Qt)return St;var ae=(Xt=this.canvas.ownerDocument)!==null&&Xt!==void 0?Xt:document,Ee=ae.createElement("canvas");Ee.width=Math.max(1,wt),Ee.height=Math.max(1,Qt);var fe=Ee.getContext("2d");return fe.drawImage(St,0,0,St.width,St.height,0,0,wt,Qt),Ee},mt.prototype.renderBackgroundImage=function(St){return xe(this,void 0,void 0,function(){var wt,Qt,Xt,ae,Ee,fe;return Me(this,function(Xe){switch(Xe.label){case 0:wt=St.styles.backgroundImage.length-1,Qt=function($e){var gn,$n,rr,ra,gl,Hl,ds,va,Vo,Ni,ra,gl,Hl,ds,va,zi,po,Br,Pr,Er,Lo,io,cr,Uo,Vo,ro,ra,dl,Ml,ds,va,iu,gl,Hl,ru,Ve,Uu,ac,Du,Ou,yh,za;return Me(this,function(fA){switch(fA.label){case 0:if($e.type!==0)return[3,5];gn=void 0,$n=$e.url,fA.label=1;case 1:return fA.trys.push([1,3,,4]),[4,Xt.context.cache.match($n)];case 2:return gn=fA.sent(),[3,4];case 3:return fA.sent(),Xt.context.logger.error("Error loading background-image "+$n),[3,4];case 4:return gn&&(rr=ic(St,wt,[gn.width,gn.height,gn.width/gn.height]),ra=rr[0],gl=rr[1],Hl=rr[2],ds=rr[3],va=rr[4],Vo=Xt.ctx.createPattern(Xt.resizeImage(gn,ds,va),"repeat"),Xt.renderRepeat(ra,Vo,gl,Hl)),[3,6];case 5:fu($e)?(Ni=ic(St,wt,[null,null,null]),ra=Ni[0],gl=Ni[1],Hl=Ni[2],ds=Ni[3],va=Ni[4],zi=CA($e.angle,ds,va),po=zi[0],Br=zi[1],Pr=zi[2],Er=zi[3],Lo=zi[4],io=document.createElement("canvas"),io.width=ds,io.height=va,cr=io.getContext("2d"),Uo=cr.createLinearGradient(Br,Er,Pr,Lo),qe($e.stops,po).forEach(function(Vf){return Uo.addColorStop(Vf.stop,Io(Vf.color))}),cr.fillStyle=Uo,cr.fillRect(0,0,ds,va),ds>0&&va>0&&(Vo=Xt.ctx.createPattern(io,"repeat"),Xt.renderRepeat(ra,Vo,gl,Hl))):yo($e)&&(ro=ic(St,wt,[null,null,null]),ra=ro[0],dl=ro[1],Ml=ro[2],ds=ro[3],va=ro[4],iu=$e.position.length===0?[Zu]:$e.position,gl=No(iu[0],ds),Hl=No(iu[iu.length-1],va),ru=_l($e,gl,Hl,ds,va),Ve=ru[0],Uu=ru[1],Ve>0&&Uu>0&&(ac=Xt.ctx.createRadialGradient(dl+gl,Ml+Hl,0,dl+gl,Ml+Hl,Ve),qe($e.stops,Ve*2).forEach(function(Vf){return ac.addColorStop(Vf.stop,Io(Vf.color))}),Xt.path(ra),Xt.ctx.fillStyle=ac,Ve!==Uu?(Du=St.bounds.left+.5*St.bounds.width,Ou=St.bounds.top+.5*St.bounds.height,yh=Uu/Ve,za=1/yh,Xt.ctx.save(),Xt.ctx.translate(Du,Ou),Xt.ctx.transform(1,0,0,yh,0,0),Xt.ctx.translate(-Du,-Ou),Xt.ctx.fillRect(dl,za*(Ml-Ou)+Ou,ds,va*za),Xt.ctx.restore()):Xt.ctx.fill())),fA.label=6;case 6:return wt--,[2]}})},Xt=this,ae=0,Ee=St.styles.backgroundImage.slice(0).reverse(),Xe.label=1;case 1:return ae<Ee.length?(fe=Ee[ae],[5,Qt(fe)]):[3,4];case 2:Xe.sent(),Xe.label=3;case 3:return ae++,[3,1];case 4:return[2]}})})},mt.prototype.renderSolidBorder=function(St,wt,Qt){return xe(this,void 0,void 0,function(){return Me(this,function(Xt){return this.path(ec(Qt,wt)),this.ctx.fillStyle=Io(St),this.ctx.fill(),[2]})})},mt.prototype.renderDoubleBorder=function(St,wt,Qt,Xt){return xe(this,void 0,void 0,function(){var ae,Ee;return Me(this,function(fe){switch(fe.label){case 0:return wt<3?[4,this.renderSolidBorder(St,Qt,Xt)]:[3,2];case 1:return fe.sent(),[2];case 2:return ae=vh(Xt,Qt),this.path(ae),this.ctx.fillStyle=Io(St),this.ctx.fill(),Ee=Td(Xt,Qt),this.path(Ee),this.ctx.fill(),[2]}})})},mt.prototype.renderNodeBackgroundAndBorders=function(St){return xe(this,void 0,void 0,function(){var wt,Qt,Xt,ae,Ee,fe,Xe,$e,gn=this;return Me(this,function($n){switch($n.label){case 0:return this.applyEffects(St.getEffects(2)),wt=St.container.styles,Qt=!vs(wt.backgroundColor)||wt.backgroundImage.length,Xt=[{style:wt.borderTopStyle,color:wt.borderTopColor,width:wt.borderTopWidth},{style:wt.borderRightStyle,color:wt.borderRightColor,width:wt.borderRightWidth},{style:wt.borderBottomStyle,color:wt.borderBottomColor,width:wt.borderBottomWidth},{style:wt.borderLeftStyle,color:wt.borderLeftColor,width:wt.borderLeftWidth}],ae=Dd(oc(wt.backgroundClip,0),St.curves),Qt||wt.boxShadow.length?(this.ctx.save(),this.path(ae),this.ctx.clip(),vs(wt.backgroundColor)||(this.ctx.fillStyle=Io(wt.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(St.container)]):[3,2];case 1:$n.sent(),this.ctx.restore(),wt.boxShadow.slice(0).reverse().forEach(function(rr){gn.ctx.save();var Ni=$a(St.curves),zi=rr.inset?0:El,po=Jp(Ni,-zi+(rr.inset?1:-1)*rr.spread.number,(rr.inset?1:-1)*rr.spread.number,rr.spread.number*(rr.inset?-2:2),rr.spread.number*(rr.inset?-2:2));rr.inset?(gn.path(Ni),gn.ctx.clip(),gn.mask(po)):(gn.mask(Ni),gn.ctx.clip(),gn.path(po)),gn.ctx.shadowOffsetX=rr.offsetX.number+zi,gn.ctx.shadowOffsetY=rr.offsetY.number,gn.ctx.shadowColor=Io(rr.color),gn.ctx.shadowBlur=rr.blur.number,gn.ctx.fillStyle=rr.inset?Io(rr.color):"rgba(0,0,0,1)",gn.ctx.fill(),gn.ctx.restore()}),$n.label=2;case 2:Ee=0,fe=0,Xe=Xt,$n.label=3;case 3:return fe<Xe.length?($e=Xe[fe],$e.style!==0&&!vs($e.color)&&$e.width>0?$e.style!==2?[3,5]:[4,this.renderDashedDottedBorder($e.color,$e.width,Ee,St.curves,2)]:[3,11]):[3,13];case 4:return $n.sent(),[3,11];case 5:return $e.style!==3?[3,7]:[4,this.renderDashedDottedBorder($e.color,$e.width,Ee,St.curves,3)];case 6:return $n.sent(),[3,11];case 7:return $e.style!==4?[3,9]:[4,this.renderDoubleBorder($e.color,$e.width,Ee,St.curves)];case 8:return $n.sent(),[3,11];case 9:return[4,this.renderSolidBorder($e.color,Ee,St.curves)];case 10:$n.sent(),$n.label=11;case 11:Ee++,$n.label=12;case 12:return fe++,[3,3];case 13:return[2]}})})},mt.prototype.renderDashedDottedBorder=function(St,wt,Qt,Xt,ae){return xe(this,void 0,void 0,function(){var Ee,fe,Xe,$e,gn,$n,rr,Ni,zi,po,Br,Pr,Er,Lo,io,cr,io,cr;return Me(this,function(Uo){return this.ctx.save(),Ee=nc(Xt,Qt),fe=ec(Xt,Qt),ae===2&&(this.path(fe),this.ctx.clip()),es(fe[0])?(Xe=fe[0].start.x,$e=fe[0].start.y):(Xe=fe[0].x,$e=fe[0].y),es(fe[1])?(gn=fe[1].end.x,$n=fe[1].end.y):(gn=fe[1].x,$n=fe[1].y),Qt===0||Qt===2?rr=Math.abs(Xe-gn):rr=Math.abs($e-$n),this.ctx.beginPath(),ae===3?this.formatPath(Ee):this.formatPath(fe.slice(0,2)),Ni=wt<3?wt*3:wt*2,zi=wt<3?wt*2:wt,ae===3&&(Ni=wt,zi=wt),po=!0,rr<=Ni*2?po=!1:rr<=Ni*2+zi?(Br=rr/(2*Ni+zi),Ni*=Br,zi*=Br):(Pr=Math.floor((rr+zi)/(Ni+zi)),Er=(rr-Pr*Ni)/(Pr-1),Lo=(rr-(Pr+1)*Ni)/Pr,zi=Lo<=0||Math.abs(zi-Er)<Math.abs(zi-Lo)?Er:Lo),po&&(ae===3?this.ctx.setLineDash([0,Ni+zi]):this.ctx.setLineDash([Ni,zi])),ae===3?(this.ctx.lineCap="round",this.ctx.lineWidth=wt):this.ctx.lineWidth=wt*2+1.1,this.ctx.strokeStyle=Io(St),this.ctx.stroke(),this.ctx.setLineDash([]),ae===2&&(es(fe[0])&&(io=fe[3],cr=fe[0],this.ctx.beginPath(),this.formatPath([new Di(io.end.x,io.end.y),new Di(cr.start.x,cr.start.y)]),this.ctx.stroke()),es(fe[1])&&(io=fe[1],cr=fe[2],this.ctx.beginPath(),this.formatPath([new Di(io.end.x,io.end.y),new Di(cr.start.x,cr.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},mt.prototype.render=function(St){return xe(this,void 0,void 0,function(){var wt;return Me(this,function(Qt){switch(Qt.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Io(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),wt=zf(St),[4,this.renderStack(wt)];case 1:return Qt.sent(),this.applyEffects([]),[2,this.canvas]}})})},mt}(Ud),km=function(vt){return vt instanceof _c||vt instanceof Qf?!0:vt instanceof Ol&&vt.type!==JA&&vt.type!==Wh},Dd=function(vt,mt){switch(vt){case 0:return $a(mt);case 2:return Ms(mt);case 1:default:return Nu(mt)}},Lr=function(vt){switch(vt){case 1:return"center";case 2:return"right";case 0:default:return"left"}},e0=["-apple-system","system-ui"],n0=function(vt){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?vt.filter(function(mt){return e0.indexOf(mt)===-1}):vt},ep=function(vt){ne(mt,vt);function mt(St,wt){var Qt=vt.call(this,St,wt)||this;return Qt.canvas=wt.canvas?wt.canvas:document.createElement("canvas"),Qt.ctx=Qt.canvas.getContext("2d"),Qt.options=wt,Qt.canvas.width=Math.floor(wt.width*wt.scale),Qt.canvas.height=Math.floor(wt.height*wt.scale),Qt.canvas.style.width=wt.width+"px",Qt.canvas.style.height=wt.height+"px",Qt.ctx.scale(Qt.options.scale,Qt.options.scale),Qt.ctx.translate(-wt.x,-wt.y),Qt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+wt.width+"x"+wt.height+" at "+wt.x+","+wt.y+") with scale "+wt.scale),Qt}return mt.prototype.render=function(St){return xe(this,void 0,void 0,function(){var wt,Qt;return Me(this,function(Xt){switch(Xt.label){case 0:return wt=Gc(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,St),[4,jf(wt)];case 1:return Qt=Xt.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Io(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Qt,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},mt}(Ud),jf=function(vt){return new Promise(function(mt,St){var wt=new Image;wt.onload=function(){mt(wt)},wt.onerror=St,wt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(vt))})},Kf=function(){function vt(mt){var St=mt.id,wt=mt.enabled;this.id=St,this.enabled=wt,this.start=Date.now()}return vt.prototype.debug=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,je([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.prototype.getTime=function(){return Date.now()-this.start},vt.prototype.info=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,je([this.id,this.getTime()+"ms"],mt))},vt.prototype.warn=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,je([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.prototype.error=function(){for(var mt=[],St=0;St<arguments.length;St++)mt[St]=arguments[St];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,je([this.id,this.getTime()+"ms"],mt)):this.info.apply(this,mt))},vt.instances={},vt}(),nu=function(){function vt(mt,St){var wt;this.windowBounds=St,this.instanceName="#"+vt.instanceCount++,this.logger=new Kf({id:this.instanceName,enabled:mt.logging}),this.cache=(wt=mt.cache)!==null&&wt!==void 0?wt:new eo(this,mt)}return vt.instanceCount=1,vt}(),np=function(vt,mt){return mt===void 0&&(mt={}),ip(vt,mt)};typeof window!="undefined"&&Hi.setContext(window);var ip=function(vt,mt){return xe(void 0,void 0,void 0,function(){var St,wt,Qt,Xt,ae,Ee,fe,Xe,$e,gn,$n,rr,Ni,zi,po,Br,Pr,Er,Lo,io,Uo,cr,Uo,Vo,ro,ra,dl,Ml,ds,va,iu,gl,Hl,ru,Ve,Uu,ac,Du,Ou,yh;return Me(this,function(za){switch(za.label){case 0:if(!vt||typeof vt!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(St=vt.ownerDocument,!St)throw new Error("Element is not attached to a Document");if(wt=St.defaultView,!wt)throw new Error("Document is not attached to a Window");return Qt={allowTaint:(Vo=mt.allowTaint)!==null&&Vo!==void 0?Vo:!1,imageTimeout:(ro=mt.imageTimeout)!==null&&ro!==void 0?ro:15e3,proxy:mt.proxy,useCORS:(ra=mt.useCORS)!==null&&ra!==void 0?ra:!1},Xt=bt({logging:(dl=mt.logging)!==null&&dl!==void 0?dl:!0,cache:mt.cache},Qt),ae={windowWidth:(Ml=mt.windowWidth)!==null&&Ml!==void 0?Ml:wt.innerWidth,windowHeight:(ds=mt.windowHeight)!==null&&ds!==void 0?ds:wt.innerHeight,scrollX:(va=mt.scrollX)!==null&&va!==void 0?va:wt.pageXOffset,scrollY:(iu=mt.scrollY)!==null&&iu!==void 0?iu:wt.pageYOffset},Ee=new ke(ae.scrollX,ae.scrollY,ae.windowWidth,ae.windowHeight),fe=new nu(Xt,Ee),Xe=(gl=mt.foreignObjectRendering)!==null&&gl!==void 0?gl:!1,$e={allowTaint:(Hl=mt.allowTaint)!==null&&Hl!==void 0?Hl:!1,onclone:mt.onclone,ignoreElements:mt.ignoreElements,inlineImages:Xe,copyStyles:Xe},fe.logger.debug("Starting document clone with size "+Ee.width+"x"+Ee.height+" scrolled to "+-Ee.left+","+-Ee.top),gn=new dt(fe,vt,$e),$n=gn.clonedReferenceElement,$n?[4,gn.toIFrame(St,Ee)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return rr=za.sent(),Ni=Po($n)||Of($n)?pe($n.ownerDocument):ye(fe,$n),zi=Ni.width,po=Ni.height,Br=Ni.left,Pr=Ni.top,Er=rp(fe,$n,mt.backgroundColor),Lo={canvas:mt.canvas,backgroundColor:Er,scale:(Ve=(ru=mt.scale)!==null&&ru!==void 0?ru:wt.devicePixelRatio)!==null&&Ve!==void 0?Ve:1,x:((Uu=mt.x)!==null&&Uu!==void 0?Uu:0)+Br,y:((ac=mt.y)!==null&&ac!==void 0?ac:0)+Pr,width:(Du=mt.width)!==null&&Du!==void 0?Du:Math.ceil(zi),height:(Ou=mt.height)!==null&&Ou!==void 0?Ou:Math.ceil(po)},Xe?(fe.logger.debug("Document cloned, using foreign object rendering"),Uo=new ep(fe,Lo),[4,Uo.render($n)]):[3,3];case 2:return io=za.sent(),[3,5];case 3:return fe.logger.debug("Document cloned, element located at "+Br+","+Pr+" with size "+zi+"x"+po+" using computed rendering"),fe.logger.debug("Starting DOM parsing"),cr=Ld(fe,$n),Er===cr.styles.backgroundColor&&(cr.styles.backgroundColor=ys.TRANSPARENT),fe.logger.debug("Starting renderer for element at "+Lo.x+","+Lo.y+" with size "+Lo.width+"x"+Lo.height),Uo=new sc(fe,Lo),[4,Uo.render(cr)];case 4:io=za.sent(),za.label=5;case 5:return(!((yh=mt.removeContainer)!==null&&yh!==void 0)||yh)&&(dt.destroy(rr)||fe.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),fe.logger.debug("Finished rendering"),[2,io]}})})},rp=function(vt,mt,St){var wt=mt.ownerDocument,Qt=wt.documentElement?Xr(vt,getComputedStyle(wt.documentElement).backgroundColor):ys.TRANSPARENT,Xt=wt.body?Xr(vt,getComputedStyle(wt.body).backgroundColor):ys.TRANSPARENT,ae=typeof St=="string"?Xr(vt,St):St===null?ys.TRANSPARENT:4294967295;return mt===wt.documentElement?vs(Qt)?vs(Xt)?ae:Xt:Qt:ae};return np})},2859:function(Pn,gi,ne){"use strict";ne.d(gi,{hP:function(){return Cn}});var bt=function(Ut,Lt){return(bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Bt,Tt){Bt.__proto__=Tt}||function(Bt,Tt){for(var jt in Tt)Object.prototype.hasOwnProperty.call(Tt,jt)&&(Bt[jt]=Tt[jt])})(Ut,Lt)};function xe(Ut,Lt){function Bt(){this.constructor=Ut}bt(Ut,Lt),Ut.prototype=Lt===null?Object.create(Lt):(Bt.prototype=Lt.prototype,new Bt)}function Me(Ut,Lt,Bt,Tt){return new(Bt||(Bt=Promise))(function(jt,kt){function Ce(Qn){try{Gn(Tt.next(Qn))}catch(_n){kt(_n)}}function on(Qn){try{Gn(Tt.throw(Qn))}catch(_n){kt(_n)}}function Gn(Qn){var _n;Qn.done?jt(Qn.value):(_n=Qn.value,_n instanceof Bt?_n:new Bt(function(_e){_e(_n)})).then(Ce,on)}Gn((Tt=Tt.apply(Ut,Lt||[])).next())})}function je(Ut,Lt){var Bt,Tt,jt,kt,Ce={label:0,sent:function(){if(1&jt[0])throw jt[1];return jt[1]},trys:[],ops:[]};return kt={next:on(0),throw:on(1),return:on(2)},typeof Symbol=="function"&&(kt[Symbol.iterator]=function(){return this}),kt;function on(Gn){return function(Qn){return function(_n){if(Bt)throw new TypeError("Generator is already executing.");for(;Ce;)try{if(Bt=1,Tt&&(jt=2&_n[0]?Tt.return:_n[0]?Tt.throw||((jt=Tt.return)&&jt.call(Tt),0):Tt.next)&&!(jt=jt.call(Tt,_n[1])).done)return jt;switch(Tt=0,jt&&(_n=[2&_n[0],jt.value]),_n[0]){case 0:case 1:jt=_n;break;case 4:return Ce.label++,{value:_n[1],done:!1};case 5:Ce.label++,Tt=_n[1],_n=[0];continue;case 7:_n=Ce.ops.pop(),Ce.trys.pop();continue;default:if(jt=Ce.trys,!((jt=jt.length>0&&jt[jt.length-1])||_n[0]!==6&&_n[0]!==2)){Ce=0;continue}if(_n[0]===3&&(!jt||_n[1]>jt[0]&&_n[1]<jt[3])){Ce.label=_n[1];break}if(_n[0]===6&&Ce.label<jt[1]){Ce.label=jt[1],jt=_n;break}if(jt&&Ce.label<jt[2]){Ce.label=jt[2],Ce.ops.push(_n);break}jt[2]&&Ce.ops.pop(),Ce.trys.pop();continue}_n=Lt.call(Ut,Ce)}catch(_e){_n=[6,_e],Tt=0}finally{Bt=jt=0}if(5&_n[0])throw _n[1];return{value:_n[0]?_n[1]:void 0,done:!0}}([Gn,Qn])}}}function ke(){for(var Ut=0,Lt=0,Bt=arguments.length;Lt<Bt;Lt++)Ut+=arguments[Lt].length;var Tt=Array(Ut),jt=0;for(Lt=0;Lt<Bt;Lt++)for(var kt=arguments[Lt],Ce=0,on=kt.length;Ce<on;Ce++,jt++)Tt[jt]=kt[Ce];return Tt}var ye=function(){function Ut(){}return Ut.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ut.setAttributes=function(Lt,Bt){for(var Tt=0,jt=Bt;Tt<jt.length;Tt++){var kt=jt[Tt],Ce=kt[0],on=kt[1];Lt.setAttribute(Ce,on)}},Ut.createRect=function(Lt,Bt,Tt){var jt=document.createElementNS("http://www.w3.org/2000/svg","rect");return jt.setAttribute("width",Lt.toString()),jt.setAttribute("height",Bt.toString()),Tt&&Ut.setAttributes(jt,Tt),jt},Ut.createLine=function(Lt,Bt,Tt,jt,kt){var Ce=document.createElementNS("http://www.w3.org/2000/svg","line");return Ce.setAttribute("x1",Lt.toString()),Ce.setAttribute("y1",Bt.toString()),Ce.setAttribute("x2",Tt.toString()),Ce.setAttribute("y2",jt.toString()),kt&&Ut.setAttributes(Ce,kt),Ce},Ut.createPolygon=function(Lt,Bt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Tt.setAttribute("points",Lt),Bt&&Ut.setAttributes(Tt,Bt),Tt},Ut.createCircle=function(Lt,Bt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","circle");return Tt.setAttribute("cx",(Lt/2).toString()),Tt.setAttribute("cy",(Lt/2).toString()),Tt.setAttribute("r",Lt.toString()),Bt&&Ut.setAttributes(Tt,Bt),Tt},Ut.createEllipse=function(Lt,Bt,Tt){var jt=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return jt.setAttribute("cx",(Lt/2).toString()),jt.setAttribute("cy",(Bt/2).toString()),jt.setAttribute("rx",(Lt/2).toString()),jt.setAttribute("ry",(Bt/2).toString()),Tt&&Ut.setAttributes(jt,Tt),jt},Ut.createGroup=function(Lt){var Bt=document.createElementNS("http://www.w3.org/2000/svg","g");return Lt&&Ut.setAttributes(Bt,Lt),Bt},Ut.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ut.createMarker=function(Lt,Bt,Tt,jt,kt,Ce,on){var Gn=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ut.setAttributes(Gn,[["id",Lt],["orient",Bt],["markerWidth",Tt.toString()],["markerHeight",jt.toString()],["refX",kt.toString()],["refY",Ce.toString()]]),Gn.appendChild(on),Gn},Ut.createText=function(Lt){var Bt=document.createElementNS("http://www.w3.org/2000/svg","text");return Bt.setAttribute("x","0"),Bt.setAttribute("y","0"),Lt&&Ut.setAttributes(Bt,Lt),Bt},Ut.createTSpan=function(Lt,Bt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Tt.textContent=Lt,Bt&&Ut.setAttributes(Tt,Bt),Tt},Ut.createImage=function(Lt){var Bt=document.createElementNS("http://www.w3.org/2000/svg","image");return Lt&&Ut.setAttributes(Bt,Lt),Bt},Ut.createPoint=function(Lt,Bt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Tt.x=Lt,Tt.y=Bt,Tt},Ut.createPath=function(Lt,Bt){var Tt=document.createElementNS("http://www.w3.org/2000/svg","path");return Tt.setAttribute("d",Lt),Bt&&Ut.setAttributes(Tt,Bt),Tt},Ut}(),pe=function(){function Ut(){}return Ut.addKey=function(Lt){Ut.key=Lt},Object.defineProperty(Ut,"isLicensed",{get:function(){return!!Ut.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ut.key)},enumerable:!1,configurable:!0}),Ut}(),Ue=function(){function Ut(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ut.prototype.rasterize=function(Lt,Bt,Tt){var jt=this;return new Promise(function(kt){var Ce=Tt!==void 0?Tt:document.createElement("canvas");Lt===null&&(jt.markersOnly=!0,jt.naturalSize=!1);var on=document.createElementNS("http://www.w3.org/2000/svg","svg");on.setAttribute("xmlns","http://www.w3.org/2000/svg"),on.setAttribute("width",Bt.width.baseVal.valueAsString),on.setAttribute("height",Bt.height.baseVal.valueAsString),on.setAttribute("viewBox","0 0 "+Bt.viewBox.baseVal.width.toString()+" "+Bt.viewBox.baseVal.height.toString()),on.innerHTML=Bt.innerHTML,jt.naturalSize===!0?(on.width.baseVal.value=Lt.naturalWidth,on.height.baseVal.value=Lt.naturalHeight):jt.width!==void 0&&jt.height!==void 0&&(on.width.baseVal.value=jt.width,on.height.baseVal.value=jt.height),Ce.width=on.width.baseVal.value,Ce.height=on.height.baseVal.value;var Gn=on.outerHTML,Qn=Ce.getContext("2d");jt.markersOnly!==!0&&Qn.drawImage(Lt,0,0,Ce.width,Ce.height);var _n=window.URL,_e=new Image(Ce.width,Ce.height);_e.setAttribute("crossOrigin","anonymous");var Zn=new Blob([Gn],{type:"image/svg+xml"}),Dn=_n.createObjectURL(Zn);_e.onload=function(){Qn.drawImage(_e,0,0),_n.revokeObjectURL(Dn);var ai=Ce.toDataURL(jt.imageType,jt.imageQuality);kt(ai)},_e.src=Dn})},Ut}(),Pe=function(){},ie=function(){function Ut(Lt){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Lt+"_"}return Object.defineProperty(Ut.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ut.prototype.addClass=function(Lt){return this.styleSheet===void 0&&this.addStyleSheet(),Lt.name=""+this.classNamePrefix+Lt.localName,this.classes.push(Lt),this.styleSheet.sheet.insertRule("."+Lt.name+" {"+Lt.style+"}",this.styleSheet.sheet.cssRules.length),Lt},Ut.prototype.addRule=function(Lt){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Lt),this.styleSheet.sheet.insertRule(Lt.selector+" {"+Lt.style+"}",this.styleSheet.sheet.cssRules.length)},Ut.prototype.addStyleSheet=function(){var Lt;this.styleSheet=document.createElement("style"),((Lt=this.styleSheetRoot)!==null&&Lt!==void 0?Lt:document.head).appendChild(this.styleSheet),this.addRule(new An("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new An("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new An("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new we("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new we("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},Ut.prototype.removeStyleSheet=function(){var Lt;this.styleSheet&&(((Lt=this.styleSheetRoot)!==null&&Lt!==void 0?Lt:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ut}(),An=function(Ut,Lt){this.selector=Ut,this.style=Lt},we=function(Ut,Lt){this.localName=Ut,this.style=Lt},xn=function(){function Ut(Lt,Bt,Tt,jt,kt){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Lt,this.displayMode=Bt,this.markerItems=Tt,this.uiStyleSettings=jt,this.styles=kt,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ut.prototype.show=function(Lt){var Bt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Tt=document.createElement("div");Tt.className=this.toolbarBlockStyleClass.name,Tt.style.whiteSpace="nowrap",this.uiContainer.appendChild(Tt),this.addActionButton(Tt,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Tt,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Tt,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Tt,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Tt,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Tt,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Tt,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Tt,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"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 Ce=document.createElement("div");Ce.className=""+Bt.toolbarButtonStyleClass.name,Ce.setAttribute("data-type-name",kt.typeName),Ce.innerHTML=kt.icon,Ce.addEventListener("click",function(){Bt.markerToolbarButtonClicked(Ce,kt)}),Bt.buttons.push(Ce),Bt.markerButtons.push(Ce)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var jt=document.createElement("div");jt.className=this.toolbarBlockStyleClass.name,jt.style.whiteSpace="nowrap",jt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(jt),this.addActionButton(jt,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(jt,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ut.prototype.addButtonClickListener=function(Lt){this.buttonClickListeners.push(Lt)},Ut.prototype.removeButtonClickListener=function(Lt){this.buttonClickListeners.indexOf(Lt)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Lt),1)},Ut.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ut.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 Bt=0;Bt<this.markerButtons.length;Bt++)Bt<Lt||Bt===Lt&&this.markerButtons.length-1===Lt?this.markerButtonBlock.appendChild(this.markerButtons[Bt]):(Bt===Lt&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Bt]))}},Ut.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Ut.prototype.resetButtonStyles=function(){var Lt=this;this.buttons.forEach(function(Bt){Bt.className=Bt.className.replace(Lt.uiStyleSettings.toolbarButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarButtonStyleColorsClassName:Lt.toolbarButtonStyleColorsClass.name,"").trim(),Bt.className=Bt.className.replace(Lt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Lt.toolbarActiveButtonStyleColorsClass.name,"").trim(),Bt.className+=" "+(Lt.uiStyleSettings.toolbarButtonStyleColorsClassName?Lt.uiStyleSettings.toolbarButtonStyleColorsClassName:Lt.toolbarButtonStyleColorsClass.name)})},Ut.prototype.addActionButton=function(Lt,Bt,Tt){var jt=this,kt=document.createElement("div");switch(kt.className=""+this.toolbarButtonStyleClass.name,kt.innerHTML=Bt,kt.setAttribute("data-action",Tt),kt.addEventListener("click",function(){jt.actionToolbarButtonClicked(kt,Tt)}),Tt){case"select":kt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":kt.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":kt.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":kt.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":kt.style.fill=this.uiStyleSettings.closeButtonColor}Lt.appendChild(kt),this.buttons.push(kt)},Ut.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new we("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new we("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new we("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new we("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new we("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var Lt=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new we("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Lt)+`px;
|
|
padding: `+Lt+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new we("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new we("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new An("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new An("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},Ut.prototype.markerToolbarButtonClicked=function(Lt,Bt){this.setActiveButton(Lt),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Tt){return Tt("marker",Bt)}),this.markerButtonOverflowBlock.style.display="none"},Ut.prototype.actionToolbarButtonClicked=function(Lt,Bt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Tt){return Tt("action",Bt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ut.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)},Ut.prototype.setActiveMarkerButton=function(Lt){var Bt=this.markerButtons.find(function(Tt){return Tt.getAttribute("data-type-name")===Lt});Bt&&this.setActiveButton(Bt)},Ut.prototype.setCurrentMarker=function(Lt){var Bt=this;this.currentMarker=Lt,this.buttons.filter(function(Tt){return/delete|notes/.test(Tt.getAttribute("data-action"))}).forEach(function(Tt){Bt.currentMarker===void 0?(Tt.style.fillOpacity="0.4",Tt.style.pointerEvents="none"):(Tt.style.fillOpacity="1",Tt.style.pointerEvents="all")})},Ut}(),Dt=function(){function Ut(Lt,Bt,Tt,jt){this.panels=[],this.panelButtons=[],this.markerjsContainer=Lt,this.displayMode=Bt,this.uiStyleSettings=Tt,this.styles=jt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ut.prototype.addStyles=function(){var Lt;this.toolboxStyleClass=this.styles.addClass(new we("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 we("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var Bt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new we("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new we("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new we("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 we("toolbox-panel-row_colors",`
|
|
background-color: `+((Lt=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Lt!==void 0?Lt:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new we("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Bt)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Bt)+`px;
|
|
padding: `+Bt+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new we("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new we("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new An("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new An("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},Ut.prototype.show=function(Lt){var Bt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Lt,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Bt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Bt!==void 0?Bt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ut.prototype.setPanelButtons=function(Lt){var Bt,Tt,jt=this;this.panels=Lt,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Bt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Bt!==void 0?Bt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Tt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Tt!==void 0?Tt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(kt){var Ce;kt.uiStyleSettings=jt.uiStyleSettings;var on=document.createElement("div");on.className=jt.toolboxButtonStyleClass.name+" "+((Ce=jt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ce!==void 0?Ce:jt.toolboxButtonStyleColorsClass.name),on.innerHTML=kt.icon,on.title=kt.title,on.addEventListener("click",function(){jt.panelButtonClick(kt)}),jt.panelButtons.push(on),jt.buttonRow.appendChild(on)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ut.prototype.panelButtonClick=function(Lt){var Bt=this,Tt=-1;if(Lt!==this.activePanel){Tt=this.panels.indexOf(Lt),this.panelRow.innerHTML="";var jt=Lt.getUi();jt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(jt),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(){Bt.displayMode==="inline"?Bt.panelRow.style.display="none":Bt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(kt,Ce){var on,Gn;kt.className=Bt.toolboxButtonStyleClass.name+" "+(Ce===Tt?""+((on=Bt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&on!==void 0?on:Bt.toolboxActiveButtonStyleColorsClass.name):""+((Gn=Bt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Gn!==void 0?Gn:Bt.toolboxButtonStyleColorsClass.name))})},Ut}(),et=function(Ut,Lt){this.title=Ut,this.icon=Lt},nt=function(Ut){function Lt(Bt,Tt,jt,kt){var Ce=Ut.call(this,Bt,kt||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ce.colors=[],Ce.addTransparent=!1,Ce.colorBoxes=[],Ce.colors=Tt,Ce.currentColor=jt,Ce.setCurrentColor=Ce.setCurrentColor.bind(Ce),Ce.getColorBox=Ce.getColorBox.bind(Ce),Ce}return xe(Lt,Ut),Lt.prototype.getUi=function(){var Bt=this,Tt=document.createElement("div");return Tt.style.overflow="hidden",Tt.style.whiteSpace="nowrap",this.colors.forEach(function(jt){var kt=Bt.getColorBox(jt);Tt.appendChild(kt),Bt.colorBoxes.push(kt)}),Tt},Lt.prototype.getColorBox=function(Bt){var Tt=this,jt=this.uiStyleSettings.toolbarHeight/4,kt=this.uiStyleSettings.toolbarHeight-jt,Ce=document.createElement("div");Ce.style.display="inline-block",Ce.style.boxSizing="content-box",Ce.style.width=kt-2+"px",Ce.style.height=kt-2+"px",Ce.style.padding="1px",Ce.style.marginRight="2px",Ce.style.marginBottom="2px",Ce.style.borderWidth="2px",Ce.style.borderStyle="solid",Ce.style.borderRadius=(kt+2)/2+"px",Ce.style.borderColor=Bt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ce.addEventListener("click",function(){Tt.setCurrentColor(Bt,Ce)});var on=document.createElement("div");return on.style.display="inline-block",on.style.width=kt-2+"px",on.style.height=kt-2+"px",on.style.backgroundColor=Bt,on.style.borderRadius=kt/2+"px",Bt==="transparent"&&(on.style.fill=this.uiStyleSettings.toolboxAccentColor,on.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),Ce.appendChild(on),Ce},Lt.prototype.setCurrentColor=function(Bt,Tt){var jt=this;this.currentColor=Bt,this.colorBoxes.forEach(function(kt){kt.style.borderColor=kt===Tt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Bt)},Lt}(et),ct=function(){function Ut(Lt,Bt,Tt){this._state="new",this._isSelected=!1,this._container=Lt,this._overlayContainer=Bt,this.globalSettings=Tt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ut.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ut.prototype.ownsTarget=function(Lt){return!1},Object.defineProperty(Ut.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ut.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ut.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ut.prototype.pointerDown=function(Lt,Bt){},Ut.prototype.dblClick=function(Lt,Bt){},Ut.prototype.manipulate=function(Lt){},Ut.prototype.pointerUp=function(Lt){this.stateChanged()},Ut.prototype.dispose=function(){},Ut.prototype.addMarkerVisualToContainer=function(Lt){this.container.childNodes.length>0?this.container.insertBefore(Lt,this.container.childNodes[0]):this.container.appendChild(Lt)},Ut.prototype.getState=function(){return{typeName:Ut.typeName,state:this.state,notes:this.notes}},Ut.prototype.restoreState=function(Lt){this._state=Lt.state,this.notes=Lt.notes},Ut.prototype.scale=function(Lt,Bt){},Ut.prototype.colorChanged=function(Lt){this.onColorChanged&&this.onColorChanged(Lt),this.stateChanged()},Ut.prototype.fillColorChanged=function(Lt){this.onFillColorChanged&&this.onFillColorChanged(Lt),this.stateChanged()},Ut.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)}},Ut.typeName="MarkerBase",Ut}(),lt=function(){function Ut(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ut.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},Ut}(),gt=function(){function Ut(){this.GRIP_SIZE=10,this.visual=ye.createGroup(),this.visual.appendChild(ye.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ye.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ut.prototype.ownsTarget=function(Lt){return Lt===this.visual||Lt===this.visual.childNodes[0]||Lt===this.visual.childNodes[1]},Ut}(),yt=function(){function Ut(){}return Ut.toITransformMatrix=function(Lt){return{a:Lt.a,b:Lt.b,c:Lt.c,d:Lt.d,e:Lt.e,f:Lt.f}},Ut.toSVGMatrix=function(Lt,Bt){return Lt.a=Bt.a,Lt.b=Bt.b,Lt.c=Bt.c,Lt.d=Bt.d,Lt.e=Bt.e,Lt.f=Bt.f,Lt},Ut}(),Et=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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(ye.createTransform()),kt.setupControlBox(),kt}return xe(Lt,Ut),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(Bt){this._visual=Bt;var Tt=ye.createTransform();this._visual.transform.baseVal.appendItem(Tt)},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(Bt){return!!Ut.prototype.ownsTarget.call(this,Bt)||!!(this.controlGrips.findGripByVisual(Bt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Bt))},Lt.prototype.pointerDown=function(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.state==="new"&&(this.left=Bt.x,this.top=Bt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var jt=this.unrotatePoint(Bt);if(this.manipulationStartX=jt.x,this.manipulationStartY=jt.y,this.offsetX=jt.x-this.left,this.offsetY=jt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Tt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Tt)){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 Ce=this.container.transform.baseVal.getItem(0);Ce.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ce,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Lt.prototype.pointerUp=function(Bt){var Tt=this.state;Ut.prototype.pointerUp.call(this,Bt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Bt),this._state="select",Tt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Lt.prototype.moveVisual=function(Bt){this.visual.style.transform="translate("+Bt.x+"px, "+Bt.y+"px)"},Lt.prototype.manipulate=function(Bt){var Tt=this.unrotatePoint(Bt);this.state==="creating"?this.resize(Bt):this.state==="move"?(this.left=this.manipulationStartLeft+(Tt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Tt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Tt):this.state==="rotate"&&this.rotate(Bt)},Lt.prototype.resize=function(Bt){var Tt=this.manipulationStartLeft,jt=this.manipulationStartWidth,kt=this.manipulationStartTop,Ce=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Tt=this.manipulationStartLeft+Bt.x-this.manipulationStartX,jt=this.manipulationStartWidth+this.manipulationStartLeft-Tt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:jt=this.manipulationStartWidth+Bt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:kt=this.manipulationStartTop+Bt.y-this.manipulationStartY,Ce=this.manipulationStartHeight+this.manipulationStartTop-kt;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ce=this.manipulationStartHeight+Bt.y-this.manipulationStartY}jt>=0?(this.left=Tt,this.width=jt):(this.left=Tt+jt,this.width=-jt),Ce>=0?(this.top=kt,this.height=Ce):(this.top=kt+Ce,this.height=-Ce),this.setSize()},Lt.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Lt.prototype.rotate=function(Bt){if(Math.abs(Bt.x-this.centerX)>.1){var Tt=Math.sign(Bt.x-this.centerX);this.rotationAngle=180*Math.atan((Bt.y-this.centerY)/(Bt.x-this.centerX))/Math.PI+90*Tt,this.applyRotation()}},Lt.prototype.applyRotation=function(){var Bt=this.container.transform.baseVal.getItem(0);Bt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Bt,0)},Lt.prototype.rotatePoint=function(Bt){if(this.rotationAngle===0)return Bt;var Tt=this.container.getCTM(),jt=ye.createPoint(Bt.x,Bt.y);return{x:(jt=jt.matrixTransform(Tt)).x,y:jt.y}},Lt.prototype.unrotatePoint=function(Bt){if(this.rotationAngle===0)return Bt;var Tt=this.container.getCTM();Tt=Tt.inverse();var jt=ye.createPoint(Bt.x,Bt.y);return{x:(jt=jt.matrixTransform(Tt)).x,y:jt.y}},Lt.prototype.select=function(){Ut.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ut.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=ye.createGroup();var Bt=ye.createTransform();Bt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Bt),this.container.appendChild(this.controlBox),this.controlRect=ye.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=ye.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 Bt=this.controlBox.transform.baseVal.getItem(0);Bt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Bt,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 Bt=new gt;return Bt.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(Bt.visual),Bt},Lt.prototype.positionGrips=function(){var Bt=this.controlGrips.topLeft.GRIP_SIZE,Tt=-Bt/2,jt=Tt,kt=(this.width+this.CB_DISTANCE)/2-Bt/2,Ce=(this.height+this.CB_DISTANCE)/2-Bt/2,on=this.height+this.CB_DISTANCE-Bt/2,Gn=this.width+this.CB_DISTANCE-Bt/2;this.positionGrip(this.controlGrips.topLeft.visual,Tt,jt),this.positionGrip(this.controlGrips.topCenter.visual,kt,jt),this.positionGrip(this.controlGrips.topRight.visual,Gn,jt),this.positionGrip(this.controlGrips.centerLeft.visual,Tt,Ce),this.positionGrip(this.controlGrips.centerRight.visual,Gn,Ce),this.positionGrip(this.controlGrips.bottomLeft.visual,Tt,on),this.positionGrip(this.controlGrips.bottomCenter.visual,kt,on),this.positionGrip(this.controlGrips.bottomRight.visual,Gn,on),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,kt,jt-3*this.CB_DISTANCE)},Lt.prototype.positionGrip=function(Bt,Tt,jt){var kt=Bt.transform.baseVal.getItem(0);kt.setTranslate(Tt,jt),Bt.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:yt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:yt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ut.prototype.getState.call(this))},Lt.prototype.restoreState=function(Bt){Ut.prototype.restoreState.call(this,Bt);var Tt=Bt;this.left=Tt.left,this.top=Tt.top,this.width=Tt.width,this.height=Tt.height,this.rotationAngle=Tt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Tt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(yt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Tt.containerTransformMatrix))},Lt.prototype.scale=function(Bt,Tt){Ut.prototype.scale.call(this,Bt,Tt);var jt=this.rotatePoint({x:this.left,y:this.top}),kt=this.unrotatePoint({x:jt.x*Bt,y:jt.y*Tt});this.left=kt.x,this.top=kt.y,this.width=this.width*Bt,this.height=this.height*Tt,this.adjustControlBox()},Lt}(ct),Nt=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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 xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return!(!Ut.prototype.ownsTarget.call(this,Bt)&&Bt!==this.visual)},Lt.prototype.createVisual=function(){this.visual=ye.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(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.state==="new"&&(this.createVisual(),this.moveVisual(Bt),this._state="creating")},Lt.prototype.manipulate=function(Bt){Ut.prototype.manipulate.call(this,Bt)},Lt.prototype.resize=function(Bt){Ut.prototype.resize.call(this,Bt),this.setSize()},Lt.prototype.setSize=function(){Ut.prototype.setSize.call(this),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(Bt){Ut.prototype.pointerUp.call(this,Bt),this.setSize()},Lt.prototype.setStrokeColor=function(Bt){this.strokeColor=Bt,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Bt),this.stateChanged()},Lt.prototype.setFillColor=function(Bt){this.fillColor=Bt,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Lt.prototype.setStrokeWidth=function(Bt){this.strokeWidth=Bt,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(Bt){this.strokeDasharray=Bt,this.visual&&ye.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},Ut.prototype.getState.call(this))},Lt.prototype.restoreState=function(Bt){var Tt=Bt;this.fillColor=Tt.fillColor,this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.opacity=Tt.opacity,this.createVisual(),Ut.prototype.restoreState.call(this,Bt),this.setSize()},Lt.prototype.scale=function(Bt,Tt){Ut.prototype.scale.call(this,Bt,Tt),this.setSize()},Lt.title="Rectangle marker",Lt}(Et),Vt=function(Ut){function Lt(Bt,Tt,jt,kt){var Ce=Ut.call(this,Bt,kt||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ce.widths=[],Ce.widthBoxes=[],Ce.widths=Tt,Ce.currentWidth=jt,Ce.setCurrentWidth=Ce.setCurrentWidth.bind(Ce),Ce}return xe(Lt,Ut),Lt.prototype.getUi=function(){var Bt=this,Tt=document.createElement("div");return Tt.style.display="flex",Tt.style.overflow="hidden",Tt.style.flexGrow="2",this.widths.forEach(function(jt){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=jt===Bt.currentWidth?Bt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Bt.setCurrentWidth(jt,kt)}),Tt.appendChild(kt);var Ce=document.createElement("div");Ce.innerText=jt.toString(),Ce.style.marginRight="5px",kt.appendChild(Ce);var on=document.createElement("div");on.style.minHeight="20px",on.style.flexGrow="2",on.style.display="flex",on.style.alignItems="center";var Gn=document.createElement("hr");Gn.style.minWidth="20px",Gn.style.border="0px",Gn.style.borderTop=jt+"px solid "+Bt.uiStyleSettings.toolboxColor,Gn.style.flexGrow="2",on.appendChild(Gn),kt.appendChild(on),Bt.widthBoxes.push(kt)}),Tt},Lt.prototype.setCurrentWidth=function(Bt,Tt){var jt=this;this.currentWidth=Bt,this.widthBoxes.forEach(function(kt){kt.style.borderColor=kt===Tt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Lt}(et),Jt=function(Ut){function Lt(Bt,Tt,jt,kt){var Ce=Ut.call(this,Bt,kt||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ce.styles=[],Ce.styleBoxes=[],Ce.styles=Tt,Ce.currentStyle=jt,Ce.setCurrentStyle=Ce.setCurrentStyle.bind(Ce),Ce}return xe(Lt,Ut),Lt.prototype.getUi=function(){var Bt=this,Tt=document.createElement("div");return Tt.style.display="flex",Tt.style.overflow="hidden",Tt.style.flexGrow="2",this.styles.forEach(function(jt){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/Bt.styles.length-5+"%",kt.style.borderColor=jt===Bt.currentStyle?Bt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Bt.setCurrentStyle(jt,kt)}),Tt.appendChild(kt);var Ce=document.createElement("div");Ce.style.minHeight="20px",Ce.style.flexGrow="2",Ce.style.overflow="hidden";var on=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Bt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(jt!==""?'stroke-dasharray="'+jt+'"':"")+` />
|
|
</svg>`;Ce.innerHTML=on,kt.appendChild(Ce),Bt.styleBoxes.push(kt)}),Tt},Lt.prototype.setCurrentStyle=function(Bt,Tt){var jt=this;this.currentStyle=Bt,this.styleBoxes.forEach(function(kt){kt.style.borderColor=kt===Tt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Lt}(et),ce=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||this;return kt.strokeColor=jt.defaultColor,kt.strokeWidth=jt.defaultStrokeWidth,kt.strokeDasharray=jt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",jt.defaultColorSet,jt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Vt("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return xe(Lt,Ut),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Bt=Ut.prototype.getState.call(this);return Bt.typeName=Lt.typeName,Bt},Lt.typeName="FrameMarker",Lt.title="Frame marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Lt}(Nt),de=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"},Ae=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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 xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return!!Ut.prototype.ownsTarget.call(this,Bt)||!(!this.grip1.ownsTarget(Bt)&&!this.grip2.ownsTarget(Bt))},Lt.prototype.pointerDown=function(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.manipulationStartX=Bt.x,this.manipulationStartY=Bt.y,this.state==="new"&&(this.x1=Bt.x,this.y1=Bt.y,this.x2=Bt.x,this.y2=Bt.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(Tt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Tt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Lt.prototype.pointerUp=function(Bt){var Tt=this.state;Ut.prototype.pointerUp.call(this,Bt),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(Bt),this._state="select",Tt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Lt.prototype.adjustVisual=function(){},Lt.prototype.manipulate=function(Bt){this.state==="creating"?this.resize(Bt):this.state==="move"?(this.x1=this.manipulationStartX1+Bt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Bt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Bt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Bt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Bt)},Lt.prototype.resize=function(Bt){switch(this.activeGrip){case this.grip1:this.x1=Bt.x,this.y1=Bt.y;break;case this.grip2:case void 0:this.x2=Bt.x,this.y2=Bt.y}this.adjustVisual(),this.adjustControlBox()},Lt.prototype.select=function(){Ut.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Lt.prototype.deselect=function(){Ut.prototype.deselect.call(this),this.controlBox.style.display="none"},Lt.prototype.setupControlBox=function(){this.controlBox=ye.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 Bt=new gt;return Bt.visual.transform.baseVal.appendItem(ye.createTransform()),this.controlBox.appendChild(Bt.visual),Bt},Lt.prototype.positionGrips=function(){var Bt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Bt/2,this.y1-Bt/2),this.positionGrip(this.grip2.visual,this.x2-Bt/2,this.y2-Bt/2)},Lt.prototype.positionGrip=function(Bt,Tt,jt){var kt=Bt.transform.baseVal.getItem(0);kt.setTranslate(Tt,jt),Bt.transform.baseVal.replaceItem(kt,0)},Lt.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ut.prototype.getState.call(this))},Lt.prototype.restoreState=function(Bt){Ut.prototype.restoreState.call(this,Bt);var Tt=Bt;this.x1=Tt.x1,this.y1=Tt.y1,this.x2=Tt.x2,this.y2=Tt.y2},Lt.prototype.scale=function(Bt,Tt){Ut.prototype.scale.call(this,Bt,Tt),this.x1=this.x1*Bt,this.y1=this.y1*Tt,this.x2=this.x2*Bt,this.y2=this.y2*Tt,this.adjustVisual(),this.adjustControlBox()},Lt}(ct),De=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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=jt.defaultColor,kt.strokeWidth=jt.defaultStrokeWidth,kt.strokeDasharray=jt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",jt.defaultColorSet,jt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Vt("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return!(!Ut.prototype.ownsTarget.call(this,Bt)&&Bt!==this.visual&&Bt!==this.selectorLine&&Bt!==this.visibleLine)},Lt.prototype.createVisual=function(){this.visual=ye.createGroup(),this.selectorLine=ye.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ye.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(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),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()),ye.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setStrokeColor=function(Bt){this.strokeColor=Bt,this.adjustVisual(),this.colorChanged(Bt)},Lt.prototype.setStrokeWidth=function(Bt){this.strokeWidth=Bt,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(Bt){this.strokeDasharray=Bt,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 Bt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ut.prototype.getState.call(this));return Bt.typeName=Lt.typeName,Bt},Lt.prototype.restoreState=function(Bt){Ut.prototype.restoreState.call(this,Bt);var Tt=Bt;this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.createVisual(),this.adjustVisual()},Lt.typeName="LineMarker",Lt.title="Line marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Lt}(Ae),ve=function(Ut){function Lt(Bt,Tt,jt,kt){var Ce=Ut.call(this,Bt,kt||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ce.fonts=[],Ce.fontBoxes=[],Ce.fonts=Tt,Ce.currentFont=jt,Ce.setCurrentFont=Ce.setCurrentFont.bind(Ce),Ce}return xe(Lt,Ut),Lt.prototype.getUi=function(){var Bt=this,Tt=document.createElement("div");return Tt.style.overflow="hidden",Tt.style.flexGrow="2",this.fonts.forEach(function(jt){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/Bt.fonts.length-5+"%",kt.style.borderColor=jt===Bt.currentFont?Bt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Bt.setCurrentFont(jt,kt)}),Tt.appendChild(kt);var Ce=document.createElement("div");Ce.style.display="flex",Ce.style.minHeight="20px",Ce.style.flexGrow="2",Ce.style.fontFamily=jt,Ce.style.overflow="hidden";var on=document.createElement("div");on.style.whiteSpace="nowrap",on.style.overflow="hidden",on.style.textOverflow="ellipsis",on.innerHTML="The quick brown fox jumps over the lazy dog",Ce.appendChild(on),kt.appendChild(Ce),Bt.fontBoxes.push(kt)}),Tt},Lt.prototype.setCurrentFont=function(Bt,Tt){var jt=this;this.currentFont=Bt,this.fontBoxes.forEach(function(kt){kt.style.borderColor=kt===Tt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Lt}(et),We=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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=jt.defaultColor,kt.fontFamily=jt.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 nt("Color",jt.defaultColorSet,jt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.fontFamilyPanel=new ve("Font",jt.defaultFontFamilies,jt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt}return xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){if(Ut.prototype.ownsTarget.call(this,Bt)||Bt===this.visual||Bt===this.textElement||Bt===this.bgRectangle)return!0;var Tt=!1;return this.textElement.childNodes.forEach(function(jt){jt===Bt&&(Tt=!0)}),Tt},Lt.prototype.createVisual=function(){this.visual=ye.createGroup(),this.bgRectangle=ye.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ye.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.textElement.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Lt.prototype.pointerDown=function(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.isMoved=!1,this.pointerDownPoint=Bt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Bt),this._state="creating")},Lt.prototype.renderText=function(){var Bt=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(Tt){Bt.textElement.appendChild(ye.createTSpan(Tt.trim()===""?" ":Tt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Lt.prototype.getTextScale=function(){var Bt=this.textElement.getBBox(),Tt=1;if(Bt.width>0&&Bt.height>0){var jt=(1*this.width-this.width*this.padding*2/100)/Bt.width,kt=(1*this.height-this.height*this.padding*2/100)/Bt.height;Tt=Math.min(jt,kt)}return Tt},Lt.prototype.getTextPosition=function(Bt){var Tt=this.textElement.getBBox(),jt=0,kt=0;return Tt.width>0&&Tt.height>0&&(jt=(this.width-Tt.width*Bt)/2,kt=this.height/2-Tt.height*Bt/2),{x:jt,y:kt}},Lt.prototype.sizeText=function(){var Bt=this.textElement.getBBox(),Tt=this.getTextScale(),jt=this.getTextPosition(Tt);jt.y-=Bt.y*Tt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+jt.x+"px, "+jt.y+"px) scale("+Tt+", "+Tt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(jt.x,jt.y),this.textElement.transform.baseVal.getItem(1).setScale(Tt,Tt))},Lt.prototype.manipulate=function(Bt){Ut.prototype.manipulate.call(this,Bt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Bt.x-this.pointerDownPoint.x)>5||Math.abs(Bt.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(Bt){Ut.prototype.resize.call(this,Bt),this.isMoved=!0,this.setSize(),this.sizeText()},Lt.prototype.setSize=function(){Ut.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Lt.prototype.pointerUp=function(Bt){var Tt=this.state;Tt==="creating"&&(this._suppressMarkerCreateEvent=!0),Ut.prototype.pointerUp.call(this,Bt),this.setSize(),(Tt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.showTextEditor=function(){var Bt=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(Tt){Tt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Tt=Number.parseFloat(Bt.textEditor.style.fontSize);Bt.textEditor.clientWidth>=Number.parseInt(Bt.textEditor.style.maxWidth)&&Tt>.9;)Tt-=.1,Bt.textEditor.style.fontSize=Math.max(Tt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Tt){Tt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Tt){if(Tt.clipboardData){var jt=Tt.clipboardData.getData("text"),kt=window.getSelection();if(!kt.rangeCount)return!1;kt.deleteFromDocument(),kt.getRangeAt(0).insertNode(document.createTextNode(jt)),Tt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Bt.textEditDivClicked(Bt.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 Bt=this.getTextScale(),Tt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),jt=this.textElement.getBBox(),kt={x:jt.width*Bt,y:jt.height*Bt};Tt.x-=kt.x/2,Tt.y-=kt.y/2,this.textEditor.style.top=Tt.y+"px",this.textEditor.style.left=Tt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Tt.x+"px",this.textEditor.style.fontSize=Math.max(16*Bt,12)+"px",this.textElement.style.display="none"}},Lt.prototype.textEditDivClicked=function(Bt){this.text=Bt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Lt.prototype.select=function(){Ut.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Lt.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ut.prototype.deselect.call(this)},Lt.prototype.dblClick=function(Bt,Tt){Ut.prototype.dblClick.call(this,Bt,Tt),this.showTextEditor()},Lt.prototype.setColor=function(Bt){this.textElement&&ye.setAttributes(this.textElement,[["fill",Bt]]),this.color=Bt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Bt)},Lt.prototype.setFont=function(Bt){this.textElement&&ye.setAttributes(this.textElement,[["font-family",Bt]]),this.fontFamily=Bt,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 Bt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ut.prototype.getState.call(this));return Bt.typeName=Lt.typeName,Bt},Lt.prototype.restoreState=function(Bt){var Tt=Bt;this.color=Tt.color,this.fontFamily=Tt.fontFamily,this.padding=Tt.padding,this.text=Tt.text,this.createVisual(),Ut.prototype.restoreState.call(this,Bt),this.setSize()},Lt.prototype.scale=function(Bt,Tt){Ut.prototype.scale.call(this,Bt,Tt),this.setSize(),this.sizeText(),this.positionTextEditor()},Lt.typeName="TextMarker",Lt.title="Text marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',Lt}(Et),nn=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||this;return kt.color="transparent",kt.lineWidth=3,kt.drawing=!1,kt.pixelRatio=1,kt.color=jt.defaultColor,kt.lineWidth=jt.defaultStrokeWidth,kt.pixelRatio=jt.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 nt("Color",jt.defaultColorSet,jt.defaultColor),kt.colorPanel.onColorChanged=kt.setColor,kt.lineWidthPanel=new Vt("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),kt.lineWidthPanel.onWidthChanged=kt.setLineWidth,kt}return xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return!(!Ut.prototype.ownsTarget.call(this,Bt)&&Bt!==this.visual&&Bt!==this.drawingImage)},Lt.prototype.createVisual=function(){this.visual=ye.createGroup(),this.drawingImage=ye.createImage(),this.visual.appendChild(this.drawingImage);var Bt=ye.createTransform();this.visual.transform.baseVal.appendItem(Bt),this.addMarkerVisualToContainer(this.visual)},Lt.prototype.pointerDown=function(Bt,Tt){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(Bt.x,Bt.y),this.drawing=!0):Ut.prototype.pointerDown.call(this,Bt,Tt)},Lt.prototype.manipulate=function(Bt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Bt.x,Bt.y),this.canvasContext.stroke()):Ut.prototype.manipulate.call(this,Bt)},Lt.prototype.resize=function(Bt){Ut.prototype.resize.call(this,Bt),ye.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Lt.prototype.pointerUp=function(Bt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ut.prototype.pointerUp.call(this,Bt)},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(),Ut.prototype.select.call(this)},Lt.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ut.prototype.deselect.call(this)},Lt.prototype.finishCreation=function(){for(var Bt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Tt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],jt=Tt[0],kt=Tt[1],Ce=Tt[2],on=Tt[3],Gn=!1,Qn=0;Qn<this.canvasElement.height;Qn++)for(var _n=0;_n<this.canvasElement.width;_n++)Bt.data[Qn*this.canvasElement.width*4+4*_n+3]>0&&(Gn=!0,Qn<kt&&(kt=Qn),_n<jt&&(jt=_n),Qn>on&&(on=Qn),_n>Ce&&(Ce=_n));if(Gn){this.left=jt/this.pixelRatio,this.top=kt/this.pixelRatio,this.width=(Ce-jt)/this.pixelRatio,this.height=(on-kt)/this.pixelRatio;var _e=document.createElement("canvas");_e.width=Ce-jt,_e.height=on-kt,_e.getContext("2d").putImageData(this.canvasContext.getImageData(jt,kt,Ce-jt,on-kt),0,0),this.drawingImgUrl=_e.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Lt.prototype.setDrawingImage=function(){ye.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ye.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Lt.prototype.setColor=function(Bt){this.color=Bt,this.colorChanged(Bt)},Lt.prototype.setLineWidth=function(Bt){this.lineWidth=Bt},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 Bt=Object.assign({drawingImgUrl:this.drawingImgUrl},Ut.prototype.getState.call(this));return Bt.typeName=Lt.typeName,Bt},Lt.prototype.restoreState=function(Bt){this.createVisual(),Ut.prototype.restoreState.call(this,Bt),this.drawingImgUrl=Bt.drawingImgUrl,this.setDrawingImage()},Lt.prototype.scale=function(Bt,Tt){Ut.prototype.scale.call(this,Bt,Tt),this.setDrawingImage()},Lt.typeName="FreehandMarker",Lt.title="Freehand marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',Lt}(Et),an=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,jt||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return kt.typeBoxes=[],kt.currentType=Tt,kt.setCurrentType=kt.setCurrentType.bind(kt),kt}return xe(Lt,Ut),Lt.prototype.getUi=function(){var Bt=this,Tt=document.createElement("div");Tt.style.display="flex",Tt.style.overflow="hidden",Tt.style.flexGrow="2";for(var jt=function(on){var Gn="both";switch(on){case 0:Gn="both";break;case 1:Gn="start";break;case 2:Gn="end";break;case 3:Gn="none"}var Qn=document.createElement("div");if(Qn.style.display="flex",Qn.style.flexGrow="2",Qn.style.alignItems="center",Qn.style.justifyContent="space-between",Qn.style.padding="5px",Qn.style.borderWidth="2px",Qn.style.borderStyle="solid",Qn.style.borderColor=Gn===kt.currentType?kt.uiStyleSettings.toolboxAccentColor:"transparent",Qn.addEventListener("click",function(){Bt.setCurrentType(Gn,Qn)}),Tt.appendChild(Qn),Gn==="both"||Gn==="start"){var _n=document.createElement("div");_n.style.display="flex",_n.style.alignItems="center",_n.style.minHeight="20px",_n.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,_n.style.marginLeft="5px",Qn.appendChild(_n)}var _e=document.createElement("div");_e.style.display="flex",_e.style.alignItems="center",_e.style.minHeight="20px",_e.style.flexGrow="2";var Zn=document.createElement("hr");if(Zn.style.minWidth="20px",Zn.style.border="0px",Zn.style.borderTop="3px solid "+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee"),Zn.style.flexGrow="2",_e.appendChild(Zn),Qn.appendChild(_e),Gn==="both"||Gn==="end"){var Dn=document.createElement("div");Dn.style.display="flex",Dn.style.alignItems="center",Dn.style.minHeight="20px",Dn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(kt.uiStyleSettings!==void 0?kt.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Dn.style.marginRight="5px",Qn.appendChild(Dn)}kt.typeBoxes.push(Qn)},kt=this,Ce=0;Ce<4;Ce++)jt(Ce);return Tt},Lt.prototype.setCurrentType=function(Bt,Tt){var jt=this;this.currentType=Bt,this.typeBoxes.forEach(function(kt){kt.style.borderColor=kt===Tt?jt.uiStyleSettings!==void 0?jt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Lt}(et),In=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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 an("Arrow type","end"),kt.arrowTypePanel.onArrowTypeChanged=kt.setArrowType,kt}return xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return!(!Ut.prototype.ownsTarget.call(this,Bt)&&Bt!==this.arrow1&&Bt!==this.arrow2)},Lt.prototype.getArrowPoints=function(Bt,Tt){var jt=this.arrowBaseWidth+2*this.strokeWidth,kt=this.arrowBaseHeight+2*this.strokeWidth;return Bt-jt/2+","+(Tt+kt/2)+" "+Bt+","+(Tt-kt/2)+" "+(Bt+jt/2)+","+(Tt+kt/2)},Lt.prototype.createTips=function(){this.arrow1=ye.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ye.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.arrow2)},Lt.prototype.pointerDown=function(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(Ut.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",ye.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ye.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Bt=0;Math.abs(this.x1-this.x2)>.1&&(Bt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Tt=this.arrow1.transform.baseVal.getItem(0);Tt.setRotate(Bt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Tt,0);var jt=this.arrow2.transform.baseVal.getItem(0);jt.setRotate(Bt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(jt,0)}},Lt.prototype.setArrowType=function(Bt){this.arrowType=Bt,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 Bt=Object.assign({arrowType:this.arrowType},Ut.prototype.getState.call(this));return Bt.typeName=Lt.typeName,Bt},Lt.prototype.restoreState=function(Bt){Ut.prototype.restoreState.call(this,Bt);var Tt=Bt;this.arrowType=Tt.arrowType,this.createTips(),this.adjustVisual()},Lt.typeName="ArrowMarker",Lt.title="Arrow marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Lt}(De),En=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||this;return kt.fillColor=jt.defaultFillColor,kt.strokeWidth=0,kt.fillPanel=new nt("Color",jt.defaultColorSet,jt.defaultFillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt}return xe(Lt,Ut),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Bt=Ut.prototype.getState.call(this);return Bt.typeName=Lt.typeName,Bt},Lt.typeName="CoverMarker",Lt.title="Cover marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Lt}(Nt),ui=function(Ut){function Lt(Bt,Tt,jt,kt){var Ce=Ut.call(this,Bt,kt||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ce.opacities=[],Ce.opacityBoxes=[],Ce.opacities=Tt,Ce.currentOpacity=jt,Ce.setCurrentOpacity=Ce.setCurrentOpacity.bind(Ce),Ce}return xe(Lt,Ut),Lt.prototype.getUi=function(){var Bt=this,Tt=document.createElement("div");return Tt.style.display="flex",Tt.style.overflow="hidden",Tt.style.flexGrow="2",Tt.style.justifyContent="space-between",this.opacities.forEach(function(jt){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=jt===Bt.currentOpacity?Bt.uiStyleSettings.toolboxAccentColor:"transparent",kt.addEventListener("click",function(){Bt.setCurrentOpacity(jt,kt)}),Tt.appendChild(kt);var Ce=document.createElement("div");Ce.innerText=100*jt+"%",kt.appendChild(Ce),Bt.opacityBoxes.push(kt)}),Tt},Lt.prototype.setCurrentOpacity=function(Bt,Tt){var jt=this;this.currentOpacity=Bt,this.opacityBoxes.forEach(function(kt){kt.style.borderColor=kt===Tt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Lt}(et),fi=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||this;return kt.setOpacity=kt.setOpacity.bind(kt),kt.fillColor=jt.defaultHighlightColor,kt.strokeWidth=0,kt.opacity=jt.defaultHighlightOpacity,kt.fillPanel=new nt("Color",jt.defaultColorSet,kt.fillColor),kt.fillPanel.onColorChanged=kt.setFillColor,kt.opacityPanel=new ui("Opacity",jt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return xe(Lt,Ut),Lt.prototype.setOpacity=function(Bt){this.opacity=Bt,this.visual&&ye.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 Bt=Ut.prototype.getState.call(this);return Bt.typeName=Lt.typeName,Bt},Lt.typeName="HighlightMarker",Lt.title="Highlight marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',Lt}(En),ue='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Kt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',dn=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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=jt.defaultStrokeColor,kt.bgColor=jt.defaultFillColor,kt.fontFamily=jt.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 nt("Text color",jt.defaultColorSet,kt.color,ue),kt.colorPanel.onColorChanged=kt.setColor,kt.bgColorPanel=new nt("Fill color",jt.defaultColorSet,kt.bgColor,Kt),kt.bgColorPanel.onColorChanged=kt.setBgColor,kt.fontFamilyPanel=new ve("Font",jt.defaultFontFamilies,jt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.tipGrip=new gt,kt.tipGrip.visual.transform.baseVal.appendItem(ye.createTransform()),kt.controlBox.appendChild(kt.tipGrip.visual),kt}return xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return Ut.prototype.ownsTarget.call(this,Bt)||this.tipGrip.ownsTarget(Bt)||this.tip===Bt},Lt.prototype.createTip=function(){ye.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ye.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Lt.prototype.pointerDown=function(Bt,Tt){this.state==="new"&&Ut.prototype.pointerDown.call(this,Bt,Tt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Tt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ut.prototype.pointerDown.call(this,Bt,Tt)},Lt.prototype.pointerUp=function(Bt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ut.prototype.pointerUp.call(this,Bt);else{var Tt=this.state==="creating";Ut.prototype.pointerUp.call(this,Bt),this.setTipPoints(Tt),this.positionTip()}},Lt.prototype.manipulate=function(Bt){if(this.tipMoving){var Tt=this.unrotatePoint(Bt);this.tipPosition={x:Tt.x-this.manipulationStartLeft,y:Tt.y-this.manipulationStartTop},this.positionTip()}else Ut.prototype.manipulate.call(this,Bt)},Lt.prototype.setBgColor=function(Bt){this.bgRectangle&&this.tip&&(ye.setAttributes(this.bgRectangle,[["fill",Bt]]),ye.setAttributes(this.tip,[["fill",Bt]])),this.bgColor=Bt,this.fillColorChanged(Bt)},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(Bt){Bt===void 0&&(Bt=!1);var Tt=Math.min(this.height/2,15),jt=this.height/5;Bt&&(this.tipPosition={x:Tt+jt/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.height/2?kt<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(jt=this.width/5,Tt=Math.min(this.width/2,15),this.tipBase1Position={x:Tt,y:0},this.tipBase2Position={x:Tt+jt,y:0}):(this.tipBase1Position={x:0,y:Tt},this.tipBase2Position={x:0,y:Tt+jt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?kt<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(jt=this.width/5,Tt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Tt-jt,y:0},this.tipBase2Position={x:this.width-Tt,y:0}):(this.tipBase1Position={x:this.width,y:Tt},this.tipBase2Position={x:this.width,y:Tt+jt}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?kt<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(jt=this.width/5,Tt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Tt-jt,y:this.height},this.tipBase2Position={x:this.width-Tt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Tt-jt},this.tipBase2Position={x:this.width,y:this.height-Tt}):kt<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(jt=this.width/5,Tt=Math.min(this.width/2,15),this.tipBase1Position={x:Tt,y:this.height},this.tipBase2Position={x:Tt+jt,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Tt},this.tipBase2Position={x:0,y:this.height-Tt-jt})},Lt.prototype.resize=function(Bt){Ut.prototype.resize.call(this,Bt),this.positionTip()},Lt.prototype.positionTip=function(){ye.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Bt=this.tipGrip.visual.transform.baseVal.getItem(0);Bt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Bt,0)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Lt.prototype.select=function(){this.positionTip(),Ut.prototype.select.call(this)},Lt.prototype.getState=function(){var Bt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ut.prototype.getState.call(this));return Bt.typeName=Lt.typeName,Bt},Lt.prototype.restoreState=function(Bt){var Tt=Bt;this.bgColor=Tt.bgColor,this.tipPosition=Tt.tipPosition,Ut.prototype.restoreState.call(this,Bt),this.createTip(),this.setTipPoints()},Lt.prototype.scale=function(Bt,Tt){Ut.prototype.scale.call(this,Bt,Tt),this.tipPosition={x:this.tipPosition.x*Bt,y:this.tipPosition.y*Tt},this.positionTip()},Lt.typeName="CalloutMarker",Lt.title="Callout marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',Lt}(We),Ai=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||this;return kt.fillColor="transparent",kt.strokeColor="transparent",kt.strokeWidth=0,kt.strokeDasharray="",kt.opacity=1,kt.strokeColor=jt.defaultColor,kt.strokeWidth=jt.defaultStrokeWidth,kt.strokeDasharray=jt.defaultStrokeDasharray,kt.fillColor=jt.defaultFillColor,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.setOpacity=kt.setOpacity.bind(kt),kt.createVisual=kt.createVisual.bind(kt),kt.strokePanel=new nt("Line color",ke(jt.defaultColorSet,["transparent"]),jt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",ke(jt.defaultColorSet,["transparent"]),kt.fillColor,Kt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Vt("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.opacityPanel=new ui("Opacity",jt.defaultOpacitySteps,kt.opacity),kt.opacityPanel.onOpacityChanged=kt.setOpacity,kt}return xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return!(!Ut.prototype.ownsTarget.call(this,Bt)&&Bt!==this.visual)},Lt.prototype.createVisual=function(){this.visual=ye.createEllipse(this.width/2,this.height/2,[["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(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.state==="new"&&(this.createVisual(),this.moveVisual(Bt),this._state="creating")},Lt.prototype.manipulate=function(Bt){Ut.prototype.manipulate.call(this,Bt)},Lt.prototype.resize=function(Bt){Ut.prototype.resize.call(this,Bt),this.setSize()},Lt.prototype.setSize=function(){Ut.prototype.setSize.call(this),ye.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Lt.prototype.pointerUp=function(Bt){Ut.prototype.pointerUp.call(this,Bt),this.setSize()},Lt.prototype.setStrokeColor=function(Bt){this.strokeColor=Bt,this.visual&&ye.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Bt),this.stateChanged()},Lt.prototype.setFillColor=function(Bt){this.fillColor=Bt,this.visual&&ye.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Bt),this.stateChanged()},Lt.prototype.setStrokeWidth=function(Bt){this.strokeWidth=Bt,this.visual&&ye.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(Bt){this.strokeDasharray=Bt,this.visual&&ye.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Lt.prototype.setOpacity=function(Bt){this.opacity=Bt,this.visual&&ye.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Bt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ut.prototype.getState.call(this));return Bt.typeName=Lt.typeName,Bt},Lt.prototype.restoreState=function(Bt){var Tt=Bt;this.fillColor=Tt.fillColor,this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.opacity=Tt.opacity,this.createVisual(),Ut.prototype.restoreState.call(this,Bt),this.setSize()},Lt.prototype.scale=function(Bt,Tt){Ut.prototype.scale.call(this,Bt,Tt),this.setSize()},Lt.typeName="EllipseMarker",Lt.title="Ellipse marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Lt}(Et),qn=function(Ut){function Lt(Bt,Tt,jt){return Ut.call(this,Bt,Tt,jt)||this}return xe(Lt,Ut),Object.defineProperty(Lt.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(Bt){return!(!Ut.prototype.ownsTarget.call(this,Bt)&&Bt!==this.tip1&&Bt!==this.tip2)},Lt.prototype.createTips=function(){this.tip1=ye.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ye.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ye.createTransform()),this.visual.appendChild(this.tip2)},Lt.prototype.pointerDown=function(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.state==="creating"&&this.createTips()},Lt.prototype.adjustVisual=function(){if(Ut.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ye.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Bt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Tt=this.tip1.transform.baseVal.getItem(0);Tt.setRotate(Bt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Tt,0);var jt=this.tip2.transform.baseVal.getItem(0);jt.setRotate(Bt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(jt,0)}},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Bt=Ut.prototype.getState.call(this);return Bt.typeName=Lt.typeName,Bt},Lt.prototype.restoreState=function(Bt){Ut.prototype.restoreState.call(this,Bt),this.createTips(),this.adjustVisual()},Lt.typeName="MeasurementMarker",Lt.title="Measurement marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',Lt}(De),Ke=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||this;return kt.strokePanel.colors=jt.defaultColorSet,kt.fillColor="transparent",kt}return xe(Lt,Ut),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Bt=Ut.prototype.getState.call(this);return Bt.typeName=Lt.typeName,Bt},Lt.typeName="EllipseFrameMarker",Lt.title="Ellipse frame marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Lt}(Ai),yn=function(){function Ut(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ut.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ut.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))},Ut.prototype.replaceLastUndoStep=function(Lt){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Lt)},Ut.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ut.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}},Ut.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ut}(),Sn=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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=jt.defaultColor,kt.strokeWidth=jt.defaultStrokeWidth,kt.strokeDasharray=jt.defaultStrokeDasharray,kt.strokePanel=new nt("Line color",jt.defaultColorSet,jt.defaultColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.strokeWidthPanel=new Vt("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt}return xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return!(!Ut.prototype.ownsTarget.call(this,Bt)&&Bt!==this.visual&&Bt!==this.selectorCurve&&Bt!==this.visibleCurve&&!this.curveGrip.ownsTarget(Bt))},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=ye.createGroup(),this.selectorCurve=ye.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ye.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(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Bt.x,this.curveY=Bt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Tt)&&(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()),ye.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ye.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ye.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Lt.prototype.setupControlBox=function(){Ut.prototype.setupControlBox.call(this),this.curveControlLine1=ye.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ye.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,Ut.prototype.addControlGrips.call(this)},Lt.prototype.positionGrips=function(){Ut.prototype.positionGrips.call(this);var Bt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Bt/2,this.curveY-Bt/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(Bt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Bt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Bt.y-this.manipulationStartY),Ut.prototype.manipulate.call(this,Bt)},Lt.prototype.resize=function(Bt){this.activeGrip===this.curveGrip&&(this.curveX=Bt.x,this.curveY=Bt.y),Ut.prototype.resize.call(this,Bt),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(Bt){this.strokeColor=Bt,this.adjustVisual(),this.colorChanged(Bt)},Lt.prototype.setStrokeWidth=function(Bt){this.strokeWidth=Bt,this.adjustVisual()},Lt.prototype.setStrokeDasharray=function(Bt){this.strokeDasharray=Bt,this.adjustVisual()},Lt.prototype.scale=function(Bt,Tt){this.curveX=this.curveX*Bt,this.curveY=this.curveY*Tt,Ut.prototype.scale.call(this,Bt,Tt)},Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Lt.prototype.getState=function(){var Bt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ut.prototype.getState.call(this));return Bt.typeName=Lt.typeName,Bt},Lt.prototype.restoreState=function(Bt){Ut.prototype.restoreState.call(this,Bt);var Tt=Bt;this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.curveX=Tt.curveX,this.curveY=Tt.curveY,this.createVisual(),this.adjustVisual()},Lt.typeName="CurveMarker",Lt.title="Curve marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',Lt}(Ae),si=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,Tt,jt)||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=jt.defaultColor,kt.strokeWidth=jt.defaultStrokeWidth,kt.strokeDasharray=jt.defaultStrokeDasharray,kt.fillColor=jt.defaultFillColor,kt.textColor=jt.defaultStrokeColor,kt.fontFamily=jt.defaultFontFamily,kt.fontSize=jt.defaultCaptionFontSize,kt.captionText=jt.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 nt("Line color",ke(jt.defaultColorSet,["transparent"]),kt.strokeColor),kt.strokePanel.onColorChanged=kt.setStrokeColor,kt.fillPanel=new nt("Fill color",ke(jt.defaultColorSet,["transparent"]),kt.fillColor,Kt),kt.fillPanel.onColorChanged=kt.setFillColor,kt.strokeWidthPanel=new Vt("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),kt.strokeWidthPanel.onWidthChanged=kt.setStrokeWidth,kt.strokeStylePanel=new Jt("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),kt.strokeStylePanel.onStyleChanged=kt.setStrokeDasharray,kt.fontFamilyPanel=new ve("Font",jt.defaultFontFamilies,jt.defaultFontFamily),kt.fontFamilyPanel.onFontChanged=kt.setFont,kt.textColorPanel=new nt("Text color",jt.defaultColorSet,kt.textColor,ue),kt.textColorPanel.onColorChanged=kt.setTextColor,kt}return xe(Lt,Ut),Lt.prototype.ownsTarget=function(Bt){return!(!Ut.prototype.ownsTarget.call(this,Bt)&&Bt!==this.visual&&Bt!==this.frame&&Bt!==this.captionBg&&Bt!==this.captionElement)},Lt.prototype.createVisual=function(){this.visual=ye.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ye.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ye.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=ye.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(Bt){this.captionText=Bt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Lt.prototype.pointerDown=function(Bt,Tt){Ut.prototype.pointerDown.call(this,Bt,Tt),this.isMoved=!1,this.pointerDownPoint=Bt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Bt),this._state="creating")},Lt.prototype.manipulate=function(Bt){Ut.prototype.manipulate.call(this,Bt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Bt.x-this.pointerDownPoint.x)>5||Math.abs(Bt.y-this.pointerDownPoint.y)>5)},Lt.prototype.resize=function(Bt){Ut.prototype.resize.call(this,Bt),this.setSize()},Lt.prototype.sizeCaption=function(){var Bt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Bt.width+2*this.PADDING,this.captionBoxHeight=Bt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ye.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')"]]),ye.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 Bt=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(Tt){Tt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Tt){Tt.key==="Enter"&&Bt.finishTextEditing(Bt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Tt){Tt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Bt.finishTextEditing(Bt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Bt.finishTextEditing(Bt.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(Bt){this.setCaptionText(Bt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Lt.prototype.setFont=function(Bt){this.captionElement&&ye.setAttributes(this.captionElement,[["font-family",Bt]]),this.fontFamily=Bt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Lt.prototype.setTextColor=function(Bt){this.captionElement&&ye.setAttributes(this.captionElement,[["fill",Bt]]),this.textColor=Bt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Lt.prototype.setSize=function(){Ut.prototype.setSize.call(this),ye.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Lt.prototype.pointerUp=function(Bt){Ut.prototype.pointerUp.call(this,Bt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Lt.prototype.dblClick=function(Bt,Tt){Ut.prototype.dblClick.call(this,Bt,Tt),this.showTextEditor()},Lt.prototype.setStrokeColor=function(Bt){this.strokeColor=Bt,this.frame&&ye.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Bt),this.stateChanged()},Lt.prototype.setFillColor=function(Bt){this.fillColor=Bt,this.captionBg&&ye.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Bt),this.stateChanged()},Lt.prototype.setStrokeWidth=function(Bt){this.strokeWidth=Bt,this.frame&&ye.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Lt.prototype.setStrokeDasharray=function(Bt){this.strokeDasharray=Bt,this.frame&&ye.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 Bt=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},Ut.prototype.getState.call(this));return Bt.typeName=this.typeName,Bt},Lt.prototype.restoreState=function(Bt){var Tt=Bt;this.fillColor=Tt.fillColor,this.strokeColor=Tt.strokeColor,this.strokeWidth=Tt.strokeWidth,this.strokeDasharray=Tt.strokeDasharray,this.textColor=Tt.textColor,this.fontFamily=Tt.fontFamily,this.captionText=Tt.captionText,this.fontSize=Tt.fontSize,this.createVisual(),Ut.prototype.restoreState.call(this,Bt),this.setSize()},Lt.prototype.scale=function(Bt,Tt){Ut.prototype.scale.call(this,Bt,Tt),this.setSize()},Lt.typeName="CaptionFrameMarker",Lt.title="Caption frame marker",Lt.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',Lt}(Et),Bn=function(){function Ut(Lt,Bt){Bt===void 0&&(Bt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Lt,this.cancelable=Bt}return Object.defineProperty(Ut.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ut.prototype.preventDefault=function(){this._defaultPrevented=!0},Ut}(),Se=function(Ut){function Lt(Bt,Tt,jt){var kt=Ut.call(this,Bt,!1)||this;return kt.dataUrl=Tt,kt.state=jt,kt}return xe(Lt,Ut),Lt}(Bn),Fe=function(Ut){function Lt(Bt,Tt,jt){jt===void 0&&(jt=!1);var kt=Ut.call(this,Bt,jt)||this;return kt.marker=Tt,kt}return xe(Lt,Ut),Lt}(Bn),pn=function(){function Ut(){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 Ut.prototype.addEventListener=function(Lt,Bt){this[Lt].push(Bt)},Ut.prototype.removeEventListener=function(Lt,Bt){var Tt=this[Lt].indexOf(Bt);Tt>-1&&this[Lt].splice(Tt,1)},Ut}(),Cn=function(){function Ut(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 de,this._isOpen=!1,this.undoRedoManager=new yn,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 pn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ut.instanceCounter++,this.styles=new ie(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(Ut.prototype,"ALL_MARKER_TYPES",{get:function(){return[ce,nn,In,We,Ke,Ai,fi,dn,qn,En,De,Sn,si]},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ce,nn,In,We,Ai,fi,dn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ce,nn,In,We,fi]},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Lt){var Bt=this;this._availableMarkerTypes.splice(0),Lt.forEach(function(Tt){if(typeof Tt=="string"){var jt=Bt.ALL_MARKER_TYPES.find(function(kt){return kt.typeName===Tt});jt!==void 0&&Bt._availableMarkerTypes.push(jt)}else Bt._availableMarkerTypes.push(Tt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ut.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(Ut.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ut.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),pe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ut.prototype.show=function(){var Lt=this;this.styles.styleSheetRoot===void 0&&Pe.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Pe.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Bt){return Bt(new Bn(Lt))})},Ut.prototype.render=function(){return Me(this,void 0,void 0,function(){var Lt;return je(this,function(Bt){switch(Bt.label){case 0:return this.setCurrentMarker(),(Lt=new Ue).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 Bt.sent(),[4,Lt.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Bt.sent()]}})})},Ut.prototype.close=function(Lt){var Bt=this;if(Lt===void 0&&(Lt=!1),this.isOpen){var Tt=!1;Lt||this.eventListeners.beforeclose.forEach(function(jt){var kt=new Bn(Bt,!0);jt(kt),kt.defaultPrevented&&(Tt=!0)}),Tt||(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(jt){return jt(new Bn(Bt))}),this.detachEvents(),this._isOpen=!1)}},Ut.prototype.addMarkersToToolbar=function(){for(var Lt,Bt=[],Tt=0;Tt<arguments.length;Tt++)Bt[Tt]=arguments[Tt];(Lt=this._availableMarkerTypes).push.apply(Lt,Bt)},Ut.prototype.addRenderEventListener=function(Lt){this.addEventListener("render",function(Bt){Lt(Bt.dataUrl,Bt.state)})},Ut.prototype.removeRenderEventListener=function(Lt){},Ut.prototype.addCloseEventListener=function(Lt){this.addEventListener("close",function(){Lt()})},Ut.prototype.removeCloseEventListener=function(Lt){},Ut.prototype.setupResizeObserver=function(){var Lt=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Lt.resize(Lt.target.clientWidth,Lt.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Lt.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ut.prototype.onPopupTargetResize=function(){var Lt=1*this.target.clientWidth/this.target.clientHeight,Bt=this.editorCanvas.clientWidth/Lt>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Lt:this.editorCanvas.clientWidth,Tt=Bt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Lt;this.resize(Bt,Tt)},Ut.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ut.prototype.resize=function(Lt,Bt){this._isResizing=!0;var Tt=Lt/this.imageWidth,jt=Bt/this.imageHeight;this.imageWidth=Math.round(Lt),this.imageHeight=Math.round(Bt),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Tt,jt),this._isResizing=!1},Ut.prototype.scaleMarkers=function(Lt,Bt){var Tt,jt=this;this._currentMarker&&this._currentMarker instanceof We?this._currentMarker.scale(Lt,Bt):(Tt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(kt){kt!==jt._currentMarker&&kt.scale(Lt,Bt)}),Tt!==void 0&&this.setCurrentMarker(Tt)},Ut.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Ut.prototype.setTopLeft=function(){var Lt=this.editingTarget.getBoundingClientRect(),Bt=this.editorCanvas.getBoundingClientRect();this.left=Lt.left-Bt.left,this.top=Lt.top-Bt.top},Ut.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Ut.prototype.addDefs=function(){for(var Lt,Bt=[],Tt=0;Tt<arguments.length;Tt++)Bt[Tt]=arguments[Tt];this.defs=ye.createDefs(),this.addDefsToImage(),(Lt=this.defs).append.apply(Lt,Bt)},Ut.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ut.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Ut.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ut.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ut.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Ut.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ut.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Ut.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Lt=document.createElement("a");Lt.href="https://markerjs.com/",Lt.target="_blank",Lt.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',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()},Ut.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")},Ut.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"},Ut.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ut.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 xn(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<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Dt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ut.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ut.prototype.removeMarker=function(Lt){this.markerImage.removeChild(Lt.container),this.markers.indexOf(Lt)>-1&&this.markers.splice(this.markers.indexOf(Lt),1),Lt.dispose()},Ut.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())},Ut.prototype.toolbarButtonClicked=function(Lt,Bt){if(Lt==="marker"&&Bt!==void 0)this.createNewMarker(Bt);else if(Lt==="action")switch(Bt){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()}},Ut.prototype.deleteSelectedMarker=function(){var Lt=this;if(this._currentMarker!==void 0){var Bt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(jt){var kt=new Fe(Lt,Lt._currentMarker,!0);jt(kt),kt.defaultPrevented&&(Bt=!0)}),!Bt){var Tt=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(jt){return jt(new Fe(Lt,Tt))})}}},Ut.prototype.clear=function(){var Lt=this,Bt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ce){var on=new Fe(Lt,void 0,!0);Ce(on),on.defaultPrevented&&(Bt=!0)}),!Bt)){this.setCurrentMarker();for(var Tt=function(Ce){var on=jt.markers[Ce];jt.setCurrentMarker(jt.markers[Ce]),jt._currentMarker.dispose(),jt.markerImage.removeChild(jt._currentMarker.container),jt.markers.splice(jt.markers.indexOf(jt._currentMarker),1),jt.eventListeners.markerdelete.forEach(function(Gn){return Gn(new Fe(Lt,on))})},jt=this,kt=this.markers.length-1;kt>=0;kt--)Tt(kt);this.addUndoStep()}},Object.defineProperty(Ut.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ut.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))},Ut.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)},Ut.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ut.prototype.addUndoStep=function(){var Lt=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Bt=this.getState(),Tt=this.undoRedoManager.getLastUndoStep();if(!Tt||Tt.width===Bt.width&&Tt.height===Bt.height){var jt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Bt),jt<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(kt){return kt(new Bn(Lt))})}else this.undoRedoManager.replaceLastUndoStep(Bt),this.eventListeners.statechange.forEach(function(kt){return kt(new Bn(Lt))})}},Ut.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ut.prototype.undoStep=function(){var Lt=this,Bt=this.undoRedoManager.undo();Bt!==void 0&&(this.restoreState(Bt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Tt){return Tt(new Bn(Lt))}))},Ut.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ut.prototype.redoStep=function(){var Lt=this,Bt=this.undoRedoManager.redo();Bt!==void 0&&(this.restoreState(Bt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Tt){return Tt(new Bn(Lt))}))},Ut.prototype.stepZoom=function(){var Lt=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Lt<this.zoomSteps.length-1?this.zoomSteps[Lt+1]:this.zoomSteps[0]},Ut.prototype.panTo=function(Lt){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Lt.x,top:this.prevPanPoint.y-Lt.y}),this.prevPanPoint=Lt},Ut.prototype.startRenderAndClose=function(){return Me(this,void 0,void 0,function(){var Lt,Bt,Tt=this;return je(this,function(jt){switch(jt.label){case 0:return[4,this.render()];case 1:return Lt=jt.sent(),Bt=this.getState(),this.eventListeners.render.forEach(function(kt){return kt(new Se(Tt,Lt,Bt))}),this.close(!0),[2]}})})},Ut.prototype.getState=function(Lt){Lt===!0&&this.setCurrentMarker();var Bt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Tt){return Bt.markers.push(Tt.getState())}),Bt},Ut.prototype.restoreState=function(Lt){var Bt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Lt.markers.forEach(function(Tt){var jt=Bt._availableMarkerTypes.find(function(Ce){return Ce.typeName===Tt.typeName});if(jt!==void 0){var kt=Bt.addNewMarker(jt);kt.restoreState(Tt),Bt.markers.push(kt)}}),Lt.width&&Lt.height&&(Lt.width!==this.imageWidth||Lt.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Lt.width,this.imageHeight/Lt.height),this.eventListeners.restorestate.forEach(function(Tt){return Tt(new Bn(Bt))})},Ut.prototype.addNewMarker=function(Lt){var Bt=ye.createGroup();return this.markerImage.appendChild(Bt),new Lt(Bt,this.overlayContainer,this.settings)},Ut.prototype.createNewMarker=function(Lt){var Bt,Tt=this;(Bt=typeof Lt=="string"?this._availableMarkerTypes.find(function(jt){return jt.typeName===Lt}):Lt)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Bt),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Bt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(jt){return jt(new Fe(Tt,Tt._currentMarker))}))},Ut.prototype.markerCreated=function(Lt){var Bt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Lt),this.setCurrentMarker(Lt),Lt instanceof nn&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(nn):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Tt){return Tt(new Fe(Bt,Bt._currentMarker))})},Ut.prototype.colorChanged=function(Lt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Lt,this.settings.defaultStrokeColor=Lt)},Ut.prototype.fillColorChanged=function(Lt){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Lt)},Ut.prototype.markerStateChanged=function(Lt){var Bt=this;this.eventListeners.markerchange.forEach(function(Tt){return Tt(new Fe(Bt,Lt))})},Ut.prototype.setCurrentMarker=function(Lt){var Bt=this;this._currentMarker!==Lt&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Tt){return Tt(new Fe(Bt,Bt._currentMarker))})),this._currentMarker=Lt,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Tt){return Tt(new Fe(Bt,Bt._currentMarker))}))},Ut.prototype.onPointerDown=function(Lt){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Lt.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Bt=this.markers.find(function(Tt){return Tt.ownsTarget(Lt.target)});Bt!==void 0?(this.setCurrentMarker(Bt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY),Lt.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Lt.clientX,y:Lt.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY))},Ut.prototype.onDblClick=function(Lt){if(this._isFocused||this.focus(),this.mode==="select"){var Bt=this.markers.find(function(Tt){return Tt.ownsTarget(Lt.target)});Bt!==void 0&&Bt!==this._currentMarker&&this.setCurrentMarker(Bt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY),Lt.target):this.setCurrentMarker()}},Ut.prototype.onPointerMove=function(Lt){this.touchPoints!==1&&Lt.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Lt.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Lt.clientX,Lt.clientY)):this.zoomLevel>1&&this.panTo({x:Lt.clientX,y:Lt.clientY}))},Ut.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()},Ut.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ut.prototype.onKeyUp=function(Lt){this._currentMarker===void 0||this.notesArea!==void 0||Lt.key!=="Delete"&&Lt.key!=="Backspace"||this.deleteSelectedMarker()},Ut.prototype.clientToLocalCoordinates=function(Lt,Bt){var Tt=this.markerImage.getBoundingClientRect();return{x:(Lt-Tt.left)/this.zoomLevel,y:(Bt-Tt.top)/this.zoomLevel}},Ut.prototype.onWindowResize=function(){this.positionUI()},Ut.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()},Ut.prototype.addLicenseKey=function(Lt){pe.addKey(Lt)},Ut.prototype.addEventListener=function(Lt,Bt){this.eventListeners.addEventListener(Lt,Bt)},Ut.prototype.removeEventListener=function(Lt,Bt){this.eventListeners.removeEventListener(Lt,Bt)},Ut.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(Ut.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ut.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(Bt){return Bt(new Bn(Lt))}))},Ut.prototype.blur=function(){var Lt=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Bt){return Bt(new Bn(Lt))}))},Ut.instanceCounter=0,Ut}()},25930:function(Pn,gi,ne){"use strict";ne.d(gi,{Cd:function(){return De}});var bt=ne(67711),xe=ne(98506),Me=ne(33346),je=ne(59301),ke=ne(92310),ye=ne.n(ke),pe={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ue=function(){var nn=(0,je.useRef)([]),an=(0,je.useRef)(null);return(0,je.useEffect)(function(){var In=Date.now(),En=!1;nn.current.forEach(function(ui){if(ui){En=!0;var fi=ui.style;fi.transitionDuration=".3s, .3s, .3s, .06s",an.current&&In-an.current<100&&(fi.transitionDuration="0s, 0s")}}),En&&(an.current=Date.now())}),nn.current},Pe=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],ie=function(nn){var an=(0,xe.Z)((0,xe.Z)({},pe),nn),In=an.className,En=an.percent,ui=an.prefixCls,fi=an.strokeColor,ue=an.strokeLinecap,Kt=an.strokeWidth,dn=an.style,Ai=an.trailColor,qn=an.trailWidth,Ke=an.transition,yn=(0,Me.Z)(an,Pe);delete yn.gapPosition;var Sn=Array.isArray(En)?En:[En],si=Array.isArray(fi)?fi:[fi],Bn=Ue(),Se=Kt/2,Fe=100-Kt/2,pn="M ".concat(ue==="round"?Se:0,",").concat(Se,`
|
|
L `).concat(ue==="round"?Fe:100,",").concat(Se),Cn="0 0 100 ".concat(Kt),Ut=0;return je.createElement("svg",(0,bt.Z)({className:ye()("".concat(ui,"-line"),In),viewBox:Cn,preserveAspectRatio:"none",style:dn},yn),je.createElement("path",{className:"".concat(ui,"-line-trail"),d:pn,strokeLinecap:ue,stroke:Ai,strokeWidth:qn||Kt,fillOpacity:"0"}),Sn.map(function(Lt,Bt){var Tt=1;switch(ue){case"round":Tt=1-Kt/100;break;case"square":Tt=1-Kt/2/100;break;default:Tt=1;break}var jt={strokeDasharray:"".concat(Lt*Tt,"px, 100px"),strokeDashoffset:"-".concat(Ut,"px"),transition:Ke||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},kt=si[Bt]||si[si.length-1];return Ut+=Lt,je.createElement("path",{key:Bt,className:"".concat(ui,"-line-path"),d:pn,strokeLinecap:ue,stroke:kt,strokeWidth:Kt,fillOpacity:"0",ref:function(on){Bn[Bt]=on},style:jt})}))},An=ie,we=ne(26420),xn=ne(16886),Dt=ne(47273),et=0,nt=(0,Dt.Z)();function ct(){var We;return nt?(We=et,et+=1):We="TEST_OR_SSR",We}var lt=function(We){var nn=je.useState(),an=(0,xn.Z)(nn,2),In=an[0],En=an[1];return je.useEffect(function(){En("rc_progress_".concat(ct()))},[]),We||In},gt=function(nn){var an=nn.bg,In=nn.children;return je.createElement("div",{style:{width:"100%",height:"100%",background:an}},In)};function yt(We,nn){return Object.keys(We).map(function(an){var In=parseFloat(an),En="".concat(Math.floor(In*nn),"%");return"".concat(We[an]," ").concat(En)})}var Et=je.forwardRef(function(We,nn){var an=We.prefixCls,In=We.color,En=We.gradientId,ui=We.radius,fi=We.style,ue=We.ptg,Kt=We.strokeLinecap,dn=We.strokeWidth,Ai=We.size,qn=We.gapDegree,Ke=In&&(0,we.Z)(In)==="object",yn=Ke?"#FFF":void 0,Sn=Ai/2,si=je.createElement("circle",{className:"".concat(an,"-circle-path"),r:ui,cx:Sn,cy:Sn,stroke:yn,strokeLinecap:Kt,strokeWidth:dn,opacity:ue===0?0:1,style:fi,ref:nn});if(!Ke)return si;var Bn="".concat(En,"-conic"),Se=qn?"".concat(180+qn/2,"deg"):"0deg",Fe=yt(In,(360-qn)/360),pn=yt(In,1),Cn="conic-gradient(from ".concat(Se,", ").concat(Fe.join(", "),")"),Ut="linear-gradient(to ".concat(qn?"bottom":"top",", ").concat(pn.join(", "),")");return je.createElement(je.Fragment,null,je.createElement("mask",{id:Bn},si),je.createElement("foreignObject",{x:0,y:0,width:Ai,height:Ai,mask:"url(#".concat(Bn,")")},je.createElement(gt,{bg:Ut},je.createElement(gt,{bg:Cn}))))}),Nt=Et,Vt=100,Jt=function(nn,an,In,En,ui,fi,ue,Kt,dn,Ai){var qn=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Ke=In/100*360*((360-fi)/360),yn=fi===0?0:{bottom:0,top:180,left:90,right:-90}[ue],Sn=(100-En)/100*an;dn==="round"&&En!==100&&(Sn+=Ai/2,Sn>=an&&(Sn=an-.01));var si=Vt/2;return{stroke:typeof Kt=="string"?Kt:void 0,strokeDasharray:"".concat(an,"px ").concat(nn),strokeDashoffset:Sn+qn,transform:"rotate(".concat(ui+Ke+yn,"deg)"),transformOrigin:"".concat(si,"px ").concat(si,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},ce=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function de(We){var nn=We!=null?We:[];return Array.isArray(nn)?nn:[nn]}var Ae=function(nn){var an=(0,xe.Z)((0,xe.Z)({},pe),nn),In=an.id,En=an.prefixCls,ui=an.steps,fi=an.strokeWidth,ue=an.trailWidth,Kt=an.gapDegree,dn=Kt===void 0?0:Kt,Ai=an.gapPosition,qn=an.trailColor,Ke=an.strokeLinecap,yn=an.style,Sn=an.className,si=an.strokeColor,Bn=an.percent,Se=(0,Me.Z)(an,ce),Fe=Vt/2,pn=lt(In),Cn="".concat(pn,"-gradient"),Ut=Fe-fi/2,Lt=Math.PI*2*Ut,Bt=dn>0?90+dn/2:-90,Tt=Lt*((360-dn)/360),jt=(0,we.Z)(ui)==="object"?ui:{count:ui,gap:2},kt=jt.count,Ce=jt.gap,on=de(Bn),Gn=de(si),Qn=Gn.find(function(Rn){return Rn&&(0,we.Z)(Rn)==="object"}),_n=Qn&&(0,we.Z)(Qn)==="object",_e=_n?"butt":Ke,Zn=Jt(Lt,Tt,0,100,Bt,dn,Ai,qn,_e,fi),Dn=Ue(),ai=function(){var _i=0;return on.map(function(ii,ji){var Vi=Gn[ji]||Gn[Gn.length-1],Wr=Jt(Lt,Tt,_i,ii,Bt,dn,Ai,Vi,_e,fi);return _i+=ii,je.createElement(Nt,{key:ji,color:Vi,ptg:ii,radius:Ut,prefixCls:En,gradientId:Cn,style:Wr,strokeLinecap:_e,strokeWidth:fi,gapDegree:dn,ref:function(mr){Dn[ji]=mr},size:Vt})}).reverse()},vi=function(){var _i=Math.round(kt*(on[0]/100)),ii=100/kt,ji=0;return new Array(kt).fill(null).map(function(Vi,Wr){var pr=Wr<=_i-1?Gn[0]:qn,mr=pr&&(0,we.Z)(pr)==="object"?"url(#".concat(Cn,")"):void 0,Sr=Jt(Lt,Tt,ji,ii,Bt,dn,Ai,pr,"butt",fi,Ce);return ji+=(Tt-Sr.strokeDashoffset+Ce)*100/Tt,je.createElement("circle",{key:Wr,className:"".concat(En,"-circle-path"),r:Ut,cx:Fe,cy:Fe,stroke:mr,strokeWidth:fi,opacity:1,style:Sr,ref:function(ar){Dn[Wr]=ar}})})};return je.createElement("svg",(0,bt.Z)({className:ye()("".concat(En,"-circle"),Sn),viewBox:"0 0 ".concat(Vt," ").concat(Vt),style:yn,id:In,role:"presentation"},Se),!kt&&je.createElement("circle",{className:"".concat(En,"-circle-trail"),r:Ut,cx:Fe,cy:Fe,stroke:qn,strokeLinecap:_e,strokeWidth:ue||fi,style:Zn}),kt?vi():ai())},De=Ae,ve={Line:An,Circle:De}},738:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return yt}});var bt=ne(67711),xe=ne(52873),Me=ne(16886),je=ne(33346),ke=ne(92310),ye=ne.n(ke),pe=ne(18929),Ue=ne(10228),Pe=ne(26112),ie=ne(59301);function An(Et,Nt){var Vt=Et.disabled,Jt=Et.prefixCls,ce=Et.character,de=Et.characterRender,Ae=Et.index,De=Et.count,ve=Et.value,We=Et.allowHalf,nn=Et.focused,an=Et.onHover,In=Et.onClick,En=function(Ke){an(Ke,Ae)},ui=function(Ke){In(Ke,Ae)},fi=function(Ke){Ke.keyCode===Ue.Z.ENTER&&In(Ke,Ae)},ue=Ae+1,Kt=new Set([Jt]);ve===0&&Ae===0&&nn?Kt.add("".concat(Jt,"-focused")):We&&ve+.5>=ue&&ve<ue?(Kt.add("".concat(Jt,"-half")),Kt.add("".concat(Jt,"-active")),nn&&Kt.add("".concat(Jt,"-focused"))):(ue<=ve?Kt.add("".concat(Jt,"-full")):Kt.add("".concat(Jt,"-zero")),ue===ve&&nn&&Kt.add("".concat(Jt,"-focused")));var dn=typeof ce=="function"?ce(Et):ce,Ai=ie.createElement("li",{className:ye()(Array.from(Kt)),ref:Nt},ie.createElement("div",{onClick:Vt?null:ui,onKeyDown:Vt?null:fi,onMouseMove:Vt?null:En,role:"radio","aria-checked":ve>Ae?"true":"false","aria-posinset":Ae+1,"aria-setsize":De,tabIndex:Vt?-1:0},ie.createElement("div",{className:"".concat(Jt,"-first")},dn),ie.createElement("div",{className:"".concat(Jt,"-second")},dn)));return de&&(Ai=de(Ai,Et)),Ai}var we=ie.forwardRef(An);function xn(){var Et=ie.useRef({});function Nt(Jt){return Et.current[Jt]}function Vt(Jt){return function(ce){Et.current[Jt]=ce}}return[Nt,Vt]}function Dt(Et){var Nt=Et.pageXOffset,Vt="scrollLeft";if(typeof Nt!="number"){var Jt=Et.document;Nt=Jt.documentElement[Vt],typeof Nt!="number"&&(Nt=Jt.body[Vt])}return Nt}function et(Et){var Nt,Vt,Jt=Et.ownerDocument,ce=Jt.body,de=Jt&&Jt.documentElement,Ae=Et.getBoundingClientRect();return Nt=Ae.left,Vt=Ae.top,Nt-=de.clientLeft||ce.clientLeft||0,Vt-=de.clientTop||ce.clientTop||0,{left:Nt,top:Vt}}function nt(Et){var Nt=et(Et),Vt=Et.ownerDocument,Jt=Vt.defaultView||Vt.parentWindow;return Nt.left+=Dt(Jt),Nt.left}var ct=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function lt(Et,Nt){var Vt=Et.prefixCls,Jt=Vt===void 0?"rc-rate":Vt,ce=Et.className,de=Et.defaultValue,Ae=Et.value,De=Et.count,ve=De===void 0?5:De,We=Et.allowHalf,nn=We===void 0?!1:We,an=Et.allowClear,In=an===void 0?!0:an,En=Et.keyboard,ui=En===void 0?!0:En,fi=Et.character,ue=fi===void 0?"\u2605":fi,Kt=Et.characterRender,dn=Et.disabled,Ai=Et.direction,qn=Ai===void 0?"ltr":Ai,Ke=Et.tabIndex,yn=Ke===void 0?0:Ke,Sn=Et.autoFocus,si=Et.onHoverChange,Bn=Et.onChange,Se=Et.onFocus,Fe=Et.onBlur,pn=Et.onKeyDown,Cn=Et.onMouseLeave,Ut=(0,je.Z)(Et,ct),Lt=xn(),Bt=(0,Me.Z)(Lt,2),Tt=Bt[0],jt=Bt[1],kt=ie.useRef(null),Ce=function(){if(!dn){var tr;(tr=kt.current)===null||tr===void 0||tr.focus()}};ie.useImperativeHandle(Nt,function(){return{focus:Ce,blur:function(){if(!dn){var tr;(tr=kt.current)===null||tr===void 0||tr.blur()}}}});var on=(0,pe.Z)(de||0,{value:Ae}),Gn=(0,Me.Z)(on,2),Qn=Gn[0],_n=Gn[1],_e=(0,pe.Z)(null),Zn=(0,Me.Z)(_e,2),Dn=Zn[0],ai=Zn[1],vi=function(tr,Hr){var Pt=qn==="rtl",so=tr+1;if(nn){var zr=Tt(tr),ri=nt(zr),pi=zr.clientWidth;(Pt&&Hr-ri>pi/2||!Pt&&Hr-ri<pi/2)&&(so-=.5)}return so},Rn=function(tr){_n(tr),Bn==null||Bn(tr)},_i=ie.useState(!1),ii=(0,Me.Z)(_i,2),ji=ii[0],Vi=ii[1],Wr=function(){Vi(!0),Se==null||Se()},pr=function(){Vi(!1),Fe==null||Fe()},mr=ie.useState(null),Sr=(0,Me.Z)(mr,2),$r=Sr[0],ar=Sr[1],Yr=function(tr,Hr){var Pt=vi(Hr,tr.pageX);Pt!==Dn&&(ar(Pt),ai(null)),si==null||si(Pt)},kr=function(tr){dn||(ar(null),ai(null),si==null||si(void 0)),tr&&(Cn==null||Cn(tr))},no=function(tr,Hr){var Pt=vi(Hr,tr.pageX),so=!1;In&&(so=Pt===Qn),kr(),Rn(so?0:Pt),ai(so?Pt:null)},Oo=function(tr){var Hr=tr.keyCode,Pt=qn==="rtl",so=nn?.5:1;ui&&(Hr===Ue.Z.RIGHT&&Qn<ve&&!Pt?(Rn(Qn+so),tr.preventDefault()):Hr===Ue.Z.LEFT&&Qn>0&&!Pt||Hr===Ue.Z.RIGHT&&Qn>0&&Pt?(Rn(Qn-so),tr.preventDefault()):Hr===Ue.Z.LEFT&&Qn<ve&&Pt&&(Rn(Qn+so),tr.preventDefault())),pn==null||pn(tr)};ie.useEffect(function(){Sn&&!dn&&Ce()},[]);var $o=new Array(ve).fill(0).map(function(oo,tr){return ie.createElement(we,{ref:jt(tr),index:tr,count:ve,disabled:dn,prefixCls:"".concat(Jt,"-star"),allowHalf:nn,value:$r===null?Qn:$r,onClick:no,onHover:Yr,key:oo||tr,character:ue,characterRender:Kt,focused:ji})}),ko=ye()(Jt,ce,(0,xe.Z)((0,xe.Z)({},"".concat(Jt,"-disabled"),dn),"".concat(Jt,"-rtl"),qn==="rtl"));return ie.createElement("ul",(0,bt.Z)({className:ko,onMouseLeave:kr,tabIndex:dn?-1:yn,onFocus:dn?null:Wr,onBlur:dn?null:pr,onKeyDown:dn?null:Oo,ref:kt},(0,Pe.Z)(Ut,{aria:!0,data:!0,attr:!0})),$o)}var gt=ie.forwardRef(lt),yt=gt},6551:function(Pn,gi,ne){"use strict";ne.d(gi,{ZP:function(){return pe}});var bt=ne(16886),xe=ne(59301),Me=ne(47273),je=0,ke=(0,Me.Z)();function ye(){var Ue;return ke?(Ue=je,je+=1):Ue="TEST_OR_SSR",Ue}function pe(Ue){var Pe=xe.useState(),ie=(0,bt.Z)(Pe,2),An=ie[0],we=ie[1];return xe.useEffect(function(){we("rc_select_".concat(ye()))},[]),Ue||An}},37463:function(Pn,gi,ne){"use strict";ne.d(gi,{Ac:function(){return Vi},Xo:function(){return pr},Wx:function(){return Sr},ZP:function(){return sn},lk:function(){return yt}});var bt=ne(67711),xe=ne(15142),Me=ne(52873),je=ne(98506),ke=ne(16886),ye=ne(33346),pe=ne(26420),Ue=ne(18929),Pe=ne(48736),ie=ne(59301),An=ne(92310),we=ne.n(An),xn=ne(34280),Dt=ne(49658),et=ne(8654),nt=function(he){var wn=he.className,un=he.customizeIcon,Ne=he.customizeIconProps,mn=he.children,xi=he.onMouseDown,Mi=he.onClick,Gi=typeof un=="function"?un(Ne):un;return ie.createElement("span",{className:wn,onMouseDown:function(Ln){Ln.preventDefault(),xi==null||xi(Ln)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Mi,"aria-hidden":!0},Gi!==void 0?Gi:ie.createElement("span",{className:we()(wn.split(/\s+/).map(function(bn){return"".concat(bn,"-icon")}))},mn))},ct=nt,lt=function(he,wn,un,Ne,mn){var xi=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Mi=arguments.length>6?arguments[6]:void 0,Gi=arguments.length>7?arguments[7]:void 0,bn=ie.useMemo(function(){if((0,pe.Z)(Ne)==="object")return Ne.clearIcon;if(mn)return mn},[Ne,mn]),Ln=ie.useMemo(function(){return!!(!xi&&Ne&&(un.length||Mi)&&!(Gi==="combobox"&&Mi===""))},[Ne,xi,un.length,Mi,Gi]);return{allowClear:Ln,clearIcon:ie.createElement(ct,{className:"".concat(he,"-clear"),onMouseDown:wn,customizeIcon:bn},"\xD7")}},gt=ie.createContext(null);function yt(){return ie.useContext(gt)}function Et(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,he=ie.useState(!1),wn=(0,ke.Z)(he,2),un=wn[0],Ne=wn[1],mn=ie.useRef(null),xi=function(){window.clearTimeout(mn.current)};ie.useEffect(function(){return xi},[]);var Mi=function(bn,Ln){xi(),mn.current=window.setTimeout(function(){Ne(bn),Ln&&Ln()},Yt)};return[un,Mi,xi]}function Nt(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,he=ie.useRef(null),wn=ie.useRef(null);ie.useEffect(function(){return function(){window.clearTimeout(wn.current)}},[]);function un(Ne){(Ne||he.current===null)&&(he.current=Ne),window.clearTimeout(wn.current),wn.current=window.setTimeout(function(){he.current=null},Yt)}return[function(){return he.current},un]}function Vt(Yt,he,wn,un){var Ne=ie.useRef(null);Ne.current={open:he,triggerOpen:wn,customizedTrigger:un},ie.useEffect(function(){function mn(xi){var Mi;if(!((Mi=Ne.current)!==null&&Mi!==void 0&&Mi.customizedTrigger)){var Gi=xi.target;Gi.shadowRoot&&xi.composed&&(Gi=xi.composedPath()[0]||Gi),Ne.current.open&&Yt().filter(function(bn){return bn}).every(function(bn){return!bn.contains(Gi)&&bn!==Gi})&&Ne.current.triggerOpen(!1)}}return window.addEventListener("mousedown",mn),function(){return window.removeEventListener("mousedown",mn)}},[])}var Jt=ne(10228);function ce(Yt){return Yt&&![Jt.Z.ESC,Jt.Z.SHIFT,Jt.Z.BACKSPACE,Jt.Z.TAB,Jt.Z.WIN_KEY,Jt.Z.ALT,Jt.Z.META,Jt.Z.WIN_KEY_RIGHT,Jt.Z.CTRL,Jt.Z.SEMICOLON,Jt.Z.EQUALS,Jt.Z.CAPS_LOCK,Jt.Z.CONTEXT_MENU,Jt.Z.F1,Jt.Z.F2,Jt.Z.F3,Jt.Z.F4,Jt.Z.F5,Jt.Z.F6,Jt.Z.F7,Jt.Z.F8,Jt.Z.F9,Jt.Z.F10,Jt.Z.F11,Jt.Z.F12].includes(Yt)}var de=ne(26112),Ae=ne(11780);function De(Yt,he,wn){var un=(0,je.Z)((0,je.Z)({},Yt),wn?he:{});return Object.keys(he).forEach(function(Ne){var mn=he[Ne];typeof mn=="function"&&(un[Ne]=function(){for(var xi,Mi=arguments.length,Gi=new Array(Mi),bn=0;bn<Mi;bn++)Gi[bn]=arguments[bn];return mn.apply(void 0,Gi),(xi=Yt[Ne])===null||xi===void 0?void 0:xi.call.apply(xi,[Yt].concat(Gi))})}),un}var ve=De,We=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],nn=function(he,wn){var un=he.prefixCls,Ne=he.id,mn=he.inputElement,xi=he.autoFocus,Mi=he.autoComplete,Gi=he.editable,bn=he.activeDescendantId,Ln=he.value,On=he.open,Yi=he.attrs,ki=(0,ye.Z)(he,We),hn=mn||ie.createElement("input",null),Vn=hn,Fr=Vn.ref,Ur=Vn.props;return(0,Pe.Kp)(!("maxLength"in hn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),hn=ie.cloneElement(hn,(0,je.Z)((0,je.Z)((0,je.Z)({type:"search"},ve(ki,Ur,!0)),{},{id:Ne,ref:(0,et.sQ)(wn,Fr),autoComplete:Mi||"off",autoFocus:xi,className:we()("".concat(un,"-selection-search-input"),Ur==null?void 0:Ur.className),role:"combobox","aria-expanded":On||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ne,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ne,"_list"),"aria-activedescendant":On?bn:void 0},Yi),{},{value:Gi?Ln:"",readOnly:!Gi,unselectable:Gi?null:"on",style:(0,je.Z)((0,je.Z)({},Ur.style),{},{opacity:Gi?null:0})})),hn},an=ie.forwardRef(nn),In=an;function En(Yt){return Array.isArray(Yt)?Yt:Yt!==void 0?[Yt]:[]}var ui=typeof window!="undefined"&&window.document&&window.document.documentElement,fi=ui;function ue(Yt){return Yt!=null}function Kt(Yt){return!Yt&&Yt!==0}function dn(Yt){return["string","number"].includes((0,pe.Z)(Yt))}function Ai(Yt){var he=void 0;return Yt&&(dn(Yt.title)?he=Yt.title.toString():dn(Yt.label)&&(he=Yt.label.toString())),he}function qn(Yt,he){fi?ie.useLayoutEffect(Yt,he):ie.useEffect(Yt,he)}function Ke(Yt){var he;return(he=Yt.key)!==null&&he!==void 0?he:Yt.value}var yn=function(he){he.preventDefault(),he.stopPropagation()},Sn=function(he){var wn=he.id,un=he.prefixCls,Ne=he.values,mn=he.open,xi=he.searchValue,Mi=he.autoClearSearchValue,Gi=he.inputRef,bn=he.placeholder,Ln=he.disabled,On=he.mode,Yi=he.showSearch,ki=he.autoFocus,hn=he.autoComplete,Vn=he.activeDescendantId,Fr=he.tabIndex,Ur=he.removeIcon,vo=he.maxTagCount,Be=he.maxTagTextLength,wi=he.maxTagPlaceholder,ir=wi===void 0?function(Pi){return"+ ".concat(Pi.length," ...")}:wi,li=he.tagRender,br=he.onToggleOpen,lr=he.onRemove,xr=he.onInputChange,Ar=he.onInputPaste,qt=he.onInputKeyDown,$t=he.onInputMouseDown,_t=he.onInputCompositionStart,Qe=he.onInputCompositionEnd,le=he.onInputBlur,rn=ie.useRef(null),Wn=(0,ie.useState)(0),Un=(0,ke.Z)(Wn,2),mi=Un[0],zn=Un[1],cn=(0,ie.useState)(!1),Yn=(0,ke.Z)(cn,2),Ki=Yn[0],Wi=Yn[1],vn="".concat(un,"-selection"),Ht=mn||On==="multiple"&&Mi===!1||On==="tags"?xi:"",Ii=On==="tags"||On==="multiple"&&Mi===!1||Yi&&(mn||Ki);qn(function(){zn(rn.current.scrollWidth)},[Ht]);var Mr=function(Tn,ti,Jn,Mn,ci){return ie.createElement("span",{title:Ai(Tn),className:we()("".concat(vn,"-item"),(0,Me.Z)({},"".concat(vn,"-item-disabled"),Jn))},ie.createElement("span",{className:"".concat(vn,"-item-content")},ti),Mn&&ie.createElement(ct,{className:"".concat(vn,"-item-remove"),onMouseDown:yn,onClick:ci,customizeIcon:Ur},"\xD7"))},Rr=function(Tn,ti,Jn,Mn,ci,Je){var er=function(Or){yn(Or),br(!mn)};return ie.createElement("span",{onMouseDown:er},li({label:ti,value:Tn,disabled:Jn,closable:Mn,onClose:ci,isMaxTag:!!Je}))},yr=function(Tn){var ti=Tn.disabled,Jn=Tn.label,Mn=Tn.value,ci=!Ln&&!ti,Je=Jn;if(typeof Be=="number"&&(typeof Jn=="string"||typeof Jn=="number")){var er=String(Je);er.length>Be&&(Je="".concat(er.slice(0,Be),"..."))}var fr=function(nr){nr&&nr.stopPropagation(),lr(Tn)};return typeof li=="function"?Rr(Mn,Je,ti,ci,fr):Mr(Tn,Je,ti,ci,fr)},Ei=function(Tn){if(!Ne.length)return null;var ti=typeof ir=="function"?ir(Tn):ir;return typeof li=="function"?Rr(void 0,ti,!1,!1,void 0,!0):Mr({title:ti},ti,!1)},jn=ie.createElement("div",{className:"".concat(vn,"-search"),style:{width:mi},onFocus:function(){Wi(!0)},onBlur:function(){Wi(!1)}},ie.createElement(In,{ref:Gi,open:mn,prefixCls:un,id:wn,inputElement:null,disabled:Ln,autoFocus:ki,autoComplete:hn,editable:Ii,activeDescendantId:Vn,value:Ht,onKeyDown:qt,onMouseDown:$t,onChange:xr,onPaste:Ar,onCompositionStart:_t,onCompositionEnd:Qe,onBlur:le,tabIndex:Fr,attrs:(0,de.Z)(he,!0)}),ie.createElement("span",{ref:rn,className:"".concat(vn,"-search-mirror"),"aria-hidden":!0},Ht,"\xA0")),oi=ie.createElement(Ae.Z,{prefixCls:"".concat(vn,"-overflow"),data:Ne,renderItem:yr,renderRest:Ei,suffix:jn,itemKey:Ke,maxCount:vo});return ie.createElement("span",{className:"".concat(vn,"-wrap")},oi,!Ne.length&&!Ht&&ie.createElement("span",{className:"".concat(vn,"-placeholder")},bn))},si=Sn,Bn=function(he){var wn=he.inputElement,un=he.prefixCls,Ne=he.id,mn=he.inputRef,xi=he.disabled,Mi=he.autoFocus,Gi=he.autoComplete,bn=he.activeDescendantId,Ln=he.mode,On=he.open,Yi=he.values,ki=he.placeholder,hn=he.tabIndex,Vn=he.showSearch,Fr=he.searchValue,Ur=he.activeValue,vo=he.maxLength,Be=he.onInputKeyDown,wi=he.onInputMouseDown,ir=he.onInputChange,li=he.onInputPaste,br=he.onInputCompositionStart,lr=he.onInputCompositionEnd,xr=he.onInputBlur,Ar=he.title,qt=ie.useState(!1),$t=(0,ke.Z)(qt,2),_t=$t[0],Qe=$t[1],le=Ln==="combobox",rn=le||Vn,Wn=Yi[0],Un=Fr||"";le&&Ur&&!_t&&(Un=Ur),ie.useEffect(function(){le&&Qe(!1)},[le,Ur]);var mi=Ln!=="combobox"&&!On&&!Vn?!1:!!Un,zn=Ar===void 0?Ai(Wn):Ar,cn=ie.useMemo(function(){return Wn?null:ie.createElement("span",{className:"".concat(un,"-selection-placeholder"),style:mi?{visibility:"hidden"}:void 0},ki)},[Wn,mi,ki,un]);return ie.createElement("span",{className:"".concat(un,"-selection-wrap")},ie.createElement("span",{className:"".concat(un,"-selection-search")},ie.createElement(In,{ref:mn,prefixCls:un,id:Ne,open:On,inputElement:wn,disabled:xi,autoFocus:Mi,autoComplete:Gi,editable:rn,activeDescendantId:bn,value:Un,onKeyDown:Be,onMouseDown:wi,onChange:function(Ki){Qe(!0),ir(Ki)},onPaste:li,onCompositionStart:br,onCompositionEnd:lr,onBlur:xr,tabIndex:hn,attrs:(0,de.Z)(he,!0),maxLength:le?vo:void 0})),!le&&Wn?ie.createElement("span",{className:"".concat(un,"-selection-item"),title:zn,style:mi?{visibility:"hidden"}:void 0},Wn.label):null,cn)},Se=Bn,Fe=function(he,wn){var un=(0,ie.useRef)(null),Ne=(0,ie.useRef)(!1),mn=he.prefixCls,xi=he.open,Mi=he.mode,Gi=he.showSearch,bn=he.tokenWithEnter,Ln=he.disabled,On=he.prefix,Yi=he.autoClearSearchValue,ki=he.onSearch,hn=he.onSearchSubmit,Vn=he.onToggleOpen,Fr=he.onInputKeyDown,Ur=he.onInputBlur,vo=he.domRef;ie.useImperativeHandle(wn,function(){return{focus:function(zn){un.current.focus(zn)},blur:function(){un.current.blur()}}});var Be=Nt(0),wi=(0,ke.Z)(Be,2),ir=wi[0],li=wi[1],br=function(zn){var cn=zn.which,Yn=un.current instanceof HTMLTextAreaElement;!Yn&&xi&&(cn===Jt.Z.UP||cn===Jt.Z.DOWN)&&zn.preventDefault(),Fr&&Fr(zn),cn===Jt.Z.ENTER&&Mi==="tags"&&!Ne.current&&!xi&&(hn==null||hn(zn.target.value)),!(Yn&&!xi&&~[Jt.Z.UP,Jt.Z.DOWN,Jt.Z.LEFT,Jt.Z.RIGHT].indexOf(cn))&&ce(cn)&&Vn(!0)},lr=function(){li(!0)},xr=(0,ie.useRef)(null),Ar=function(zn){ki(zn,!0,Ne.current)!==!1&&Vn(!0)},qt=function(){Ne.current=!0},$t=function(zn){Ne.current=!1,Mi!=="combobox"&&Ar(zn.target.value)},_t=function(zn){var cn=zn.target.value;if(bn&&xr.current&&/[\r\n]/.test(xr.current)){var Yn=xr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");cn=cn.replace(Yn,xr.current)}xr.current=null,Ar(cn)},Qe=function(zn){var cn=zn.clipboardData,Yn=cn==null?void 0:cn.getData("text");xr.current=Yn||""},le=function(zn){var cn=zn.target;if(cn!==un.current){var Yn=document.body.style.msTouchAction!==void 0;Yn?setTimeout(function(){un.current.focus()}):un.current.focus()}},rn=function(zn){var cn=ir();zn.target!==un.current&&!cn&&!(Mi==="combobox"&&Ln)&&zn.preventDefault(),(Mi!=="combobox"&&(!Gi||!cn)||!xi)&&(xi&&Yi!==!1&&ki("",!0,!1),Vn())},Wn={inputRef:un,onInputKeyDown:br,onInputMouseDown:lr,onInputChange:_t,onInputPaste:Qe,onInputCompositionStart:qt,onInputCompositionEnd:$t,onInputBlur:Ur},Un=Mi==="multiple"||Mi==="tags"?ie.createElement(si,(0,bt.Z)({},he,Wn)):ie.createElement(Se,(0,bt.Z)({},he,Wn));return ie.createElement("div",{ref:vo,className:"".concat(mn,"-selector"),onClick:le,onMouseDown:rn},On&&ie.createElement("div",{className:"".concat(mn,"-prefix")},On),Un)},pn=ie.forwardRef(Fe),Cn=pn,Ut=ne(65030),Lt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Bt=function(he){var wn=he===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:wn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:wn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:wn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:wn,adjustY:1},htmlRegion:"scroll"}}},Tt=function(he,wn){var un=he.prefixCls,Ne=he.disabled,mn=he.visible,xi=he.children,Mi=he.popupElement,Gi=he.animation,bn=he.transitionName,Ln=he.dropdownStyle,On=he.dropdownClassName,Yi=he.direction,ki=Yi===void 0?"ltr":Yi,hn=he.placement,Vn=he.builtinPlacements,Fr=he.dropdownMatchSelectWidth,Ur=he.dropdownRender,vo=he.dropdownAlign,Be=he.getPopupContainer,wi=he.empty,ir=he.getTriggerDOMNode,li=he.onPopupVisibleChange,br=he.onPopupMouseEnter,lr=(0,ye.Z)(he,Lt),xr="".concat(un,"-dropdown"),Ar=Mi;Ur&&(Ar=Ur(Mi));var qt=ie.useMemo(function(){return Vn||Bt(Fr)},[Vn,Fr]),$t=Gi?"".concat(xr,"-").concat(Gi):bn,_t=typeof Fr=="number",Qe=ie.useMemo(function(){return _t?null:Fr===!1?"minWidth":"width"},[Fr,_t]),le=Ln;_t&&(le=(0,je.Z)((0,je.Z)({},le),{},{width:Fr}));var rn=ie.useRef(null);return ie.useImperativeHandle(wn,function(){return{getPopupElement:function(){var Un;return(Un=rn.current)===null||Un===void 0?void 0:Un.popupElement}}}),ie.createElement(Ut.Z,(0,bt.Z)({},lr,{showAction:li?["click"]:[],hideAction:li?["click"]:[],popupPlacement:hn||(ki==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:qt,prefixCls:xr,popupTransitionName:$t,popup:ie.createElement("div",{onMouseEnter:br},Ar),ref:rn,stretch:Qe,popupAlign:vo,popupVisible:mn,getPopupContainer:Be,popupClassName:we()(On,(0,Me.Z)({},"".concat(xr,"-empty"),wi)),popupStyle:le,getTriggerDOMNode:ir,onPopupVisibleChange:li}),xi)},jt=ie.forwardRef(Tt),kt=jt,Ce=ne(57879);function on(Yt,he){var wn=Yt.key,un;return"value"in Yt&&(un=Yt.value),wn!=null?wn:un!==void 0?un:"rc-index-key-".concat(he)}function Gn(Yt){return typeof Yt!="undefined"&&!Number.isNaN(Yt)}function Qn(Yt,he){var wn=Yt||{},un=wn.label,Ne=wn.value,mn=wn.options,xi=wn.groupLabel,Mi=un||(he?"children":"label");return{label:Mi,value:Ne||"value",options:mn||"options",groupLabel:xi||Mi}}function _n(Yt){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},wn=he.fieldNames,un=he.childrenAsData,Ne=[],mn=Qn(wn,!1),xi=mn.label,Mi=mn.value,Gi=mn.options,bn=mn.groupLabel;function Ln(On,Yi){Array.isArray(On)&&On.forEach(function(ki){if(Yi||!(Gi in ki)){var hn=ki[Mi];Ne.push({key:on(ki,Ne.length),groupOption:Yi,data:ki,label:ki[xi],value:hn})}else{var Vn=ki[bn];Vn===void 0&&un&&(Vn=ki.label),Ne.push({key:on(ki,Ne.length),group:!0,data:ki,label:Vn}),Ln(ki[Gi],!0)}})}return Ln(Yt,!1),Ne}function _e(Yt){var he=(0,je.Z)({},Yt);return"props"in he||Object.defineProperty(he,"props",{get:function(){return(0,Pe.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),he}}),he}var Zn=function(he,wn,un){if(!wn||!wn.length)return null;var Ne=!1,mn=function Mi(Gi,bn){var Ln=(0,Ce.Z)(bn),On=Ln[0],Yi=Ln.slice(1);if(!On)return[Gi];var ki=Gi.split(On);return Ne=Ne||ki.length>1,ki.reduce(function(hn,Vn){return[].concat((0,xe.Z)(hn),(0,xe.Z)(Mi(Vn,Yi)))},[]).filter(Boolean)},xi=mn(he,wn);return Ne?typeof un!="undefined"?xi.slice(0,un):xi:null},Dn=ie.createContext(null),ai=Dn;function vi(Yt){var he=Yt.visible,wn=Yt.values;if(!he)return null;var un=50;return ie.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(wn.slice(0,un).map(function(Ne){var mn=Ne.label,xi=Ne.value;return["number","string"].includes((0,pe.Z)(mn))?mn:xi}).join(", ")),wn.length>un?", ...":null)}var Rn=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],_i=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ii=function(he){return he==="tags"||he==="multiple"},ji=ie.forwardRef(function(Yt,he){var wn,un=Yt.id,Ne=Yt.prefixCls,mn=Yt.className,xi=Yt.showSearch,Mi=Yt.tagRender,Gi=Yt.direction,bn=Yt.omitDomProps,Ln=Yt.displayValues,On=Yt.onDisplayValuesChange,Yi=Yt.emptyOptions,ki=Yt.notFoundContent,hn=ki===void 0?"Not Found":ki,Vn=Yt.onClear,Fr=Yt.mode,Ur=Yt.disabled,vo=Yt.loading,Be=Yt.getInputElement,wi=Yt.getRawInputElement,ir=Yt.open,li=Yt.defaultOpen,br=Yt.onDropdownVisibleChange,lr=Yt.activeValue,xr=Yt.onActiveValueChange,Ar=Yt.activeDescendantId,qt=Yt.searchValue,$t=Yt.autoClearSearchValue,_t=Yt.onSearch,Qe=Yt.onSearchSplit,le=Yt.tokenSeparators,rn=Yt.allowClear,Wn=Yt.prefix,Un=Yt.suffixIcon,mi=Yt.clearIcon,zn=Yt.OptionList,cn=Yt.animation,Yn=Yt.transitionName,Ki=Yt.dropdownStyle,Wi=Yt.dropdownClassName,vn=Yt.dropdownMatchSelectWidth,Ht=Yt.dropdownRender,Ii=Yt.dropdownAlign,Mr=Yt.placement,Rr=Yt.builtinPlacements,yr=Yt.getPopupContainer,Ei=Yt.showAction,jn=Ei===void 0?[]:Ei,oi=Yt.onFocus,Pi=Yt.onBlur,Tn=Yt.onKeyUp,ti=Yt.onKeyDown,Jn=Yt.onMouseDown,Mn=(0,ye.Z)(Yt,Rn),ci=ii(Fr),Je=(xi!==void 0?xi:ci)||Fr==="combobox",er=(0,je.Z)({},Mn);_i.forEach(function(Mo){delete er[Mo]}),bn==null||bn.forEach(function(Mo){delete er[Mo]});var fr=ie.useState(!1),Or=(0,ke.Z)(fr,2),nr=Or[0],jr=Or[1];ie.useEffect(function(){jr((0,Dt.Z)())},[]);var Kr=ie.useRef(null),Ho=ie.useRef(null),ao=ie.useRef(null),bo=ie.useRef(null),ho=ie.useRef(null),be=ie.useRef(!1),co=Et(),ls=(0,ke.Z)(co,3),ks=ls[0],lo=ls[1],xa=ls[2];ie.useImperativeHandle(he,function(){var Mo,Xr;return{focus:(Mo=bo.current)===null||Mo===void 0?void 0:Mo.focus,blur:(Xr=bo.current)===null||Xr===void 0?void 0:Xr.blur,scrollTo:function(Fi){var Rs;return(Rs=ho.current)===null||Rs===void 0?void 0:Rs.scrollTo(Fi)},nativeElement:Kr.current||Ho.current}});var ta=ie.useMemo(function(){var Mo;if(Fr!=="combobox")return qt;var Xr=(Mo=Ln[0])===null||Mo===void 0?void 0:Mo.value;return typeof Xr=="string"||typeof Xr=="number"?String(Xr):""},[qt,Fr,Ln]),Da=Fr==="combobox"&&typeof Be=="function"&&Be()||null,Gr=typeof wi=="function"&&wi(),Ro=(0,et.x1)(Ho,Gr==null||(wn=Gr.props)===null||wn===void 0?void 0:wn.ref),Vs=ie.useState(!1),Vl=(0,ke.Z)(Vs,2),zA=Vl[0],Ba=Vl[1];(0,xn.Z)(function(){Ba(!0)},[]);var Xi=(0,Ue.Z)(!1,{defaultValue:li,value:ir}),xA=(0,ke.Z)(Xi,2),jA=xA[0],Wa=xA[1],Hs=zA?jA:!1,hu=!hn&&Yi;(Ur||hu&&Hs&&Fr==="combobox")&&(Hs=!1);var ni=hu?!1:Hs,$i=ie.useCallback(function(Mo){var Xr=Mo!==void 0?Mo:!Hs;Ur||(Wa(Xr),Hs!==Xr&&(br==null||br(Xr)))},[Ur,Hs,Wa,br]),dr=ie.useMemo(function(){return(le||[]).some(function(Mo){return[`
|
|
`,`\r
|
|
`].includes(Mo)})},[le]),Cr=ie.useContext(ai)||{},Dr=Cr.maxCount,So=Cr.rawValues,Ui=function(Xr,ys,Fi){if(!(ci&&Gn(Dr)&&(So==null?void 0:So.size)>=Dr)){var Rs=!0,se=Xr;xr==null||xr(null);var qe=Zn(Xr,le,Gn(Dr)?Dr-So.size:void 0),Nl=Fi?null:qe;return Fr!=="combobox"&&Nl&&(se="",Qe==null||Qe(Nl),$i(!1),Rs=!1),_t&&ta!==se&&_t(se,{source:ys?"typing":"effect"}),Rs}},xo=function(Xr){!Xr||!Xr.trim()||_t(Xr,{source:"submit"})};ie.useEffect(function(){!Hs&&!ci&&Fr!=="combobox"&&Ui("",!1,!1)},[Hs]),ie.useEffect(function(){jA&&Ur&&Wa(!1),Ur&&!be.current&&lo(!1)},[Ur]);var ea=Nt(),Bs=(0,ke.Z)(ea,2),Go=Bs[0],_s=Bs[1],bs=ie.useRef(!1),ca=function(Xr){var ys=Go(),Fi=Xr.key,Rs=Fi==="Enter";if(Rs&&(Fr!=="combobox"&&Xr.preventDefault(),Hs||$i(!0)),_s(!!ta),Fi==="Backspace"&&!ys&&ci&&!ta&&Ln.length){for(var se=(0,xe.Z)(Ln),qe=null,Nl=se.length-1;Nl>=0;Nl-=1){var CA=se[Nl];if(!CA.disabled){se.splice(Nl,1),qe=CA;break}}qe&&On(se,{type:"remove",values:[qe]})}for(var Cs=arguments.length,Ca=new Array(Cs>1?Cs-1:0),_l=1;_l<Cs;_l++)Ca[_l-1]=arguments[_l];if(Hs&&(!Rs||!bs.current)){var KA;Rs&&(bs.current=!0),(KA=ho.current)===null||KA===void 0||KA.onKeyDown.apply(KA,[Xr].concat(Ca))}ti==null||ti.apply(void 0,[Xr].concat(Ca))},Ws=function(Xr){for(var ys=arguments.length,Fi=new Array(ys>1?ys-1:0),Rs=1;Rs<ys;Rs++)Fi[Rs-1]=arguments[Rs];if(Hs){var se;(se=ho.current)===null||se===void 0||se.onKeyUp.apply(se,[Xr].concat(Fi))}Xr.key==="Enter"&&(bs.current=!1),Tn==null||Tn.apply(void 0,[Xr].concat(Fi))},ns=function(Xr){var ys=Ln.filter(function(Fi){return Fi!==Xr});On(ys,{type:"remove",values:[Xr]})},xl=function(){bs.current=!1},Ts=ie.useRef(!1),Zu=function(){lo(!0),Ur||(oi&&!Ts.current&&oi.apply(void 0,arguments),jn.includes("focus")&&$i(!0)),Ts.current=!0},Il=function(){be.current=!0,lo(!1,function(){Ts.current=!1,be.current=!1,$i(!1)}),!Ur&&(ta&&(Fr==="tags"?_t(ta,{source:"submit"}):Fr==="multiple"&&_t("",{source:"blur"})),Pi&&Pi.apply(void 0,arguments))},Ya=[];ie.useEffect(function(){return function(){Ya.forEach(function(Mo){return clearTimeout(Mo)}),Ya.splice(0,Ya.length)}},[]);var No=function(Xr){var ys,Fi=Xr.target,Rs=(ys=ao.current)===null||ys===void 0?void 0:ys.getPopupElement();if(Rs&&Rs.contains(Fi)){var se=setTimeout(function(){var Cs=Ya.indexOf(se);if(Cs!==-1&&Ya.splice(Cs,1),xa(),!nr&&!Rs.contains(document.activeElement)){var Ca;(Ca=bo.current)===null||Ca===void 0||Ca.focus()}});Ya.push(se)}for(var qe=arguments.length,Nl=new Array(qe>1?qe-1:0),CA=1;CA<qe;CA++)Nl[CA-1]=arguments[CA];Jn==null||Jn.apply(void 0,[Xr].concat(Nl))},al=ie.useState({}),Ju=(0,ke.Z)(al,2),qu=Ju[1];function Eh(){qu({})}var is;Gr&&(is=function(Xr){$i(Xr)}),Vt(function(){var Mo;return[Kr.current,(Mo=ao.current)===null||Mo===void 0?void 0:Mo.getPopupElement()]},ni,$i,!!Gr);var Lc=ie.useMemo(function(){return(0,je.Z)((0,je.Z)({},Yt),{},{notFoundContent:hn,open:Hs,triggerOpen:ni,id:un,showSearch:Je,multiple:ci,toggleOpen:$i})},[Yt,hn,ni,Hs,un,Je,ci,$i]),$u=!!Un||vo,fa;$u&&(fa=ie.createElement(ct,{className:we()("".concat(Ne,"-arrow"),(0,Me.Z)({},"".concat(Ne,"-arrow-loading"),vo)),customizeIcon:Un,customizeIconProps:{loading:vo,searchValue:ta,open:Hs,focused:ks,showSearch:Je}}));var ll=function(){var Xr;Vn==null||Vn(),(Xr=bo.current)===null||Xr===void 0||Xr.focus(),On([],{type:"clear",values:Ln}),Ui("",!1,!1)},vs=lt(Ne,ll,Ln,rn,mi,Ur,ta,Fr),Io=vs.allowClear,rs=vs.clearIcon,Ys=ie.createElement(zn,{ref:ho}),th=we()(Ne,mn,(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},"".concat(Ne,"-focused"),ks),"".concat(Ne,"-multiple"),ci),"".concat(Ne,"-single"),!ci),"".concat(Ne,"-allow-clear"),rn),"".concat(Ne,"-show-arrow"),$u),"".concat(Ne,"-disabled"),Ur),"".concat(Ne,"-loading"),vo),"".concat(Ne,"-open"),Hs),"".concat(Ne,"-customize-input"),Da),"".concat(Ne,"-show-search"),Je)),BA=ie.createElement(kt,{ref:ao,disabled:Ur,prefixCls:Ne,visible:ni,popupElement:Ys,animation:cn,transitionName:Yn,dropdownStyle:Ki,dropdownClassName:Wi,direction:Gi,dropdownMatchSelectWidth:vn,dropdownRender:Ht,dropdownAlign:Ii,placement:Mr,builtinPlacements:Rr,getPopupContainer:yr,empty:Yi,getTriggerDOMNode:function(Xr){return Ho.current||Xr},onPopupVisibleChange:is,onPopupMouseEnter:Eh},Gr?ie.cloneElement(Gr,{ref:Ro}):ie.createElement(Cn,(0,bt.Z)({},Yt,{domRef:Ho,prefixCls:Ne,inputElement:Da,ref:bo,id:un,prefix:Wn,showSearch:Je,autoClearSearchValue:$t,mode:Fr,activeDescendantId:Ar,tagRender:Mi,values:Ln,open:Hs,onToggleOpen:$i,activeValue:lr,searchValue:ta,onSearch:Ui,onSearchSubmit:xo,onRemove:ns,tokenWithEnter:dr,onInputBlur:xl}))),Wo;return Gr?Wo=BA:Wo=ie.createElement("div",(0,bt.Z)({className:th},er,{ref:Kr,onMouseDown:No,onKeyDown:ca,onKeyUp:Ws,onFocus:Zu,onBlur:Il}),ie.createElement(vi,{visible:ks&&!Hs,values:Ln}),BA,fa,Io&&rs),ie.createElement(gt.Provider,{value:Lc},Wo)}),Vi=ji,Wr=function(){return null};Wr.isSelectOptGroup=!0;var pr=Wr,mr=function(){return null};mr.isSelectOption=!0;var Sr=mr,$r=ne(80547),ar=ne(2738),Yr=ne(6790);function kr(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var no=["disabled","title","children","style","className"];function Oo(Yt){return typeof Yt=="string"||typeof Yt=="number"}var $o=function(he,wn){var un=yt(),Ne=un.prefixCls,mn=un.id,xi=un.open,Mi=un.multiple,Gi=un.mode,bn=un.searchValue,Ln=un.toggleOpen,On=un.notFoundContent,Yi=un.onPopupScroll,ki=ie.useContext(ai),hn=ki.maxCount,Vn=ki.flattenOptions,Fr=ki.onActiveValue,Ur=ki.defaultActiveFirstOption,vo=ki.onSelect,Be=ki.menuItemSelectedIcon,wi=ki.rawValues,ir=ki.fieldNames,li=ki.virtual,br=ki.direction,lr=ki.listHeight,xr=ki.listItemHeight,Ar=ki.optionRender,qt="".concat(Ne,"-item"),$t=(0,$r.Z)(function(){return Vn},[xi,Vn],function(Ei,jn){return jn[0]&&Ei[1]!==jn[1]}),_t=ie.useRef(null),Qe=ie.useMemo(function(){return Mi&&Gn(hn)&&(wi==null?void 0:wi.size)>=hn},[Mi,hn,wi==null?void 0:wi.size]),le=function(jn){jn.preventDefault()},rn=function(jn){var oi;(oi=_t.current)===null||oi===void 0||oi.scrollTo(typeof jn=="number"?{index:jn}:jn)},Wn=ie.useCallback(function(Ei){return Gi==="combobox"?!1:wi.has(Ei)},[Gi,(0,xe.Z)(wi).toString(),wi.size]),Un=function(jn){for(var oi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Pi=$t.length,Tn=0;Tn<Pi;Tn+=1){var ti=(jn+Tn*oi+Pi)%Pi,Jn=$t[ti]||{},Mn=Jn.group,ci=Jn.data;if(!Mn&&!(ci!=null&&ci.disabled)&&(Wn(ci.value)||!Qe))return ti}return-1},mi=ie.useState(function(){return Un(0)}),zn=(0,ke.Z)(mi,2),cn=zn[0],Yn=zn[1],Ki=function(jn){var oi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Yn(jn);var Pi={source:oi?"keyboard":"mouse"},Tn=$t[jn];if(!Tn){Fr(null,-1,Pi);return}Fr(Tn.value,jn,Pi)};(0,ie.useEffect)(function(){Ki(Ur!==!1?Un(0):-1)},[$t.length,bn]);var Wi=ie.useCallback(function(Ei){return Gi==="combobox"?String(Ei).toLowerCase()===bn.toLowerCase():wi.has(Ei)},[Gi,bn,(0,xe.Z)(wi).toString(),wi.size]);(0,ie.useEffect)(function(){var Ei=setTimeout(function(){if(!Mi&&xi&&wi.size===1){var oi=Array.from(wi)[0],Pi=$t.findIndex(function(Tn){var ti=Tn.data;return bn?String(ti.value).startsWith(bn):ti.value===oi});Pi!==-1&&(Ki(Pi),rn(Pi))}});if(xi){var jn;(jn=_t.current)===null||jn===void 0||jn.scrollTo(void 0)}return function(){return clearTimeout(Ei)}},[xi,bn]);var vn=function(jn){jn!==void 0&&vo(jn,{selected:!wi.has(jn)}),Mi||Ln(!1)};if(ie.useImperativeHandle(wn,function(){return{onKeyDown:function(jn){var oi=jn.which,Pi=jn.ctrlKey;switch(oi){case Jt.Z.N:case Jt.Z.P:case Jt.Z.UP:case Jt.Z.DOWN:{var Tn=0;if(oi===Jt.Z.UP?Tn=-1:oi===Jt.Z.DOWN?Tn=1:kr()&&Pi&&(oi===Jt.Z.N?Tn=1:oi===Jt.Z.P&&(Tn=-1)),Tn!==0){var ti=Un(cn+Tn,Tn);rn(ti),Ki(ti,!0)}break}case Jt.Z.TAB:case Jt.Z.ENTER:{var Jn,Mn=$t[cn];Mn&&!(Mn!=null&&(Jn=Mn.data)!==null&&Jn!==void 0&&Jn.disabled)&&!Qe?vn(Mn.value):vn(void 0),xi&&jn.preventDefault();break}case Jt.Z.ESC:Ln(!1),xi&&jn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(jn){rn(jn)}}}),$t.length===0)return ie.createElement("div",{role:"listbox",id:"".concat(mn,"_list"),className:"".concat(qt,"-empty"),onMouseDown:le},On);var Ht=Object.keys(ir).map(function(Ei){return ir[Ei]}),Ii=function(jn){return jn.label};function Mr(Ei,jn){var oi=Ei.group;return{role:oi?"presentation":"option",id:"".concat(mn,"_list_").concat(jn)}}var Rr=function(jn){var oi=$t[jn];if(!oi)return null;var Pi=oi.data||{},Tn=Pi.value,ti=oi.group,Jn=(0,de.Z)(Pi,!0),Mn=Ii(oi);return oi?ie.createElement("div",(0,bt.Z)({"aria-label":typeof Mn=="string"&&!ti?Mn:null},Jn,{key:jn},Mr(oi,jn),{"aria-selected":Wi(Tn)}),Tn):null},yr={role:"listbox",id:"".concat(mn,"_list")};return ie.createElement(ie.Fragment,null,li&&ie.createElement("div",(0,bt.Z)({},yr,{style:{height:0,width:0,overflow:"hidden"}}),Rr(cn-1),Rr(cn),Rr(cn+1)),ie.createElement(Yr.Z,{itemKey:"key",ref:_t,data:$t,height:lr,itemHeight:xr,fullHeight:!1,onMouseDown:le,onScroll:Yi,virtual:li,direction:br,innerProps:li?null:yr},function(Ei,jn){var oi=Ei.group,Pi=Ei.groupOption,Tn=Ei.data,ti=Ei.label,Jn=Ei.value,Mn=Tn.key;if(oi){var ci,Je=(ci=Tn.title)!==null&&ci!==void 0?ci:Oo(ti)?ti.toString():void 0;return ie.createElement("div",{className:we()(qt,"".concat(qt,"-group"),Tn.className),title:Je},ti!==void 0?ti:Mn)}var er=Tn.disabled,fr=Tn.title,Or=Tn.children,nr=Tn.style,jr=Tn.className,Kr=(0,ye.Z)(Tn,no),Ho=(0,ar.Z)(Kr,Ht),ao=Wn(Jn),bo=er||!ao&&Qe,ho="".concat(qt,"-option"),be=we()(qt,ho,jr,(0,Me.Z)((0,Me.Z)((0,Me.Z)((0,Me.Z)({},"".concat(ho,"-grouped"),Pi),"".concat(ho,"-active"),cn===jn&&!bo),"".concat(ho,"-disabled"),bo),"".concat(ho,"-selected"),ao)),co=Ii(Ei),ls=!Be||typeof Be=="function"||ao,ks=typeof co=="number"?co:co||Jn,lo=Oo(ks)?ks.toString():void 0;return fr!==void 0&&(lo=fr),ie.createElement("div",(0,bt.Z)({},(0,de.Z)(Ho),li?{}:Mr(Ei,jn),{"aria-selected":Wi(Jn),className:be,title:lo,onMouseMove:function(){cn===jn||bo||Ki(jn)},onClick:function(){bo||vn(Jn)},style:nr}),ie.createElement("div",{className:"".concat(ho,"-content")},typeof Ar=="function"?Ar(Ei,{index:jn}):ks),ie.isValidElement(Be)||ao,ls&&ie.createElement(ct,{className:"".concat(qt,"-option-state"),customizeIcon:Be,customizeIconProps:{value:Jn,disabled:bo,isSelected:ao}},ao?"\u2713":null))}))},ko=ie.forwardRef($o),oo=ko,tr=function(Yt,he){var wn=ie.useRef({values:new Map,options:new Map}),un=ie.useMemo(function(){var mn=wn.current,xi=mn.values,Mi=mn.options,Gi=Yt.map(function(On){if(On.label===void 0){var Yi;return(0,je.Z)((0,je.Z)({},On),{},{label:(Yi=xi.get(On.value))===null||Yi===void 0?void 0:Yi.label})}return On}),bn=new Map,Ln=new Map;return Gi.forEach(function(On){bn.set(On.value,On),Ln.set(On.value,he.get(On.value)||Mi.get(On.value))}),wn.current.values=bn,wn.current.options=Ln,Gi},[Yt,he]),Ne=ie.useCallback(function(mn){return he.get(mn)||wn.current.options.get(mn)},[he]);return[un,Ne]};function Hr(Yt,he){return En(Yt).join("").toUpperCase().includes(he)}var Pt=function(Yt,he,wn,un,Ne){return ie.useMemo(function(){if(!wn||un===!1)return Yt;var mn=he.options,xi=he.label,Mi=he.value,Gi=[],bn=typeof un=="function",Ln=wn.toUpperCase(),On=bn?un:function(ki,hn){return Ne?Hr(hn[Ne],Ln):hn[mn]?Hr(hn[xi!=="children"?xi:"label"],Ln):Hr(hn[Mi],Ln)},Yi=bn?function(ki){return _e(ki)}:function(ki){return ki};return Yt.forEach(function(ki){if(ki[mn]){var hn=On(wn,Yi(ki));if(hn)Gi.push(ki);else{var Vn=ki[mn].filter(function(Fr){return On(wn,Yi(Fr))});Vn.length&&Gi.push((0,je.Z)((0,je.Z)({},ki),{},(0,Me.Z)({},mn,Vn)))}return}On(wn,Yi(ki))&&Gi.push(ki)}),Gi},[Yt,un,Ne,wn,he])},so=ne(6551),zr=ne(11592),ri=["children","value"],pi=["children"];function Ci(Yt){var he=Yt,wn=he.key,un=he.props,Ne=un.children,mn=un.value,xi=(0,ye.Z)(un,ri);return(0,je.Z)({key:wn,value:mn!==void 0?mn:wn,children:Ne},xi)}function Qi(Yt){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,zr.Z)(Yt).map(function(wn,un){if(!ie.isValidElement(wn)||!wn.type)return null;var Ne=wn,mn=Ne.type.isSelectOptGroup,xi=Ne.key,Mi=Ne.props,Gi=Mi.children,bn=(0,ye.Z)(Mi,pi);return he||!mn?Ci(wn):(0,je.Z)((0,je.Z)({key:"__RC_SELECT_GRP__".concat(xi===null?un:xi,"__"),label:xi},bn),{},{options:Qi(Gi)})}).filter(function(wn){return wn})}var Tr=function(he,wn,un,Ne,mn){return ie.useMemo(function(){var xi=he,Mi=!he;Mi&&(xi=Qi(wn));var Gi=new Map,bn=new Map,Ln=function(ki,hn,Vn){Vn&&typeof Vn=="string"&&ki.set(hn[Vn],hn)},On=function Yi(ki){for(var hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Vn=0;Vn<ki.length;Vn+=1){var Fr=ki[Vn];!Fr[un.options]||hn?(Gi.set(Fr[un.value],Fr),Ln(bn,Fr,un.label),Ln(bn,Fr,Ne),Ln(bn,Fr,mn)):Yi(Fr[un.options],!0)}};return On(xi),{options:xi,valueOptions:Gi,labelOptions:bn}},[he,wn,un,Ne,mn])},Re=Tr;function Oe(Yt){var he=ie.useRef();he.current=Yt;var wn=ie.useCallback(function(){return he.current.apply(he,arguments)},[]);return wn}function Te(Yt){var he=Yt.mode,wn=Yt.options,un=Yt.children,Ne=Yt.backfill,mn=Yt.allowClear,xi=Yt.placeholder,Mi=Yt.getInputElement,Gi=Yt.showSearch,bn=Yt.onSearch,Ln=Yt.defaultOpen,On=Yt.autoFocus,Yi=Yt.labelInValue,ki=Yt.value,hn=Yt.inputValue,Vn=Yt.optionLabelProp,Fr=isMultiple(he),Ur=Gi!==void 0?Gi:Fr||he==="combobox",vo=wn||convertChildrenToData(un);if(warning(he!=="tags"||vo.every(function(li){return!li.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),he==="tags"||he==="combobox"){var Be=vo.some(function(li){return li.options?li.options.some(function(br){return typeof("value"in br?br.value:br.key)=="number"}):typeof("value"in li?li.value:li.key)=="number"});warning(!Be,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(he!=="combobox"||!Vn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(he==="combobox"||!Ne,"`backfill` only works with `combobox` mode."),warning(he==="combobox"||!Mi,"`getInputElement` only work with `combobox` mode."),noteOnce(he!=="combobox"||!Mi||!mn||!xi,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),bn&&!Ur&&he!=="combobox"&&he!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ln||On,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ki!=null){var wi=toArray(ki);warning(!Yi||wi.every(function(li){return _typeof(li)==="object"&&("key"in li||"value"in li)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Fr||Array.isArray(ki),"`value` should be array when `mode` is `multiple` or `tags`")}if(un){var ir=null;toNodeArray(un).some(function(li){if(!React.isValidElement(li)||!li.type)return!1;var br=li,lr=br.type;if(lr.isSelectOption)return!1;if(lr.isSelectOptGroup){var xr=toNodeArray(li.props.children).every(function(Ar){return!React.isValidElement(Ar)||!li.type||Ar.type.isSelectOption?!0:(ir=Ar.type,!1)});return!xr}return ir=lr,!0}),ir&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ir.displayName||ir.name||ir,"`.")),warning(hn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ze(Yt,he){if(Yt){var wn=function un(Ne){for(var mn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,xi=0;xi<Ne.length;xi++){var Mi=Ne[xi];if(Mi[he==null?void 0:he.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!mn&&Array.isArray(Mi[he==null?void 0:he.options])&&un(Mi[he==null?void 0:he.options],!0))break}};wn(Yt)}}var yi=null,hi=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Zi=["inputValue"];function He(Yt){return!Yt||(0,pe.Z)(Yt)!=="object"}var Le=ie.forwardRef(function(Yt,he){var wn=Yt.id,un=Yt.mode,Ne=Yt.prefixCls,mn=Ne===void 0?"rc-select":Ne,xi=Yt.backfill,Mi=Yt.fieldNames,Gi=Yt.inputValue,bn=Yt.searchValue,Ln=Yt.onSearch,On=Yt.autoClearSearchValue,Yi=On===void 0?!0:On,ki=Yt.onSelect,hn=Yt.onDeselect,Vn=Yt.dropdownMatchSelectWidth,Fr=Vn===void 0?!0:Vn,Ur=Yt.filterOption,vo=Yt.filterSort,Be=Yt.optionFilterProp,wi=Yt.optionLabelProp,ir=Yt.options,li=Yt.optionRender,br=Yt.children,lr=Yt.defaultActiveFirstOption,xr=Yt.menuItemSelectedIcon,Ar=Yt.virtual,qt=Yt.direction,$t=Yt.listHeight,_t=$t===void 0?200:$t,Qe=Yt.listItemHeight,le=Qe===void 0?20:Qe,rn=Yt.labelRender,Wn=Yt.value,Un=Yt.defaultValue,mi=Yt.labelInValue,zn=Yt.onChange,cn=Yt.maxCount,Yn=(0,ye.Z)(Yt,hi),Ki=(0,so.ZP)(wn),Wi=ii(un),vn=!!(!ir&&br),Ht=ie.useMemo(function(){return Ur===void 0&&un==="combobox"?!1:Ur},[Ur,un]),Ii=ie.useMemo(function(){return Qn(Mi,vn)},[JSON.stringify(Mi),vn]),Mr=(0,Ue.Z)("",{value:bn!==void 0?bn:Gi,postState:function(dr){return dr||""}}),Rr=(0,ke.Z)(Mr,2),yr=Rr[0],Ei=Rr[1],jn=Re(ir,br,Ii,Be,wi),oi=jn.valueOptions,Pi=jn.labelOptions,Tn=jn.options,ti=ie.useCallback(function($i){var dr=En($i);return dr.map(function(Cr){var Dr,So,Ui,xo,ea;if(He(Cr))Dr=Cr;else{var Bs;Ui=Cr.key,So=Cr.label,Dr=(Bs=Cr.value)!==null&&Bs!==void 0?Bs:Ui}var Go=oi.get(Dr);if(Go){var _s;if(So===void 0&&(So=Go==null?void 0:Go[wi||Ii.label]),Ui===void 0&&(Ui=(_s=Go==null?void 0:Go.key)!==null&&_s!==void 0?_s:Dr),xo=Go==null?void 0:Go.disabled,ea=Go==null?void 0:Go.title,0)var bs}return{label:So,value:Dr,key:Ui,disabled:xo,title:ea}})},[Ii,wi,oi]),Jn=(0,Ue.Z)(Un,{value:Wn}),Mn=(0,ke.Z)(Jn,2),ci=Mn[0],Je=Mn[1],er=ie.useMemo(function(){var $i,dr=Wi&&ci===null?[]:ci,Cr=ti(dr);return un==="combobox"&&Kt(($i=Cr[0])===null||$i===void 0?void 0:$i.value)?[]:Cr},[ci,ti,un,Wi]),fr=tr(er,oi),Or=(0,ke.Z)(fr,2),nr=Or[0],jr=Or[1],Kr=ie.useMemo(function(){if(!un&&nr.length===1){var $i=nr[0];if($i.value===null&&($i.label===null||$i.label===void 0))return[]}return nr.map(function(dr){var Cr;return(0,je.Z)((0,je.Z)({},dr),{},{label:(Cr=typeof rn=="function"?rn(dr):dr.label)!==null&&Cr!==void 0?Cr:dr.value})})},[un,nr,rn]),Ho=ie.useMemo(function(){return new Set(nr.map(function($i){return $i.value}))},[nr]);ie.useEffect(function(){if(un==="combobox"){var $i,dr=($i=nr[0])===null||$i===void 0?void 0:$i.value;Ei(ue(dr)?String(dr):"")}},[nr]);var ao=Oe(function($i,dr){var Cr=dr!=null?dr:$i;return(0,Me.Z)((0,Me.Z)({},Ii.value,$i),Ii.label,Cr)}),bo=ie.useMemo(function(){if(un!=="tags")return Tn;var $i=(0,xe.Z)(Tn),dr=function(Dr){return oi.has(Dr)};return(0,xe.Z)(nr).sort(function(Cr,Dr){return Cr.value<Dr.value?-1:1}).forEach(function(Cr){var Dr=Cr.value;dr(Dr)||$i.push(ao(Dr,Cr.label))}),$i},[ao,Tn,oi,nr,un]),ho=Pt(bo,Ii,yr,Ht,Be),be=ie.useMemo(function(){return un!=="tags"||!yr||ho.some(function($i){return $i[Be||"value"]===yr})||ho.some(function($i){return $i[Ii.value]===yr})?ho:[ao(yr)].concat((0,xe.Z)(ho))},[ao,Be,un,ho,yr,Ii]),co=function $i(dr){var Cr=(0,xe.Z)(dr).sort(function(Dr,So){return vo(Dr,So,{searchValue:yr})});return Cr.map(function(Dr){return Array.isArray(Dr.options)?(0,je.Z)((0,je.Z)({},Dr),{},{options:Dr.options.length>0?$i(Dr.options):Dr.options}):Dr})},ls=ie.useMemo(function(){return vo?co(be):be},[be,vo,yr]),ks=ie.useMemo(function(){return _n(ls,{fieldNames:Ii,childrenAsData:vn})},[ls,Ii,vn]),lo=function(dr){var Cr=ti(dr);if(Je(Cr),zn&&(Cr.length!==nr.length||Cr.some(function(Ui,xo){var ea;return((ea=nr[xo])===null||ea===void 0?void 0:ea.value)!==(Ui==null?void 0:Ui.value)}))){var Dr=mi?Cr:Cr.map(function(Ui){return Ui.value}),So=Cr.map(function(Ui){return _e(jr(Ui.value))});zn(Wi?Dr:Dr[0],Wi?So:So[0])}},xa=ie.useState(null),ta=(0,ke.Z)(xa,2),Da=ta[0],Gr=ta[1],Ro=ie.useState(0),Vs=(0,ke.Z)(Ro,2),Vl=Vs[0],zA=Vs[1],Ba=lr!==void 0?lr:un!=="combobox",Xi=ie.useCallback(function($i,dr){var Cr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Dr=Cr.source,So=Dr===void 0?"keyboard":Dr;zA(dr),xi&&un==="combobox"&&$i!==null&&So==="keyboard"&&Gr(String($i))},[xi,un]),xA=function(dr,Cr,Dr){var So=function(){var ns,xl=jr(dr);return[mi?{label:xl==null?void 0:xl[Ii.label],value:dr,key:(ns=xl==null?void 0:xl.key)!==null&&ns!==void 0?ns:dr}:dr,_e(xl)]};if(Cr&&ki){var Ui=So(),xo=(0,ke.Z)(Ui,2),ea=xo[0],Bs=xo[1];ki(ea,Bs)}else if(!Cr&&hn&&Dr!=="clear"){var Go=So(),_s=(0,ke.Z)(Go,2),bs=_s[0],ca=_s[1];hn(bs,ca)}},jA=Oe(function($i,dr){var Cr,Dr=Wi?dr.selected:!0;Dr?Cr=Wi?[].concat((0,xe.Z)(nr),[$i]):[$i]:Cr=nr.filter(function(So){return So.value!==$i}),lo(Cr),xA($i,Dr),un==="combobox"?Gr(""):(!ii||Yi)&&(Ei(""),Gr(""))}),Wa=function(dr,Cr){lo(dr);var Dr=Cr.type,So=Cr.values;(Dr==="remove"||Dr==="clear")&&So.forEach(function(Ui){xA(Ui.value,!1,Dr)})},Hs=function(dr,Cr){if(Ei(dr),Gr(null),Cr.source==="submit"){var Dr=(dr||"").trim();if(Dr){var So=Array.from(new Set([].concat((0,xe.Z)(Ho),[Dr])));lo(So),xA(Dr,!0),Ei("")}return}Cr.source!=="blur"&&(un==="combobox"&&lo(dr),Ln==null||Ln(dr))},hu=function(dr){var Cr=dr;un!=="tags"&&(Cr=dr.map(function(So){var Ui=Pi.get(So);return Ui==null?void 0:Ui.value}).filter(function(So){return So!==void 0}));var Dr=Array.from(new Set([].concat((0,xe.Z)(Ho),(0,xe.Z)(Cr))));lo(Dr),Dr.forEach(function(So){xA(So,!0)})},ni=ie.useMemo(function(){var $i=Ar!==!1&&Fr!==!1;return(0,je.Z)((0,je.Z)({},jn),{},{flattenOptions:ks,onActiveValue:Xi,defaultActiveFirstOption:Ba,onSelect:jA,menuItemSelectedIcon:xr,rawValues:Ho,fieldNames:Ii,virtual:$i,direction:qt,listHeight:_t,listItemHeight:le,childrenAsData:vn,maxCount:cn,optionRender:li})},[cn,jn,ks,Xi,Ba,jA,xr,Ho,Ii,Ar,Fr,qt,_t,le,vn,li]);return ie.createElement(ai.Provider,{value:ni},ie.createElement(Vi,(0,bt.Z)({},Yn,{id:Ki,prefixCls:mn,ref:he,omitDomProps:Zi,mode:un,displayValues:Kr,onDisplayValuesChange:Wa,direction:qt,searchValue:yr,onSearch:Hs,autoClearSearchValue:Yi,onSearchSplit:hu,dropdownMatchSelectWidth:Fr,OptionList:oo,emptyOptions:!ks.length,activeValue:Da,activeDescendantId:"".concat(Ki,"_list_").concat(Vl)})))}),kn=Le;kn.Option=Sr,kn.OptGroup=pr;var Bi=kn,sn=Bi},63158:function(Pn,gi,ne){"use strict";var bt=ne(67711),xe=ne(52873),Me=ne(16886),je=ne(33346),ke=ne(59301),ye=ne(92310),pe=ne.n(ye),Ue=ne(18929),Pe=ne(10228),ie=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],An=ke.forwardRef(function(we,xn){var Dt,et=we.prefixCls,nt=et===void 0?"rc-switch":et,ct=we.className,lt=we.checked,gt=we.defaultChecked,yt=we.disabled,Et=we.loadingIcon,Nt=we.checkedChildren,Vt=we.unCheckedChildren,Jt=we.onClick,ce=we.onChange,de=we.onKeyDown,Ae=(0,je.Z)(we,ie),De=(0,Ue.Z)(!1,{value:lt,defaultValue:gt}),ve=(0,Me.Z)(De,2),We=ve[0],nn=ve[1];function an(fi,ue){var Kt=We;return yt||(Kt=fi,nn(Kt),ce==null||ce(Kt,ue)),Kt}function In(fi){fi.which===Pe.Z.LEFT?an(!1,fi):fi.which===Pe.Z.RIGHT&&an(!0,fi),de==null||de(fi)}function En(fi){var ue=an(!We,fi);Jt==null||Jt(ue,fi)}var ui=pe()(nt,ct,(Dt={},(0,xe.Z)(Dt,"".concat(nt,"-checked"),We),(0,xe.Z)(Dt,"".concat(nt,"-disabled"),yt),Dt));return ke.createElement("button",(0,bt.Z)({},Ae,{type:"button",role:"switch","aria-checked":We,disabled:yt,className:ui,ref:xn,onKeyDown:In,onClick:En}),Et,ke.createElement("span",{className:"".concat(nt,"-inner")},ke.createElement("span",{className:"".concat(nt,"-inner-checked")},Nt),ke.createElement("span",{className:"".concat(nt,"-inner-unchecked")},Vt)))});An.displayName="Switch",gi.Z=An},22711:function(Pn,gi,ne){"use strict";ne.r(gi),ne.d(gi,{ResizableTextArea:function(){return ve},default:function(){return In}});var bt=ne(67711),xe=ne(52873),Me=ne(98506),je=ne(15142),ke=ne(16886),ye=ne(33346),pe=ne(92310),Ue=ne.n(pe),Pe=ne(36901),ie=ne(66003),An=ne(30292),we=ne(18929),xn=ne(59301),Dt=ne(26420),et=ne(29301),nt=ne(34280),ct=ne(16089),lt=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,gt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],yt={},Et;function Nt(En){var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fi=En.getAttribute("id")||En.getAttribute("data-reactid")||En.getAttribute("name");if(ui&&yt[fi])return yt[fi];var ue=window.getComputedStyle(En),Kt=ue.getPropertyValue("box-sizing")||ue.getPropertyValue("-moz-box-sizing")||ue.getPropertyValue("-webkit-box-sizing"),dn=parseFloat(ue.getPropertyValue("padding-bottom"))+parseFloat(ue.getPropertyValue("padding-top")),Ai=parseFloat(ue.getPropertyValue("border-bottom-width"))+parseFloat(ue.getPropertyValue("border-top-width")),qn=gt.map(function(yn){return"".concat(yn,":").concat(ue.getPropertyValue(yn))}).join(";"),Ke={sizingStyle:qn,paddingSize:dn,borderSize:Ai,boxSizing:Kt};return ui&&fi&&(yt[fi]=Ke),Ke}function Vt(En){var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Et||(Et=document.createElement("textarea"),Et.setAttribute("tab-index","-1"),Et.setAttribute("aria-hidden","true"),Et.setAttribute("name","hiddenTextarea"),document.body.appendChild(Et)),En.getAttribute("wrap")?Et.setAttribute("wrap",En.getAttribute("wrap")):Et.removeAttribute("wrap");var Kt=Nt(En,ui),dn=Kt.paddingSize,Ai=Kt.borderSize,qn=Kt.boxSizing,Ke=Kt.sizingStyle;Et.setAttribute("style","".concat(Ke,";").concat(lt)),Et.value=En.value||En.placeholder||"";var yn=void 0,Sn=void 0,si,Bn=Et.scrollHeight;if(qn==="border-box"?Bn+=Ai:qn==="content-box"&&(Bn-=dn),fi!==null||ue!==null){Et.value=" ";var Se=Et.scrollHeight-dn;fi!==null&&(yn=Se*fi,qn==="border-box"&&(yn=yn+dn+Ai),Bn=Math.max(yn,Bn)),ue!==null&&(Sn=Se*ue,qn==="border-box"&&(Sn=Sn+dn+Ai),si=Bn>Sn?"":"hidden",Bn=Math.min(Sn,Bn))}var Fe={height:Bn,overflowY:si,resize:"none"};return yn&&(Fe.minHeight=yn),Sn&&(Fe.maxHeight=Sn),Fe}var Jt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ce=0,de=1,Ae=2,De=xn.forwardRef(function(En,ui){var fi=En,ue=fi.prefixCls,Kt=fi.defaultValue,dn=fi.value,Ai=fi.autoSize,qn=fi.onResize,Ke=fi.className,yn=fi.style,Sn=fi.disabled,si=fi.onChange,Bn=fi.onInternalAutoSize,Se=(0,ye.Z)(fi,Jt),Fe=(0,we.Z)(Kt,{value:dn,postState:function(Sr){return Sr!=null?Sr:""}}),pn=(0,ke.Z)(Fe,2),Cn=pn[0],Ut=pn[1],Lt=function(Sr){Ut(Sr.target.value),si==null||si(Sr)},Bt=xn.useRef();xn.useImperativeHandle(ui,function(){return{textArea:Bt.current}});var Tt=xn.useMemo(function(){return Ai&&(0,Dt.Z)(Ai)==="object"?[Ai.minRows,Ai.maxRows]:[]},[Ai]),jt=(0,ke.Z)(Tt,2),kt=jt[0],Ce=jt[1],on=!!Ai,Gn=function(){try{if(document.activeElement===Bt.current){var Sr=Bt.current,$r=Sr.selectionStart,ar=Sr.selectionEnd,Yr=Sr.scrollTop;Bt.current.setSelectionRange($r,ar),Bt.current.scrollTop=Yr}}catch(kr){}},Qn=xn.useState(Ae),_n=(0,ke.Z)(Qn,2),_e=_n[0],Zn=_n[1],Dn=xn.useState(),ai=(0,ke.Z)(Dn,2),vi=ai[0],Rn=ai[1],_i=function(){Zn(ce)};(0,nt.Z)(function(){on&&_i()},[dn,kt,Ce,on]),(0,nt.Z)(function(){if(_e===ce)Zn(de);else if(_e===de){var mr=Vt(Bt.current,!1,kt,Ce);Zn(Ae),Rn(mr)}else Gn()},[_e]);var ii=xn.useRef(),ji=function(){ct.Z.cancel(ii.current)},Vi=function(Sr){_e===Ae&&(qn==null||qn(Sr),Ai&&(ji(),ii.current=(0,ct.Z)(function(){_i()})))};xn.useEffect(function(){return ji},[]);var Wr=on?vi:null,pr=(0,Me.Z)((0,Me.Z)({},yn),Wr);return(_e===ce||_e===de)&&(pr.overflowY="hidden",pr.overflowX="hidden"),xn.createElement(et.Z,{onResize:Vi,disabled:!(Ai||qn)},xn.createElement("textarea",(0,bt.Z)({},Se,{ref:Bt,style:pr,className:Ue()(ue,Ke,(0,xe.Z)({},"".concat(ue,"-disabled"),Sn)),disabled:Sn,value:Cn,onChange:Lt})))}),ve=De,We=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],nn=xn.forwardRef(function(En,ui){var fi,ue=En.defaultValue,Kt=En.value,dn=En.onFocus,Ai=En.onBlur,qn=En.onChange,Ke=En.allowClear,yn=En.maxLength,Sn=En.onCompositionStart,si=En.onCompositionEnd,Bn=En.suffix,Se=En.prefixCls,Fe=Se===void 0?"rc-textarea":Se,pn=En.showCount,Cn=En.count,Ut=En.className,Lt=En.style,Bt=En.disabled,Tt=En.hidden,jt=En.classNames,kt=En.styles,Ce=En.onResize,on=En.onClear,Gn=En.onPressEnter,Qn=En.readOnly,_n=En.autoSize,_e=En.onKeyDown,Zn=(0,ye.Z)(En,We),Dn=(0,we.Z)(ue,{value:Kt,defaultValue:ue}),ai=(0,ke.Z)(Dn,2),vi=ai[0],Rn=ai[1],_i=vi==null?"":String(vi),ii=xn.useState(!1),ji=(0,ke.Z)(ii,2),Vi=ji[0],Wr=ji[1],pr=xn.useRef(!1),mr=xn.useState(null),Sr=(0,ke.Z)(mr,2),$r=Sr[0],ar=Sr[1],Yr=(0,xn.useRef)(null),kr=(0,xn.useRef)(null),no=function(){var kn;return(kn=kr.current)===null||kn===void 0?void 0:kn.textArea},Oo=function(){no().focus()};(0,xn.useImperativeHandle)(ui,function(){var Le;return{resizableTextArea:kr.current,focus:Oo,blur:function(){no().blur()},nativeElement:((Le=Yr.current)===null||Le===void 0?void 0:Le.nativeElement)||no()}}),(0,xn.useEffect)(function(){Wr(function(Le){return!Bt&&Le})},[Bt]);var $o=xn.useState(null),ko=(0,ke.Z)($o,2),oo=ko[0],tr=ko[1];xn.useEffect(function(){if(oo){var Le;(Le=no()).setSelectionRange.apply(Le,(0,je.Z)(oo))}},[oo]);var Hr=(0,ie.Z)(Cn,pn),Pt=(fi=Hr.max)!==null&&fi!==void 0?fi:yn,so=Number(Pt)>0,zr=Hr.strategy(_i),ri=!!Pt&&zr>Pt,pi=function(kn,Bi){var sn=Bi;!pr.current&&Hr.exceedFormatter&&Hr.max&&Hr.strategy(Bi)>Hr.max&&(sn=Hr.exceedFormatter(Bi,{max:Hr.max}),Bi!==sn&&tr([no().selectionStart||0,no().selectionEnd||0])),Rn(sn),(0,An.rJ)(kn.currentTarget,kn,qn,sn)},Ci=function(kn){pr.current=!0,Sn==null||Sn(kn)},Qi=function(kn){pr.current=!1,pi(kn,kn.currentTarget.value),si==null||si(kn)},Tr=function(kn){pi(kn,kn.target.value)},Re=function(kn){kn.key==="Enter"&&Gn&&Gn(kn),_e==null||_e(kn)},Oe=function(kn){Wr(!0),dn==null||dn(kn)},Te=function(kn){Wr(!1),Ai==null||Ai(kn)},Ze=function(kn){Rn(""),Oo(),(0,An.rJ)(no(),kn,qn)},yi=Bn,hi;Hr.show&&(Hr.showFormatter?hi=Hr.showFormatter({value:_i,count:zr,maxLength:Pt}):hi="".concat(zr).concat(so?" / ".concat(Pt):""),yi=xn.createElement(xn.Fragment,null,yi,xn.createElement("span",{className:Ue()("".concat(Fe,"-data-count"),jt==null?void 0:jt.count),style:kt==null?void 0:kt.count},hi)));var Zi=function(kn){var Bi;Ce==null||Ce(kn),(Bi=no())!==null&&Bi!==void 0&&Bi.style.height&&ar(!0)},He=!_n&&!pn&&!Ke;return xn.createElement(Pe.BaseInput,{ref:Yr,value:_i,allowClear:Ke,handleReset:Ze,suffix:yi,prefixCls:Fe,classNames:(0,Me.Z)((0,Me.Z)({},jt),{},{affixWrapper:Ue()(jt==null?void 0:jt.affixWrapper,(0,xe.Z)((0,xe.Z)({},"".concat(Fe,"-show-count"),pn),"".concat(Fe,"-textarea-allow-clear"),Ke))}),disabled:Bt,focused:Vi,className:Ue()(Ut,ri&&"".concat(Fe,"-out-of-range")),style:(0,Me.Z)((0,Me.Z)({},Lt),$r&&!He?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof hi=="string"?hi:void 0}},hidden:Tt,readOnly:Qn,onClear:on},xn.createElement(ve,(0,bt.Z)({},Zn,{autoSize:_n,maxLength:yn,onKeyDown:Re,onChange:Tr,onFocus:Oe,onBlur:Te,onCompositionStart:Ci,onCompositionEnd:Qi,className:Ue()(jt==null?void 0:jt.textarea),style:(0,Me.Z)((0,Me.Z)({},kt==null?void 0:kt.textarea),{},{resize:Lt==null?void 0:Lt.resize}),disabled:Bt,prefixCls:Fe,onResize:Zi,ref:kr,readOnly:Qn})))}),an=nn,In=an},6790:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return Cn}});var bt=ne(67711),xe=ne(26420),Me=ne(98506),je=ne(52873),ke=ne(16886),ye=ne(33346),pe=ne(92310),Ue=ne.n(pe),Pe=ne(29301),ie=ne(70425),An=ne(34280),we=ne(59301),xn=ne(4676),Dt=we.forwardRef(function(Ut,Lt){var Bt=Ut.height,Tt=Ut.offsetY,jt=Ut.offsetX,kt=Ut.children,Ce=Ut.prefixCls,on=Ut.onInnerResize,Gn=Ut.innerProps,Qn=Ut.rtl,_n=Ut.extra,_e={},Zn={display:"flex",flexDirection:"column"};return Tt!==void 0&&(_e={height:Bt,position:"relative",overflow:"hidden"},Zn=(0,Me.Z)((0,Me.Z)({},Zn),{},(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)({transform:"translateY(".concat(Tt,"px)")},Qn?"marginRight":"marginLeft",-jt),"position","absolute"),"left",0),"right",0),"top",0))),we.createElement("div",{style:_e},we.createElement(Pe.Z,{onResize:function(ai){var vi=ai.offsetHeight;vi&&on&&on()}},we.createElement("div",(0,bt.Z)({style:Zn,className:Ue()((0,je.Z)({},"".concat(Ce,"-holder-inner"),Ce)),ref:Lt},Gn),kt,_n)))});Dt.displayName="Filler";var et=Dt;function nt(Ut){var Lt=Ut.children,Bt=Ut.setRef,Tt=we.useCallback(function(jt){Bt(jt)},[]);return we.cloneElement(Lt,{ref:Tt})}function ct(Ut,Lt,Bt,Tt,jt,kt,Ce,on){var Gn=on.getKey;return Ut.slice(Lt,Bt+1).map(function(Qn,_n){var _e=Lt+_n,Zn=Ce(Qn,_e,{style:{width:Tt},offsetX:jt}),Dn=Gn(Qn);return we.createElement(nt,{key:Dn,setRef:function(vi){return kt(Qn,vi)}},Zn)})}function lt(Ut,Lt,Bt,Tt){var jt=Bt-Ut,kt=Lt-Bt,Ce=Math.min(jt,kt)*2;if(Tt<=Ce){var on=Math.floor(Tt/2);return Tt%2?Bt+on+1:Bt-on}return jt>kt?Bt-(Tt-kt):Bt+(Tt-jt)}function gt(Ut,Lt,Bt){var Tt=Ut.length,jt=Lt.length,kt,Ce;if(Tt===0&&jt===0)return null;Tt<jt?(kt=Ut,Ce=Lt):(kt=Lt,Ce=Ut);var on={__EMPTY_ITEM__:!0};function Gn(ai){return ai!==void 0?Bt(ai):on}for(var Qn=null,_n=Math.abs(Tt-jt)!==1,_e=0;_e<Ce.length;_e+=1){var Zn=Gn(kt[_e]),Dn=Gn(Ce[_e]);if(Zn!==Dn){Qn=_e,_n=_n||Zn!==Gn(Ce[_e+1]);break}}return Qn===null?null:{index:Qn,multiple:_n}}function yt(Ut,Lt,Bt){var Tt=we.useState(Ut),jt=(0,ke.Z)(Tt,2),kt=jt[0],Ce=jt[1],on=we.useState(null),Gn=(0,ke.Z)(on,2),Qn=Gn[0],_n=Gn[1];return we.useEffect(function(){var _e=gt(kt||[],Ut||[],Lt);(_e==null?void 0:_e.index)!==void 0&&(Bt==null||Bt(_e.index),_n(Ut[_e.index])),Ce(Ut)},[Ut]),[Qn]}var Et=ne(16089),Nt=(typeof navigator=="undefined"?"undefined":(0,xe.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Vt=Nt,Jt=function(Ut,Lt,Bt,Tt){var jt=(0,we.useRef)(!1),kt=(0,we.useRef)(null);function Ce(){clearTimeout(kt.current),jt.current=!0,kt.current=setTimeout(function(){jt.current=!1},50)}var on=(0,we.useRef)({top:Ut,bottom:Lt,left:Bt,right:Tt});return on.current.top=Ut,on.current.bottom=Lt,on.current.left=Bt,on.current.right=Tt,function(Gn,Qn){var _n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,_e=Gn?Qn<0&&on.current.left||Qn>0&&on.current.right:Qn<0&&on.current.top||Qn>0&&on.current.bottom;return _n&&_e?(clearTimeout(kt.current),jt.current=!1):(!_e||jt.current)&&Ce(),!jt.current&&_e}};function ce(Ut,Lt,Bt,Tt,jt,kt,Ce){var on=(0,we.useRef)(0),Gn=(0,we.useRef)(null),Qn=(0,we.useRef)(null),_n=(0,we.useRef)(!1),_e=Jt(Lt,Bt,Tt,jt);function Zn(ii,ji){if(Et.Z.cancel(Gn.current),!_e(!1,ji)){var Vi=ii;if(!Vi._virtualHandled)Vi._virtualHandled=!0;else return;on.current+=ji,Qn.current=ji,Vt||Vi.preventDefault(),Gn.current=(0,Et.Z)(function(){var Wr=_n.current?10:1;Ce(on.current*Wr,!1),on.current=0})}}function Dn(ii,ji){Ce(ji,!0),Vt||ii.preventDefault()}var ai=(0,we.useRef)(null),vi=(0,we.useRef)(null);function Rn(ii){if(Ut){Et.Z.cancel(vi.current),vi.current=(0,Et.Z)(function(){ai.current=null},2);var ji=ii.deltaX,Vi=ii.deltaY,Wr=ii.shiftKey,pr=ji,mr=Vi;(ai.current==="sx"||!ai.current&&Wr&&Vi&&!ji)&&(pr=Vi,mr=0,ai.current="sx");var Sr=Math.abs(pr),$r=Math.abs(mr);ai.current===null&&(ai.current=kt&&Sr>$r?"x":"y"),ai.current==="y"?Zn(ii,mr):Dn(ii,pr)}}function _i(ii){Ut&&(_n.current=ii.detail===Qn.current)}return[Rn,_i]}function de(Ut,Lt,Bt,Tt){var jt=we.useMemo(function(){return[new Map,[]]},[Ut,Bt.id,Tt]),kt=(0,ke.Z)(jt,2),Ce=kt[0],on=kt[1],Gn=function(_n){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_n,Zn=Ce.get(_n),Dn=Ce.get(_e);if(Zn===void 0||Dn===void 0)for(var ai=Ut.length,vi=on.length;vi<ai;vi+=1){var Rn,_i=Ut[vi],ii=Lt(_i);Ce.set(ii,vi);var ji=(Rn=Bt.get(ii))!==null&&Rn!==void 0?Rn:Tt;if(on[vi]=(on[vi-1]||0)+ji,ii===_n&&(Zn=vi),ii===_e&&(Dn=vi),Zn!==void 0&&Dn!==void 0)break}return{top:on[Zn-1]||0,bottom:on[Dn]}};return Gn}var Ae=ne(42573),De=ne(58698),ve=function(){function Ut(){(0,Ae.Z)(this,Ut),(0,je.Z)(this,"maps",void 0),(0,je.Z)(this,"id",0),(0,je.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,De.Z)(Ut,[{key:"set",value:function(Bt,Tt){this.diffRecords.set(Bt,this.maps[Bt]),this.maps[Bt]=Tt,this.id+=1}},{key:"get",value:function(Bt){return this.maps[Bt]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Ut}(),We=ve;function nn(Ut){var Lt=parseFloat(Ut);return isNaN(Lt)?0:Lt}function an(Ut,Lt,Bt){var Tt=we.useState(0),jt=(0,ke.Z)(Tt,2),kt=jt[0],Ce=jt[1],on=(0,we.useRef)(new Map),Gn=(0,we.useRef)(new We),Qn=(0,we.useRef)(0);function _n(){Qn.current+=1}function _e(){var Dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;_n();var ai=function(){var _i=!1;on.current.forEach(function(ii,ji){if(ii&&ii.offsetParent){var Vi=ii.offsetHeight,Wr=getComputedStyle(ii),pr=Wr.marginTop,mr=Wr.marginBottom,Sr=nn(pr),$r=nn(mr),ar=Vi+Sr+$r;Gn.current.get(ji)!==ar&&(Gn.current.set(ji,ar),_i=!0)}}),_i&&Ce(function(ii){return ii+1})};if(Dn)ai();else{Qn.current+=1;var vi=Qn.current;Promise.resolve().then(function(){vi===Qn.current&&ai()})}}function Zn(Dn,ai){var vi=Ut(Dn),Rn=on.current.get(vi);ai?(on.current.set(vi,ai),_e()):on.current.delete(vi),!Rn!=!ai&&(ai?Lt==null||Lt(Dn):Bt==null||Bt(Dn))}return(0,we.useEffect)(function(){return _n},[]),[Zn,_e,Gn.current,kt]}var In=14/15;function En(Ut,Lt,Bt){var Tt=(0,we.useRef)(!1),jt=(0,we.useRef)(0),kt=(0,we.useRef)(0),Ce=(0,we.useRef)(null),on=(0,we.useRef)(null),Gn,Qn=function(Dn){if(Tt.current){var ai=Math.ceil(Dn.touches[0].pageX),vi=Math.ceil(Dn.touches[0].pageY),Rn=jt.current-ai,_i=kt.current-vi,ii=Math.abs(Rn)>Math.abs(_i);ii?jt.current=ai:kt.current=vi;var ji=Bt(ii,ii?Rn:_i,!1,Dn);ji&&Dn.preventDefault(),clearInterval(on.current),ji&&(on.current=setInterval(function(){ii?Rn*=In:_i*=In;var Vi=Math.floor(ii?Rn:_i);(!Bt(ii,Vi,!0)||Math.abs(Vi)<=.1)&&clearInterval(on.current)},16))}},_n=function(){Tt.current=!1,Gn()},_e=function(Dn){Gn(),Dn.touches.length===1&&!Tt.current&&(Tt.current=!0,jt.current=Math.ceil(Dn.touches[0].pageX),kt.current=Math.ceil(Dn.touches[0].pageY),Ce.current=Dn.target,Ce.current.addEventListener("touchmove",Qn,{passive:!1}),Ce.current.addEventListener("touchend",_n,{passive:!0}))};Gn=function(){Ce.current&&(Ce.current.removeEventListener("touchmove",Qn),Ce.current.removeEventListener("touchend",_n))},(0,An.Z)(function(){return Ut&&Lt.current.addEventListener("touchstart",_e,{passive:!0}),function(){var Zn;(Zn=Lt.current)===null||Zn===void 0||Zn.removeEventListener("touchstart",_e),Gn(),clearInterval(on.current)}},[Ut])}function ui(Ut){return Math.floor(Math.pow(Ut,.5))}function fi(Ut,Lt){var Bt="touches"in Ut?Ut.touches[0]:Ut;return Bt[Lt?"pageX":"pageY"]-window[Lt?"scrollX":"scrollY"]}function ue(Ut,Lt,Bt){we.useEffect(function(){var Tt=Lt.current;if(Ut&&Tt){var jt=!1,kt,Ce,on=function(){Et.Z.cancel(kt)},Gn=function Zn(){on(),kt=(0,Et.Z)(function(){Bt(Ce),Zn()})},Qn=function(Dn){if(!(Dn.target.draggable||Dn.button!==0)){var ai=Dn;ai._virtualHandled||(ai._virtualHandled=!0,jt=!0)}},_n=function(){jt=!1,on()},_e=function(Dn){if(jt){var ai=fi(Dn,!1),vi=Tt.getBoundingClientRect(),Rn=vi.top,_i=vi.bottom;if(ai<=Rn){var ii=Rn-ai;Ce=-ui(ii),Gn()}else if(ai>=_i){var ji=ai-_i;Ce=ui(ji),Gn()}else on()}};return Tt.addEventListener("mousedown",Qn),Tt.ownerDocument.addEventListener("mouseup",_n),Tt.ownerDocument.addEventListener("mousemove",_e),function(){Tt.removeEventListener("mousedown",Qn),Tt.ownerDocument.removeEventListener("mouseup",_n),Tt.ownerDocument.removeEventListener("mousemove",_e),on()}}},[Ut])}var Kt=10;function dn(Ut,Lt,Bt,Tt,jt,kt,Ce,on){var Gn=we.useRef(),Qn=we.useState(null),_n=(0,ke.Z)(Qn,2),_e=_n[0],Zn=_n[1];return(0,An.Z)(function(){if(_e&&_e.times<Kt){if(!Ut.current){Zn(function(Hr){return(0,Me.Z)({},Hr)});return}kt();var Dn=_e.targetAlign,ai=_e.originAlign,vi=_e.index,Rn=_e.offset,_i=Ut.current.clientHeight,ii=!1,ji=Dn,Vi=null;if(_i){for(var Wr=Dn||ai,pr=0,mr=0,Sr=0,$r=Math.min(Lt.length-1,vi),ar=0;ar<=$r;ar+=1){var Yr=jt(Lt[ar]);mr=pr;var kr=Bt.get(Yr);Sr=mr+(kr===void 0?Tt:kr),pr=Sr}for(var no=Wr==="top"?Rn:_i-Rn,Oo=$r;Oo>=0;Oo-=1){var $o=jt(Lt[Oo]),ko=Bt.get($o);if(ko===void 0){ii=!0;break}if(no-=ko,no<=0)break}switch(Wr){case"top":Vi=mr-Rn;break;case"bottom":Vi=Sr-_i+Rn;break;default:{var oo=Ut.current.scrollTop,tr=oo+_i;mr<oo?ji="top":Sr>tr&&(ji="bottom")}}Vi!==null&&Ce(Vi),Vi!==_e.lastTop&&(ii=!0)}ii&&Zn((0,Me.Z)((0,Me.Z)({},_e),{},{times:_e.times+1,targetAlign:ji,lastTop:Vi}))}},[_e,Ut.current]),function(Dn){if(Dn==null){on();return}if(Et.Z.cancel(Gn.current),typeof Dn=="number")Ce(Dn);else if(Dn&&(0,xe.Z)(Dn)==="object"){var ai,vi=Dn.align;"index"in Dn?ai=Dn.index:ai=Lt.findIndex(function(ii){return jt(ii)===Dn.key});var Rn=Dn.offset,_i=Rn===void 0?0:Rn;Zn({times:0,index:ai,offset:_i,originAlign:vi})}}}var Ai=we.forwardRef(function(Ut,Lt){var Bt=Ut.prefixCls,Tt=Ut.rtl,jt=Ut.scrollOffset,kt=Ut.scrollRange,Ce=Ut.onStartMove,on=Ut.onStopMove,Gn=Ut.onScroll,Qn=Ut.horizontal,_n=Ut.spinSize,_e=Ut.containerSize,Zn=Ut.style,Dn=Ut.thumbStyle,ai=Ut.showScrollBar,vi=we.useState(!1),Rn=(0,ke.Z)(vi,2),_i=Rn[0],ii=Rn[1],ji=we.useState(null),Vi=(0,ke.Z)(ji,2),Wr=Vi[0],pr=Vi[1],mr=we.useState(null),Sr=(0,ke.Z)(mr,2),$r=Sr[0],ar=Sr[1],Yr=!Tt,kr=we.useRef(),no=we.useRef(),Oo=we.useState(ai),$o=(0,ke.Z)(Oo,2),ko=$o[0],oo=$o[1],tr=we.useRef(),Hr=function(){ai===!0||ai===!1||(clearTimeout(tr.current),oo(!0),tr.current=setTimeout(function(){oo(!1)},3e3))},Pt=kt-_e||0,so=_e-_n||0,zr=we.useMemo(function(){if(jt===0||Pt===0)return 0;var Ze=jt/Pt;return Ze*so},[jt,Pt,so]),ri=function(yi){yi.stopPropagation(),yi.preventDefault()},pi=we.useRef({top:zr,dragging:_i,pageY:Wr,startTop:$r});pi.current={top:zr,dragging:_i,pageY:Wr,startTop:$r};var Ci=function(yi){ii(!0),pr(fi(yi,Qn)),ar(pi.current.top),Ce(),yi.stopPropagation(),yi.preventDefault()};we.useEffect(function(){var Ze=function(He){He.preventDefault()},yi=kr.current,hi=no.current;return yi.addEventListener("touchstart",Ze,{passive:!1}),hi.addEventListener("touchstart",Ci,{passive:!1}),function(){yi.removeEventListener("touchstart",Ze),hi.removeEventListener("touchstart",Ci)}},[]);var Qi=we.useRef();Qi.current=Pt;var Tr=we.useRef();Tr.current=so,we.useEffect(function(){if(_i){var Ze,yi=function(He){var Le=pi.current,kn=Le.dragging,Bi=Le.pageY,sn=Le.startTop;Et.Z.cancel(Ze);var Yt=kr.current.getBoundingClientRect(),he=_e/(Qn?Yt.width:Yt.height);if(kn){var wn=(fi(He,Qn)-Bi)*he,un=sn;!Yr&&Qn?un-=wn:un+=wn;var Ne=Qi.current,mn=Tr.current,xi=mn?un/mn:0,Mi=Math.ceil(xi*Ne);Mi=Math.max(Mi,0),Mi=Math.min(Mi,Ne),Ze=(0,Et.Z)(function(){Gn(Mi,Qn)})}},hi=function(){ii(!1),on()};return window.addEventListener("mousemove",yi,{passive:!0}),window.addEventListener("touchmove",yi,{passive:!0}),window.addEventListener("mouseup",hi,{passive:!0}),window.addEventListener("touchend",hi,{passive:!0}),function(){window.removeEventListener("mousemove",yi),window.removeEventListener("touchmove",yi),window.removeEventListener("mouseup",hi),window.removeEventListener("touchend",hi),Et.Z.cancel(Ze)}}},[_i]),we.useEffect(function(){return Hr(),function(){clearTimeout(tr.current)}},[jt]),we.useImperativeHandle(Lt,function(){return{delayHidden:Hr}});var Re="".concat(Bt,"-scrollbar"),Oe={position:"absolute",visibility:ko?null:"hidden"},Te={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Qn?(Object.assign(Oe,{height:8,left:0,right:0,bottom:0}),Object.assign(Te,(0,je.Z)({height:"100%",width:_n},Yr?"left":"right",zr))):(Object.assign(Oe,(0,je.Z)({width:8,top:0,bottom:0},Yr?"right":"left",0)),Object.assign(Te,{width:"100%",height:_n,top:zr})),we.createElement("div",{ref:kr,className:Ue()(Re,(0,je.Z)((0,je.Z)((0,je.Z)({},"".concat(Re,"-horizontal"),Qn),"".concat(Re,"-vertical"),!Qn),"".concat(Re,"-visible"),ko)),style:(0,Me.Z)((0,Me.Z)({},Oe),Zn),onMouseDown:ri,onMouseMove:Hr},we.createElement("div",{ref:no,className:Ue()("".concat(Re,"-thumb"),(0,je.Z)({},"".concat(Re,"-thumb-moving"),_i)),style:(0,Me.Z)((0,Me.Z)({},Te),Dn),onMouseDown:Ci}))}),qn=Ai,Ke=20;function yn(){var Ut=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Bt=Ut/Lt*Ut;return isNaN(Bt)&&(Bt=0),Bt=Math.max(Bt,Ke),Math.floor(Bt)}var Sn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],si=[],Bn={overflowY:"auto",overflowAnchor:"none"};function Se(Ut,Lt){var Bt=Ut.prefixCls,Tt=Bt===void 0?"rc-virtual-list":Bt,jt=Ut.className,kt=Ut.height,Ce=Ut.itemHeight,on=Ut.fullHeight,Gn=on===void 0?!0:on,Qn=Ut.style,_n=Ut.data,_e=Ut.children,Zn=Ut.itemKey,Dn=Ut.virtual,ai=Ut.direction,vi=Ut.scrollWidth,Rn=Ut.component,_i=Rn===void 0?"div":Rn,ii=Ut.onScroll,ji=Ut.onVirtualScroll,Vi=Ut.onVisibleChange,Wr=Ut.innerProps,pr=Ut.extraRender,mr=Ut.styles,Sr=Ut.showScrollBar,$r=Sr===void 0?"optional":Sr,ar=(0,ye.Z)(Ut,Sn),Yr=we.useCallback(function(jn){return typeof Zn=="function"?Zn(jn):jn==null?void 0:jn[Zn]},[Zn]),kr=an(Yr,null,null),no=(0,ke.Z)(kr,4),Oo=no[0],$o=no[1],ko=no[2],oo=no[3],tr=!!(Dn!==!1&&kt&&Ce),Hr=we.useMemo(function(){return Object.values(ko.maps).reduce(function(jn,oi){return jn+oi},0)},[ko.id,ko.maps]),Pt=tr&&_n&&(Math.max(Ce*_n.length,Hr)>kt||!!vi),so=ai==="rtl",zr=Ue()(Tt,(0,je.Z)({},"".concat(Tt,"-rtl"),so),jt),ri=_n||si,pi=(0,we.useRef)(),Ci=(0,we.useRef)(),Qi=(0,we.useRef)(),Tr=(0,we.useState)(0),Re=(0,ke.Z)(Tr,2),Oe=Re[0],Te=Re[1],Ze=(0,we.useState)(0),yi=(0,ke.Z)(Ze,2),hi=yi[0],Zi=yi[1],He=(0,we.useState)(!1),Le=(0,ke.Z)(He,2),kn=Le[0],Bi=Le[1],sn=function(){Bi(!0)},Yt=function(){Bi(!1)},he={getKey:Yr};function wn(jn){Te(function(oi){var Pi;typeof jn=="function"?Pi=jn(oi):Pi=jn;var Tn=lr(Pi);return pi.current.scrollTop=Tn,Tn})}var un=(0,we.useRef)({start:0,end:ri.length}),Ne=(0,we.useRef)(),mn=yt(ri,Yr),xi=(0,ke.Z)(mn,1),Mi=xi[0];Ne.current=Mi;var Gi=we.useMemo(function(){if(!tr)return{scrollHeight:void 0,start:0,end:ri.length-1,offset:void 0};if(!Pt){var jn;return{scrollHeight:((jn=Ci.current)===null||jn===void 0?void 0:jn.offsetHeight)||0,start:0,end:ri.length-1,offset:void 0}}for(var oi=0,Pi,Tn,ti,Jn=ri.length,Mn=0;Mn<Jn;Mn+=1){var ci=ri[Mn],Je=Yr(ci),er=ko.get(Je),fr=oi+(er===void 0?Ce:er);fr>=Oe&&Pi===void 0&&(Pi=Mn,Tn=oi),fr>Oe+kt&&ti===void 0&&(ti=Mn),oi=fr}return Pi===void 0&&(Pi=0,Tn=0,ti=Math.ceil(kt/Ce)),ti===void 0&&(ti=ri.length-1),ti=Math.min(ti+1,ri.length-1),{scrollHeight:oi,start:Pi,end:ti,offset:Tn}},[Pt,tr,Oe,ri,oo,kt]),bn=Gi.scrollHeight,Ln=Gi.start,On=Gi.end,Yi=Gi.offset;un.current.start=Ln,un.current.end=On,we.useLayoutEffect(function(){var jn=ko.getRecord();if(jn.size===1){var oi=Array.from(jn.keys())[0],Pi=jn.get(oi),Tn=ri[Ln];if(Tn&&Pi===void 0){var ti=Yr(Tn);if(ti===oi){var Jn=ko.get(oi),Mn=Jn-Ce;wn(function(ci){return ci+Mn})}}}ko.resetRecord()},[bn]);var ki=we.useState({width:0,height:kt}),hn=(0,ke.Z)(ki,2),Vn=hn[0],Fr=hn[1],Ur=function(oi){Fr({width:oi.offsetWidth,height:oi.offsetHeight})},vo=(0,we.useRef)(),Be=(0,we.useRef)(),wi=we.useMemo(function(){return yn(Vn.width,vi)},[Vn.width,vi]),ir=we.useMemo(function(){return yn(Vn.height,bn)},[Vn.height,bn]),li=bn-kt,br=(0,we.useRef)(li);br.current=li;function lr(jn){var oi=jn;return Number.isNaN(br.current)||(oi=Math.min(oi,br.current)),oi=Math.max(oi,0),oi}var xr=Oe<=0,Ar=Oe>=li,qt=hi<=0,$t=hi>=vi,_t=Jt(xr,Ar,qt,$t),Qe=function(){return{x:so?-hi:hi,y:Oe}},le=(0,we.useRef)(Qe()),rn=(0,ie.zX)(function(jn){if(ji){var oi=(0,Me.Z)((0,Me.Z)({},Qe()),jn);(le.current.x!==oi.x||le.current.y!==oi.y)&&(ji(oi),le.current=oi)}});function Wn(jn,oi){var Pi=jn;oi?((0,xn.flushSync)(function(){Zi(Pi)}),rn()):wn(Pi)}function Un(jn){var oi=jn.currentTarget.scrollTop;oi!==Oe&&wn(oi),ii==null||ii(jn),rn()}var mi=function(oi){var Pi=oi,Tn=vi?vi-Vn.width:0;return Pi=Math.max(Pi,0),Pi=Math.min(Pi,Tn),Pi},zn=(0,ie.zX)(function(jn,oi){oi?((0,xn.flushSync)(function(){Zi(function(Pi){var Tn=Pi+(so?-jn:jn);return mi(Tn)})}),rn()):wn(function(Pi){var Tn=Pi+jn;return Tn})}),cn=ce(tr,xr,Ar,qt,$t,!!vi,zn),Yn=(0,ke.Z)(cn,2),Ki=Yn[0],Wi=Yn[1];En(tr,pi,function(jn,oi,Pi,Tn){var ti=Tn;return _t(jn,oi,Pi)?!1:!ti||!ti._virtualHandled?(ti&&(ti._virtualHandled=!0),Ki({preventDefault:function(){},deltaX:jn?oi:0,deltaY:jn?0:oi}),!0):!1}),ue(Pt,pi,function(jn){wn(function(oi){return oi+jn})}),(0,An.Z)(function(){function jn(Pi){var Tn=xr&&Pi.detail<0,ti=Ar&&Pi.detail>0;tr&&!Tn&&!ti&&Pi.preventDefault()}var oi=pi.current;return oi.addEventListener("wheel",Ki,{passive:!1}),oi.addEventListener("DOMMouseScroll",Wi,{passive:!0}),oi.addEventListener("MozMousePixelScroll",jn,{passive:!1}),function(){oi.removeEventListener("wheel",Ki),oi.removeEventListener("DOMMouseScroll",Wi),oi.removeEventListener("MozMousePixelScroll",jn)}},[tr,xr,Ar]),(0,An.Z)(function(){if(vi){var jn=mi(hi);Zi(jn),rn({x:jn})}},[Vn.width,vi]);var vn=function(){var oi,Pi;(oi=vo.current)===null||oi===void 0||oi.delayHidden(),(Pi=Be.current)===null||Pi===void 0||Pi.delayHidden()},Ht=dn(pi,ri,ko,Ce,Yr,function(){return $o(!0)},wn,vn);we.useImperativeHandle(Lt,function(){return{nativeElement:Qi.current,getScrollInfo:Qe,scrollTo:function(oi){function Pi(Tn){return Tn&&(0,xe.Z)(Tn)==="object"&&("left"in Tn||"top"in Tn)}Pi(oi)?(oi.left!==void 0&&Zi(mi(oi.left)),Ht(oi.top)):Ht(oi)}}}),(0,An.Z)(function(){if(Vi){var jn=ri.slice(Ln,On+1);Vi(jn,ri)}},[Ln,On,ri]);var Ii=de(ri,Yr,ko,Ce),Mr=pr==null?void 0:pr({start:Ln,end:On,virtual:Pt,offsetX:hi,offsetY:Yi,rtl:so,getSize:Ii}),Rr=ct(ri,Ln,On,vi,hi,Oo,_e,he),yr=null;kt&&(yr=(0,Me.Z)((0,je.Z)({},Gn?"height":"maxHeight",kt),Bn),tr&&(yr.overflowY="hidden",vi&&(yr.overflowX="hidden"),kn&&(yr.pointerEvents="none")));var Ei={};return so&&(Ei.dir="rtl"),we.createElement("div",(0,bt.Z)({ref:Qi,style:(0,Me.Z)((0,Me.Z)({},Qn),{},{position:"relative"}),className:zr},Ei,ar),we.createElement(Pe.Z,{onResize:Ur},we.createElement(_i,{className:"".concat(Tt,"-holder"),style:yr,ref:pi,onScroll:Un,onMouseEnter:vn},we.createElement(et,{prefixCls:Tt,height:bn,offsetX:hi,offsetY:Yi,scrollWidth:vi,onInnerResize:$o,ref:Ci,innerProps:Wr,rtl:so,extra:Mr},Rr))),Pt&&bn>kt&&we.createElement(qn,{ref:vo,prefixCls:Tt,scrollOffset:Oe,scrollRange:bn,rtl:so,onScroll:Wn,onStartMove:sn,onStopMove:Yt,spinSize:ir,containerSize:Vn.height,style:mr==null?void 0:mr.verticalScrollBar,thumbStyle:mr==null?void 0:mr.verticalScrollBarThumb,showScrollBar:$r}),Pt&&vi>Vn.width&&we.createElement(qn,{ref:Be,prefixCls:Tt,scrollOffset:hi,scrollRange:vi,rtl:so,onScroll:Wn,onStartMove:sn,onStopMove:Yt,spinSize:wi,containerSize:Vn.width,horizontal:!0,style:mr==null?void 0:mr.horizontalScrollBar,thumbStyle:mr==null?void 0:mr.horizontalScrollBarThumb,showScrollBar:$r}))}var Fe=we.forwardRef(Se);Fe.displayName="List";var pn=Fe,Cn=pn},93314:function(Pn){"use strict";Pn.exports="data:image/png;base64,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"},96908:function(Pn){"use strict";Pn.exports="data:image/png;base64,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"},57177:function(Pn){"use strict";Pn.exports="data:image/png;base64,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"},81378:function(Pn){"use strict";Pn.exports="data:image/png;base64,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"},16722:function(Pn,gi,ne){"use strict";ne.d(gi,{Z:function(){return Ue}});const bt=Pe=>typeof Pe=="object"&&Pe!=null&&Pe.nodeType===1,xe=(Pe,ie)=>(!ie||Pe!=="hidden")&&Pe!=="visible"&&Pe!=="clip",Me=(Pe,ie)=>{if(Pe.clientHeight<Pe.scrollHeight||Pe.clientWidth<Pe.scrollWidth){const An=getComputedStyle(Pe,null);return xe(An.overflowY,ie)||xe(An.overflowX,ie)||(we=>{const xn=(Dt=>{if(!Dt.ownerDocument||!Dt.ownerDocument.defaultView)return null;try{return Dt.ownerDocument.defaultView.frameElement}catch(et){return null}})(we);return!!xn&&(xn.clientHeight<we.scrollHeight||xn.clientWidth<we.scrollWidth)})(Pe)}return!1},je=(Pe,ie,An,we,xn,Dt,et,nt)=>Dt<Pe&&et>ie||Dt>Pe&&et<ie?0:Dt<=Pe&&nt<=An||et>=ie&&nt>=An?Dt-Pe-we:et>ie&&nt<An||Dt<Pe&&nt>An?et-ie+xn:0,ke=Pe=>{const ie=Pe.parentElement;return ie==null?Pe.getRootNode().host||null:ie},ye=(Pe,ie)=>{var An,we,xn,Dt;if(typeof document=="undefined")return[];const{scrollMode:et,block:nt,inline:ct,boundary:lt,skipOverflowHiddenElements:gt}=ie,yt=typeof lt=="function"?lt:qn=>qn!==lt;if(!bt(Pe))throw new TypeError("Invalid target");const Et=document.scrollingElement||document.documentElement,Nt=[];let Vt=Pe;for(;bt(Vt)&&yt(Vt);){if(Vt=ke(Vt),Vt===Et){Nt.push(Vt);break}Vt!=null&&Vt===document.body&&Me(Vt)&&!Me(document.documentElement)||Vt!=null&&Me(Vt,gt)&&Nt.push(Vt)}const Jt=(we=(An=window.visualViewport)==null?void 0:An.width)!=null?we:innerWidth,ce=(Dt=(xn=window.visualViewport)==null?void 0:xn.height)!=null?Dt:innerHeight,{scrollX:de,scrollY:Ae}=window,{height:De,width:ve,top:We,right:nn,bottom:an,left:In}=Pe.getBoundingClientRect(),{top:En,right:ui,bottom:fi,left:ue}=(qn=>{const Ke=window.getComputedStyle(qn);return{top:parseFloat(Ke.scrollMarginTop)||0,right:parseFloat(Ke.scrollMarginRight)||0,bottom:parseFloat(Ke.scrollMarginBottom)||0,left:parseFloat(Ke.scrollMarginLeft)||0}})(Pe);let Kt=nt==="start"||nt==="nearest"?We-En:nt==="end"?an+fi:We+De/2-En+fi,dn=ct==="center"?In+ve/2-ue+ui:ct==="end"?nn+ui:In-ue;const Ai=[];for(let qn=0;qn<Nt.length;qn++){const Ke=Nt[qn],{height:yn,width:Sn,top:si,right:Bn,bottom:Se,left:Fe}=Ke.getBoundingClientRect();if(et==="if-needed"&&We>=0&&In>=0&&an<=ce&&nn<=Jt&&(Ke===Et&&!Me(Ke)||We>=si&&an<=Se&&In>=Fe&&nn<=Bn))return Ai;const pn=getComputedStyle(Ke),Cn=parseInt(pn.borderLeftWidth,10),Ut=parseInt(pn.borderTopWidth,10),Lt=parseInt(pn.borderRightWidth,10),Bt=parseInt(pn.borderBottomWidth,10);let Tt=0,jt=0;const kt="offsetWidth"in Ke?Ke.offsetWidth-Ke.clientWidth-Cn-Lt:0,Ce="offsetHeight"in Ke?Ke.offsetHeight-Ke.clientHeight-Ut-Bt:0,on="offsetWidth"in Ke?Ke.offsetWidth===0?0:Sn/Ke.offsetWidth:0,Gn="offsetHeight"in Ke?Ke.offsetHeight===0?0:yn/Ke.offsetHeight:0;if(Et===Ke)Tt=nt==="start"?Kt:nt==="end"?Kt-ce:nt==="nearest"?je(Ae,Ae+ce,ce,Ut,Bt,Ae+Kt,Ae+Kt+De,De):Kt-ce/2,jt=ct==="start"?dn:ct==="center"?dn-Jt/2:ct==="end"?dn-Jt:je(de,de+Jt,Jt,Cn,Lt,de+dn,de+dn+ve,ve),Tt=Math.max(0,Tt+Ae),jt=Math.max(0,jt+de);else{Tt=nt==="start"?Kt-si-Ut:nt==="end"?Kt-Se+Bt+Ce:nt==="nearest"?je(si,Se,yn,Ut,Bt+Ce,Kt,Kt+De,De):Kt-(si+yn/2)+Ce/2,jt=ct==="start"?dn-Fe-Cn:ct==="center"?dn-(Fe+Sn/2)+kt/2:ct==="end"?dn-Bn+Lt+kt:je(Fe,Bn,Sn,Cn,Lt+kt,dn,dn+ve,ve);const{scrollLeft:Qn,scrollTop:_n}=Ke;Tt=Gn===0?0:Math.max(0,Math.min(_n+Tt/Gn,Ke.scrollHeight-yn/Gn+Ce)),jt=on===0?0:Math.max(0,Math.min(Qn+jt/on,Ke.scrollWidth-Sn/on+kt)),Kt+=_n-Tt,dn+=Qn-jt}Ai.push({el:Ke,top:Tt,left:jt})}return Ai},pe=Pe=>Pe===!1?{block:"end",inline:"nearest"}:(ie=>ie===Object(ie)&&Object.keys(ie).length!==0)(Pe)?Pe:{block:"start",inline:"nearest"};function Ue(Pe,ie){if(!Pe.isConnected||!(xn=>{let Dt=xn;for(;Dt&&Dt.parentNode;){if(Dt.parentNode===document)return!0;Dt=Dt.parentNode instanceof ShadowRoot?Dt.parentNode.host:Dt.parentNode}return!1})(Pe))return;const An=(xn=>{const Dt=window.getComputedStyle(xn);return{top:parseFloat(Dt.scrollMarginTop)||0,right:parseFloat(Dt.scrollMarginRight)||0,bottom:parseFloat(Dt.scrollMarginBottom)||0,left:parseFloat(Dt.scrollMarginLeft)||0}})(Pe);if((xn=>typeof xn=="object"&&typeof xn.behavior=="function")(ie))return ie.behavior(ye(Pe,ie));const we=typeof ie=="boolean"||ie==null?void 0:ie.behavior;for(const{el:xn,top:Dt,left:et}of ye(Pe,pe(ie))){const nt=Dt-An.top+An.bottom,ct=et-An.left+An.right;xn.scroll({top:nt,left:ct,behavior:we})}}}}]);
|